9f4b5e5e0c423ab8ecc542764ec9157be714479b
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-01 Joel Brobecker <brobecker@adacore.com>
2
3 * ada-lang.c (symbol_list_obstack): Delete.
4 (resolve_subexp): Make sure "candidates" gets xfree'ed.
5 (ada_lookup_symbol_list_worker): Remove the limitation that
6 the result is only good until the next call, now making it
7 the responsibility of the caller to free the result when no
8 longer needed. Adjust the function's intro comment accordingly.
9 (ada_lookup_symbol_list): Adjust the function's intro comment.
10 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
11 (ada_lookup_encoded_symbol, get_var_value): Likewise.
12 (_initialize_ada_language): Remove symbol_list_obstack
13 initialization.
14 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
15 (write_var_or_type, write_name_assoc): Likewise.
16
17 2017-12-01 Andrew Cagney <cagney@redhat.com>
18 Joel Brobecker <brobecker@adacore.com>
19 Sergio Durigan Junior <sergiodj@redhat.com>
20
21 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
22 feature.
23 * coffread.c (coff_symfile_read): Do not map over sections with
24 'coff_locate_sections' if readnever is on.
25 * dwarf2read.c (dwarf2_has_info): Return 0 if
26 readnever is on.
27 * elfread.c (elf_symfile_read): Do not map over sections with
28 'elf_locate_sections' if readnever is on.
29 * main.c (validate_readnow_readnever): New function.
30 (captured_main_1): Add support for --readnever.
31 (print_gdb_help): Document --readnever.
32 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
33 flag.
34 * symfile.c (readnever_symbol_files): New global.
35 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
36 'READNEVER_SYMBOL_FILES' is set.
37 (validate_readnow_readnever): New function.
38 (symbol_file_command): Handle '-readnever' option.
39 Call 'validate_readnow_readnever'.
40 (add_symbol_file_command): Handle '-readnever' option.
41 Call 'validate_readnow_readnever'.
42 (_initialize_symfile): Document new '-readnever' option for
43 both 'symbol-file' and 'add-symbol-file' commands.
44 * top.h (readnever_symbol_files): New extern global.
45 * xcoffread.c (xcoff_initial_scan): Do not read debug
46 information if readnever is on.
47
48 2017-12-01 Tom Tromey <tom@tromey.com>
49
50 * Makefile.in (all_deps_files): New variable.
51 Include .Po files using all_deps_files.
52
53 2017-12-01 Joel Brobecker <brobecker@adacore.com>
54
55 * MAINTAINERS: Update list of maintainers, moving those who
56 stepped down or became inactive to the "Past Maintainers"
57 section.
58
59 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
60
61 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
62 sys/proc.h.
63 (NEW_PROC_API): Remove.
64 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
65 Likewise.
66 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
67 * configure: Regenerate.
68 * config.in: Regenerate.
69 * gdbserver/configure: Regenerate.
70 * gdbserver/config.in: Regenerate.
71
72 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
73 NEW_PROC_API test.
74 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
75
76 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
77
78 * proc-api.c: Remove !NEW_PROC_API support.
79 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
80 Remove tests for macros always defined on Solaris.
81 * proc-events.c: Remove !NEW_PROC_API support.
82 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
83 HAVE_SYS_USER_H tests.
84 (init_syscall_table): Remove non-Solaris syscalls.
85 Remove tests for syscalls present on all Solaris versions.
86 Add missing Solaris 10+ syscalls.
87 (signal_table): Remove non-Solaris signals.
88 Remove tests for signals present on all Solaris versions.
89 (fault_table): Remove non-Solaris faults.
90 Remove tests for faults present on all Solaris versions.
91 * proc-flags.c: Remove !NEW_PROC_API support.
92 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
93 Remove non-Solaris flags.
94 * proc-why.c: Remove !NEW_PROC_API support.
95 (pr_why_table): Remove meaningless comments.
96 Remove tests for reasons present on all Solaris versions.
97 Remove OSF/1 cases.
98 (proc_prettyfprint_why): Likewise.
99
100 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
101 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
102 Remove WA_READ test, IRIX watchpoint support.
103 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
104 types. Change users.
105 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
106 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
107 Change callers.
108 Remove CTL_PROC_NAME_FMT tests.
109 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
110 users.
111 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
112 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
113 (proc_modify_flag): Replace GDBRESET by PCUNSET.
114 Remove PR_ASYNC, PR_KLC tests.
115 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
116 (proc_parent_pid): Remove PCWATCH etc. tests.
117 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
118 Remove PCAGENT test.
119 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
120 Remove SYS_lwpcreate || SYS_lwp_create test.
121 (proc_get_current_thread): Likewise.
122 [PIOCNTHR && PIOCTLIST]: Remove.
123 [PIOCLSTATUS]: Remove.
124 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
125 [PRFS_STOPEXEC]: Remove.
126 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
127 (syscall_is_exit): Likewise.
128 (syscall_is_exec): Likewise.
129 (syscall_is_lwp_create): Likewise.
130 Remove SYS_syssgi support.
131 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
132 [SYS_syssgi]: Remove.
133 Remove non-Solaris cases, conditionals.
134 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
135 Remove.
136 (procfs_init_inferior) [SYS_syssgi]: Remove.
137 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
138 (procfs_inferior_created) [SYS_syssgi]: Remove.
139 (procfs_set_watchpoint): Remove !AIX5 test.
140 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
141 case.
142 (mappingflags) [MA_PHYS]: Remove.
143 (info_mappings_callback): Remove PCAGENT test.
144 Remove PIOCOPENLWP || PCAGENT test.
145
146 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
147
148 * sol-thread.c (info_solthreads): Constify args.
149 Cast args to void *.
150
151 2017-11-29 John Baldwin <jhb@FreeBSD.org>
152
153 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
154
155 2017-11-29 Joel Brobecker <brobecker@adacore.com>
156
157 * ada-lang.c (to_fixed_range_type): Make sure that the size
158 of the range type being returned is the same as the size
159 of the range type being fixed.
160
161 2017-11-29 Pedro Alves <palves@redhat.com>
162
163 PR c++/19436
164 * NEWS: Mention setting breakpoints on functions with C++ ABI
165 tags.
166 * completer.h (completion_match_for_lcd) <match,
167 mark_ignored_range>: New methods.
168 <finish>: Consider ignored ranges.
169 <clear>: Clear ignored ranges.
170 <m_ignored_ranges, m_finished_storage>: New fields.
171 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
172 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
173 completion_match_for_lcd pointer to strncmp_iw_with_mode.
174 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
175 * language.c (default_symbol_name_matcher): Pass the
176 completion_match_for_lcd pointer to strncmp_iw_with_mode.
177 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
178 * utils.c (skip_abi_tag): New function.
179 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
180 Handle ABI tags.
181 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
182 parameter.
183
184 2017-11-29 Pedro Alves <palves@redhat.com>
185
186 PR c++/19436
187 * NEWS: Mention setting breakpoints on functions with C++ ABI
188 tags.
189 * completer.h (completion_match_for_lcd) <match,
190 mark_ignored_range>: New methods.
191 <finish>: Consider ignored ranges.
192 <clear>: Clear ignored ranges.
193 <m_ignored_ranges, m_finished_storage>: New fields.
194 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
195 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
196 completion_match_for_lcd pointer to strncmp_iw_with_mode.
197 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
198 * language.c (default_symbol_name_matcher): Pass the
199 completion_match_for_lcd pointer to strncmp_iw_with_mode.
200 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
201 * utils.c (skip_abi_tag): New function.
202 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
203 Handle ABI tags.
204 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
205 parameter.
206
207 2017-11-29 Pedro Alves <palves@redhat.com>
208
209 * NEWS: Mention that breakpoints on C++ functions are now set on
210 on all namespaces/classes by default, and mention "break
211 -qualified".
212 * ax-gdb.c (agent_command_1): Adjust to pass a
213 symbol_name_match_type to new_linespec_location.
214 * breakpoint.c (parse_breakpoint_sals): Adjust to
215 get_linespec_location's return type change.
216 (strace_marker_create_sals_from_location): Adjust to pass a
217 symbol_name_match_type to new_linespec_location.
218 (strace_marker_decode_location): Adjust to get_linespec_location's
219 return type change.
220 (strace_command): Adjust to pass a symbol_name_match_type to
221 new_linespec_location.
222 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
223 mention "-qualified".
224 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
225 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
226 enumerator.
227 (complete_address_and_linespec_locations): New parameter
228 'match_type'. Pass it down.
229 (explicit_options): Add "-qualified".
230 (collect_explicit_location_matches): Pass the requested match type
231 to the linespec completers. Handle MATCH_QUALIFIED.
232 (location_completer): Handle "-qualified" combined with linespecs.
233 * cp-support.c (cp_search_name_hash): New.
234 (cp_symbol_name_matches_1): Implement wild matching for C++.
235 (cp_fq_symbol_name_matches): Reimplement.
236 (cp_get_symbol_name_matcher): Return different matchers depending
237 on the lookup name's match type.
238 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
239 * cp-support.h (cp_search_name_hash): New declaration.
240 * dwarf2read.c
241 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
242 symbols.
243 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
244 tests.
245 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
246 pass a symbol_name_match_type to new_linespec_location.
247 * linespec.c (linespec_parse_basic): Lookup function symbols using
248 the parser's symbol name match type.
249 (convert_explicit_location_to_linespec): New
250 symbol_name_match_type parameter. Pass it down to
251 find_linespec_symbols.
252 (convert_explicit_location_to_sals): Pass the location's name
253 match type to convert_explicit_location_to_linespec.
254 (parse_linespec): New match_type parameter. Save it in the
255 parser.
256 (linespec_parser_new): Default to symbol_name_match_type::WILD.
257 (linespec_complete_function): New symbol_name_match_type
258 parameter. Use it.
259 (complete_linespec_component): Pass down the parser's recorded
260 name match type.
261 (linespec_complete_label): New symbol_name_match_type parameter.
262 Use it.
263 (linespec_complete): New symbol_name_match_type parameter. Save
264 it in the parser and pass it down. Adjust to
265 get_linespec_location's prototype change.
266 (find_function_symbols, find_linespec_symbols): New
267 symbol_name_match_type parameter. Pass it down instead of
268 assuming symbol_name_match_type::WILD.
269 * linespec.h (linespec_complete, linespec_complete_function)
270 (linespec_complete_label): New symbol_name_match_type parameter.
271 * location.c (event_location::linespec_location): Now a struct
272 linespec_location.
273 (EL_LINESPEC): Adjust.
274 (initialize_explicit_location): Default to
275 symbol_name_match_type::WILD.
276 (new_linespec_location): New symbol_name_match_type parameter.
277 Record it in the location.
278 (get_linespec_location): Now returns a struct linespec_location.
279 (new_explicit_location): Also copy func_name_match_type.
280 (explicit_to_string_internal)
281 (string_to_explicit_location): Handle "-qualified".
282 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
283 Copy symbol_name_match_type fields.
284 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
285 type change.
286 (event_location_to_string): Adjust to LINESPEC_LOCATION type
287 change. Handle "-qualfied".
288 (string_to_explicit_location): Handle "-qualified".
289 (string_to_event_location_basic): New symbol_name_match_type
290 parameter. Pass it down.
291 (string_to_event_location): Handle "-qualified".
292 * location.h (struct linespec_location): New.
293 (explicit_location::func_name_match_type): New field.
294 (new_linespec_location): Now returns a const linespec_location *.
295 (string_to_event_location_basic): New symbol_name_match_type
296 parameter.
297 (explicit_completion_info::saw_explicit_location_option): New
298 field.
299 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
300 symbol_name_match_type to new_linespec_location.
301 * python/py-breakpoint.c (bppy_init): Likewise.
302 * python/python.c (gdbpy_decode_line): Likewise.
303
304 2017-11-29 Pedro Alves <palves@redhat.com>
305
306 * ada-lang.c (ada_lookup_name_info::matches): Change type of
307 parameter from completion_match to completion_match_result.
308 Adjust.
309 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
310 * completer.c (completion_tracker::maybe_add_completion): Add
311 match_for_lcd parameter and use it.
312 (completion_tracker::add_completion): Likewise.
313 * completer.h (class completion_match_for_lcd): New class.
314 (completion_match_result::match_for_lcd): New field.
315 (completion_match_result::set_match): New method.
316 (completion_tracker): Add comments.
317 (completion_tracker::add_completion): Add match_for_lcd parameter.
318 (completion_tracker::reset_completion_match_result): Reset
319 match_for_lcd too.
320 (completion_tracker::maybe_add_completion): Add match_for_lcd
321 parameter.
322 (completion_tracker::m_lowest_common_denominator_unique): Extend
323 comments.
324 * cp-support.c (cp_symbol_name_matches_1)
325 (cp_fq_symbol_name_matches): Change type of parameter from
326 completion_match to completion_match_result. Adjust.
327 * language.c (default_symbol_name_matcher): Change type of
328 parameter from completion_match to completion_match_result.
329 Adjust.
330 * language.h (completion_match_for_lcd): Forward declare.
331 (default_symbol_name_matcher): Change type of parameter from
332 completion_match to completion_match_result.
333 * symtab.c (compare_symbol_name): Adjust.
334 (completion_list_add_name): Pass the match_for_lcd to the tracker.
335 * symtab.h (ada_lookup_name_info::matches): Change type of
336 parameter from completion_match to completion_match_result.
337 (symbol_name_matcher_ftype): Likewise, and update comments.
338
339 2017-11-29 Pedro Alves <palves@redhat.com>
340
341 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
342 * minsyms.c (msymbol_is_text): Delete.
343 (msymbol_is_function): New function.
344 * minsyms.h (msymbol_is_text): Delete.
345 (msymbol_is_function): New declaration.
346 * symtab.c (find_function_alias_target): Use msymbol_is_function.
347
348 2017-11-29 Tom Tromey <tom@tromey.com>
349
350 * Makefile.in (distclean): Handle the case where rmdir fails.
351
352 2017-11-29 Tom Tromey <tom@tromey.com>
353
354 * symfile.c (_initialize_symfile): Update usage text for
355 add-symbol-file, symbol-file, load.
356
357 2017-11-29 Tom Tromey <tom@tromey.com>
358
359 * symfile.c (add_symbol_file_command): Error if some arguments to
360 -s are missing. Change unrecognized-argument error message.
361 (_initialize_symfile): Fix usage text for add-symbol-file.
362
363 2017-11-27 Tom Tromey <tom@tromey.com>
364
365 * Makefile.in (REMOTE_OBS): Remove.
366 (SFILES): Remove remote sources.
367 (COMMON_SFILES): Add remote sources.
368 (ALLDEPFILES): Remove dcache.c.
369
370 2017-11-27 Tom Tromey <tom@tromey.com>
371
372 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
373 variables.
374 (SFILES): Use SUBDIR_TARGET_SRCS.
375 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
376 (CONFIG_SRC_SUBDIR): Add target.
377 (%.o): Remove target rule.
378
379 2017-11-27 Tom Tromey <tom@tromey.com>
380
381 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
382 registry.o, thread-fsm.o, debug.o.
383 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
384 thread-fsm.c, debug.c.
385
386 2017-11-27 Tom Tromey <tom@tromey.com>
387
388 * Makefile.in (COMMON_SFILES): New.
389 (SFILES): Move some entries to COMMON_SFILES.
390 (COMMON_OBS): Use COMMON_SFILES.
391
392 2017-11-27 Tom Tromey <tom@tromey.com>
393
394 * Makefile.in (YYFILES): Update comment.
395 (YYOBJ): Redefine.
396
397 2017-11-27 Tom Tromey <tom@tromey.com>
398
399 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
400 (CONFIG_SRC_SUBDIR): Add python.
401 (%.o): Remove python rule.
402 (python/%.o): New rule.
403 * configure: Rebuild.
404 * configure.ac (CONFIG_OBS): Refer to python/python.o
405
406 2017-11-27 Tom Tromey <tom@tromey.com>
407
408 * configure: Rebuild.
409 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
410 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
411 (CONFIG_SRC_SUBDIR): Add guile.
412 (%.o): Remove guile rule.
413
414 2017-11-27 Tom Tromey <tom@tromey.com>
415
416 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
417 (%.o): Remove unittests rule.
418 (CONFIG_SRC_SUBDIR): Add unittests.
419
420 2017-11-27 Tom Tromey <tom@tromey.com>
421
422 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
423 (CONFIG_SRC_SUBDIR): Add tui.
424 (%.o): Remove tui rule.
425
426 2017-11-27 Tom Tromey <tom@tromey.com>
427
428 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
429 (%.o): Remove compile rule.
430 (CONFIG_SRC_SUBDIR): Add compile.
431
432 2017-11-27 Tom Tromey <tom@tromey.com>
433
434 * Makefile.in (SUBDIR_MI_OBS): Redefine.
435 (%.o): Remove mi rule.
436 (CONFIG_SRC_SUBDIR): Add mi.
437 (COMMON_OBS): Use mi/mi-common.o
438
439 2017-11-27 Tom Tromey <tom@tromey.com>
440
441 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
442 (%.o): Remove cli rule.
443 (CONFIG_SRC_SUBDIR): Add cli.
444
445 2017-11-27 Tom Tromey <tom@tromey.com>
446
447 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
448 * configure: Rebuild.
449 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
450 (CONFIG_DEP_SUBDIR): New variable.
451 (%.o): Add order-only dependency.
452 ($(CONFIG_DEP_SUBDIR)): New target.
453
454 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
455
456 PR gdb/21945
457 * findcmd.c (_initialize_mem_search): Update find command help
458 text.
459
460 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
461
462 * python/python.c (do_start_initialization): Change progname
463 type to gdb::unique_xmalloc_ptr. Release the pointer when using
464 Python 2.
465
466 2017-11-26 Tom Tromey <tom@tromey.com>
467
468 * common/format.h: Add include guards.
469
470 2017-11-26 Tom Tromey <tom@tromey.com>
471
472 * nat/linux-personality.h (class
473 maybe_disable_address_space_randomization): New class.
474 (maybe_disable_address_space_randomization): Don't declare
475 function.
476 * nat/linux-personality.c (restore_personality)
477 (make_disable_asr_cleanup): Remove.
478 (maybe_disable_address_space_randomization): Now a constructor.
479 (~maybe_disable_address_space_randomization): New destructor.
480 * linux-nat.c (linux_nat_create_inferior): Update.
481
482 2017-11-26 Tom Tromey <tom@tromey.com>
483
484 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
485
486 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
487
488 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
489 "cooked" register. Access only first four bytes of branch target
490 registers.
491
492 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
493
494 PR gdb/22491
495 * stap-probe.c (relocate_address): New function.
496 (stap_probe::get_relocated_address): Use 'relocate_address'.
497 (stap_probe::set_semaphore): Use 'relocate_address' and pass
498 'm_sem_addr'.
499 (stap_probe::clear_semaphore): Likewise.
500
501 2017-11-25 Pedro Alves <palves@redhat.com>
502
503 * dictionary.c: Include "safe-ctype.h".
504 * minsyms.c: Include "safe-ctype.h".
505 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
506
507 2017-11-25 Pedro Alves <palves@redhat.com>
508
509 * completer.c (complete_line_internal_1): Skip spaces until the
510 start of the command.
511
512 2017-11-24 Pedro Alves <palves@redhat.com>
513
514 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
515 cp_fq_symbol_name_matches. Pass language_cplus to
516 strncmp_with_mode.
517 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
518 (selftests::test_cp_symbol_name_cmp): New.
519 (_initialize_cp_support): Register "cp_symbol_name_matches"
520 selftests.
521 * language.c (default_symbol_name_matcher): Pass language_minimal
522 to strncmp_iw_with_mode.
523 * utils.c: Include "cp-support.h" and <algorithm>.
524 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
525 (cp_is_operator): New functions.
526 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
527 skip whitespace in the symbol name when the lookup name doesn't
528 have spaces, and vice versa.
529 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
530 * utils.h (strncmp_iw_with_mode): Add language parameter.
531
532 2017-11-24 Joel Brobecker <brobecker@adacore.com>
533
534 * ada-lang.c (ada_exception_message_1, ada_exception_message):
535 New functions.
536 (print_it_exception): If available, display the exception
537 message as well.
538 * NEWS: Document new feature.
539
540 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
541
542 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
543
544 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
545
546 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
547 (dtrace_probe::is_enabled, dtrace_probe::enable)
548 (dtrace_probe::disable): Remove keyword 'struct' at for-range
549 variable
550 * probe.c (gen_ui_out_table_header_info)
551 (print_ui_out_not_applicables): Remove keyword 'struct' at
552 for-range variable
553
554 2017-11-24 Alan Hayward <alan.hayward@arm.com>
555
556 * configure.tgt: Add arch/aarch64.o
557
558 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
559
560 * common/common-utils.h: Include poison.h.
561 (xfree): Remove declaration, add definition with static_assert.
562 * common/common-utils.c (xfree): Remove.
563 * common/poison.h (IsMallocatable): Define.
564 (IsFreeable): Define.
565 (free): Delete for non-freeable types.
566 (xnew): New.
567 (XNEW): Undef and redefine.
568 (xcnew): New.
569 (XCNEW): Undef and redefine.
570 (xdelete): New.
571 (XDELETE): Undef and redefine.
572 (xnewvec): New.
573 (XNEWVEC): Undef and redefine.
574 (xcnewvec): New.
575 (XCNEWVEC): Undef and redefine.
576 (xresizevec): New.
577 (XRESIZEVEC): Undef and redefine.
578 (xdeletevec): New.
579 (XDELETEVEC): Undef and redefine.
580 (xnewvar): New.
581 (XNEWVAR): Undef and redefine.
582 (xcnewvar): New.
583 (XCNEWVAR): Undef and redefine.
584 (xresizevar): New.
585 (XRESIZEVAR): Undef and redefine.
586
587 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * gdbthread.h (private_thread_info): Define structure type, add
590 virtual pure destructor.
591 (thread_info) <priv>: Change type to unique_ptr.
592 <private_dtor>: Remove.
593 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
594 (private_thread_info::~private_thread_info): Provide default
595 implementation.
596 (thread_info::~thread_info): Don't call private_dtor nor
597 manually free priv.
598 * aix-thread.c (private_thread_info): Rename to ...
599 (aix_thread_info): ... this.
600 (get_aix_thread_info): New.
601 (sync_threadlists): Adjust.
602 (iter_tid): Adjust.
603 (aix_thread_resume): Adjust.
604 (aix_thread_fetch_registers): Adjust.
605 (aix_thread_store_registers): Adjust.
606 (aix_thread_extra_thread_info): Adjust.
607 * darwin-nat.h (private_thread_info): Rename to ...
608 (darwin_thread_info): ... this.
609 (get_darwin_thread_info): New.
610 * darwin-nat.c (darwin_init_thread_list): Adjust.
611 (darwin_check_new_threads): Adjust.
612 (thread_info_from_private_thread_info): Adjust.
613 * linux-thread-db.c (private_thread_info): Rename to ...
614 (thread_db_thread_info): ... this, initialize fields.
615 (get_thread_db_thread_info): New.
616 <dying>: Change type to bool.
617 (update_thread_state): Adjust to type rename.
618 (record_thread): Adjust to type rename an use of unique_ptr.
619 (thread_db_pid_to_str): Likewise.
620 (thread_db_extra_thread_info): Likewise.
621 (thread_db_thread_handle_to_thread_info): Likewise.
622 (thread_db_get_thread_local_address): Likewise.
623 * nto-tdep.h (private_thread_info): Rename to ...
624 (nto_thread_info): ... this, initialize fields.
625 (get_nto_thread_info): New.
626 <name>: Change type to std::string.
627 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
628 use of unique_ptr.
629 * nto-procfs.c (update_thread_private_data_name): Adjust to
630 std::string change, allocate nto_private_thread_info with new.
631 (update_thread_private_data): Adjust to unique_ptr.
632 * remote.c (private_thread_info): Rename to ...
633 (remote_thread_info): ... this, initialize data members with
634 default values.
635 <extra, name>: Change type to std::string.
636 <thread_handle>: Change type to non-pointer.
637 (free_private_thread_info): Remove.
638 (get_private_info_thread): Rename to...
639 (get_remote_thread_info): ... this, change return type, adjust to
640 use of unique_ptr, use remote_thread_info constructor.
641 (remote_add_thread): Adjust.
642 (get_private_info_ptid): Rename to...
643 (get_remote_thread_info): ...this, change return type.
644 (remote_thread_name): Use get_remote_thread_info, adjust to
645 change to std::string.
646 (struct thread_item) <~thread_item>: Remove.
647 <thread_handle>: Make non pointer.
648 (start_thread): Adjust to thread_item::thread_handle type
649 change.
650 (remote_update_thread_list): Adjust to type name change, move
651 strings from temporary to long-lived object instead of
652 duplicating.
653 (remote_threads_extra_info): Use get_remote_thread_info.
654 (process_initial_stop_replies): Likewise.
655 (resume_clear_thread_private_info): Likewise.
656 (remote_resume): Adjust to type name change.
657 (remote_commit_resume): Use get_remote_thread_info.
658 (process_stop_reply): Adjust to type name change.
659 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
660 (remote_stopped_by_hw_breakpoint): Likewise.
661 (remote_stopped_by_watchpoint): Likewise.
662 (remote_stopped_data_address): Likewise.
663 (remote_core_of_thread): Likewise.
664 (remote_thread_handle_to_thread_info): Use
665 get_private_info_thread, adjust to thread_handle field type
666 change.
667
668 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
669
670 * remote.c (struct thread_item): Add constructor, disable copy
671 construction and copy assignment, define default move
672 construction and move assignment.
673 <extra, name>: Change type to std::string.
674 <core>: Initialize.
675 <thread_handle>: Make non-pointer.
676 (thread_item_t): Remove typedef.
677 (DEF_VEC_O(thread_item_t)): Remove.
678 (threads_listing_context) <contains_thread>: New method.
679 <remove_thread>: New method.
680 <items>: Change type to std::vector.
681 (clear_threads_listing_context): Remove.
682 (threads_listing_context_remove): Remove.
683 (remote_newthread_step): Use thread_item constructor, adjust to
684 change to std::vector.
685 (start_thread): Use thread_item constructor, adjust to change to
686 std::vector.
687 (end_thread): Adjust to change to std::vector and std::string.
688 (remote_get_threads_with_qthreadinfo): Use thread_item
689 constructor, adjust to std::vector.
690 (remote_update_thread_list): Adjust to change to std::vector and
691 std::string, use threads_listing_context methods.
692 (remove_child_of_pending_fork): Adjust.
693 (remove_new_fork_children): Adjust.
694 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
695 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
696 * unittests/rsp-low-selftests.c: New file.
697 * common/rsp-low.h: Include common/byte-vector.h.
698 (hex2bin): New overload.
699 * common/rsp-low.c (hex2bin): New overload.
700
701 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
702
703 * inferior.h (private_inferior): Define structure type, add
704 virtual pure destructor.
705 (inferior) <priv>: Change type to unique_ptr.
706 * inferior.c (private_inferior::~private_inferior): Provide
707 default implementation.
708 (inferior::~inferior): Don't free priv field.
709 (exit_inferior_1): Likewise.
710 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
711 (darwin_exception_info): Remove typedef.
712 (DEF_VEC_O (darwin_thread_t)); Remove.
713 (private_inferior): Rename to ...
714 (darwin_private_inferior): ... this, extend private_inferior.
715 (get_darwin_inferior): New.
716 <threads>: Change type to std::vector of darwin_thread_t pointers.
717 * darwin-nat.c (darwin_check_new_threads): Adjust.
718 (find_inferior_task_it): Adjust.
719 (darwin_find_thread); Adjust.
720 (darwin_suspend_inferior): Adjust.
721 (darwin_resume_inferior): Adjust.
722 (darwin_find_new_inferior): Adjust.
723 (darwin_decode_notify_message): Adjust.
724 (darwin_send_reply): Adjust.
725 (darwin_resume_inferior_threads): Adjust.
726 (darwin_suspend_inferior_threads): Adjust.
727 (darwin_decode_message): Adjust.
728 (darwin_wait): Adjust.
729 (darwin_interrupt): Adjust.
730 (darwin_deallocate_threads): Adjust.
731 (darwin_mourn_inferior): Adjust, don't free private data.
732 (darwin_reply_to_all_pending_messages): Adjust.
733 (darwin_stop_inferior): Adjust.
734 (darwin_setup_exceptions): Adjust.
735 (darwin_kill_inferior): Adjust.
736 (darwin_setup_request_notification): Adjust.
737 (darwin_attach_pid): Adjust.
738 (darwin_init_thread_list): Adjust.
739 (darwin_setup_fake_stop_event): Adjust.
740 (darwin_attach): Adjust.
741 (darwin_detach): Adjust.
742 (darwin_xfer_partial): Adjust.
743 (set_enable_mach_exceptions): Adjust.
744 (darwin_pid_to_exec_file): Adjust.
745 (darwin_get_ada_task_ptid): Adjust.
746 * darwin-nat-info.c (get_task_from_args): Adjust.
747 (info_mach_ports_command): Adjust.
748 (info_mach_region_command): Adjust.
749 (info_mach_exceptions_command): Adjust.
750 * remote.c (private_inferior): Rename to ...
751 (remote_private_inferior): ... this, initialize fields.
752 (get_remote_inferior); New.
753 (remote_commit_resume): Use get_remote_inferior.
754 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
755
756 2017-11-24 Pedro Alves <palves@redhat.com>
757
758 * NEWS: Mention linespecs and explicit locations, and completion
759 improvements.
760
761 2017-11-24 Yao Qi <yao.qi@linaro.org>
762
763 * regcache.c (regcache::dump): Remove footnote_register_size.
764
765 2017-11-24 Yao Qi <yao.qi@linaro.org>
766
767 * regcache.c (cooked_read_test): Add more test for readonly
768 regcache.
769
770 2017-11-24 Yao Qi <yao.qi@linaro.org>
771
772 * gdbarch-selftests.c (test_target_has_registers): Move it to
773 target.c.
774 (test_target_has_stack): Likewise.
775 (test_target_has_memory): Likewise.
776 (test_target_prepare_to_store): Likewise.
777 (test_target_store_registers): Likewise.
778 (test_target_ops): Likewise.
779 * regcache.c: Include selftest-arch.h and gdbthread.h.
780 (target_ops_no_register): New class.
781 (test_target_fetch_registers): New.
782 (test_target_store_registers): New.
783 (test_target_xfer_partial): New.
784 (readwrite_regcache): New.
785 (cooked_read_test): New.
786 (_initialize_regcache): Register the test.
787 * target.c: (test_target_has_registers): Moved from
788 gdbarch-selftests.c.
789 (test_target_has_stack): Likewise.
790 (test_target_has_memory): Likewise.
791 (test_target_prepare_to_store): Likewise.
792 (test_target_store_registers): Likewise.
793 * target.h (test_target_ops): New class.
794
795 2017-11-24 Alan Hayward <alan.hayward@arm.com>
796
797 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
798 selftest.
799
800 2017-11-24 Alan Hayward <alan.hayward@arm.com>
801
802 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
803 * arch/aarch64.c (aarch64_create_target_description): Create
804 new target description.
805 * features/Makefile: Add new files.
806 * features/aarch64.c: Remove file.
807 * features/aarch64-core.c: New autogenerated file.
808 * features/aarch64-fpu.c: New autogenerated file.
809 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
810
811 2017-11-24 Alan Hayward <alan.hayward@arm.com>
812
813 * Makefile.in: Add new files.
814 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
815 aarch64_read_description.
816 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
817 Call aarch64_read_description.
818 * aarch64-tdep.c (aarch64_read_description): New function.
819 (aarch64_gdbarch_init): Call aarch64_read_description.
820 * aarch64-tdep.h (aarch64_read_description): New function.
821 * arch/aarch64.c: New file.
822 * configure.tgt: Add new files.
823
824 2017-11-24 Yao Qi <yao.qi@linaro.org>
825
826 * mi/mi-main.c (register_changed_p): Update.
827 * value.c (value_contents_bits_eq): Change return type.
828 (value_contents_eq): Likewise.
829 * value.h: Update comments.
830
831 2017-11-24 Yao Qi <yao.qi@linaro.org>
832
833 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
834 local 'changed'. Remove error.
835 (register_changed_p): Change return type to bool.
836
837 2017-11-24 Yao Qi <yao.qi@linaro.org>
838
839 * arch/tic6x.c: New file.
840 * arch/tic6x.h: New file.
841 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
842 tic6x-core.xml and tic6x-gp.xml.
843 * features/tic6x-c6xp.c: Generated.
844 * features/tic6x-core.c: Generated.
845 * features/tic6x-gp.c: Generated.
846 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
847 "tic6x-".
848
849 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
850
851 * mi/mi-main.c (list_available_thread_groups): Change map value
852 type to std::vector.
853
854 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
855
856 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
857
858 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
859
860 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
861 back to...
862 <children_requested>: ... this.
863 (varobj_get_num_children, varobj_update): Adjust.
864
865 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
866
867 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
868 (ada_value_has_mutated): Likewise.
869 * c-varobj.c (varobj_is_anonymous_child): Likewise.
870 (c_is_path_expr_parent): Likewise.
871 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
872 (mi_cmd_var_set_frozen): Likewise.
873 (mi_cmd_var_update_iter): Likewise.
874 (mi_cmd_var_update): Likewise.
875 * varobj.c (pretty_printing): Likewise.
876 (varobj_enable_pretty_printing): Likewise.
877 (struct varobj_root) <floating, is_valid>: Likewise.
878 (struct varobj_dynamic) <children_requested>: Likewise.
879 (delete_variable): Likewise.
880 (delete_variable_1): Likewise.
881 (install_variable): Likewise.
882 (update_type_if_necessary): Likewise.
883 (install_new_value): Likewise.
884 (value_of_root): Likewise.
885 (is_root_p): Likewise.
886 (varobj_create): Likewise.
887 (varobj_delete): Likewise.
888 (varobj_has_more): Likewise.
889 (varobj_set_frozen): Likewise.
890 (varobj_get_frozen): Likewise.
891 (install_dynamic_child): Likewise.
892 (dynamic_varobj_has_child_method): Likewise.
893 (update_dynamic_varobj_children): Likewise.
894 (varobj_get_num_children): Likewise.
895 (varobj_list_children): Likewise.
896 (is_path_expr_parent): Likewise.
897 (varobj_default_is_path_expr_parent): Likewise.
898 (varobj_is_dynamic_p): Likewise.
899 (varobj_set_value): Likewise.
900 (varobj_value_has_mutated): Likewise.
901 (varobj_update): Likewise.
902 (check_scope): Likewise.
903 (value_of_root_1): Likewise.
904 (varobj_value_get_print_value): Likewise.
905 (varobj_editable_p): Likewise.
906 (varobj_value_is_changeable_p): Likewise.
907 (varobj_floating_p): Likewise.
908 (varobj_default_value_is_changeable_p): Likewise.
909 (varobj_invalidate_iter): Likewise.
910 * varobj.h (struct varobj_update_result) <type_changed,
911 children_changed, changed, value_installed>: Likewise.
912 (struct varobj) <updated, frozen, not_fetched>: Likewise.
913 (struct lang_varobj_ops) <value_is_changeable_p,
914 value_has_mutated, is_path_expr_parent>: Likewise.
915 (varobj_delete): Likewise.
916 (varobj_set_frozen): Likewise.
917 (varobj_get_frozen): Likewise.
918 (varobj_set_value): Likewise.
919 (varobj_update): Likewise.
920 (varobj_editable_p): Likewise.
921 (varobj_floating_p): Likewise.
922 (varobj_has_more): Likewise.
923 (varobj_is_dynamic_p): Likewise.
924 (varobj_default_value_is_changeable_p): Likewise.
925 (varobj_value_is_changeable_p): Likewise.
926 (varobj_is_anonymous_child): Likewise.
927 (varobj_default_is_path_expr_parent): Likewise.
928
929 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
930
931 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
932 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
933 <type_str>: Convert to 'std::string'.
934 <expr>: Convert to 'expression_up'.
935 (dtrace_probe_arg_s): Delete type and VEC.
936 (dtrace_probe_enabler_s): Likewise.
937 (struct dtrace_probe): Replace by...
938 (class dtrace_static_probe_ops): ...this and...
939 (class dtrace_probe): ...this.
940 (dtrace_probe_is_linespec): Rename to...
941 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
942 to reflect change.
943 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
944 Adjust code. Create new instance of 'dtrace_probe'.
945 (dtrace_build_arg_exprs): Rename to...
946 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
947 reflect change.
948 (dtrace_get_probes): Rename to...
949 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
950 to reflect change.
951 (dtrace_get_arg): Rename to...
952 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
953 reflect change.
954 (dtrace_probe_is_enabled): Rename to...
955 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
956 change.
957 (dtrace_get_probe_address): Rename to...
958 (dtrace_probe::get_relocated_address): ...this. Adjust code
959 to reflect change.
960 (dtrace_get_probe_argument_count): Rename to...
961 (dtrace_probe::get_argument_count): ...this. Adjust code to
962 reflect change.
963 (dtrace_can_evaluate_probe_arguments): Rename to...
964 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
965 to reflect change.
966 (dtrace_evaluate_probe_argument): Rename to...
967 (dtrace_probe::evaluate_argument): ...this. Adjust code to
968 reflect change.
969 (dtrace_compile_to_ax): Rename to...
970 (dtrace_probe::compile_to_ax): ...this. Adjust code to
971 reflect change.
972 (dtrace_probe_destroy): Delete.
973 (dtrace_type_name): Rename to...
974 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
975 reflect change.
976 (dtrace_probe::get_static_ops): New method.
977 (dtrace_gen_info_probes_table_header): Rename to...
978 (dtrace_static_probe_ops::gen_info_probes_table_header):
979 ...this. Adjust code to reflect change.
980 (dtrace_gen_info_probes_table_values): Rename to...
981 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
982 code to reflect change.
983 (dtrace_enable_probe): Rename to...
984 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
985 change.
986 (dtrace_disable_probe): Rename to...
987 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
988 change.
989 (struct probe_ops dtrace_probe_ops): Delete.
990 (info_probes_dtrace_command): Call 'info_probes_for_spops'
991 instead of 'info_probes_for_ops'.
992 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
993 of 'all_probe_ops'.
994
995 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
996 Simon Marchi <simark@simark.ca>
997
998 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
999 variable.
1000 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1001 <aexpr>: Change type to 'expression_up'.
1002 (stap_probe_arg_s): Delete type and VEC.
1003 (struct stap_probe): Delete. Replace by...
1004 (class stap_static_probe_ops): ...this and...
1005 (class stap_probe): ...this. Rename variables to add 'm_'
1006 prefix. Do not use 'union' for arguments anymore.
1007 (stap_get_expected_argument_type): Receive probe name instead
1008 of 'struct stap_probe'. Adjust code.
1009 (stap_parse_probe_arguments): Rename to...
1010 (stap_probe::parse_arguments): ...this. Adjust code to
1011 reflect change.
1012 (stap_get_probe_address): Rename to...
1013 (stap_probe::get_relocated_address): ...this. Adjust code
1014 to reflect change.
1015 (stap_get_probe_argument_count): Rename to...
1016 (stap_probe::get_argument_count): ...this. Adjust code
1017 to reflect change.
1018 (stap_get_arg): Rename to...
1019 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1020 reflect change.
1021 (can_evaluate_probe_arguments): Rename to...
1022 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1023 to reflect change.
1024 (stap_evaluate_probe_argument): Rename to...
1025 (stap_probe::evaluate_argument): ...this. Adjust code
1026 to reflect change.
1027 (stap_compile_to_ax): Rename to...
1028 (stap_probe::compile_to_ax): ...this. Adjust code to
1029 reflect change.
1030 (stap_probe_destroy): Delete.
1031 (stap_modify_semaphore): Adjust comment.
1032 (stap_set_semaphore): Rename to...
1033 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1034 change.
1035 (stap_clear_semaphore): Rename to...
1036 (stap_probe::clear_semaphore): ...this. Adjust code to
1037 reflect change.
1038 (stap_probe::get_static_ops): New method.
1039 (handle_stap_probe): Adjust code to create instance of
1040 'stap_probe'.
1041 (stap_get_probes): Rename to...
1042 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1043 reflect change.
1044 (stap_probe_is_linespec): Rename to...
1045 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1046 reflect change.
1047 (stap_type_name): Rename to...
1048 (stap_static_probe_ops::type_name): ...this. Adjust code to
1049 reflect change.
1050 (stap_gen_info_probes_table_header): Rename to...
1051 (stap_static_probe_ops::gen_info_probes_table_header):
1052 ...this. Adjust code to reflect change.
1053 (stap_gen_info_probes_table_values): Rename to...
1054 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1055 code to reflect change.
1056 (struct probe_ops stap_probe_ops): Delete.
1057 (info_probes_stap_command): Use 'info_probes_for_spops'
1058 instead of 'info_probes_for_ops'.
1059 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1060 of 'all_probe_ops'.
1061
1062 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1063
1064 * break-catch-throw.c (fetch_probe_arguments): Use
1065 'probe.prob' instead of 'probe.probe'.
1066 * breakpoint.c (create_longjmp_master_breakpoint): Call
1067 'can_evaluate_arguments' and 'get_relocated_address' methods
1068 from probe.
1069 (create_exception_master_breakpoint): Likewise.
1070 (add_location_to_breakpoint): Use 'sal->prob' instead of
1071 'sal->probe'.
1072 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1073 probe.
1074 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1075 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1076 of 'probe_ops'.
1077 (probe_key_free): Call 'delete' on probe.
1078 (check_exception_resume): Use 'probe.prob' instead of
1079 'probe.probe'.
1080 * location.c (string_to_event_location_basic): Call
1081 'probe_linespec_to_static_ops'.
1082 * probe.c (class any_static_probe_ops): New class.
1083 (any_static_probe_ops any_static_probe_ops): New variable.
1084 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1085 argument. Adjust code to reflect change.
1086 (parse_probes): Use 'static_probe_ops' instead of
1087 'probe_ops'. Adjust code to reflect change.
1088 (find_probes_in_objfile): Call methods to get name and
1089 provider from probe.
1090 (find_probe_by_pc): Use 'result.prob' instead of
1091 'result.probe'. Call 'get_relocated_address' method from
1092 probe.
1093 (collect_probes): Adjust comment and argument list to receive
1094 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1095 reflect change. Call necessary methods from probe.
1096 (compare_probes): Call methods to get name and provider from
1097 probes.
1098 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1099 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1100 adjust code accordingly.
1101 (print_ui_out_not_applicables): Likewise.
1102 (info_probes_for_ops): Rename to...
1103 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1104 as argument instead of 'probe_ops'. Adjust code. Call
1105 necessary methods from probe.
1106 (info_probes_command): Use 'info_probes_for_spops'.
1107 (enable_probes_command): Pass correct argument to
1108 'collect_probes'. Call methods from probe.
1109 (disable_probes_command): Likewise.
1110 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1111 (get_probe_argument_count): Move to
1112 'any_static_probe_ops::get_argument_count'.
1113 (can_evaluate_probe_arguments): Move to
1114 'any_static_probe_ops::can_evaluate_arguments'.
1115 (evaluate_probe_argument): Move to
1116 'any_static_probe_ops::evaluate_argument'.
1117 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1118 'probe.probe'.
1119 (probe_linespec_to_ops): Rename to...
1120 (probe_linespec_to_static_ops): ...this. Adjust code.
1121 (probe_any_is_linespec): Rename to...
1122 (any_static_probe_ops::is_linespec): ...this.
1123 (probe_any_get_probes): Rename to...
1124 (any_static_probe_ops::get_probes): ...this.
1125 (any_static_probe_ops::type_name): New method.
1126 (any_static_probe_ops::gen_info_probes_table_header): New
1127 method.
1128 (compute_probe_arg): Use 'pc_probe.prob' instead of
1129 'pc_probe.probe'. Call methods from probe.
1130 (compile_probe_arg): Likewise.
1131 (std::vector<const probe_ops *> all_probe_ops): Delete.
1132 (std::vector<const static_probe_ops *> all_static_probe_ops):
1133 New variable.
1134 (_initialize_probe): Use 'all_static_probe_ops' instead of
1135 'all_probe_ops'.
1136 * probe.h (struct info_probe_column) <field_name>: Delete
1137 extraneous newline
1138 (info_probe_column_s): Delete type and VEC.
1139 (struct probe_ops): Delete. Replace with...
1140 (class static_probe_ops): ...this and...
1141 (clas probe): ...this.
1142 (struct bound_probe) <bound_probe>: Delete extraneous
1143 newline. Adjust constructor to receive 'probe' instead of
1144 'struct probe'.
1145 <probe>: Rename to...
1146 <prob>: ...this. Delete extraneous newline.
1147 <objfile>: Delete extraneous newline.
1148 (register_probe_ops): Delete unused prototype.
1149 (info_probes_for_ops): Rename to...
1150 (info_probes_for_spops): ...this. Adjust comment.
1151 (get_probe_address): Move to 'probe::get_address'.
1152 (get_probe_argument_count): Move to
1153 'probe::get_argument_count'.
1154 (can_evaluate_probe_arguments): Move to
1155 'probe::can_evaluate_arguments'.
1156 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1157 * solib-svr4.c (struct svr4_info): Adjust comment.
1158 (struct probe_and_action) <probe>: Rename to...
1159 <prob>: ...this.
1160 (register_solib_event_probe): Receive 'probe' instead of
1161 'struct probe' as argument. Use 'prob' instead of 'probe'
1162 when applicable.
1163 (solib_event_probe_action): Call 'get_argument_count' method
1164 from probe. Adjust comment.
1165 (svr4_handle_solib_event): Adjust comment. Call
1166 'evaluate_argument' method from probe.
1167 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1168 from probe.
1169 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1170 'struct probe'. Call 'can_evaluate_arguments' from probe.
1171 * symfile.h: Forward declare 'class probe' instead of 'struct
1172 probe'.
1173 * symtab.h: Likewise.
1174 (struct symtab_and_line) <probe>: Rename to...
1175 <prob>: ...this.
1176 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1177 Call probe methods.
1178 (stop_tracing): Likewise.
1179
1180 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1181
1182 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1183 trailing newline at end of string in call to warning.
1184
1185 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1186
1187 * osdata.h: Include vector isntead of vec.h.
1188 (osdata_column_s): Remove typedef.
1189 (struct osdata_column): Add constructor.
1190 <name, value>: Change type to std::string.
1191 (DEF_VEC_O (osdata_column_s)): Remove.
1192 (osdata_item_s): Remove typedef.
1193 (struct osdata_item) <columns>: Change type to std::vector.
1194 (DEF_VEC_O (osdata_item_s)): Remove.
1195 (struct osdata): Add constructor.
1196 <type>: Change type to std::string.
1197 <items>: Change type to std::vector.
1198 (osdata_p): Remove typedef.
1199 (DEF_VEC_P (osdata_p)): Remove.
1200 (osdata_parse): Return a unique_ptr.
1201 (osdata_free): Remove.
1202 (make_cleanup_osdata_free): Remove.
1203 (get_osdata): Return a unique_ptr.
1204 (get_osdata_column): Return pointer to std::string, take a
1205 reference to osdata_item as parameter.
1206 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1207 unique_ptr.
1208 <property_name>: Change type to std::string.
1209 (osdata_start_osdata): Allocate osdata with new and adjust.
1210 (osdata_start_item): Adjust.
1211 (osdata_start_column): Adjust.
1212 (osdata_end_column): Adjust.
1213 (clear_parsing_data): Remove.
1214 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1215 (osdata_item_clear): Remove.
1216 (get_osdata): return a unique_ptr and adjust.
1217 (get_osdata_column): Return a pointer to std::string and adjust.
1218 (info_osdata): Adjust.
1219 * mi/mi-main.c: Include <map>.
1220 (free_vector_of_osdata_items): Remove.
1221 (list_available_thread_groups): Adjust, use std::map instead of
1222 splay tree.
1223
1224 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1225
1226 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1227 case in switch.
1228
1229 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1230
1231 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1232
1233 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1234
1235 * varobj.h (struct varobj_update_result): Add constructor, add
1236 move constructor, disable copy and assign, initialize fields.
1237 <newobj>: Change type to std::vector.
1238 (varobj_update): Return std::vector.
1239 * varobj.c (install_dynamic_child): Change VEC parameters to
1240 std::vector and adjust.
1241 (update_dynamic_varobj_children): Likewise.
1242 (varobj_update): Return std::vector and adjust.
1243 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1244
1245 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 * varobj.h (struct varobj) <parent>: Remove const.
1248 <children>: Change type to std::vector.
1249 (varobj_list_children): Return std::vector const reference.
1250 (varobj_restrict_range): Change parameter type to std::vector
1251 const reference.
1252 * varobj.c (varobj_has_more): Adjust.
1253 (varobj_restrict_range): Change parameter type to std::vector
1254 const reference and adjust.
1255 (install_dynamic_child): Adjust.
1256 (update_dynamic_varobj_children): Adjust.
1257 (varobj_list_children): Return std::vector const reference and
1258 adjust.
1259 (varobj_add_child): Adjust.
1260 (update_type_if_necessary): Adjust.
1261 (varobj_update): Adjust.
1262 (delete_variable_1): Adjust.
1263 * ada-varobj.c (ada_value_has_mutated): Adjust.
1264 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1265
1266 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1267
1268 * varobj.h (struct varobj): Add constructor and destructor,
1269 initialize fields.
1270 * varobj.c (struct varobj_root): Initialize fields.
1271 (struct varobj_dynamic): Initialize fields.
1272 (varobj_create): Use unique_ptr instead of cleanup. Create
1273 varobj with new instead of new_root_variable.
1274 (delete_variable_1): Free variable with delete instead of
1275 free_variable.
1276 (create_child_with_value): Create variable with new instead of
1277 new_variable.
1278 (varobj::varobj): New.
1279 (varobj::~varobj): New (body mostly coming from free_variable).
1280 (new_variable): Remove.
1281 (free_variable): Remove.
1282 (do_free_variable_cleanup): Remove.
1283 (make_cleanup_free_variable): Remove.
1284
1285 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1286
1287 * core-regset.c: Remove file.
1288 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1289
1290 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1291
1292 * NEWS: Document use of GNU MPFR.
1293 * README: Likewise.
1294
1295 * Makefile.in (LIBMPFR): Add define.
1296 (CLIBS): Add $(LIBMPFR).
1297 * configure.ac: Add --with-mpfr configure option.
1298 * configure: Regenerate.
1299 * config.in: Regenerate.
1300
1301 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1302 (class mpfr_float_ops): New type.
1303 (mpfr_float_ops::from_target): Two new overloaded functions.
1304 (mpfr_float_ops::to_target): Likewise.
1305 (mpfr_float_ops::to_string): New function.
1306 (mpfr_float_ops::from_string): Likewise.
1307 (mpfr_float_ops::to_longest): Likewise.
1308 (mpfr_float_ops::from_longest): Likewise.
1309 (mpfr_float_ops::from_ulongest): Likewise.
1310 (mpfr_float_ops::to_host_double): Likewise.
1311 (mpfr_float_ops::from_host_double): Likewise.
1312 (mpfr_float_ops::convert): Likewise.
1313 (mpfr_float_ops::binop): Likewise.
1314 (mpfr_float_ops::compare): Likewise.
1315 (get_target_float_ops): Use mpfr_float_ops if available.
1316
1317 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1318
1319 * target-float.c: Do not include <math.h>.
1320 Include <cmath> and <limits>.
1321 (DOUBLEST): Do not define.
1322 (class target_float_ops): New type.
1323 (class host_float_ops): New templated type.
1324 (class decimal_float_ops): New type.
1325
1326 (floatformat_to_doublest): Rename to ...
1327 (host_float_ops<T>::from_target): ... this. Use template type T
1328 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1329 (host_float_ops<T>::from_target): New overload using a type argument.
1330 (floatformat_from_doublest): Rename to ...
1331 (host_float_ops<T>::to_target): ... this. Use template type T
1332 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1333 (host_float_ops<T>::to_target): New overload using a type argument.
1334 (floatformat_printf_format): New function.
1335 (struct printf_length_modifier): New templated type.
1336 (floatformat_to_string): Rename to ...
1337 (host_float_ops<T>::to_string): ... this. Use type instead of
1338 floatformat argument. Use floatformat_printf_format and
1339 printf_length_modifier. Remove special handling of invalid numbers,
1340 infinities and NaN (moved to target_float_to_string).
1341 (struct scanf_length_modifier): New templated type.
1342 (floatformat_from_string): Rename to ...
1343 (host_float_ops<T>::from_string): ... this. Use type instead of
1344 floatformat argument. Use scanf_length_modifier.
1345 (floatformat_to_longest): Rename to ...
1346 (host_float_ops<T>::to_longest): ... this. Use type instead of
1347 floatformat argument. Handle out-of-range values deterministically.
1348 (floatformat_from_longest): Rename to ...
1349 (host_float_ops<T>::from_longest): ... this. Use type instead of
1350 floatformat argument.
1351 (floatformat_from_ulongest): Rename to ...
1352 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1353 floatformat argument.
1354 (floatformat_to_host_double): Rename to ...
1355 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1356 floatformat argument.
1357 (floatformat_from_host_double): Rename to ...
1358 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1359 floatformat argument.
1360 (floatformat_convert): Rename to ...
1361 (host_float_ops<T>::convert): ... this. Use type instead of
1362 floatformat arguments. Remove handling of no-op conversions.
1363 (floatformat_binop): Rename to ...
1364 (host_float_ops<T>::binop): ... this. Use type instead of
1365 floatformat arguments.
1366 (floatformat_compare): Rename to ...
1367 (host_float_ops<T>::compare): ... this. Use type instead of
1368 floatformat arguments.
1369
1370 (match_endianness): Use type instead of length/byte_order arguments.
1371 (set_decnumber_context): Likewise.
1372 (decimal_from_number): Likewise. Update calls.
1373 (decimal_to_number): Likewise.
1374 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1375 (decimal_float_ops::to_host_double): New dummy function.
1376 (decimal_float_ops::from_host_double): Likewise.
1377 (decimal_to_string): Rename to ...
1378 (decimal_float_ops::to_string): ... this. Use type instead of
1379 length/byte_order arguments. Update calls.
1380 (decimal_from_string): Rename to ...
1381 (decimal_float_ops::from_string): ... this. Use type instead of
1382 length/byte_order arguments. Update calls.
1383 (decimal_from_longest): Rename to ...
1384 (decimal_float_ops::from_longest): ... this. Use type instead of
1385 length/byte_order arguments. Update calls.
1386 (decimal_from_ulongest): Rename to ...
1387 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1388 length/byte_order arguments. Update calls.
1389 (decimal_to_longest): Rename to ...
1390 (decimal_float_ops::to_longest): ... this. Use type instead of
1391 length/byte_order arguments. Update calls.
1392 (decimal_binop): Rename to ...
1393 (decimal_float_ops::binop): ... this. Use type instead of
1394 length/byte_order arguments. Update calls.
1395 (decimal_compare): Rename to ...
1396 (decimal_float_ops::compare): ... this. Use type instead of
1397 length/byte_order arguments. Update calls.
1398 (decimal_convert): Rename to ...
1399 (decimal_float_ops::convert): ... this. Use type instead of
1400 length/byte_order arguments. Update calls.
1401
1402 (target_float_same_category_p): New function.
1403 (target_float_same_format_p): Likewise.
1404 (target_float_format_length): Likewise.
1405 (enum target_float_ops_kind): New type.
1406 (get_target_float_ops_kind): New function.
1407 (get_target_float_ops): Three new overloaded functions.
1408
1409 (target_float_is_zero): Update call.
1410 (target_float_to_string): Add special handling of invalid numbers,
1411 infinities and NaN (moved from floatformat_to_string). Use
1412 target_float_ops callback.
1413 (target_float_from_string): Use target_float_ops callback.
1414 (target_float_to_longest): Likewise.
1415 (target_float_from_longest): Likewise.
1416 (target_float_from_ulongest): Likewise.
1417 (target_float_to_host_double): Likewise.
1418 (target_float_from_host_double): Likewise.
1419 (target_float_convert): Add special case for no-op conversions.
1420 Use target_float_ops callback.
1421 (target_float_binop): Use target_float_ops callback.
1422 (target_float_compare): Likewise.
1423
1424 2017-11-22 Yao Qi <yao.qi@linaro.org>
1425
1426 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1427
1428 2017-11-22 Yao Qi <yao.qi@linaro.org>
1429
1430 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1431 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1432
1433 2017-11-21 Jerome Guitton <guitton@adacore.com>
1434
1435 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1436 with event ptid from the lower layer before doing the
1437 ravenscar-specific update.
1438
1439 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1440
1441 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1442 the ptid's TID is nonzero.
1443
1444 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1445
1446 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1447 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1448 Make non-static. Change return type to char *. Adjust code
1449 accordingly. Rewrite the function's documentation.
1450 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1451 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1452 we have enough debugging information in the runtime to support
1453 Ada task debugging before we enable the ravenscar-thread layer.
1454
1455 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1456
1457 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1458 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1459 * ravenscar-thread.c: Add into comment.
1460 (base_magic_null_ptid): Delete.
1461 (base_ptid): Change documentation.
1462 (ravenscar_active_task): Renames ravenscar_running_thread.
1463 All callers updated throughout.
1464 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1465 (ravenscar_task_is_currently_active): Likewise.
1466 (get_base_thread_from_ravenscar_task): Ditto.
1467 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1468 (ravenscar_runtime_initialized): Likewise.
1469 (get_running_thread_id): Add new parameter "cpu". Adjust
1470 implementation to handle this new parameter.
1471 (ravenscar_fetch_registers): Small adjustment to use
1472 is_ravenscar_task and ravenscar_task_is_currently_active in
1473 order to decide whether to use the target beneath or this
1474 module's arch_ops.
1475 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1476 (ravenscar_stopped_by_sw_breakpoint): Use
1477 get_base_thread_from_ravenscar_task to get the underlying
1478 thread, rather than using base_ptid.
1479 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1480 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1481 Likewise.
1482 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1483
1484 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1485
1486 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1487 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1488 (get_tcb_types_info): Set fieldnos.base_cpu.
1489 (read_atcb): Set task_info->base_cpu.
1490 (info_task): Print "Base CPU" info if set by runtime.
1491
1492 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1493
1494 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1495 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1496 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1497 New functions.
1498 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1499 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1500 to_stopped_data_address and to_core_of_thread fields of
1501 ravenscar_ops.
1502
1503 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1504
1505 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1506 (struct gdbarch_tdep): New member long_double_abi.
1507 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1508 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1509 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1510 format depending on long_double_abi tdep member.
1511 (ppc_floatformat_for_type): Handle __ibm128 type.
1512
1513 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1514
1515 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1516
1517 2017-11-21 Pedro Alves <palves@redhat.com>
1518
1519 * dwarf2read.c (mapped_index::find_name_components_bounds)
1520 <completion mode, upper bound>: Use std::lower_bound instead of
1521 std::upper_bound.
1522 (test_mapped_index_find_name_component_bounds): Remove incorrect
1523 "t1_fund" from expected symbols.
1524
1525 2017-11-21 Pedro Alves <palves@redhat.com>
1526
1527 * dwarf2read.c (mapped_index::name_components_casing): New field.
1528 (mapped_index) <build_name_components,
1529 find_name_components_bounds): Declare new methods.
1530 (mapped_index::find_name_components_bounds)
1531 (mapped_index::build_name_components): New methods, factored out
1532 from dw2_expand_symtabs_matching_symbol.
1533 (check_find_bounds_finds)
1534 (test_mapped_index_find_name_component_bounds): New.
1535 (run_test): Rename to ...
1536 (test_dw2_expand_symtabs_matching_symbol): ... this.
1537 (run_test): Reimplement.
1538
1539 2017-11-21 Pedro Alves <palves@redhat.com>
1540
1541 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1542 (symbol_end): Use cp_ident_is_alnum.
1543 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1544 * dwarf2read.c (make_sort_after_prefix_name): New function.
1545 (dw2_expand_symtabs_matching_symbol): Use it.
1546 (test_symbols): Add more symbols.
1547 (run_test): Add tests.
1548
1549 2017-11-17 Tom Tromey <tom@tromey.com>
1550
1551 * symtab.h (enum symbol_subclass_kind): New.
1552 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1553 Remove.
1554 <subclass>: New member.
1555 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1556 * rust-lang.c (rust_get_trait_object_pointer): Update.
1557 * dwarf2read.c (read_func_scope): Update.
1558 (read_variable): Update.
1559
1560 2017-11-17 Tom Tromey <tom@tromey.com>
1561
1562 * dwarf2read.c (read_func_scope): Update.
1563 * symtab.h (struct template_symbol): Derive from symbol.
1564 <base>: Remove.
1565
1566 2017-11-17 Tom Tromey <tom@tromey.com>
1567
1568 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1569 (struct rust_vtable_symbol): New.
1570 (find_symbol_at_address): Declare.
1571 * symtab.c (find_symbol_at_address): New function.
1572 * symfile.h (struct quick_symbol_functions)
1573 <find_compunit_symtab_by_address>: New member.
1574 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1575 function.
1576 (debug_sym_quick_functions): Link to
1577 debug_qf_find_compunit_symtab_by_address.
1578 * rust-lang.c (rust_get_trait_object_pointer): New function.
1579 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1580 rust_get_trait_object_pointer.
1581 * psymtab.c (psym_relocate): Clear psymbol_map.
1582 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1583 functions.
1584 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1585 * objfiles.h (struct objfile) <psymbol_map>: New member.
1586 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1587 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1588 (rust_containing_type, read_variable): New functions.
1589
1590 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1591
1592 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1593
1594 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1595
1596 * common/filestuff.c: Include <algorithm>.
1597 (open_fds): Change type to std::vector<int>.
1598 (do_mark_open_fd): Adjust.
1599 (unmark_fd_no_cloexec): Adjust.
1600 (do_close): Adjust.
1601
1602 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1603
1604 * breakpoint.c (output_thread_groups): Take an std::vector.
1605 (print_one_breakpoint_location): Adjust.
1606
1607 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1608
1609 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1610 (ada_evaluate_subexp_for_cast): New function.
1611 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1612 ada_evaluate_subexp_for_cast.
1613 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1614 eval_skip_value.
1615 * eval.c (evaluate_var_value): Make non-static.
1616 (evaluate_var_msym_value, eval_skip_value): Likewise.
1617 * value.h (evaluate_var_value, evaluate_var_msym_value)
1618 (eval_skip_value): Declare.
1619
1620 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1621
1622 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1623 Update all callers.
1624
1625 2017-11-16 Pedro Alves <palves@redhat.com>
1626
1627 * python/py-unwind.c (pyuw_sniffer): Translate
1628 PyExc_KeyboardInterrupt to a GDB Quit exception.
1629
1630 2017-11-16 Pedro Alves <palves@redhat.com>
1631
1632 * infrun.c (resume_cleanups): Delete.
1633 (resume): No longer install a resume_cleanups cleanup nor call
1634 QUIT.
1635 (proceed): Pass the terminal to the inferior.
1636 (keep_going_pass_signal): No longer install a resume_cleanups
1637 cleanup.
1638
1639 2017-11-16 Pedro Alves <palves@redhat.com>
1640
1641 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1642 if the prompt is blocked.
1643
1644 2017-11-16 Pedro Alves <palves@redhat.com>
1645
1646 * breakpoint.c (insert_bp_location): Replace bp_err and
1647 bp_err_message locals by a gdb_exception local.
1648
1649 2017-11-16 Pedro Alves <palves@redhat.com>
1650
1651 * inflow.c (scoped_ignore_sigttou): New class.
1652 (child_terminal_ours_1, new_tty): Use it.
1653
1654 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1655
1656 * target-float.c (decimal_from_number): Add byte_order argument and
1657 call match_endianness. Error if unknown floating-point type.
1658 (decimal_to_number): Add byte_order argument and call match_endianness.
1659 (decimal_from_longest): Update call. Do not call match_endianness.
1660 (decimal_from_ulongest): Likewise.
1661 (decimal_binop): Likewise.
1662 (decimal_is_zero): Likewise.
1663 (decimal_compare): Likewise.
1664 (decimal_convert): Likewise.
1665
1666 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1667
1668 * python/python.c (gdbpy_rbreak): New function.
1669 * NEWS: Document Python rbreak feature.
1670
1671 2017-11-16 Yao Qi <yao.qi@linaro.org>
1672
1673 * features/tic6x-c62x.xml: Remove.
1674 * features/tic6x-c64x.xml: Remove.
1675 * features/tic6x-c64xp.xml: Remove.
1676
1677 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1678
1679 * symtab.h: Include <array>.
1680
1681 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1682
1683 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1684 (bsd_kvm_proc_cmd): Likewise.
1685
1686 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1687
1688 * tui/tui-win.c (window_name_completer): Replace VEC with
1689 std::vector.
1690
1691 2017-11-15 Andrew Cagney <cagney@gnu.org>
1692
1693 * MAINTAINERS: Remove no-longer applicable entries.
1694
1695 2017-11-15 Andrew Cagney <cagney@gnu.org>
1696
1697 * MAINTAINERS: Move self to Past Maintainers.
1698
1699 2017-11-15 Yao Qi <yao.qi@linaro.org>
1700
1701 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1702 * features/nios2-linux.c: Remove.
1703 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1704 initialize_tdesc_nios2_linux.
1705
1706 2017-11-15 Yao Qi <yao.qi@linaro.org>
1707
1708 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1709 M68HC11_LAST_HARD_REG + 1.
1710
1711 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1712
1713 PR gdb/22388
1714 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1715 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1716 Return TARGET_XFER_EOF if size of returned data is 0.
1717
1718 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1719
1720 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1721 memory-map-selftests.c.
1722 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1723 * memory-map.c (memory_map_start_memory): Fix computation of hi
1724 address.
1725 * unittests/memory-map-selftests.c: New file.
1726
1727 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1728
1729 * ada-lang.c: Fix some typos in the general command documenting
1730 how Ada expressions are being evaluated and how their result
1731 is printed.
1732
1733 2017-11-09 Tom Tromey <tom@tromey.com>
1734
1735 * psymtab.c (psymbol_hash): Do not hash string contents.
1736 (psymbol_compare): Add comment.
1737
1738 2017-11-09 Tom Tromey <tom@tromey.com>
1739
1740 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1741
1742 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1743
1744 * ada-exp.y (write_var_from_sym): Remove parameter
1745 "orig_left_context". Update all callers.
1746
1747 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1748
1749 * tracepoint.h (class collection_list) <stringify>: Return
1750 std::vector<std::string>.
1751 (encode_actions_rsp): Change parameters to
1752 std::vector<std::string> *.
1753 * tracepoint.c (collection_list::stringify): Return
1754 std::vector<std::string> and adjust accordingly.
1755 (encode_actions_rsp): Changee parameters to
1756 std::vector<std::string> and adjust accordingly.
1757 * remote.c (free_actions_list),
1758 free_actions_list_cleanup_wrapper): Remove.
1759 (remote_download_tracepoint): Adjust to std::vector.
1760
1761 2017-11-08 Tom Tromey <tom@tromey.com>
1762
1763 * dwarf2read.c (symbolp): Remove typedef.
1764 (read_func_scope): Use std::vector.
1765 (process_structure_scope): Use std::vector.
1766
1767 2017-11-08 Pedro Alves <palves@redhat.com>
1768
1769 * ada-lang.c (ada_make_symbol_completion_list): Use
1770 completion_skip_symbol.
1771 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1772 (symbol_is_function_or_method(symbol*)): New.
1773 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1774 completion_skip_symbol.
1775 (default_collect_symbol_completion_matches_break_on): Use
1776 completion_skip_symbol. Pass down mode.
1777 (collect_file_symbol_completion_matches): Pass down mode.
1778 * symtab.h (symbol_is_function_or_method): New declarations.
1779 (completion_skip_symbol): New template function.
1780
1781 2017-11-08 Pedro Alves <palves@redhat.com>
1782
1783 * linespec.c (iterate_over_all_matching_symtabs): Add
1784 search_domain parameter. Pass it down to expand_symtabs_matching.
1785 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1786 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1787 search_domain.
1788 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1789 Pass it down.
1790 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1791 symbols.
1792 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1793 it down.
1794
1795 2017-11-08 Pedro Alves <palves@redhat.com>
1796
1797 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1798 text_len locals and don't pass them down.
1799 * symtab.c (completion_list_add_name): Remove
1800 sym_text/sym_text_len parameters and adjust.
1801 (completion_list_add_symbol, completion_list_add_msymbol)
1802 (completion_list_objc_symbol, completion_list_add_fields)
1803 (add_symtab_completions): Likewise.
1804 (default_collect_symbol_completion_matches_break_on)
1805 (collect_file_symbol_completion_matches): Remove sym_text_len
1806 local and don't pass it down.
1807 * symtab.h (completion_list_add_name): Remove
1808 sym_text/sym_text_len parameters.
1809
1810 2017-11-08 Pedro Alves <palves@redhat.com>
1811
1812 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1813 unittests/lookup_name_info-selftests.c.
1814 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1815 * cp-support.c: Include "selftest.h".
1816 (cp_remove_params_1): Rename from cp_remove_params. Add
1817 'require_param' parameter, and handle it.
1818 (cp_remove_params): Reimplement.
1819 (cp_remove_params_if_any): New.
1820 (selftests::quote): New.
1821 (selftests::check_remove_params): New.
1822 (selftests::test_cp_remove_params): New.
1823 (_initialize_cp_support): Install
1824 selftests::test_cp_remove_params.
1825 * cp-support.h (cp_remove_params_if_any): Declare.
1826 * dwarf2read.c :Include "selftest.h".
1827 (dw2_expand_symtabs_matching_symbol): Use
1828 lookup_name_info::make_ignore_params.
1829 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1830 (selftests::dw2_expand_symtabs_matching::string_or_null)
1831 (selftests::dw2_expand_symtabs_matching::check_match)
1832 (selftests::dw2_expand_symtabs_matching::test_symbols)
1833 (selftests::dw2_expand_symtabs_matching::run_test): New.
1834 (_initialize_dwarf2_read): Register
1835 selftests::dw2_expand_symtabs_matching::run_test.
1836 * psymtab.c (psym_expand_symtabs_matching): Use
1837 lookup_name_info::make_ignore_params.
1838 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1839 If the lookup name wants to ignore parameters, strip them.
1840 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1841 code handling '('.
1842 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1843 (default_collect_symbol_completion_matches_break_on): Don't try to
1844 strip parameters.
1845 * symtab.h (lookup_name_info::lookup_name_info): Add
1846 'ignore_parameters' parameter.
1847 (lookup_name_info::ignore_parameters)
1848 (lookup_name_info::make_ignore_params): New methods.
1849 (lookup_name_info::m_ignore_parameters): New field.
1850 * unittests/lookup_name_info-selftests.c: New file.
1851
1852 2017-11-08 Pedro Alves <palves@redhat.com>
1853
1854 * dwarf2read.c (dw2_expand_marked_cus)
1855 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1856 (dw2_expand_symtabs_matching): Move further below.
1857 (dw2_expand_marked_cus): Reindent.
1858
1859 2017-11-08 Pedro Alves <palves@redhat.com>
1860
1861 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1862 (struct name_component): New.
1863 (mapped_index::name_components): New field.
1864 (mapped_index::symbol_name_at): New method.
1865 (dwarf2_read_index): Call mapped_index ctor.
1866 (dw2_map_matching_symbols): Add comment about name_components
1867 table.
1868 (dw2_expand_symtabs_matching): Factor part to...
1869 (dw2_expand_symtabs_matching_symbol): ... this new function.
1870 Build name components table, and lookup symbols in it before
1871 calling the name matcher.
1872 (dw2_expand_marked_cus): New, factored out from
1873 dw2_expand_symtabs_matching.
1874 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1875
1876 2017-11-08 Pedro Alves <palves@redhat.com>
1877
1878 * ada-lang.c (ada_encode): Rename to ..
1879 (ada_encode_1): ... this. Add throw_errors parameter and handle
1880 it.
1881 (ada_encode): Reimplement.
1882 (match_name): Delete, folded into full_name.
1883 (resolve_subexp): No longer pass the encoded name to
1884 ada_lookup_symbol_list.
1885 (should_use_wild_match): Delete.
1886 (name_match_type_from_name): New.
1887 (ada_lookup_simple_minsym): Use lookup_name_info and the
1888 language's symbol_name_matcher_ftype.
1889 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1890 (ada_add_block_renamings): Adjust to use lookup_name_info.
1891 (ada_lookup_name): New.
1892 (add_nonlocal_symbols, ada_add_all_symbols)
1893 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1894 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1895 (ada_name_for_lookup): Delete.
1896 (ada_lookup_encoded_symbol): Construct a verbatim name.
1897 (wild_match): Reverse sense of return type. Use bool.
1898 (full_match): Reverse sense of return type. Inline bits of old
1899 match_name here.
1900 (ada_add_block_symbols): Adjust to use lookup_name_info.
1901 (symbol_completion_match): Delete, folded into...
1902 (ada_lookup_name_info::matches): ... .this new method.
1903 (symbol_completion_add): Delete.
1904 (ada_collect_symbol_completion_matches): Add name_match_type
1905 parameter. Adjust to use lookup_name_info and
1906 completion_list_add_name.
1907 (get_var_value, ada_add_global_exceptions): Adjust to use
1908 lookup_name_info.
1909 (ada_get_symbol_name_cmp): Delete.
1910 (do_wild_match, do_full_match): New functions.
1911 (ada_lookup_name_info::ada_lookup_name_info): New method.
1912 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1913 functions.
1914 (ada_language_defn): Install ada_get_symbol_name_matcher.
1915 * ada-lex.l (processId): If name starts with '<', copy it
1916 verbatim.
1917 * block.c (block_iter_match_step, block_iter_match_first)
1918 (block_iter_match_next, block_lookup_symbol)
1919 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1920 lookup_name_info.
1921 * block.h (block_iter_match_first, block_iter_match_next)
1922 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1923 * c-lang.c (c_language_defn, cplus_language_defn)
1924 (asm_language_defn, minimal_language_defn): Adjust comments to
1925 refer to la_get_symbol_name_matcher.
1926 * completer.c (complete_files_symbols)
1927 (collect_explicit_location_matches, symbol_completer): Pass a
1928 symbol_name_match_type down.
1929 * completer.h (class completion_match, completion_match_result):
1930 New classes.
1931 (completion_tracker::reset_completion_match_result): New method.
1932 (completion_tracker::m_completion_match_result): New field.
1933 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1934 lookup_name_info.
1935 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1936 functions.
1937 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1938 * d-lang.c: Adjust comments to refer to
1939 la_get_symbol_name_matcher.
1940 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1941 Adjust to use lookup_name_info.
1942 (dict_iter_match_first, dict_iter_match_next)
1943 (iter_match_first_hashed, iter_match_next_hashed)
1944 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1945 with a lookup_name_info.
1946 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1947 Likewise.
1948 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1949 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1950 (gdb_index_symbol_name_matcher): New class.
1951 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1952 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1953 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1954 with a symbol_name_match_type.
1955 (f_language_defn): Adjust comments to refer to
1956 la_get_symbol_name_matcher.
1957 * go-lang.c (go_language_defn): Adjust comments to refer to
1958 la_get_symbol_name_matcher.
1959 * language.c (default_symbol_name_matcher)
1960 (language_get_symbol_name_matcher): New functions.
1961 (unknown_language_defn, auto_language_defn): Adjust comments to
1962 refer to la_get_symbol_name_matcher.
1963 * language.h (symbol_name_cmp_ftype): Delete.
1964 (language_defn) <la_collect_symbol_completion_matches>: Add match
1965 type parameter.
1966 <la_get_symbol_name_cmp>: Delete field.
1967 <la_get_symbol_name_matcher>: New field.
1968 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1969 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1970 Declare.
1971 * linespec.c (iterate_over_all_matching_symtabs)
1972 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1973 (find_methods): Add language parameter, and use lookup_name_info
1974 and the language's symbol_name_matcher_ftype.
1975 (linespec_complete_function): Adjust.
1976 (lookup_prefix_sym): Use lookup_name_info.
1977 (add_all_symbol_names_from_pspace): Adjust.
1978 (find_superclass_methods): Add language parameter and pass it
1979 down.
1980 (find_method): Pass symbol language down.
1981 (find_linespec_symbols): Don't demangle or Ada encode here.
1982 (search_minsyms_for_name): Add lookup_name_info parameter.
1983 (add_matching_symbols_to_info): Add name_match_type parameter.
1984 Use lookup_name_info.
1985 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1986 la_get_symbol_name_matcher.
1987 * minsyms.c: Include <algorithm>.
1988 (add_minsym_to_demangled_hash_table): Remove table parameter and
1989 add objfile parameter. Use search_name_hash, and add language to
1990 demangled languages vector.
1991 (struct found_minimal_symbols): New struct.
1992 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1993 New functions.
1994 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1995 input names here. Use lookup_name_info instead. Lookup up
1996 demangled names once for each language in the demangled names
1997 vector.
1998 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1999 demangled names once for each language in the demangled names
2000 vector.
2001 (build_minimal_symbol_hash_tables): Adjust.
2002 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2003 lookup_name_info.
2004 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2005 la_get_symbol_name_matcher.
2006 * objfiles.h: Include <vector>.
2007 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2008 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2009 la_get_symbol_name_matcher.
2010 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2011 la_get_symbol_name_matcher.
2012 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2013 (match_partial_symbol): Use symbol_name_match_type,
2014 lookup_name_info and psymbol_name_matches.
2015 (lookup_partial_symbol): Use lookup_name_info.
2016 (map_block): Use symbol_name_match_type and lookup_name_info.
2017 (psym_map_matching_symbols): Use symbol_name_match_type.
2018 (psymbol_name_matches): New.
2019 (recursively_search_psymtabs): Use lookup_name_info and
2020 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2021 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2022 'kind' parameter to 'domain'.
2023 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2024 la_get_symbol_name_matcher.
2025 * symfile-debug.c (debug_qf_map_matching_symbols)
2026 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2027 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2028 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2029 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2030 Adjust to use symbol_name_match_type.
2031 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2032 (expand_symtabs_matching): Adjust to use lookup_name_info.
2033 * symmisc.c (maintenance_expand_symtabs): Use
2034 lookup_name_info::match_any ().
2035 * symtab.c (symbol_matches_search_name): New.
2036 (eq_symbol_entry): Adjust to use lookup_name_info and the
2037 language's matcher.
2038 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2039 (lookup_name_info::match_any): New.
2040 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2041 (compare_symbol_name): Add language, lookup_name_info and
2042 completion_match_result parameters, and use them.
2043 (completion_list_add_name): Make extern. Add language and
2044 lookup_name_info parameters. Use them.
2045 (completion_list_add_symbol, completion_list_add_msymbol)
2046 (completion_list_objc_symbol): Add lookup_name_info parameters and
2047 adjust. Pass down language.
2048 (completion_list_add_fields): Add lookup_name_info parameters and
2049 adjust. Pass down language.
2050 (add_symtab_completions): Add lookup_name_info parameters and
2051 adjust.
2052 (default_collect_symbol_completion_matches_break_on): Add
2053 name_match_type parameter, and use it. Use lookup_name_info.
2054 (default_collect_symbol_completion_matches)
2055 (collect_symbol_completion_matches): Add name_match_type
2056 parameter, and pass it down.
2057 (collect_symbol_completion_matches_type): Adjust.
2058 (collect_file_symbol_completion_matches): Add name_match_type
2059 parameter, and use lookup_name_info.
2060 * symtab.h: Include <string> and "common/gdb_optional.h".
2061 (enum class symbol_name_match_type): New.
2062 (class ada_lookup_name_info): New.
2063 (struct demangle_for_lookup_info): New.
2064 (class lookup_name_info): New.
2065 (symbol_name_matcher_ftype): New.
2066 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2067 (symbol_matches_search_name): Declare.
2068 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2069 (default_collect_symbol_completion_matches)
2070 (collect_symbol_completion_matches)
2071 (collect_file_symbol_completion_matches): Add name_match_type
2072 parameter.
2073 (iterate_over_symbols): Use lookup_name_info.
2074 (completion_list_add_name): Declare.
2075 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2076 (strncmp_iw_with_mode): Now extern.
2077 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2078 (strncmp_iw_with_mode): Declare.
2079
2080 2017-11-08 Keith Seitz <keiths@redhat.com>
2081 Pedro Alves <palves@redhat.com>
2082
2083 * ada-lang.c (ada_language_defn): Install
2084 default_search_name_hash.
2085 * buildsym.c (struct buildsym_compunit): <language>: New field.
2086 (finish_block_internal): Pass language when creating dictionaries.
2087 (start_buildsym_compunit, start_symtab): New language parameters.
2088 Use them.
2089 (restart_symtab): Pass down compilation unit's language.
2090 * buildsym.h (enum language): Forward declare.
2091 (start_symtab): New 'language' parameter.
2092 * c-lang.c (c_language_defn, cplus_language_defn)
2093 (asm_language_defn, minimal_language_defn): Install
2094 default_search_name_hash.
2095 * coffread.c (coff_start_symtab): Adjust.
2096 * d-lang.c (d_language_defn): Install default_search_name_hash.
2097 * dbxread.c (struct symloc): Add 'pst_language' field.
2098 (PST_LANGUAGE): Define.
2099 (start_psymtab, read_ofile_symtab): Use it.
2100 (process_one_symbol): New 'language' parameter. Pass it down.
2101 * dictionary.c (struct dictionary) <language>: New field.
2102 (DICT_LANGUAGE): Define.
2103 (dict_create_hashed, dict_create_hashed_expandable)
2104 (dict_create_linear, dict_create_linear_expandable): New parameter
2105 'language'. Set the dictionary's language.
2106 (iter_match_first_hashed): Adjust to rename.
2107 (insert_symbol_hashed): Assert we don't see mismatching
2108 languages. Adjust to rename.
2109 (dict_hash): Rename to ...
2110 (default_search_name_hash): ... this and make extern.
2111 * dictionary.h (struct language_defn): Forward declare.
2112 (dict_create_hashed): New parameter 'language'.
2113 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2114 * f-lang.c (f_language_defn): Install default_search_name_hash.
2115 * go-lang.c (go_language_defn): Install default_search_name_hash.
2116 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2117 creation.
2118 * language.c (unknown_language_defn, auto_language_defn):
2119 * language.h (language_defn::la_search_name_hash): New field.
2120 (default_search_name_hash): Declare.
2121 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2122 * mdebugread.c (new_block): New parameter 'language'.
2123 * mdebugread.c (parse_symbol): Pass symbol language to block
2124 allocation.
2125 (psymtab_to_symtab_1): Pass down language.
2126 (new_symtab): Pass compunit's language to block allocation.
2127 * objc-lang.c (objc_language_defn): Install
2128 default_search_name_hash.
2129 * opencl-lang.c (opencl_language_defn):
2130 * p-lang.c (pascal_language_defn): Install
2131 default_search_name_hash.
2132 * rust-lang.c (rust_language_defn): Install
2133 default_search_name_hash.
2134 * stabsread.h (enum language): Forward declare.
2135 (process_one_symbol): Add 'language' parameter.
2136 * symtab.c (search_name_hash): New function.
2137 * symtab.h (search_name_hash): Declare.
2138 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2139
2140 2017-11-08 Pedro Alves <palves@redhat.com>
2141
2142 * cp-name-parser.y (main): Don't initialize extra_chars.
2143
2144 2017-11-07 Tom Tromey <tom@tromey.com>
2145
2146 * event-top.h (command_handler): Constify.
2147 * record-full.c (cmd_record_full_start): Update.
2148 * thread.c (thread_apply_all_command): Update.
2149 * printcmd.c (eval_command): Update.
2150 * mi/mi-main.c (mi_execute_cli_command): Update.
2151 (mi_execute_async_cli_command): Update.
2152 * tui/tui-stack.c (tui_update_command): Update.
2153 * cli/cli-interp.c (safe_execute_command): Constify.
2154 * record.c (record_start): Update.
2155 (record_start, record_stop, cmd_record_start): Update.
2156 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2157 (cmd_record_btrace_pt_start): Update.
2158 (cmd_record_btrace_start): Update.
2159 (cmd_record_btrace_start): Update.
2160 * reverse.c (exec_reverse_once): Update.
2161 * python/python.c (execute_gdb_command): Don't copy the command.
2162 * event-top.c (command_line_handler): Update.
2163 (command_handler): Constify.
2164 * defs.h (deprecated_call_command_hook): Constify.
2165 * cli/cli-script.h (execute_user_command): Constify.
2166 * cli/cli-script.c (execute_user_command): Constify.
2167 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2168 (enum command_control_type): Update.
2169 * main.c (catch_command_errors): Remove non-const overload.
2170 (catch_command_errors_ftype): Remove.
2171 * python/py-cmd.c (cmdpy_function): Constify.
2172 * guile/scm-cmd.c (cmdscm_function): Constify.
2173 * cli/cli-dump.c (call_dump_func): Constify.
2174 * cli/cli-decode.c (do_const_cfunc): Constify.
2175 (do_sfunc): Constify.
2176 (cmd_func): Constify.
2177 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2178 * top.h (execute_command): Constify.
2179 * top.c (execute_command): Constify.
2180 (execute_command_to_string): Constify.
2181 (deprecated_call_command_hook): Constify.
2182 * command.h (cmd_func): Constify.
2183 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2184
2185 2017-11-07 Tom Tromey <tom@tromey.com>
2186
2187 * ada-lang.c (catch_ada_exception_command): Constify.
2188 (catch_assert_command): Constify.
2189 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2190 (catch_rethrow_command): Constify.
2191 (catch_exception_command_1): Constify.
2192 * breakpoint.h (add_catch_command): Constify.
2193 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2194 (catch_syscall_split_args): Constify.
2195 * break-catch-sig.c (catch_signal_command): Constify.
2196 (catch_signal_split_args): Constify.
2197 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2198 cmd_const_sfunc_ftype.
2199 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2200 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2201 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2202 (add_setshow_string_cmd, struct cmd_list_element)
2203 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2204 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2205 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2206 Constify.
2207 (set_cmd_sfunc): Constify.
2208 (empty_sfunc): Constify.
2209 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2210 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2211 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2212 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2213 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2214 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2215 Constify.
2216 (set_cmd_sfunc): Constify.
2217 (cmd_sfunc_ftype): Remove.
2218 * compile/compile.c (set_compile_args): Constify.
2219 * infrun.c (set_disable_randomization): Constify.
2220 * infcmd.c (set_args_command, set_cwd_command): Constify.
2221 * breakpoint.c (set_condition_evaluation_mode): Constify.
2222 (add_catch_command): Constify.
2223 (catch_fork_command_1, catch_exec_command_1)
2224 (catch_load_command_1, catch_unload_command_1): Constify.
2225 (catch_load_or_unload): Constify.
2226 * guile/scm-param.c (pascm_set_func): Constify.
2227 (add_setshow_generic): Constify.
2228 * python/py-param.c (get_set_value): Constify.
2229 * top.h (set_verbose): Constify.
2230 * tui/tui-win.c (tui_set_var_cmd): Constify.
2231 * mi/mi-main.c (set_mi_async_command): Constify.
2232 * cli/cli-logging.c (set_logging_overwrite)
2233 (set_logging_redirect): Constify.
2234 * value.c (set_max_value_size): Constify.
2235 * valprint.c (set_input_radix, set_output_radix): Constify.
2236 * utils.c (set_width_command, set_height_command): Constify.
2237 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2238 * tracepoint.c (set_disconnected_tracing)
2239 (set_circular_trace_buffer, set_trace_buffer_size)
2240 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2241 * top.c (set_history_size_command, set_verbose, set_editing)
2242 (set_gdb_datadir, set_history_filename): Constify.
2243 * target.c (set_targetdebug, maint_set_target_async_command)
2244 (maint_set_target_non_stop_command, set_target_permissions)
2245 (set_write_memory_permission): Constify.
2246 (open_target): Constify.
2247 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2248 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2249 * symtab.c (set_symbol_cache_size_handler): Constify.
2250 * symfile.c (set_ext_lang_command): Constify.
2251 * symfile-debug.c (set_debug_symfile): Constify.
2252 * source.c (set_directories_command): Constify.
2253 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2254 * serial.c (set_parity): Constify.
2255 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2256 * remote.c (set_remote_exec_file, set_remotebreak)
2257 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2258 * record.c (set_record_insn_history_size)
2259 (set_record_call_history_size): Constify.
2260 * record-full.c (set_record_full_insn_max_num): Constify.
2261 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2262 * osabi.c (set_osabi): Constify.
2263 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2264 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2265 * maint.c (maintenance_set_profile_cmd): Constify.
2266 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2267 * language.c (set_language_command, set_range_command)
2268 (set_case_command): Constify.
2269 * infrun.c (set_non_stop, set_observer_mode)
2270 (set_stop_on_solib_events, set_schedlock_func)
2271 (set_exec_direction_func): Constify.
2272 * infcmd.c (set_inferior_tty_command): Constify.
2273 * disasm.c (set_disassembler_options_sfunc): Constify.
2274 * demangle.c (set_demangling_command): Constify.
2275 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2276 * cris-tdep.c (set_cris_version, set_cris_mode)
2277 (set_cris_dwarf2_cfi): Constify.
2278 * corefile.c (set_gnutarget_command): Constify.
2279 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2280 (set_target_wide_charset_sfunc): Constify.
2281 * breakpoint.c (update_dprintf_commands): Constify.
2282 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2283 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2284 (set_disassembly_style_sfunc): Constify.
2285 * arch-utils.c (set_endian, set_architecture): Constify.
2286 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2287 * agent.c (set_can_use_agent): Constify.
2288
2289 2017-11-07 Tom Tromey <tom@tromey.com>
2290
2291 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2292 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2293 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2294 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2295 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2296 (parse_int_arg, show_thread_default_detach_sc_cmd)
2297 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2298 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2299 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2300 (show_task_pause_cmd, set_task_detach_sc_cmd)
2301 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2302 (set_noninvasive_cmd, set_thread_pause_cmd)
2303 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2304 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2305 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2306 * windows-nat.c (display_selectors): Constify.
2307 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2308 non-const "cfunc".
2309 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2310 (cmd_cfunc_eq): Likewise.
2311 (struct cmd_list_element): Likewise.
2312 (do_cfunc): Remove.
2313 (cli_user_command_p): Update.
2314 * command.h (add_cmd): Remove non-const overload.
2315 (cmd_cfunc_ftype): Remove typedef.
2316 (cmd_cfunc_eq): Remove non-const overload.
2317 * value.c (show_values): Constify.
2318 * thread.c (thread_apply_all_command): Constify.
2319 * symfile.c (load_command): Constify.
2320 * source.c (directory_command): Constify.
2321 * maint.c (maintenance_internal_error)
2322 (maintenance_demangler_warning, maintenance_space_display)
2323 (maintenance_print_architecture, maintenance_translate_address)
2324 (maintenance_info_selftests, maintenance_internal_warning):
2325 Constify.
2326 * breakpoint.c (disable_trace_command, enable_trace_command):
2327 Constify.
2328 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2329 Constify.
2330 (add_auto_load_safe_path): Constify.
2331 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2332 * top.h (show_commands): Constify.
2333 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2334 * sparc64-tdep.c (adi_examine_command): Constify.
2335 (adi_assign_command): Constify.
2336
2337 2017-11-07 Tom Tromey <tom@tromey.com>
2338
2339 * frame.h (info_locals_command, info_args_command): Constify.
2340 * auto-load.h (auto_load_info_scripts): Constify.
2341 * inferior.h (registers_info): Constify.
2342 * copying.c: Rebuild.
2343 * copying.awk: Constify generated commands.
2344 * auto-load.c (auto_load_info_scripts)
2345 (info_auto_load_gdb_scripts): Constify.
2346 * cli/cli-decode.c (struct cmd_list_element): Take a
2347 cmd_const_cfunc_ftype.
2348 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2349 * tui/tui-win.c (tui_all_windows_info): Constify.
2350 * python/py-auto-load.c (info_auto_load_python_scripts):
2351 Constify.
2352 * cli/cli-cmds.c (show_command): Remove non-const overload.
2353 * tracepoint.c (info_tvariables_command, info_scope_command):
2354 Constify.
2355 (info_static_tracepoint_markers_command): Constify.
2356 * thread.c (info_threads_command): Constify.
2357 (print_thread_info_1): Constify.
2358 * target.c (info_target_command): Constify.
2359 * symtab.c (info_sources_command, info_functions_command)
2360 (info_types_command): Constify.
2361 (info_variables_command): Remove non-const overload.
2362 * symfile.c (info_ext_lang_command): Constify.
2363 * stack.c (info_frame_command, info_locals_command)
2364 (info_args_command): Constify.
2365 (backtrace_command): Remove non-const overload.
2366 * source.c (info_source_command, info_line_command): Constify.
2367 * solib.c (info_sharedlibrary_command): Constify.
2368 * skip.c (info_skip_command): Constify.
2369 * ser-go32.c (info_serial_command): Constify.
2370 * reverse.c (info_bookmarks_command): Constify.
2371 * printcmd.c (info_symbol_command, info_address_command)
2372 (info_display_command): Constify.
2373 * osdata.c (info_osdata_command): Constify.
2374 * objc-lang.c (info_selectors_command, info_classes_command):
2375 Constify.
2376 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2377 * memattr.c (info_mem_command): Constify.
2378 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2379 * linux-fork.c (info_checkpoints_command): Constify.
2380 * infrun.c (info_signals_command): Constify.
2381 * inflow.c (info_terminal_command): Constify.
2382 * inferior.c (info_inferiors_command): Constify.
2383 (print_inferior): Constify.
2384 * infcmd.c (info_program_command, info_all_registers_command)
2385 (info_registers_command, info_vector_command)
2386 (info_float_command): Constify.
2387 (registers_info): Constify.
2388 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2389 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2390 Constify.
2391 * f-valprint.c (info_common_command): Constify.
2392 * dcache.c (info_dcache_command): Constify.
2393 (dcache_info_1): Constify.
2394 * darwin-nat-info.c (info_mach_tasks_command)
2395 (info_mach_task_command, info_mach_ports_command)
2396 (info_mach_port_command, info_mach_threads_command)
2397 (info_mach_thread_command, info_mach_regions_command)
2398 (info_mach_regions_recurse_command, info_mach_region_command)
2399 (info_mach_exceptions_command): Constify.
2400 (get_task_from_args): Constify.
2401 * cp-support.c (info_vtbl_command): Constify.
2402 * breakpoint.c (info_watchpoints_command)
2403 (info_tracepoints_command): Constify.
2404 (info_breakpoints_command): Remove non-const overload.
2405 * avr-tdep.c (avr_io_reg_read_command): Constify.
2406 * auxv.c (info_auxv_command): Constify.
2407 * ada-tasks.c (info_tasks_command): Constify.
2408 (info_task): Constify.
2409 * ada-lang.c (info_exceptions_command): Constify.
2410
2411 2017-11-07 Tom Tromey <tom@tromey.com>
2412
2413 * solib.h (no_shared_libraries): Constify.
2414 * frame.h (return_command): Constify.
2415 * cli/cli-cmds.h (quit_command): Constify.
2416 * top.h (quit_command, execute_command): Constify.
2417 * target.h (flash_erase_command): Constify.
2418 * inferior.h (set_inferior_args, attach_command): Constify.
2419 * tracepoint.h (start_tracing, stop_tracing): Constify.
2420 * breakpoint.h (break_command, tbreak_command)
2421 (hbreak_command_wrapper, thbreak_command_wrapper)
2422 (rbreak_command_wrapper, watch_command_wrapper)
2423 (awatch_command_wrapper, rwatch_command_wrapper)
2424 (get_tracepoint_by_number): Constify.
2425 * symtab.c (info_variables_command, rbreak_command)
2426 (symtab_symbol_info): Constify.
2427 (info_variables_command): Add non-const overload.
2428 * top.c (dont_repeat_command): Constify.
2429 * breakpoint.c (ignore_command, commands_command)
2430 (condition_command, tbreak_command, hbreak_command)
2431 (thbreak_command, clear_command, break_command)
2432 (info_breakpoints_command, watch_command, rwatch_command)
2433 (awatch_command, trace_command, ftrace_command, strace_command)
2434 (trace_pass_command, break_range_command, dprintf_command)
2435 (agent_printf_command, get_tracepoint_by_number)
2436 (watch_maybe_just_location, trace_pass_command): Constify.
2437 (info_breakpoints_command): Add non-const overload.
2438 * tracefile.c (tsave_command): Constify.
2439 * infcmd.c (attach_command, disconnect_command, signal_command)
2440 (queue_signal_command, stepi_command, nexti_command)
2441 (finish_command, next_command, step_command, until_command)
2442 (advance_command, jump_command, continue_command, run_command)
2443 (start_command, starti_command, interrupt_command)
2444 (run_command_1, set_inferior_args, step_1): Constify.
2445 * inferior.c (add_inferior_command, remove_inferior_command)
2446 (clone_inferior_command): Constify.
2447 * linux-fork.c (checkpoint_command, restart_command): Constify.
2448 * windows-nat.c (signal_event_command): Constify.
2449 * guile/guile.c (guile_repl_command, guile_command): Constify.
2450 * printcmd.c (x_command, display_command, printf_command)
2451 (output_command, set_command, call_command, print_command)
2452 (eval_command): Constify.
2453 (non_const_set_command): Remove.
2454 (_initialize_printcmd): Update.
2455 * source.c (forward_search_command, reverse_search_command):
2456 Constify.
2457 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2458 Constify.
2459 * infrun.c (handle_command): Constify.
2460 * memattr.c (mem_command): Constify.
2461 * stack.c (return_command, up_command, up_silently_command)
2462 (down_command, down_silently_command, frame_command)
2463 (backtrace_command, func_command, backtrace_command_1): Constify.
2464 (backtrace_command): Add non-const overload.
2465 * remote-sim.c (simulator_command): Constify.
2466 * exec.c (set_section_command): Constify.
2467 * tracepoint.c (tdump_command, trace_variable_command)
2468 (tstatus_command, tstop_command, tstart_command)
2469 (end_actions_pseudocommand, while_stepping_pseudocommand)
2470 (collect_pseudocommand, teval_pseudocommand, actions_command)
2471 (start_tracing, stop_tracing): Constify.
2472 * value.c (init_if_undefined_command): Constify.
2473 * tui/tui-stack.c (tui_update_command): Constify.
2474 * tui/tui-win.c (tui_refresh_all_command)
2475 (tui_set_tab_width_command, tui_set_win_height_command)
2476 (tui_set_focus_command, tui_scroll_forward_command)
2477 (tui_scroll_backward_command, tui_scroll_left_command)
2478 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2479 (tui_set_win_height): Constify.
2480 * tui/tui-layout.c (tui_layout_command): Constify.
2481 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2482 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2483 (proc_untrace_sysexit_cmd): Constify.
2484 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2485 (threadset_test_cmd, threadlist_update_test_cmd)
2486 (threadalive_test): Constify.
2487 * objc-lang.c (print_object_command): Constify.
2488 * command.h (add_com): Constify.
2489 * cli/cli-dump.c (restore_command): Constify.
2490 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2491 (help_command, complete_command, shell_command, edit_command)
2492 (list_command, disassemble_command, make_command)
2493 (apropos_command, alias_command): Constify.
2494 * cli/cli-script.c (document_command, define_command)
2495 (while_command, if_command, validate_comname): Constify.
2496 * cli/cli-decode.c (struct cmd_list_element): Change type of
2497 "fun".
2498 * target.c (do_monitor_command, flash_erase_command): Constify.
2499 * regcache.c (reg_flush_command): Constify.
2500 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2501 (reverse_nexti, reverse_continue, reverse_finish)
2502 (save_bookmark_command, goto_bookmark_command)
2503 (exec_reverse_once): Constify.
2504 * python/python.c (python_interactive_command, python_command):
2505 Constify.
2506 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2507 Constify.
2508 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2509 * gcore.c (gcore_command): Constify.
2510
2511 2017-11-07 Tom Tromey <tom@tromey.com>
2512
2513 * printcmd.c (x_command): Call set_repeat_arguments.
2514 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2515 * top.c (repeat_arguments): New global.
2516 (set_repeat_arguments): New function.
2517 (execute_command): Handle repeat_arguments.
2518 (show_commands): Calls set_repeat_arguments.
2519 * command.h (set_repeat_arguments): Declare.
2520
2521 2017-11-07 Tom Tromey <tom@tromey.com>
2522
2523 * stack.c (backtrace_command): Use std::string.
2524 (backtrace_command_1): Make "count_exp" const.
2525
2526 2017-11-07 Tom Tromey <tom@tromey.com>
2527
2528 * source.c (directory_switch, mod_path, add_path): Constify.
2529 * defs.h (add_path, mod_path, directory_switch): Constify.
2530 * mi/mi-cmd-env.c (env_mod_path): Constify.
2531
2532 2017-11-07 Tom Tromey <tom@tromey.com>
2533
2534 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2535 (run_command_1, continue_command, step_1, jump_command)
2536 (signal_command, until_command, advance_command, finish_command)
2537 (attach_command): Update.
2538
2539 2017-11-07 Tom Tromey <tom@tromey.com>
2540
2541 * command.h (set_cmd_cfunc): Don't declare.
2542 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2543
2544 2017-11-07 Tom Tromey <tom@tromey.com>
2545
2546 * stack.c (select_frame_command): Constify.
2547 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2548 * command.h (add_com_suppress_notification): Constify.
2549
2550 2017-11-07 Tom Tromey <tom@tromey.com>
2551
2552 * breakpoint.c (stop_command): Constify.
2553 * cli/cli-decode.c (struct cmd_list_element): Constify.
2554 * command.h (add_abbrev_prefix_cmd): Constify.
2555
2556 2017-11-07 Pedro Alves <palves@redhat.com>
2557
2558 * breakpoint.c (extract_bp_kind): New enum.
2559 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2560 factored out from ...
2561 (extract_bp_number_and_location): ... here.
2562 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2563
2564 2017-11-07 Pedro Alves <palves@redhat.com>
2565
2566 * breakpoint.c (extract_bp_number_and_location): Change return
2567 type to void. Throw error instead of warning.
2568 (enable_disable_command): Adjust.
2569
2570 2017-11-07 Xavier Roirand <roirand@adacore.com>
2571 Pedro Alves <palves@redhat.com>
2572
2573 * breakpoint.c (map_breakpoint_number_range): New, factored out
2574 from ...
2575 (map_breakpoint_numbers): ... here.
2576 (find_location_by_number): Change parameters from string to
2577 breakpoint number and location.
2578 (extract_bp_number_and_location): New function.
2579 (enable_disable_bp_num_loc)
2580 (enable_disable_breakpoint_location_range)
2581 (enable_disable_command): New functions, factored out ...
2582 (enable_command, disable_command): ... these functions, and
2583 adjusted to support ranges.
2584 * NEWS: Document enable/disable breakpoint location range feature.
2585
2586 2017-11-06 Luis Machado <luis.machado@linaro.org>
2587
2588 * MAINTAINERS (Write After Approval): Update my e-mail address.
2589
2590 2017-11-06 Pedro Alves <palves@redhat.com>
2591
2592 * gnu-nat.c (gnu_terminal_init): Delete.
2593 (gnu_target): Don't install gnu_terminal_init.
2594 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2595 (child_terminal_init): ... this function.
2596
2597 2017-11-06 Pedro Alves <palves@redhat.com>
2598
2599 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2600 sgtty.h.
2601 * config.in, configure: Regenerate.
2602
2603 2017-11-06 Pedro Alves <palves@redhat.com>
2604
2605 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2606 (async_init_signals): Adjust.
2607 (handle_stop_sig): Rename to ...
2608 (handle_sigtstp): ... this.
2609 (async_stop_sig): Rename to ...
2610 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2611 SIGTSTP path.
2612 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2613 instead of STOP_SIGNAL thoughout.
2614 (handle_stop_sig): Rename to ...
2615 (handle_sigtstp): ... this.
2616 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2617
2618 2017-11-06 Pedro Alves <palves@redhat.com>
2619
2620 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2621 longer set flags twice in row.
2622
2623 2017-11-06 Pedro Alves <palves@redhat.com>
2624
2625 * Makefile.in (SER_HARDWIRE): Update comment.
2626 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2627 * common/gdb_termios.h: Delete file.
2628 * common/job-control.c: Include termios.h and unistd.h instead of
2629 gdb_termios.h.
2630 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2631 check.
2632 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2633 Remove sgtty code.
2634 * configure.ac: No longer check for termio.h and sgtty.h.
2635 * configure: Regenerate.
2636 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2637 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2638 Replace PROCESS_GROUP_TYPE references with pid_t references
2639 throughout.
2640 (gdb_getpgrp): Delete.
2641 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2642 (child_terminal_inferior): Remove comment. Remove sgtty code.
2643 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2644 gdb_getpgrp. Use serial_set_tty_state instead aof
2645 serial_noflush_set_tty_state. Remove sgtty code.
2646 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2647 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2648 (inferior_process_group): Now returns pid_t.
2649 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2650 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2651 * ser-event.c (serial_event_ops): Update.
2652 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2653 (dos_ops): Update.
2654 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2655 * ser-pipe.c (pipe_ops): Update.
2656 * ser-tcp.c (tcp_ops): Update.
2657 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2658 HAVE_TERMIOS checks.
2659 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2660 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2661 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2662 assume termios.
2663 (hardwire_noflush_set_tty_state): Delete.
2664 (hardwire_print_tty_state, hardwire_drain_output)
2665 (hardwire_flush_output, hardwire_flush_input)
2666 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2667 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2668 code, and assume termios.
2669 (hardwire_ops): Update.
2670 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2671 * serial.c (serial_noflush_set_tty_state): Delete.
2672 * serial.h (serial_noflush_set_tty_state): Delete.
2673 (serial_ops::noflush_set_tty_state): Delete.
2674
2675 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2676
2677 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2678 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2679 (COMMON_OBS): Remove doublest.o and dfp.o.
2680 Do not build target-float.c (instead of doublest.c)
2681 with -Wformat-nonliteral.
2682
2683 * doublest.c: Remove file.
2684 * doublest.h: Remove file.
2685 * dfp.c: Remove file.
2686 * dfp.h: Remove file.
2687
2688 * target-float.c: Do not include "doublest.h" and "dfp.h".
2689 (DOUBLEST): Move here from doublest.h.
2690 (enum float_kind): Likewise.
2691 (FLOATFORMAT_CHAR_BIT): Likewise.
2692 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2693 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2694 (floatformat_precision): Likewise.
2695 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2696 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2697 Likewise.
2698 (host_float_format, host_double_format, host_long_double_format):
2699 Likewise.
2700 (floatformat_to_string, floatformat_from_string): Likewise.
2701 (floatformat_to_doublest): Likewise. Also, inline the original
2702 convert_floatformat_to_doublest.
2703 (floatformat_from_doublest): Likewise. Also, inline the original
2704 convert_floatformat_from_doublest.
2705
2706 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2707 (MAX_DECIMAL_STRING): Move here from dfp.c.
2708 (match_endianness): Likewise.
2709 (set_decnumber_context, decimal_check_errors): Likewise.
2710 (decimal_from_number, decimal_to_number): Likewise.
2711 (decimal_to_string, decimal_from_string): Likewise. Make static.
2712 (decimal_from_longest, decimal_from_ulongest): Likewise.
2713 (decimal_to_longest): Likewise.
2714 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2715 (decimal_convert): Likewise.
2716
2717 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2718
2719 * doublest.c: Do not include "gdbtypes.h".
2720 (extract_typed_floating): Remove.
2721 (store_typed_floating): Remove.
2722 (convert_typed_floating): Remove.
2723 * doublest.h (struct type): Remove.
2724 (DOUBLEST_PRINT_FORMAT): Remove.
2725 (DOUBLEST_SCAN_FORMAT): Remove.
2726 (extract_typed_floating): Remove.
2727 (store_typed_floating): Remove.
2728 (convert_typed_floating): Remove.
2729
2730 * dfp.c (decimal_from_doublest): Remove.
2731 (decimal_to_doublest): Remove.
2732 * dfp.h: Do not include "doublest.h".
2733 (decimal_from_doublest): Remove.
2734 (decimal_to_doublest): Remove.
2735
2736 * value.c: Do not include "doublest.h" and "dfp.h".
2737 (value_as_double): Remove.
2738 (unpack_double): Remove.
2739 (value_from_double): Remove.
2740 (value_from_decfloat): Remove.
2741 * value.h: Do not include "doublest.h".
2742 (value_as_double): Remove.
2743 (unpack_double): Remove.
2744 (value_from_double): Remove.
2745 (value_from_decfloat): Remove.
2746
2747 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2748
2749 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2750 (i386_extract_return_value): Use target_float_convert.
2751 (i386_store_return_value): Likewise.
2752 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2753 (i387_value_to_register): Likewise.
2754 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2755 (ia64_register_to_value): Use target_float_convert.
2756 (ia64_value_to_register): Likewise.
2757 (ia64_extract_return_value): Likewise.
2758 (ia64_store_return_value): Likewise.
2759 (ia64_push_dummy_call): Likewise.
2760 * m68k-tdep.c: Include "target-float.h".
2761 (m68k_register_to_value): Use target_float_convert.
2762 (m68k_value_to_register): Likewise.
2763 (m68k_svr4_extract_return_value): Likewise.
2764 (m68k_svr4_store_return_value): Likewise.
2765 * ppc-sysv-tdep.c: Include "target-float.h".
2766 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2767 (do_ppc_sysv_return_value): Likewise.
2768 (ppc64_sysv_abi_push_freg): Likewise.
2769 (ppc64_sysv_abi_return_value_base): Likewise.
2770 * rs6000-aix-tdep.c: Include "target-float.h".
2771 (rs6000_push_dummy_call): Use target_float_convert.
2772 (rs6000_return_value): Likewise.
2773 * rs6000-lynx178-tdep.c: Include "target-float.h".
2774 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2775 (rs6000_lynx178_return_value): Likewise.
2776 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2777 (rs6000_register_to_value): Use target_float_convert.
2778 (rs6000_value_to_register): Likewise.
2779 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2780 (arm_extract_return_value): Use target_float_convert.
2781 (arm_store_return_value): Likewise.
2782 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2783 (sh_register_convert_to_virtual): Use target_float_convert.
2784 (sh_register_convert_to_raw): Likewise.
2785 * sh64-tdep.c: Include "target-float.h".
2786 (sh64_extract_return_value): Use target_float_convert.
2787 (sh64_register_convert_to_virtual): Likewise.
2788 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2789
2790 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2791
2792 * target-float.c (floatformat_to_host_double): New function.
2793 (floatformat_from_host_double): Likewise.
2794 (target_float_to_host_double): Likewise.
2795 (target_float_from_host_double): Likewise.
2796 * target-float.h (target_float_to_host_double): Add prototype.
2797 (target_float_from_host_double): Likewise.
2798
2799 * guile/scm-value.c: Include "target-float.h".
2800 (gdbscm_value_to_real): Use target_float_to_host_double.
2801 Handle integer source values via value_as_long.
2802 * guile/scm-math.c: Include "target-float.h". Do not include
2803 "doublest.h", "dfp.h", and "expression.h".
2804 (vlscm_convert_typed_number): Use target_float_from_host_double.
2805 (vlscm_convert_number): Likewise.
2806
2807 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2808 (convert_value_from_python): Use target_float_from_host_double.
2809
2810 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2811
2812 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2813 (cast_from_fixed): Likewise.
2814 (ada_scaling_type): New function.
2815 (ada_delta): Return value instead of DOUBLEST. Perform target
2816 arithmetic instead of host arithmetic.
2817 (scaling_factor): Rename to ...
2818 (ada_scaling_factor) ... this. Make non-static. Return value instead
2819 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2820 (ada_fixed_to_float): Remove.
2821 (ada_float_to_fixed): Remove.
2822 * ada-lang.h (ada_fixed_to_float): Remove.
2823 (ada_float_to_fixed): Remove.
2824 (ada_delta): Return value instead of DOUBLEST.
2825 (ada_scaling_factor): Add prototype.
2826
2827 * ada-typeprint.c: Include "target-float.h".
2828 (print_fixed_point_type): Perform target arithmetic instead of
2829 host arithmetic.
2830 * ada-valprint.c: Include "target-float.h".
2831 (ada_val_print_num): Perform target arithmetic instead of
2832 host arithmetic for fixed-point types.
2833
2834 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2835
2836 * target-float.c: Include <math.h>.
2837 (floatformat_binop): New function.
2838 (floatformat_compare): Likewise.
2839 (target_float_binop): Likewise.
2840 (target_float_compare): Likewise.
2841 * target-float.h: Include "expression.h".
2842 (target_float_binop): Add prototype.
2843 (target_float_compare): Likewise.
2844
2845 * valarith.c: Do not include "doublest.h" and "dfp.h".
2846 Include "common/byte-vector.h".
2847 (value_args_as_decimal): Remove, replace by ...
2848 (value_args_as_target_float): ... this function. Handle both
2849 binary and decimal target floating-point formats.
2850 (scalar_binop): Handle both binary and decimal FP using
2851 value_args_as_target_float and target_float_binop.
2852 (value_equal): Handle both binary and decimal FP using
2853 value_args_as_target_float and target_float_compare.
2854 (value_less): Likewise.
2855 (value_pos): Handle all scalar types as simple copy.
2856 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2857 * dfp.c (decimal_binop): Throw error instead of internal_error
2858 when called with an unsupported operation code.
2859
2860 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2861
2862 * target-float.c (target_float_to_string): New function.
2863 (target_float_from_string): New function.
2864 * target-float.h (target_float_to_string): Add prototype.
2865 (target_float_from_string): Add prototype.
2866
2867 * valprint.c: Include "target-float.h". Do not include
2868 "doublest.h" and "dfp.h".
2869 (print_floating): Use target_float_to_string.
2870 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2871 (printf_floating): Use target_float_to_string.
2872 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2873 (print_i387_value): Use target_float_to_string.
2874 * mips-tdep.c: Include "target-float.h".
2875 (mips_print_fp_register): Use target_float_to_string.
2876 * sh64-tdep.c: Include "target-float.h".
2877 (sh64_do_fp_register): Use target_float_to_string.
2878
2879 * parse.c: Include "target-float.h". Do not include
2880 "doublest.h" and "dfp.h".
2881 (parse_float): Use target_float_from_string.
2882 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2883 (define_symbol): Use target_float_from_string.
2884 * gdbarch-selftests.c: Include "target-float.h".
2885 (register_to_value_test): Use target_float_from_string.
2886
2887 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2888
2889 * Makefile.c (SFILES): Add target-float.c.
2890 (HFILES_NO_SRCDIR): Add target-float.h.
2891 (COMMON_OBS): Add target-float.o.
2892 * target-float.h: New file.
2893 * target-float.c: New file.
2894
2895 * doublest.c (floatformat_classify): Fix detection of float_zero.
2896
2897 * gdbtypes.c (is_floating_type): New function.
2898 * gdbtypes.h (is_floating_type): Add prototype.
2899
2900 * value.c: Do not include "floatformat.h".
2901 (unpack_double): Use target_float_is_valid.
2902 (is_floating_value): New function.
2903 * value.h (is_floating_value): Add prototype-
2904
2905 * valarith.c: Include "target-float.h".
2906 (value_logical_not): Use target_float_is_zero.
2907
2908 * python/py-value.c: Include "target-float.h".
2909 (valpy_nonzero): Use target_float_is_zero.
2910
2911 2017-11-04 Tom Tromey <tom@tromey.com>
2912
2913 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2914
2915 2017-11-04 Tom Tromey <tom@tromey.com>
2916
2917 * breakpoint.c (set_momentary_breakpoint): Return
2918 breakpoint_up.
2919 (until_break_command): Update.
2920 (new_until_break_fsm): Change argument types to
2921 breakpoint_up.
2922 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2923 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2924 Remove.
2925 * infcmd.c (finish_forward): Update.
2926 * breakpoint.h (set_momentary_breakpoint)
2927 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2928 (make_cleanup_delete_breakpoint): Remove.
2929 (struct breakpoint_deleter): New.
2930 (breakpoint_up): New typedef.
2931 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2932 (insert_exception_resume_breakpoint): Update.
2933 (insert_exception_resume_from_probe): Update.
2934 (insert_longjmp_resume_breakpoint): Update.
2935 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2936 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2937 * infcall.c (call_function_by_hand_dummy): Update
2938
2939 2017-11-04 Tom Tromey <tom@tromey.com>
2940
2941 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2942
2943 2017-11-04 Tom Tromey <tom@tromey.com>
2944
2945 * linux-tdep.c (linux_core_info_proc_mappings): Use
2946 gdb::def_vector.
2947 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2948 "size" argument.
2949 (linux_corefile_thread): Update.
2950 (linux_make_corefile_notes): Remove unused variable.
2951
2952 2017-11-04 Tom Tromey <tom@tromey.com>
2953
2954 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2955 gdb::byte_vector.
2956
2957 2017-11-04 Tom Tromey <tom@tromey.com>
2958
2959 * objfiles.c (do_free_objfile_cleanup): Remove.
2960 * compile/compile-object-load.c (compile_object_load): Update.
2961 * objfiles.h (make_cleanup_free_objfile): Remove.
2962
2963 2017-11-04 Tom Tromey <tom@tromey.com>
2964
2965 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2966 (adi_read_versions): Change "tags" to "gdb_byte *".
2967 (adi_print_versions): Likewise.
2968
2969 2017-11-04 Tom Tromey <tom@tromey.com>
2970
2971 * breakpoint.c
2972 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2973 from start_rbreak_breakpoints.
2974 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2975 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2976 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2977 * symtab.c (do_end_rbreak_breakpoints): Remove.
2978 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2979
2980 2017-11-04 Tom Tromey <tom@tromey.com>
2981
2982 * cp-namespace.c (reset_directive_searched): Remove.
2983 (cp_lookup_symbol_via_imports): Use scoped_restore.
2984 * cp-support.c (reset_directive_searched): Remove.
2985 (make_symbol_overload_list_using): Use scoped_restore.
2986 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2987 (reset_directive_searched): Remove.
2988
2989 2017-11-04 Tom Tromey <tom@tromey.com>
2990
2991 * symfile.c (find_separate_debug_file_by_debuglink): Use
2992 unique_xmalloc_ptr.
2993
2994 2017-11-04 Tom Tromey <tom@tromey.com>
2995
2996 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2997 type of "info".
2998 (compute_stack_depth): Likewise.
2999 (do_compile_dwarf_expr_to_c): Use std::vector.
3000
3001 2017-11-04 Tom Tromey <tom@tromey.com>
3002
3003 * compile/compile-object-load.c (link_callbacks_einfo): Use
3004 std::string.
3005
3006 2017-11-04 Tom Tromey <tom@tromey.com>
3007
3008 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3009 Use scoped_free_pendings.
3010 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3011 scoped_free_pendings.
3012 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3013 (xcoff_initial_scan): Likewise.
3014 * buildsym.c (reset_symtab_globals): Update comment.
3015 (scoped_free_pendings): Rename from really_free_pendings.
3016 (prepare_for_building): Update comment.
3017 (buildsym_init): Likewise.
3018 * buildsym.h (class scoped_free_pendings): New class.
3019 (really_free_pendings): Don't declare.
3020
3021 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3022
3023 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3024 output when converting a zero value to a special byteorder format.
3025
3026 2017-11-02 Yao Qi <yao.qi@linaro.org>
3027
3028 * frame.c (do_frame_register_read): Remove aspace.
3029 * jit.c (jit_frame_sniffer): Likwise.
3030 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3031 * regcache.c (regcache::regcache): Pass nullptr.
3032 (regcache_print): Caller updated.
3033 * regcache.h (regcache::regcache): Remove one constructor
3034 parameter aspace.
3035
3036 2017-11-02 Yao Qi <yao.qi@linaro.org>
3037
3038 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3039
3040 2017-11-02 Yao Qi <yao.qi@linaro.org>
3041
3042 * breakpoint.c (insert_single_step_breakpoints): Update.
3043 * frame.c (struct frame_info) <aspace>: Add const.
3044 (frame_save_as_regcache): Add const.
3045 (get_frame_address_space): Return const address_space *.
3046 * frame.h (get_frame_address_space): Update declaration.
3047 * infrun.c (struct step_over_info) <aspace>: Add const.
3048 (set_step_over_info): Make aspace const.
3049 (displaced_step_prepare_throw): Change variable const.
3050 (resume): Likewise.
3051 (proceed): Likewise.
3052 (adjust_pc_after_break): Likewise.
3053 (save_waitstatus): Likewise.
3054 (handle_signal_stop): Likewise.
3055 (keep_going_pass_signal): Likewise.
3056 * jit.c (jit_frame_sniffer): Add const.
3057 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3058 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3059 * record-full.c (record_full_wait_1): Likewise.
3060 * regcache.c (regcache::regcache): Change parameter to const.
3061 * regcache.h (regcache::regcache): Likewise.
3062 (regcache::aspace): Return const address_space *.
3063 (regcache) <m_aspace>: Add const.
3064
3065 2017-11-02 Yao Qi <yao.qi@linaro.org>
3066
3067 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3068 * frame.c (create_sentinel_frame): Likewise.
3069 * infrun.c (displaced_step_prepare_throw): Likewise.
3070 (resume): Likewise.
3071 (thread_still_needs_step_over_bp): Likewise.
3072 (proceed): Likewise.
3073 (do_target_wait): Likewise.
3074 (adjust_pc_after_break): Likewise.
3075 (handle_syscall_event): Likewise.
3076 (save_waitstatus): Likewise.
3077 (handle_inferior_event_1): Likewise.
3078 (handle_signal_stop): Likewise.
3079 (keep_going_pass_signal): Likewise.
3080 * linux-nat.c (status_callback): Likewise.
3081 (save_stop_reason): Likewise.
3082 (resume_stopped_resumed_lwps): Likewise.
3083 * record-full.c (record_full_exec_insn): Likewise.
3084 (record_full_wait_1): Likewise.
3085 * regcache.c (get_regcache_aspace): Remove.
3086 * regcache.h (get_regcache_aspace): Remove.
3087
3088 2017-11-02 Yao Qi <yao.qi@linaro.org>
3089
3090 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3091 (init_regcache_descr): Use gdbarch_num_regs.
3092 (regcache::regcache): Likewise.
3093 (regcache::get_register_status): Likewise.
3094 (regcache::assert_raw_regnum): Likewise.
3095 (regcache::cooked_read): Likewise.
3096 (regcache::cooked_read_value): Likewise.
3097 (regcache::cooked_write): Likewise.
3098 (regcache::dump): Likewise.
3099 (regcache::num_raw_registers): New method.
3100 * regcache.h (class regcache) <num_raw_registers>: New.
3101
3102 2017-11-02 Yao Qi <yao.qi@linaro.org>
3103
3104 * regcache.c (regcache::assert_regnum): New method.
3105 (regcache::invalidate): Call assert_regnum.
3106 (regcache::raw_update): Likewise.
3107 (regcache::raw_write): Likewise.
3108 (regcache::raw_read_part): Likewise.
3109 (regcache::raw_write_part): Likewise.
3110 (regcache::raw_supply): Likewise.
3111 (regcache::raw_supply_integer): Likewise.
3112 (regcache::raw_supply_zeroed): Likewise.
3113 (regcache::raw_collect): Likewise.
3114 (regcache::raw_collect_integer): Likewise.
3115 * regcache.h (regcache::assert_regnum): Declare.
3116
3117 2017-11-02 Yao Qi <yao.qi@linaro.org>
3118
3119 * regcache.c (regcache::dump): Remove code.
3120
3121 2017-11-02 Yao Qi <yao.qi@linaro.org>
3122
3123 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3124 Remove.
3125 <sizeof_cooked_register_status>: Remove.
3126 (init_regcache_descr): Update.
3127 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3128 (regcache::save): Likewise.
3129 (regcache::dump): Likewise.
3130
3131 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3132
3133 * ft32-tdep.c (ft32_fetch_instruction): New function.
3134 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3135
3136 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3137
3138 * cli/cli-script.c (execute_control_command): Rename to ...
3139 (execute_control_command_1): ... this.
3140 (execute_control_command): New function.
3141
3142 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3143
3144 * tracepoint.c (tfind_command): Remove const_cast.
3145
3146 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3147
3148 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3149
3150 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3151
3152 * common/common-utils.h (in_inclusive_range): New function.
3153 * arm-tdep.c (arm_record_extension_space): Use
3154 in_inclusive_range.
3155 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3156 * cris-tdep.c (cris_spec_reg_applicable): Use
3157 in_inclusive_range.
3158
3159 2017-10-30 Pedro Alves <palves@redhat.com>
3160 Simon Marchi <simon.marchi@ericsson.com>
3161
3162 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3163 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3164
3165 2017-10-30 Pedro Alves <palves@redhat.com>
3166
3167 * common/common-utils.c (string_appendf, string_vappendf): New
3168 functions.
3169 * common/common-utils.h (string_appendf, string_vappendf): New
3170 declarations.
3171 * unittests/common-utils-selftests.c (string_appendf_func)
3172 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3173 (string_vappendf_tests): New functions.
3174 (_initialize_common_utils_selftests): Register "string_appendf" and
3175 "string_vappendf tests".
3176
3177 2017-10-30 Pedro Alves <palves@redhat.com>
3178
3179 * unittests/common-utils-selftests.c (format_func): New typedef.
3180 (string_printf_tests, string_vprintf_tests): Tests factored out
3181 and merged to ...
3182 (test_format_func): ... this new function.
3183 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3184 test_format_func.
3185
3186 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3187
3188 * darwin-nat.c: Remove include of gdb.h.
3189
3190 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3191
3192 * xtensa-xtregs.c: Fix formatting issues.
3193
3194 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3195
3196 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3197
3198 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3199
3200 PR python/21213
3201 * python/py-infthread.c (thpy_get_inferior): Increment reference
3202 of inferior before returning it.
3203
3204 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3205
3206 * unittests/common-utils-selftests.c (format): Add
3207 ATTRIBUTE_PRINTF.
3208
3209 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3210
3211 * xml-syscall.c (struct syscall_desc): Add constructor.
3212 <name>: Change type to std::string.
3213 (syscall_desc_up): New typedef.
3214 (syscall_desc_p): Remove typeder.
3215 (DEF_VEC_P(syscall_desc_p)): Remove.
3216 (struct syscall_group_desc): Add constructor.
3217 <name>: Change type to std::string.
3218 <syscalls>: Change type to std::vector.
3219 (syscall_group_desc_up): New typedef.
3220 (syscall_group_desc_p): Remove typedef.
3221 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3222 (struct syscalls_info) <syscalls>: Change type to std::vector of
3223 unique_ptr.
3224 <groups>: Likewise.
3225 <my_gdb_datadir>: Change type to std::string.
3226 (syscalls_info_up): New typedef.
3227 (allocate_syscalls_info): Remove.
3228 (syscalls_info_free_syscalls_desc): Remove.
3229 (syscalls_info_free_syscall_group_desc): Remove.
3230 (free_syscalls_info): Remove.
3231 (make_cleanup_free_syscalls_info): Remove.
3232 (syscall_group_create_syscall_group_desc): Adjust.
3233 (syscall_group_add_syscall): Adjust.
3234 (syscall_create_syscall_desc): Adjust.
3235 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3236 (init_syscalls_info): Adjust.
3237 (syscall_group_get_group_by_name): Adjust.
3238 (xml_get_syscall_number): Adjust.
3239 (xml_get_syscall_name): Adjust.
3240 (xml_list_of_syscalls): Adjust.
3241 (xml_list_syscalls_by_group): Adjust.
3242 (xml_list_of_groups): Adjust.
3243
3244 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3245
3246 * probe.h: Don't include gdb_vecs.h.
3247 (DEF_VEC_P (probe_p)): Remove.
3248 (find_probes_in_objfile): Return an std::vector.
3249 * probe.c (find_probes_in_objfile): Likewise.
3250 * breakpoint.c (breakpoint_objfile_data)
3251 <longjmp_probes>: Change type to std::vector.
3252 <exception_probes>: Likewise.
3253 (free_breakpoint_probes): Don't manually free vectors.
3254 (create_longjmp_master_breakpoint): Adjust.
3255 (create_exception_master_breakpoint): Adjust.
3256 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3257 parameter type, adjust.
3258 (svr4_create_solib_event_breakpoints): Adjust.
3259
3260 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3261
3262 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3263 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3264 with new.
3265 (free_breakpoint_probes): Rename to ...
3266 (free_breakpoint_objfile_data): ... this, and call delete on
3267 bp_objfile_data..
3268
3269 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3270
3271 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3272 (loaded_script_ptr): Remove typedef.
3273 (DEF_VEC_P (loaded_script_ptr)): Remove.
3274 (struct collect_matching_scripts_data): Add constructor.
3275 <scripts_p>: Change type to (pointer to) std::vector.
3276 (collect_matching_scripts_data): Adjust.
3277 (sort_scripts_by_name): Make suitable for std::sort.
3278 (print_scripts): Don't sort vector, adjust to std::vector.
3279 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3280
3281 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3282
3283 * symfile.c (filename_language): Make struct, not typedef. Add
3284 constructor.
3285 <ext>: Change type to std::string.
3286 (DEF_VEC_O (filename_language)): Remove.
3287 (filename_language_table): Change type to std::vector.
3288 (add_filename_language): Adjust.
3289 (set_ext_lang_command): Adjust.
3290 (info_ext_lang_command): Adjust.
3291 (deduce_language_from_filename): Adjust.
3292 (class scoped_restore_filename_language_table): Remove.
3293 (test_filename_language): Use scoped_restore.
3294 (test_set_ext_lang_command): Use scoped_restore, adjust to
3295 std::vector change.
3296
3297 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3298
3299 * symfile.c: Include selftest.h.
3300 (class scoped_restore_filename_language_table): New.
3301 (test_filename_language): New test.
3302 (test_set_ext_lang_command): New test.
3303 (_initialize_symfile): Register tests.
3304
3305 2017-10-27 Keith Seitz <keiths@redhat.com>
3306
3307 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3308 in the bp_location, falling back to find_pc_sect_function when
3309 needed.
3310 (add_location_to_breakpoint): Save sal->symbol.
3311 * breakpoint.h (struct bp_location) <symbol>: New field.
3312 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3313 * symtab.h (struct symtab_and_line) <symbol>: New field.
3314
3315 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3316
3317 PR gdb/13669
3318 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3319 to rewind obstack.
3320
3321 2017-10-26 Pedro Alves <palves@redhat.com>
3322
3323 * remote.c (remote_async_terminal_ours_p): Delete.
3324 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3325 Remove references to 'remote_async_terminal_ours_p'.
3326
3327 2017-10-26 Yao Qi <yao.qi@linaro.org>
3328
3329 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3330
3331 2017-10-26 Yao Qi <yao.qi@linaro.org>
3332
3333 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3334 aspace const.
3335 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3336 Likewise.
3337 * breakpoint.c (bpstat_check_location): Remove cast.
3338 (breakpoint_hit_catch_fork): Make aspce const.
3339 (breakpoint_hit_catch_solib): Likewise.
3340 (breakpoint_hit_catch_exec): Likewise.
3341 (breakpoint_hit_ranged_breakpoint): Likewise.
3342 (breakpoint_hit_watchpoint): Likewise.
3343 (base_breakpoint_breakpoint_hit): Likewise.
3344 (bkpt_breakpoint_hit): Likewise.
3345 (dprintf_breakpoint_hit): Likewise.
3346 (tracepoint_breakpoint_hit): Likewise.
3347 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3348
3349 2017-10-26 Yao Qi <yao.qi@linaro.org>
3350
3351 * breakpoint.c (breakpoint_location_address_match): Change
3352 "struct address_space *" to "const address_space".
3353 (breakpoint_location_address_range_overlap): Likewise.
3354 (breakpoint_here_p): Likewise.
3355 (breakpoint_in_range_p): Likewise.
3356 (moribund_breakpoint_here_p): Likewise.
3357 (bp_location_inserted_here_p): Likewise.
3358 (software_breakpoint_inserted_here_p): Likewise.
3359 (hardware_breakpoint_inserted_here_p): Likewise.
3360 (hardware_watchpoint_inserted_in_range): Likewise.
3361 (bpstat_check_location): Likewise.
3362 (bpstat_stop_status): Likewise.
3363 (breakpoint_address_match): Likewise.
3364 (breakpoint_address_match_range): Likewise.
3365 (breakpoint_location_address_match): Likewise.
3366 (breakpoint_location_address_range_overlap): Likewise.
3367 (insert_single_step_breakpoint): Likewise.
3368 (breakpoint_has_location_inserted_here): Likewise.
3369 (single_step_breakpoint_inserted_here_p): Likewise.
3370 (pc_at_non_inline_function): Likewise.
3371 * breakpoint.h (bpstat_stop_status): Update declaration.
3372 (breakpoint_here_p): Likewise.
3373 (breakpoint_in_range_p): Likewise.
3374 (moribund_breakpoint_here_p): Likewise.
3375 (breakpoint_inserted_here_p): Likewise.
3376 (software_breakpoint_inserted_here_p): Likewise.
3377 (hardware_breakpoint_inserted_here_p): Likewise.
3378 (breakpoint_has_location_inserted_here): Likewise.
3379 (single_step_breakpoint_inserted_here_p): Likewise.
3380 (hardware_watchpoint_inserted_in_range): Likewise.
3381 (breakpoint_address_match): Likewise.
3382 (insert_single_step_breakpoint): Likewise.
3383 (pc_at_non_inline_function): Likewise.
3384 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3385 * record.c (record_check_stopped_by_breakpoint): Likewise.
3386 * record.h (record_check_stopped_by_breakpoint): Likewise.
3387 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3388
3389 2017-10-25 Yao Qi <yao.qi@linaro.org>
3390
3391 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3392 regcache->arch () instead get_regcache_arch.
3393 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3394 Likewise.
3395 (aarch64_fbsd_store_inferior_registers): Likewise.
3396 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3397 (store_gregs_to_thread): Likewise.
3398 (fetch_fpregs_from_thread): Likewise.
3399 (store_fpregs_to_thread): Likewise.
3400 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3401 (aarch64_store_return_value): Likewise.
3402 (aarch64_software_single_step): Likewise.
3403 * aix-thread.c (aix_thread_wait): Likewise.
3404 (supply_reg32): Likewise.
3405 (supply_sprs64): Likewise.
3406 (supply_sprs32): Likewise.
3407 (fill_gprs64): Likewise.
3408 (fill_gprs32): Likewise.
3409 (fill_sprs64): Likewise.
3410 (fill_sprs32): Likewise.
3411 (store_regs_user_thread): Likewise.
3412 (store_regs_kernel_thread): Likewise.
3413 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3414 (alphabsd_store_inferior_registers): Likewise.
3415 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3416 (alpha_store_return_value): Likewise.
3417 (alpha_deal_with_atomic_sequence): Likewise.
3418 (alpha_next_pc): Likewise.
3419 (alpha_software_single_step): Likewise.
3420 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3421 (amd64bsd_store_inferior_registers): Likewise.
3422 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3423 Likewise.
3424 (amd64_linux_store_inferior_registers): Likewise.
3425 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3426 (amd64_collect_native_gregset): Likewise.
3427 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3428 (amd64obsd_collect_uthread): Likewise.
3429 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3430 (amd64_collect_fpregset): Likewise.
3431 (amd64_supply_fxsave): Likewise.
3432 (amd64_supply_xsave): Likewise.
3433 (amd64_collect_fxsave): Likewise.
3434 (amd64_collect_xsave): Likewise.
3435 * arc-tdep.c (arc_write_pc): Likewise.
3436 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3437 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3438 (arm_fbsd_store_inferior_registers): Likewise.
3439 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3440 (store_vfp_regs): Likewise.
3441 (arm_linux_fetch_inferior_registers): Likewise.
3442 (arm_linux_store_inferior_registers): Likewise.
3443 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3444 (arm_linux_sigreturn_next_pc): Likewise.
3445 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3446 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3447 (fetch_register): Likewise.
3448 (store_register): Likewise.
3449 * arm-tdep.c (arm_is_thumb): Likewise.
3450 (displaced_in_arm_mode): Likewise.
3451 (bx_write_pc): Likewise.
3452 (arm_get_next_pcs_addr_bits_remove): Likewise.
3453 (arm_software_single_step): Likewise.
3454 (arm_extract_return_value): Likewise.
3455 (arm_store_return_value): Likewise.
3456 (arm_write_pc): Likewise.
3457 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3458 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3459 (bsd_uthread_store_registers): Likewise.
3460 * core-regset.c (fetch_core_registers): Likewise.
3461 * corelow.c (get_core_registers): Likewise.
3462 * cris-tdep.c (cris_store_return_value): Likewise.
3463 (cris_extract_return_value): Likewise.
3464 (find_step_target): Likewise.
3465 (find_step_target): Likewise.
3466 (cris_software_single_step): Likewise.
3467 * ctf.c (ctf_fetch_registers): Likewise.
3468 * darwin-nat.c (cancel_breakpoint): Likewise.
3469 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3470 * frv-tdep.c (frv_extract_return_value): Likewise.
3471 * ft32-tdep.c (ft32_store_return_value): Likewise.
3472 (ft32_extract_return_value): Likewise.
3473 * go32-nat.c (fetch_register): Likewise.
3474 (go32_fetch_registers): Likewise.
3475 (go32_store_registers): Likewise.
3476 (store_register): Likewise.
3477 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3478 (h8300_store_return_value): Likewise.
3479 * hppa-linux-nat.c (fetch_register): Likewise.
3480 (store_register): Likewise.
3481 (hppa_linux_fetch_inferior_registers): Likewise.
3482 (hppa_linux_store_inferior_registers): Likewise.
3483 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3484 (i386_darwin_store_inferior_registers): Likewise.
3485 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3486 (gnu_store_registers): Likewise.
3487 * i386-linux-nat.c (fetch_register): Likewise.
3488 (store_register): Likewise.
3489 (supply_gregset): Likewise.
3490 (fill_gregset): Likewise.
3491 (i386_linux_fetch_inferior_registers): Likewise.
3492 (i386_linux_store_inferior_registers): Likewise.
3493 (i386_linux_resume): Likewise.
3494 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3495 Likewise.
3496 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3497 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3498 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3499 (i386obsd_collect_uthread): Likewise.
3500 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3501 (i386_supply_gregset): Likewise.
3502 (i386_collect_gregset): Likewise.
3503 (i386_supply_fpregset): Likewise.
3504 (i386_collect_fpregset): Likewise.
3505 (i386_mpx_bd_base): Likewise.
3506 * i386-v4-nat.c (supply_fpregset): Likewise.
3507 (fill_fpregset): Likewise.
3508 * i387-tdep.c (i387_supply_fsave): Likewise.
3509 (i387_collect_fsave): Likewise.
3510 (i387_supply_fxsave): Likewise.
3511 (i387_collect_fxsave): Likewise.
3512 (i387_supply_xsave): Likewise.
3513 (i387_collect_xsave): Likewise.
3514 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3515 (ia64_linux_store_registers): Likewise.
3516 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3517 (ia64_extract_return_value): Likewise.
3518 (ia64_store_return_value): Likewise.
3519 (find_func_descr): Likewise.
3520 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3521 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3522 (inf_ptrace_store_registers): Likewise.
3523 * infrun.c (use_displaced_stepping): Likewise.
3524 (displaced_step_prepare_throw): Likewise.
3525 (resume): Likewise.
3526 (proceed): Likewise.
3527 (do_target_wait): Likewise.
3528 (adjust_pc_after_break): Likewise.
3529 (handle_inferior_event_1): Likewise.
3530 (handle_signal_stop): Likewise.
3531 (save_infcall_suspend_state): Likewise.
3532 (restore_infcall_suspend_state): Likewise.
3533 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3534 * jit.c (jit_frame_prev_register): Likewise.
3535 * linux-nat.c (save_stop_reason): Likewise.
3536 (linux_nat_wait_1): Likewise.
3537 (resume_stopped_resumed_lwps): Likewise.
3538 * linux-record.c (record_linux_sockaddr): Likewise.
3539 (record_linux_msghdr): Likewise.
3540 (record_linux_system_call): Likewise.
3541 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3542 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3543 (lm32_store_return_value): Likewise.
3544 * m32c-tdep.c (m32c_read_flg): Likewise.
3545 (m32c_pseudo_register_read): Likewise.
3546 (m32c_pseudo_register_write): Likewise.
3547 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3548 (m32r_linux_collect_gregset): Likewise.
3549 * m32r-tdep.c (m32r_store_return_value): Likewise.
3550 (m32r_extract_return_value): Likewise.
3551 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3552 (m68kbsd_collect_fpregset): Likewise.
3553 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3554 * m68k-linux-nat.c (fetch_register): Likewise.
3555 (old_fetch_inferior_registers): Likewise.
3556 (old_store_inferior_registers): Likewise.
3557 (store_regs): Likewise.
3558 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3559 (m68k_svr4_store_return_value): Likewise.
3560 * m88k-tdep.c (m88k_store_arguments): Likewise.
3561 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3562 (mi_cmd_data_write_register_values): Likewise.
3563 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3564 (mips_fbsd_store_inferior_registers): Likewise.
3565 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3566 (mips_fbsd_supply_gregs): Likewise.
3567 (mips_fbsd_collect_fpregs): Likewise.
3568 (mips_fbsd_collect_gregs): Likewise.
3569 (mips_fbsd_supply_fpregset): Likewise.
3570 (mips_fbsd_collect_fpregset): Likewise.
3571 (mips_fbsd_supply_gregset): Likewise.
3572 (mips_fbsd_collect_gregset): Likewise.
3573 * mips-linux-nat.c (supply_gregset): Likewise.
3574 (fill_gregset): Likewise.
3575 (supply_fpregset): Likewise.
3576 (fill_fpregset): Likewise.
3577 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3578 (mips_fill_gregset): Likewise.
3579 (mips_supply_fpregset): Likewise.
3580 (mips_fill_fpregset): Likewise.
3581 (mips64_supply_gregset): Likewise.
3582 (micromips_linux_sigframe_validate): Likewise.
3583 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3584 (mipsnbsd_fetch_inferior_registers): Likewise.
3585 (mipsnbsd_store_inferior_registers): Likewise.
3586 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3587 (mipsnbsd_supply_gregset): Likewise.
3588 (mipsnbsd_iterate_over_regset_sections): Likewise.
3589 (mipsnbsd_supply_reg): Likewise.
3590 (mipsnbsd_supply_fpreg): Likewise.
3591 * mips-tdep.c (mips_in_frame_stub): Likewise.
3592 (mips_dummy_id): Likewise.
3593 (is_octeon_bbit_op): Likewise.
3594 (micromips_bc1_pc): Likewise.
3595 (extended_mips16_next_pc): Likewise.
3596 (mips16_next_pc): Likewise.
3597 (deal_with_atomic_sequence): Likewise.
3598 * moxie-tdep.c (moxie_process_readu): Likewise.
3599 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3600 * nto-procfs.c (procfs_store_registers): Likewise.
3601 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3602 (ppcfbsd_store_inferior_registers): Likewise.
3603 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3604 (fetch_altivec_register): Likewise.
3605 (get_spe_registers): Likewise.
3606 (fetch_spe_register): Likewise.
3607 (fetch_altivec_registers): Likewise.
3608 (fetch_all_gp_regs): Likewise.
3609 (fetch_all_fp_regs): Likewise.
3610 (store_vsx_register): Likewise.
3611 (store_altivec_register): Likewise.
3612 (set_spe_registers): Likewise.
3613 (store_spe_register): Likewise.
3614 (store_altivec_registers): Likewise.
3615 (store_all_gp_regs): Likewise.
3616 (store_all_fp_regs): Likewise.
3617 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3618 (ppc_linux_collect_gregset): Likewise.
3619 (ppc_canonicalize_syscall): Likewise.
3620 (ppc_linux_record_signal): Likewise.
3621 (ppu2spu_prev_register): Likewise.
3622 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3623 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3624 (ppcobsd_store_registers): Likewise.
3625 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3626 Likewise.
3627 (ppc_ravenscar_generic_store_registers): Likewise.
3628 * procfs.c (procfs_fetch_registers): Likewise.
3629 (procfs_store_registers): Likewise.
3630 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3631 (ravenscar_store_registers): Likewise.
3632 (ravenscar_prepare_to_store): Likewise.
3633 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3634 * record-full.c (record_full_wait_1): Likewise.
3635 (record_full_registers_change): Likewise.
3636 (record_full_store_registers): Likewise.
3637 (record_full_core_fetch_registers): Likewise.
3638 (record_full_save): Likewise.
3639 (record_full_goto_insn): Likewise.
3640 * regcache.c (regcache_register_size): Likewise.
3641 (get_regcache_arch): Remove.
3642 (regcache_read_pc): Likewise.
3643 * regcache.h (get_regcache_arch): Remove.
3644 * remote-sim.c (gdbsim_fetch_register): Likewise.
3645 (gdbsim_store_register): Likewise.
3646 * remote.c (fetch_register_using_p): Likewise.
3647 (send_g_packet): Likewise.
3648 (remote_prepare_to_store): Likewise.
3649 (store_registers_using_G): Likewise.
3650 * reverse.c (save_bookmark_command): Likewise.
3651 (goto_bookmark_command): Likewise.
3652 * rs6000-aix-tdep.c (branch_dest): Likewise.
3653 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3654 (fetch_register): Likewise.
3655 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3656 (ppc_collect_reg): Likewise.
3657 (ppc_collect_gregset): Likewise.
3658 (ppc_collect_fpregset): Likewise.
3659 (ppc_collect_vsxregset): Likewise.
3660 (ppc_collect_vrregset): Likewise.
3661 (ppc_displaced_step_hw_singlestep): Likewise.
3662 (rs6000_pseudo_register_read): Likewise.
3663 (rs6000_pseudo_register_write): Likewise.
3664 * s390-linux-nat.c (supply_gregset): Likewise.
3665 (fill_gregset): Likewise.
3666 (s390_linux_fetch_inferior_registers): Likewise.
3667 * s390-linux-tdep.c (s390_write_pc): Likewise.
3668 (s390_software_single_step): Likewise.
3669 (s390_all_but_pc_registers_record): Likewise.
3670 (s390_linux_syscall_record): Likewise.
3671 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3672 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3673 (shnbsd_store_inferior_registers): Likewise.
3674 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3675 (sh_extract_return_value_fpu): Likewise.
3676 (sh_store_return_value_nofpu): Likewise.
3677 (sh_corefile_supply_regset): Likewise.
3678 (sh_corefile_collect_regset): Likewise.
3679 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3680 (sh64_store_return_value): Likewise.
3681 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3682 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3683 (sparc_store_inferior_registers): Likewise.
3684 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3685 (sparc_ravenscar_prepare_to_store): Likewise.
3686 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3687 (sparc_analyze_control_transfer): Likewise.
3688 (sparc_step_trap): Likewise.
3689 (sparc_software_single_step): Likewise.
3690 (sparc32_gdbarch_init): Likewise.
3691 (sparc_supply_rwindow): Likewise.
3692 (sparc_collect_rwindow): Likewise.
3693 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3694 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3695 (sparc64nbsd_collect_gregset): Likewise.
3696 (sparc64nbsd_supply_fpregset): Likewise.
3697 (sparc64nbsd_collect_fpregset): Likewise.
3698 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3699 (sparc64_supply_gregset): Likewise.
3700 (sparc64_collect_gregset): Likewise.
3701 (sparc64_supply_fpregset): Likewise.
3702 (sparc64_collect_fpregset): Likewise.
3703 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3704 * spu-tdep.c (spu_unwind_sp): Likewise.
3705 (spu2ppu_prev_register): Likewise.
3706 (spu_memory_remove_breakpoint): Likewise.
3707 * stack.c (return_command): Likewise.
3708 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3709 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3710 * tracefile.c (trace_save_ctf): Likewise.
3711 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3712 (do_windows_store_inferior_registers): Likewise.
3713 (windows_resume): Likewise.
3714 * xtensa-linux-nat.c (fill_gregset): Likewise.
3715 (supply_gregset_reg): Likewise.
3716 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3717 (xtensa_register_read_masked): Likewise.
3718 (xtensa_supply_gregset): Likewise.
3719 (xtensa_extract_return_value): Likewise.
3720 (xtensa_store_return_value): Likewise.
3721
3722 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3723
3724 * doublest.c (floatformat_from_string): New function.
3725 * doublest.h (floatformat_from_string): Add prototype.
3726
3727 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3728 (OP_FLOAT): ... this.
3729 * expression.h: Do not include "doublest.h".
3730 (union exp_element): Replace doubleconst and decfloatconst by
3731 new element floatconst.
3732 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3733 (ada_evaluate_subexp): Likewise.
3734 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3735 OP_DOUBLE and OP_DECFLOAT.
3736 * expprint.c (print_subexp_standard): Likewise.
3737 (dump_subexp_body_standard): Likewise.
3738 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3739
3740 * parse.c: Include "dfp.h".
3741 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3742 (write_exp_elt_floatcst): New function.
3743 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3744 and OP_DECFLOAT.
3745 (operator_check_standard): Likewise.
3746 (parse_float): Do not accept suffix. Take type as input. Return bool.
3747 Return target format buffer instead of host DOUBLEST.
3748 Use floatformat_from_string and decimal_from_string to parse
3749 either binary or decimal floating-point types.
3750 (parse_c_float): Remove.
3751 * parser-defs.h: Do not include "doublest.h".
3752 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3753 (write_exp_elt_floatcst): Add prototype.
3754 (parse_float): Update prototype.
3755 (parse_c_float): Remove.
3756
3757 * c-exp.y: Do not include "dfp.h".
3758 (typed_val_float): Use byte buffer instead of DOUBLEST.
3759 (typed_val_decfloat): Remove.
3760 (DECFLOAT): Remove.
3761 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3762 (parse_number): Update to new parse_float interface.
3763 Parse suffixes and determine type before calling parse_float.
3764 Handle decimal and binary FP types the same way.
3765
3766 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3767 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3768 (parse_number): Update to new parse_float interface.
3769 Parse suffixes and determine type before calling parse_float.
3770
3771 * f-exp.y: Replace dval by typed_val_float.
3772 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3773 (parse_number): Use parse_float instead of atof.
3774
3775 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3776 (parse_go_float): Remove.
3777 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3778 (parse_number): Call parse_float instead of parse_go_float.
3779 Parse suffixes and determine type before calling parse_float.
3780
3781 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3782 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3783 (parse_number): Update to new parse_float interface.
3784 Parse suffixes and determine type before calling parse_float.
3785
3786 * m2-exp.y: Replace dval by byte buffer val.
3787 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3788 (parse_number): Call parse_float instead of atof.
3789
3790 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3791 (lex_number): Call parse_float instead of strtod.
3792 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3793 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3794 Use write_exp_elt_floatcst.
3795 (unit_testing): Remove static variable.
3796 (rust_type): Do not check unit_testing.
3797 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3798
3799 * ada-exp.y (type_float, type_double): Remove.
3800 (typed_val_float): Use byte buffer instead of DOUBLEST.
3801 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3802 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3803
3804 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3805
3806 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3807 * arch/aarch64.h: New file.
3808
3809 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3810
3811 * dfp.h (decimal_from_string): Use const reference for argument.
3812 * dfp.c (decimal_from_string): Likewise.
3813
3814 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3815
3816 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3817 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3818 * mips-tdep.c (mips_print_fp_register): Likewise.
3819
3820 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3821
3822 * common/format.h (enum argclass): Replace decfloat_arg by
3823 dec32float_arg, dec64float_arg, and dec128float_arg.
3824 * common/format.c (parse_format_string): Update to return
3825 new decimal float argument classes.
3826
3827 * printcmd.c (printf_decfloat): Rename to ...
3828 (printf_floating): ... this. Add argclass argument, and use it
3829 instead of parsing the format string again. Add support for
3830 binary floating-point values, using floatformat_to_string.
3831 Convert value to the target format if it doesn't already match.
3832 (ui_printf): Call printf_floating instead of printf_decfloat,
3833 also for double_arg / long_double_arg. Pass argclass.
3834
3835 * dfp.c (decimal_to_string): Add format string argument.
3836 * dfp.h (decimal_to_string): Likewise.
3837
3838 * doublest.c (floatformat_to_string): Add format string argument.
3839 * doublest.h (floatformat_to_string): Likewise.
3840
3841 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3842
3843 * doublest.c (floatformat_precision): New routine.
3844 (floatformat_to_string): Likewise.
3845 * doublest.c (floatformat_to_string): Add prototype.
3846
3847 * printcmd.c (print_scalar_formatted): Only call print_floating
3848 on floating-point types.
3849 * valprint.c: Do not include "floatformat.h".
3850 (generic_val_print_decfloat): Remove.
3851 (generic_val_print): Call generic_val_print_float for both
3852 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3853 (print_floating): Use floatformat_to_string. Handle decimal float.
3854 (print_decimal_floating): Remove, merge into floatformat_to_string.
3855 * value.h (print_decimal_floating): Remove.
3856
3857 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3858
3859 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3860
3861 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3862
3863 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3864
3865 * memattr.h: Don't include vec.h.
3866 (struct mem_attrib): Initialize fields.
3867 <unknown>: New static method.
3868 (struct mem_region): Add constructors, operator<, initialize
3869 fields.
3870 * memattr.c: Include algorithm.
3871 (default_mem_attrib, unknown_mem_attrib): Remove.
3872 (user_mem_region_list): New global.
3873 (target_mem_region_list, mem_region_list): Change type to
3874 std::vector<mem_region>.
3875 (mem_use_target): Now a function.
3876 (target_mem_regions_valid): Change type to bool.
3877 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3878 (require_user_regions): Adjust.
3879 (require_target_regions): Adjust.
3880 (create_mem_region): Adjust.
3881 (lookup_mem_region): Adjust.
3882 (invalidate_target_mem_regions): Adjust.
3883 (mem_clear): Rename to...
3884 (user_mem_clear): ... this, and adjust.
3885 (mem_command): Adjust.
3886 (info_mem_command): Adjust.
3887 (mem_enable, enable_mem_command, mem_disable,
3888 disable_mem_command): Adjust.
3889 (mem_delete): Adjust.
3890 (delete_mem_command): Adjust.
3891 * memory-map.h (parse_memory_map): Return an std::vector.
3892 * memory-map.c (parse_memory_map): Likewise.
3893 (struct memory_map_parsing_data): Add constructor.
3894 <memory_map>: Point to std::vector.
3895 (memory_map_start_memory): Adjust.
3896 (memory_map_end_memory): Adjust.
3897 (memory_map_end_property): Adjust.
3898 (clear_result): Remove.
3899 * remote.c (remote_memory_map): Return an std::vector.
3900 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3901 Remove.
3902 (target_debug_print_mem_region_vector): New.
3903 * target-delegates.c: Regenerate.
3904 * target.h (mem_region_vector): New typedef.
3905 (to_memory_map): Return mem_region_vector.
3906 (target_memory_map): Return an std::vector.
3907 * target.c (target_memory_map): Return an std::vector.
3908 (flash_erase_command): Adjust.
3909
3910 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3911
3912 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3913 Change type to std::string.
3914 (memory_map_start_property): Adjust.
3915 (memory_map_end_property): Adjust.
3916
3917 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3918
3919 * infrun.h: Include common/byte-vector.h.
3920 (struct displaced_step_closure): New struct.
3921 (struct buf_displaced_step_closure): New struct.
3922 * infrun.c (displaced_step_closure::~displaced_step_closure):
3923 Provide default implementation.
3924 (displaced_step_clear): Deallocate step closure with delete.
3925 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3926 (aarch64_displaced_step_closure): ... this, extend
3927 displaced_step_closure.
3928 (aarch64_displaced_step_data) <dsc>: Change type to
3929 aarch64_displaced_step_closure.
3930 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3931 unique_ptr.
3932 (aarch64_displaced_step_fixup): Add cast for displaced step
3933 closure.
3934 * amd64-tdep.c (displaced_step_closure): Rename to ...
3935 (amd64_displaced_step_closure): ... this, extend
3936 displaced_step_closure.
3937 <insn_buf>: Change type to std::vector<gdb_byte>.
3938 <max_len>: Remove.
3939 (fixup_riprel): Change type of DSC parameter, adjust to type
3940 change of insn_buf.
3941 (fixup_displaced_copy): Change type of DSC parameter.
3942 (amd64_displaced_step_copy_insn): Instantiate
3943 amd64_displaced_step_closure.
3944 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3945 to type change of insn_buf.
3946 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3947 parameter DSC.
3948 (arm_linux_copy_svc): Likewise.
3949 (cleanup_kernel_helper_return): Likewise.
3950 (arm_catch_kernel_helper_return): Likewise.
3951 (arm_linux_displaced_step_copy_insn): Instantiate
3952 arm_displaced_step_closure.
3953 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3954 (displaced_read_reg): Change type of parameter DSC.
3955 (branch_write_pc): Likewise.
3956 (load_write_pc): Likewise.
3957 (alu_write_pc): Likewise.
3958 (displaced_write_reg): Likewise.
3959 (arm_copy_unmodified): Likewise.
3960 (thumb_copy_unmodified_32bit): Likewise.
3961 (thumb_copy_unmodified_16bit): Likewise.
3962 (cleanup_preload): Likewise.
3963 (install_preload): Likewise.
3964 (arm_copy_preload): Likewise.
3965 (thumb2_copy_preload): Likewise.
3966 (install_preload_reg): Likewise.
3967 (arm_copy_preload_reg): Likewise.
3968 (cleanup_copro_load_store): Likewise.
3969 (install_copro_load_store): Likewise.
3970 (arm_copy_copro_load_store) Likewise.
3971 (thumb2_copy_copro_load_store): Likewise.
3972 (cleanup_branch): Likewise.
3973 (install_b_bl_blx): Likewise.
3974 (arm_copy_b_bl_blx): Likewise.
3975 (thumb2_copy_b_bl_blx): Likewise.
3976 (thumb_copy_b): Likewise.
3977 (install_bx_blx_reg): Likewise.
3978 (arm_copy_bx_blx_reg): Likewise.
3979 (thumb_copy_bx_blx_reg): Likewise.
3980 (cleanup_alu_imm): Likewise.
3981 (arm_copy_alu_imm): Likewise.
3982 (thumb2_copy_alu_imm): Likewise.
3983 (cleanup_alu_reg): Likewise.
3984 (install_alu_reg): Likewise.
3985 (arm_copy_alu_reg): Likewise.
3986 (thumb_copy_alu_reg): Likewise.
3987 (cleanup_alu_shifted_reg): Likewise.
3988 (install_alu_shifted_reg): Likewise.
3989 (arm_copy_alu_shifted_reg): Likewise.
3990 (cleanup_load): Likewise.
3991 (cleanup_store): Likewise.
3992 (arm_copy_extra_ld_st): Likewise.
3993 (install_load_store): Likewise.
3994 (thumb2_copy_load_literal): Likewise.
3995 (thumb2_copy_load_reg_imm): Likewise.
3996 (arm_copy_ldr_str_ldrb_strb): Likewise.
3997 (cleanup_block_load_all): Likewise.
3998 (cleanup_block_store_pc): Likewise.
3999 (cleanup_block_load_pc): Likewise.
4000 (arm_copy_block_xfer): Likewise.
4001 (thumb2_copy_block_xfer): Likewise.
4002 (cleanup_svc): Likewise.
4003 (install_svc): Likewise.
4004 (arm_copy_svc): Likewise.
4005 (thumb_copy_svc): Likewise.
4006 (arm_copy_undef): Likewise.
4007 (thumb_32bit_copy_undef): Likewise.
4008 (arm_copy_unpred): Likewise.
4009 (arm_decode_misc_memhint_neon): Likewise.
4010 (arm_decode_unconditional): Likewise.
4011 (arm_decode_miscellaneous): Likewise.
4012 (arm_decode_dp_misc): Likewise.
4013 (arm_decode_ld_st_word_ubyte): Likewise.
4014 (arm_decode_media): Likewise.
4015 (arm_decode_b_bl_ldmstm): Likewise.
4016 (arm_decode_ext_reg_ld_st): Likewise.
4017 (thumb2_decode_dp_shift_reg): Likewise.
4018 (thumb2_decode_ext_reg_ld_st): Likewise.
4019 (arm_decode_svc_copro): Likewise.
4020 (thumb2_decode_svc_copro): Likewise.
4021 (install_pc_relative): Likewise.
4022 (thumb_copy_pc_relative_16bit): Likewise.
4023 (thumb_decode_pc_relative_16bit): Likewise.
4024 (thumb_copy_pc_relative_32bit): Likewise.
4025 (thumb_copy_16bit_ldr_literal): Likewise.
4026 (thumb_copy_cbnz_cbz): Likewise.
4027 (thumb2_copy_table_branch): Likewise.
4028 (cleanup_pop_pc_16bit_all): Likewise.
4029 (thumb_copy_pop_pc_16bit): Likewise.
4030 (thumb_process_displaced_16bit_insn): Likewise.
4031 (decode_thumb_32bit_ld_mem_hints): Likewise.
4032 (thumb_process_displaced_32bit_insn): Likewise.
4033 (thumb_process_displaced_insn): Likewise.
4034 (arm_process_displaced_insn): Likewise.
4035 (arm_displaced_init_closure): Likewise.
4036 (arm_displaced_step_fixup): Add cast for closure.
4037 * arm-tdep.h: Include infrun.h.
4038 (displaced_step_closure): Rename to ...
4039 (arm_displaced_step_closure): ... this, extend
4040 displaced_step_closure.
4041 <u::svc::copy_svc_os>: Change type of parameter DSC.
4042 <cleanup>: Likewise.
4043 (arm_process_displaced_insn): Likewise.
4044 (arm_displaced_init_closure): Likewise.
4045 (displaced_read_reg): Likewise.
4046 (displaced_write_reg): Likewise.
4047 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4048 Adjust.
4049 * i386-tdep.h: Include infrun.h.
4050 (i386_displaced_step_closure): New typedef.
4051 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4052 i386_displaced_step_closure.
4053 (i386_displaced_step_fixup): Adjust.
4054 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4055 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4056 and unique_ptr.
4057 (ppc_displaced_step_fixup): Adjust.
4058 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4059 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4060 and unique_ptr.
4061 (s390_displaced_step_fixup): Adjust.
4062
4063 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4064
4065 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4066 Remove declarations.
4067
4068 2017-10-20 Tom Tromey <tom@tromey.com>
4069
4070 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4071 std::vector.
4072 (gdb_bfd_record_inclusion): Update.
4073 (bfdp): Remove typedef.
4074
4075 2017-10-20 Tom Tromey <tom@tromey.com>
4076
4077 * gdb_bfd.c (gdb_bfd_ref): Use new.
4078 (struct gdb_bfd_data): Add constructor, destructor, and member
4079 initializers.
4080 (gdb_bfd_unref): Use delete.
4081
4082 2017-10-20 Tom Tromey <tom@tromey.com>
4083
4084 * exec.c (exec_file_attach): Use new_bfd_ref.
4085 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4086 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4087 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4088 new_bfd_ref.
4089 * gdb_bfd.h (new_bfd_ref): New function.
4090
4091 2017-10-20 Pedro Alves <palves@redhat.com>
4092
4093 * main.c (captured_command_loop): Add attribute noinline.
4094
4095 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4096
4097 * interps.c (struct interp_factory): Add constructor.
4098 (interp_factory_p): Remove typedef.
4099 (DEF_VEC_P(interp_factory_p)): Remove.
4100 (interpreter_factories): Change type to std::vector.
4101 (interp_factory_register): Adjust.
4102 (interp_lookup): Adjust.
4103 (interpreter_completer): Adjust.
4104
4105 2017-10-19 Tom Tromey <tom@tromey.com>
4106
4107 * break-catch-syscall.c (catch_syscall_completer): Use
4108 std::string, gdb::unique_xmalloc_ptr.
4109
4110 2017-10-19 Tom Tromey <tom@tromey.com>
4111
4112 * infcall.c (call_function_by_hand_dummy): Use std::string.
4113
4114 2017-10-19 Tom Tromey <tom@tromey.com>
4115
4116 * mi/mi-main.c (mi_cmd_execute): Update.
4117 * top.h (prepare_execute_command): Return scoped_value_mark.
4118 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4119 Add move constructor.
4120 * top.c (prepare_execute_command): Return scoped_value_mark.
4121 (execute_command): Update.
4122
4123 2017-10-19 Pedro Alves <palves@redhat.com>
4124
4125 * xml-support.c (xml_fetch_content_from_file): Check fread's
4126 return.
4127
4128 2017-10-19 Pedro Alves <palves@redhat.com>
4129
4130 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4131 async.
4132 (handle_error_fd): New function.
4133 (ser_base_async): Add/delete an event loop file handler for
4134 error_fd.
4135
4136 2017-10-19 Pedro Alves <palves@redhat.com>
4137
4138 * xml-support.c (xml_fetch_content_from_file): Don't read in
4139 chunks. Instead use fseek to determine the file's size, and read
4140 it in one go.
4141
4142 2017-11-18 Keith Seitz <keiths@redhat.com>
4143
4144 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4145 types.
4146 Add whitespace to front of type name.
4147
4148 2017-10-18 Keith Seitz <keiths@redhat.com>
4149
4150 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4151 DW_AT_accessibility.
4152
4153 2017-10-18 Yao Qi <yao.qi@linaro.org>
4154
4155 * features/tic6x-c62x-linux.c: Remove.
4156
4157 2017-10-17 Tom Tromey <tom@tromey.com>
4158
4159 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4160 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4161 (do_mixed_source_and_assembly): Likewise.
4162
4163 2017-10-17 Tom Tromey <tom@tromey.com>
4164
4165 * regcache.c (regcache::xfer_part): Remove assertion.
4166
4167 2017-10-17 Pedro Alves <palves@redhat.com>
4168
4169 * xml-support.c (xml_fetch_content_from_file): Call
4170 unique_ptr::release() instead unique_ptr::get() when passing
4171 through xrealloc.
4172
4173 2017-10-17 Yao Qi <yao.qi@linaro.org>
4174
4175 * regcache.c (regcache::xfer_part): Remove parameters read and
4176 write, add parameter is_raw. All callers are updated.
4177
4178 2017-10-16 Keith Seitz <keiths@redhat.com>
4179
4180 * c-typeprint.c (enum access_specifier): Moved here from
4181 c_type_print_base.
4182 (output_access_specifier): New function.
4183 (c_type_print_base): Consider typedefs when assessing
4184 whether access labels are needed.
4185 Use output_access_specifier as needed.
4186 Output access specifier for typedefs, if needed.
4187 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4188 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4189 fields.
4190 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4191 accessor macros.
4192
4193 2017-10-16 Tom Tromey <tom@tromey.com>
4194
4195 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4196 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4197 * target.c (target_fileio_read_stralloc): Update.
4198 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4199 * target.h (target_fileio_read_stralloc): Return
4200 unique_xmalloc_ptr.
4201
4202 2017-10-16 Tom Tromey <tom@tromey.com>
4203
4204 * xml-syscall.c (xml_init_syscalls_info): Update.
4205 * xml-support.c (xinclude_start_include): Update.
4206 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4207 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4208 (xml_fetch_content_from_file): Likewise.
4209 * osdata.c (get_osdata): Update.
4210 * target.h (target_read_stralloc, target_get_osdata): Return
4211 unique_xmalloc_ptr.
4212 * solib-aix.c (solib_aix_get_library_list): Update.
4213 * solib-target.c (solib_target_current_sos): Update.
4214 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4215 * xml-tdesc.c (fetch_available_features_from_target): Update.
4216 (target_fetch_description_xml): Update.
4217 (file_read_description_xml): Update.
4218 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4219 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4220 (remote_pid_to_exec_file): Update.
4221 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4222 (target_get_osdata): Likewise.
4223
4224 2017-10-16 Tom Tromey <tom@tromey.com>
4225
4226 * remote.c (remote_register_number_and_offset): Use std::vector.
4227 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4228 (putpkt_binary): Use gdb::def_vector.
4229 (compare_sections_command): Use gdb::byte_vector.
4230
4231 2017-10-16 Tom Tromey <tom@tromey.com>
4232
4233 * ppc-linux-nat.c (hwdebug_insert_point): Use
4234 gdb::unique_xmalloc_ptr, XDUP.
4235
4236 2017-10-16 Tom Tromey <tom@tromey.com>
4237
4238 * probe.c (parse_probes): Use std::string.
4239 (info_probes_for_ops, enable_probes_command)
4240 (disable_probes_command): Remove cleanups.
4241
4242 2017-10-16 Tom Tromey <tom@tromey.com>
4243
4244 * buildsym.c (block_compar): Remove.
4245 (end_symtab_get_static_block): Use std::vector.
4246
4247 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4248
4249 * memrange.h (struct mem_range): Define operator< and operator==.
4250 (mem_range_s): Remove.
4251 (DEF_VEC_O (mem_range_s)): Remove.
4252 (normalize_mem_ranges): Change parameter type to std::vector.
4253 * memrange.c (compare_mem_ranges): Remove.
4254 (normalize_mem_ranges): Change parameter type to std::vector,
4255 adjust to vector change.
4256 * exec.c (section_table_available_memory): Return vector, remove
4257 parameter.
4258 (section_table_read_available_memory): Adjust to std::vector
4259 change.
4260 * remote.c (remote_read_bytes): Adjust to std::vector
4261 change.
4262 * tracepoint.h (traceframe_available_memory): Change parameter
4263 type to std::vector.
4264 * tracepoint.c (traceframe_available_memory): Change parameter
4265 type to std::vector, adjust.
4266 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4267 std::vector change.
4268 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4269 unittests/memrange-selftests.c.
4270 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4271 * gdb/unittests/memrange-selftests.c: New file.
4272
4273 2017-10-16 Pedro Alves <palves@redhat.com>
4274
4275 * elfread.c (probe_key_free): Rename range-for variable.
4276 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4277 (find_probe_by_pc, collect_probes): Rename range-for variable.
4278
4279 2017-10-16 Yao Qi <yao.qi@linaro.org>
4280
4281 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4282 * features/tic6x-c62x.c: Remove.
4283 * features/tic6x-c64x-linux.c: Remove.
4284 * features/tic6x-c64x.c: Remove.
4285 * features/tic6x-c64xp-linux.c: Remove.
4286 * features/tic6x-c64xp.c: Remove.
4287 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4288 initialize_tdesc_tic6x_*_linux functions.
4289 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4290 initialize_tdesc_tic6x_* functions.
4291
4292 2017-10-16 Yao Qi <yao.qi@linaro.org>
4293
4294 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4295 tic6x-c62x.
4296 * regformats/tic6x-c62x.dat: Remove.
4297 * regformats/tic6x-c64x.dat: Remove.
4298 * regformats/tic6x-c64xp.dat: Remove.
4299
4300 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4301
4302 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4303 (the !HAVE_LIBEXPAT version).
4304
4305 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4306
4307 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4308 const.
4309
4310 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4311
4312 * target.h: Include tracepoint.h.
4313 (enum trace_find_type): Move to tracepoint.h.
4314 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4315 * tracepoint.h: Don't include target.h
4316 (enum trace_find_type): Move from target.h.
4317 (parse_traceframe_info): Return a unique ptr.
4318 * tracepoint.c (current_traceframe_info): Change type to unique
4319 ptr.
4320 (free_traceframe_info): Remove.
4321 (clear_traceframe_info): Don't manually free
4322 current_traceframe_info.
4323 (free_result): Remove.
4324 (parse_traceframe_info): Return a unique ptr.
4325 (get_traceframe_info): Adjust to unique ptr.
4326 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4327 * remote.c (remote_traceframe_info): Return a unique ptr.
4328 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4329 ptr.
4330 * target-debug.h (target_debug_print_traceframe_info_up): New
4331 macro.
4332 * target-delegates.c: Regenerate.
4333
4334 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4335
4336 * memrange.h (struct mem_range): Add constructors.
4337 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4338 std::vector<mem_range>.
4339 * tracepoint.c (free_traceframe_info): Don't manually free
4340 vector.
4341 (traceframe_info_start_memory): Adjust to vector change.
4342 (traceframe_available_memory): Likewise.
4343 * tracefile-tfile.c (build_traceframe_info): Likewise.
4344 * ctf.c (ctf_traceframe_info): Likewise.
4345
4346 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4347
4348 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4349 std::vector<int>.
4350 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4351 (traceframe_info_start_tvar): Adjust to vector change.
4352 (parse_traceframe_info): Allocate with new.
4353 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4354 vector change.
4355 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4356 change.
4357 tfile_traceframe_info): Allocate with new.
4358 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4359 change.
4360
4361 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4362
4363 * tracepoint.c (traceframe_info): Rename to...
4364 (current_traceframe_info): ...this.
4365 (clear_traceframe_info): Adjust.
4366 (get_traceframe_info): Adjust.
4367
4368 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4369
4370 * nat/linux-osdata.c: Include algorithm.
4371 (compare_processes): Remove.
4372 (struct pid_pgid_entry): New struct.
4373 (linux_xfer_osdata_processgroups): Use std::vector instead of
4374 XNEWVEC.
4375
4376 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4377
4378 * objfiles.h: Don't include symfile.h.
4379 (struct partial_symbol): Remove forward-declaration.
4380 (struct objfile) <global_psymbols, static_psymbols>: Change type
4381 to std::vector<partial_symbol *>.
4382 * objfiles.c (objfile::objfile): Don't memset those fields.
4383 (objfile::~objfile): Don't free those fields.
4384 * psympriv.h (struct psymbol_allocation_list): Remove
4385 forward-declaration.
4386 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4387 to std::vector.
4388 (start_psymtab_common): Change parameters to std::vector.
4389 * psymtab.c: Include algorithm.
4390 (require_partial_symbols): Call shrink_to_fit.
4391 (find_pc_sect_psymbol): Adjust to vector change.
4392 (match_partial_symbol): Likewise.
4393 (lookup_partial_symbol): Likewise.
4394 (psym_relocate): Likewise.
4395 (dump_psymtab): Likewise.
4396 (recursively_search_psymtabs): Likewise.
4397 (compare_psymbols): Remove.
4398 (sort_pst_symbols): Adjust to vector change.
4399 (start_psymtab_common): Likewise.
4400 (end_psymtab_common): Likewise.
4401 (psymbol_bcache_full): De-constify return value.
4402 (add_psymbol_to_bcache): Likewise.
4403 (extend_psymbol_list): Remove.
4404 (append_psymbol_to_list): Adjust to vector change.
4405 (add_psymbol_to_list): Likewise.
4406 (init_psymbol_list): Likewise.
4407 (maintenance_info_psymtabs): Likewise.
4408 (maintenance_check_psymtabs): Likewise.
4409 * symfile.h (struct psymbol_allocation_list): Remove.
4410 * symfile.c (reread_symbols): Adjust to vector change.
4411 * dbxread.c (start_psymtab): Change type of parameters.
4412 (dbx_symfile_read): Adjust to vector change.
4413 (read_dbx_symtab): Likewise.
4414 (start_psymtab): Change type of parameters.
4415 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4416 (create_partial_symtab): Likewise.
4417 (add_partial_symbol): Likewise.
4418 (write_one_signatured_type): Likewise.
4419 (recursively_write_psymbols): Likewise.
4420 * mdebugread.c (parse_partial_symbols): Likewise.
4421 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4422 (scan_xcoff_symtab): Adjust to vector change.
4423 (xcoff_initial_scan): Likewise.
4424
4425 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4426
4427 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4428
4429 2017-10-13 Yao Qi <yao.qi@linaro.org>
4430
4431 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4432 Remove s390x-*-expedite, add s390x-expedite.
4433
4434 2017-10-13 Yao Qi <yao.qi@linaro.org>
4435
4436 * features/s390-gs-linux64.c: Regenerated.
4437 * features/s390x-gs-linux64.c: Regenerated.
4438
4439 2017-10-13 Tom Tromey <tom@tromey.com>
4440
4441 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4442 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4443 delete.
4444 * symfile.c (symbol_file_add_with_addrs): Use new.
4445 (symbol_file_add_separate): Update comment.
4446 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4447 * jit.c (jit_object_close_impl): Use new.
4448 (jit_unregister_code): Use delete.
4449 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4450 (~objfile): Rename from free_objfile.
4451 (free_objfile_separate_debug, do_free_objfile_cleanup)
4452 (free_all_objfiles, objfile_purge_solibs): Use delete.
4453 * objfiles.h (struct objfile): Add constructor and destructor.
4454 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4455 (allocate_objfile, free_objfile): Don't declare.
4456 (struct objstats): Add initializers.
4457
4458 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4459
4460 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4461 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4462 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4463 * gdbarch.h: Regenerate.
4464 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4465 Adjust comment.
4466 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4467 (i386_displaced_step_fixup): Adjust comment.
4468 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4469
4470 2017-10-12 Tom Tromey <tom@tromey.com>
4471
4472 * prologue-value.h (pv_area::store_would_trash): Return bool.
4473 (pv_area::find_reg): Likewise.
4474 * prologue-value.c (pv_area::store_would_trash): Return bool.
4475 (pv_area::find_reg): Likewise.
4476
4477 2017-10-12 Tom Tromey <tom@tromey.com>
4478
4479 * s390-linux-tdep.c (s390_store, s390_load)
4480 (s390_check_for_saved, s390_analyze_prologue): Update.
4481 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4482 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4483 * prologue-value.h (class pv_area): Move from prologue-value.c.
4484 Change names of members. Add constructor, destructor, member
4485 functions.
4486 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4487 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4488 (pv_area_fetch, pv_area_scan): Don't declare.
4489 * prologue-value.c (struct pv_area::area_entry): Now member of
4490 pv_area.
4491 (struct pv_area): Move to prologue-value.h.
4492 (pv_area::pv_area): Rename from make_pv_area.
4493 (pv_area::~pv_area): Rename from free_pv_area.
4494 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4495 (clear_entries, find_entry, overlaps, store_would_trash, store)
4496 (fetch, find_reg, scan): Now member of pv_area.
4497 Remove "area" argument. Update.
4498 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4499 Update.
4500 * mn10300-tdep.c (push_reg, check_for_saved)
4501 (mn10300_analyze_prologue): Update.
4502 * mep-tdep.c (is_arg_spill, check_for_saved)
4503 (mep_analyze_prologue): Update.
4504 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4505 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4506 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4507 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4508 Update.
4509 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4510 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4511
4512 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4513
4514 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4515 * linux-nat.c (linux_nat_delete_thread): New variable.
4516 (lwp_free): Invoke linux_nat_delete_thread if set.
4517 (linux_nat_set_delete_thread): New function.
4518 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4519 thread delete callback.
4520 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4521 (_initialize_arm_linux_nat): Assign thread delete callback.
4522 * s390-linux-nat.c (s390_delete_thread): New function.
4523 (_initialize_s390_nat): Assign thread delete callback.
4524 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4525 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4526 function.
4527 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4528 declaration.
4529 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4530 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4531
4532 2017-10-09 Tom Tromey <tom@tromey.com>
4533
4534 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4535 std::string.
4536 * tui/tui-layout.c (enum tui_status): Use std::string.
4537
4538 2017-10-11 Tom Tromey <tom@tromey.com>
4539
4540 * gdbthread.h (thread_command): Constify.
4541 * inferior.h (detach_command): Constify.
4542 * top.h (set_history, show_history): Constify.
4543 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4544 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4545 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4546 * printcmd.c (set_command): Constify.
4547 (non_const_set_command): New function.
4548 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4549 * breakpoint.c (enable_command, disable_command, delete_command)
4550 (catch_command, tcatch_command, set_breakpoint_cmd)
4551 (show_breakpoint_cmd): Constify.
4552 * macrocmd.c (macro_command): Constify.
4553 * infcmd.c (unset_command, kill_command, detach_command)
4554 (info_proc_cmd): Constify.
4555 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4556 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4557 (info_auto_load_cmd): Constify.
4558 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4559 (unset_tdesc_cmd): Constify.
4560 * ada-lang.c (set_ada_command, show_ada_command)
4561 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4562 * guile/guile.c (set_guile_command, show_guile_command)
4563 (info_guile_command): Constify.
4564 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4565 Constify.
4566 * skip.c (skip_command): Constify.
4567 * compile/compile.c (_initialize_compile): Constify.
4568 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4569 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4570 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4571 (maint_btrace_pt_show_cmd): Constify.
4572 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4573 Constify.
4574 * python/python.c (user_show_python, user_set_python): Constify.
4575 * mips-tdep.c (set_mips_command, show_mips_command)
4576 (set_mipsfpu_command): Constify.
4577 * record-btrace.c (cmd_record_btrace_start)
4578 (cmd_set_record_btrace, cmd_show_record_btrace)
4579 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4580 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4581 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4582 Constify.
4583 * symfile.c (overlay_command): Constify.
4584 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4585 * cli/cli-logging.c (set_logging_command, show_logging_command):
4586 Constify.
4587 * cli/cli-dump.c (dump_command, append_command)
4588 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4589 (tekhex_dump_command, binary_dump_command)
4590 (binary_append_command): Constify.
4591 * cli/cli-decode.c (struct cmd_list_element): Change type of
4592 "fun".
4593 * cli/cli-cmds.c (info_command, show_command, set_debug)
4594 (show_debug): Constify.
4595 (show_command): Add non-const overload.
4596 * top.c (set_history, show_history): Constify.
4597 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4598 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4599 * target.c (target_command): Constify.
4600 * sparc64-tdep.c (info_adi_command): Constify.
4601 * record-full.c (cmd_record_full_start): Constify.
4602 (set_record_full_command): Constify. Fix typo.
4603 (show_record_full_command): Constify.
4604 * thread.c (thread_command, thread_apply_command): Constify.
4605 * memattr.c (dummy_cmd): Constify.
4606 * value.c (function_command): Constify.
4607 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4608 * probe.c (info_probes_command): Constify.
4609 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4610 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4611 (show_thread_cmd, set_thread_default_cmd)
4612 (show_thread_default_cmd): Constify.
4613 (check_empty): Constify.
4614 * tracepoint.c (tfind_command): Constify.
4615 * cp-support.c (maint_cplus_command): Constify.
4616 * windows-tdep.c (info_w32_command): Constify.
4617 * record.c (cmd_record_start, set_record_command)
4618 (show_record_command, info_record_command, cmd_record_goto):
4619 Constify.
4620 * ravenscar-thread.c (set_ravenscar_command)
4621 (show_ravenscar_command): Constify.
4622 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4623 Constify.
4624 (add_internal_problem_command): Remove casts.
4625 * arc-tdep.c (maintenance_print_arc_command): Constify.
4626 * valprint.c (set_print, show_print, set_print_raw)
4627 (show_print_raw): Constify.
4628 * maint.c (maintenance_command, maintenance_info_command)
4629 (maintenance_print_command, maintenance_set_cmd)
4630 (maintenance_show_cmd, set_per_command_cmd)
4631 (show_per_command_cmd, maintenance_check_command): Constify.
4632 * language.c (set_check, show_check): Constify.
4633 * typeprint.c (show_print_type, set_print_type): Constify.
4634 * go32-nat.c (go32_info_dos_command): Constify.
4635
4636 2017-10-11 Tom Tromey <tom@tromey.com>
4637
4638 * breakpoint.c (prepare_re_set_context): Remove.
4639 (breakpoint_re_set_one): Update. Don't use cleanups.
4640 (breakpoint_re_set): Use scoped_restore, std::string, and
4641 scoped_restore_current_language.
4642
4643 2017-10-11 Tom Tromey <tom@tromey.com>
4644
4645 * breakpoint.c (commands_command_1): Use std::string.
4646 (cleanup_executing_breakpoints): Remove.
4647 (bpstat_do_actions_1): Use scoped_restore.
4648 (bpstat_check_watchpoint): Use std::string.
4649 (decode_static_tracepoint_spec): Likewise.
4650 (break_range_command): Likewise.
4651 (watch_command_1): Likewise.
4652 (compare_breakpoints): Change argument types.
4653 (clear_command): Use std::vector.
4654 (cleanup_executing_breakpoints): Remove.
4655 (update_global_location_list): Use unique_xmalloc_ptr.
4656 (strace_command): Remove unused declaration.
4657
4658 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4659
4660 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4661 * NEWS: Mention new FreeBSD/arm native configuration.
4662 * configure.host: Add arm*-*-freebsd*.
4663 * configure.nat: Likewise.
4664 * arm-fbsd-nat.c: New file.
4665
4666 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4667
4668 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4669 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4670 * NEWS: Mention new FreeBSD/arm target.
4671 * configure.tgt: Add arm*-*-freebsd*.
4672 * arm-fbsd-tdep.c: New file.
4673 * arm-fbsd-tdep.h: New file.
4674
4675 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4676
4677 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4678 `gdbarch_elfcore_write_linux_prpsinfo'.
4679 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4680 method.
4681 (elf_internal_linux_prpsinfo): Remove declaration.
4682 * gdbarch.h: Regenerate.
4683 * gdbarch.c: Regenerate.
4684
4685 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4686
4687 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4688 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4689
4690 2017-10-11 Pedro Alves <palves@redhat.com>
4691
4692 * breakpoint.c (reattach_breakpoints): Delete.
4693 * breakpoint.h (reattach_breakpoints): Delete.
4694
4695 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4696
4697 * symfile.c (registered_sym_fns): Make struct, not typedef.
4698 (DEF_VEC_O (registered_sym_fns)): Remove.
4699 (symtab_fns): Change type to std::vector.
4700 (add_symtab_fns): Adjust.
4701 (find_sym_fns): Adjust.
4702
4703 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4704
4705 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4706 * arc-tdep.h (arc_arch_is_em): New function.
4707 (arc_arch_is_hs): Likewise.
4708
4709 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4710
4711 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4712 parentheses in the declaration.
4713 (macro_lookup_inclusion): Likewise.
4714 (macro_lookup_definition): Likewise.
4715 * p-lang.h (pascal_builtin_types): Likewise.
4716 * tui/tui-data.c (tui_win_list): Likewise.
4717 * tui/tui-data.h (tui_win_list): Likewise.
4718 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4719
4720 2017-10-11 Mark Rages <markrages@gmail.com>
4721
4722 * target-memory.c (block_boundaries): Fix for block address not
4723 aligned on block size.
4724
4725 2017-10-10 Pedro Alves <palves@redhat.com>
4726 Tom Tromey <tom@tromey.com>
4727
4728 * breakpoint.c (struct captured_breakpoint_query_args)
4729 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4730 (print_breakpoint): New.
4731 * breakpoint.h (print_breakpoint): Declare.
4732 * common/common-exceptions.h (enum return_reason): Remove
4733 references to catch_exceptions.
4734 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4735 Delete.
4736 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4737 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4738 * gdb.h: Delete.
4739 * gdbthread.h (thread_select): Declare.
4740 * mi/mi-cmd-break.c: Don't include gdb.h.
4741 (breakpoint_notify): Use print_breakpoint.
4742 * mi/mi-cmd-catch.c: Don't include gdb.h.
4743 * mi/mi-interp.c: Don't include gdb.h.
4744 (mi_print_breakpoint_for_event): New.
4745 (mi_breakpoint_created, mi_breakpoint_modified): Use
4746 mi_print_breakpoint_for_event.
4747 * mi/mi-main.c: Don't include gdb.h.
4748 (mi_cmd_thread_select): Parse the global thread ID here. Use
4749 thread_select instead of gdb_thread_select.
4750 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4751 of using gdb_list_thread_ids.
4752 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4753 FILEIO_ENOSYS here.
4754 (remote_fileio_request): Use TRY/CATCH instead of
4755 catch_exceptions.
4756 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4757 (symbol_file_add_from_memory_wrapper): Delete.
4758 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4759 * thread.c: Don't include gdb.h.
4760 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4761 (thread_alive): Use thread_select.
4762 (do_captured_thread_select): Delete, parts salvaged as ...
4763 (thread_select): ... this new function.
4764 (gdb_thread_select): Delete.
4765
4766 2017-10-10 Pedro Alves <palves@redhat.com>
4767 Tom Tromey <tom@tromey.com>
4768
4769 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4770 and reverse logic.
4771 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4772 No longer macros. Instead ...
4773 (enum wp_check_result): They're now values of this new
4774 enumeration.
4775 (watchpoint_check): Change return type to wp_check_result and
4776 parameter type to bpstat.
4777 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4778 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4779 catch_errors. Reverse logic of watchpoint_check call.
4780 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4781 pointer as parameter.
4782 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4783 * common/common-exceptions.c (throw_exception_sjlj): Update
4784 comments to avoid mentioning catch_errors.
4785 * exceptions.c (catch_errors): Delete.
4786 * exceptions.h: Update comments to avoid mentioning catch_errors.
4787 (catch_errors_ftype, catch_errors): Delete.
4788 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4789 (hook_stop_stub): Delete.
4790 (restore_selected_frame): Change return type to void, and
4791 parameter type to const frame_id &.
4792 (restore_infcall_control_state): Use TRY/CATCH instead of
4793 catch_errors.
4794 * main.c (captured_command_loop): Return void and remove
4795 parameter. Remove references to catch_errors.
4796 (captured_main): Use TRY/CATCH instead of catch_errors.
4797 * objc-lang.c (objc_submethod_helper_data)
4798 (find_objc_msgcall_submethod_helper): Delete.
4799 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4800 catch_errors.
4801 * record-full.c (record_full_message): Return void.
4802 (record_full_message_args, record_full_message_wrapper): Delete.
4803 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4804 instead of catch_errors.
4805 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4806 parameter type to int.
4807 * solib-darwin.c (open_symbol_file_object): Ditto.
4808 * solib-dsbt.c (open_symbol_file_object): Ditto.
4809 * solib-frv.c (open_symbol_file_object): Ditto.
4810 * solib-svr4.c (open_symbol_file_object): Ditto.
4811 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4812 * solib.c (update_solib_list): Use TRY/CATCH instead of
4813 catch_errors.
4814 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4815 Change type.
4816 * symmisc.c (struct print_symbol_args): Remove.
4817 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4818 (print_symbol): Change type.
4819 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4820 and remove parameters.
4821 (catch_errors): New.
4822 (get_windows_debug_event): Adjust.
4823
4824 2017-10-09 Tom Tromey <tom@tromey.com>
4825
4826 * mi/mi-main.c (free_splay_tree): Remove.
4827 (list_available_thread_groups): Use splay_tree_up.
4828 * common/gdb_splay_tree.h: New file.
4829
4830 2017-10-09 Tom Tromey <tom@tromey.com>
4831
4832 * mi/mi-main.c (do_nothing): Remove.
4833 (list_available_thread_groups): Update.
4834
4835 2017-10-09 Pedro Alves <palves@redhat.com>
4836
4837 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4838 reading registers when switching context.
4839
4840 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4841
4842 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4843 (fbsd_convert_siginfo): Likewise.
4844 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4845
4846 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4847
4848 * configure.ac (try_guile_versions): Remove guile-2.2.
4849 * configure: Regenerate.
4850
4851 2017-10-09 Tom Tromey <tom@tromey.com>
4852
4853 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4854 (COMPILE.pre): Use $(CXX).
4855
4856 2017-10-09 Pedro Alves <palves@redhat.com>
4857
4858 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4859 Use bool.
4860 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4861 * cp-support.h (cp_remove_params): Now returns a
4862 gdb::unique_xmalloc_ptr.
4863 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4864 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4865 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4866 returning a gdb::unique_xmalloc_ptr.
4867 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4868 * stack.c (find_frame_funname): Adjust to cp_remove_params
4869 returning a gdb::unique_xmalloc_ptr.
4870
4871 2017-10-08 Tom Tromey <tom@tromey.com>
4872
4873 * dwarf2read.c (dwarf2_get_dwz_file): Use
4874 gdb::unique_xmalloc_ptr.
4875 (find_slot_in_mapped_hash): Likewise.
4876 (dwarf2_physname): Likewise.
4877 (create_dwo_unit_in_dwp_v1): Use std::string.
4878 (create_dwo_unit_in_dwp_v2): Likewise.
4879 (lookup_dwo_cutu): Likewise.
4880 (inherit_abstract_dies): Use std::vector.
4881 (read_array_type): Likewise.
4882 (dwarf_decode_macros): Remove unused declaration.
4883 (unsigned_int_compar): Remove.
4884 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4885 (psymtabs_addrmap_cleanup): Remove.
4886
4887 2017-10-08 Tom Tromey <tom@tromey.com>
4888
4889 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4890 * frame.h (frame_cleanup_after_sniffer): Declare.
4891 (frame_prepare_for_sniffer): Return void.
4892 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4893 type of argument.
4894 (frame_prepare_for_sniffer): Return void.
4895
4896 2017-10-08 Tom Tromey <tom@tromey.com>
4897
4898 * utils.h (make_cleanup_value_free): Remove.
4899 * utils.c (do_value_free, struct cleanup): Remove.
4900 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4901 Use gdb_value_up.
4902 * value.h (struct value_deleter): New.
4903 (gdb_value_up): New typedef.
4904
4905 2017-10-08 Tom Tromey <tom@tromey.com>
4906
4907 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4908 (make_cleanup_free_search_symbols): Remove.
4909 (search_symbols): Return std::vector.
4910 (symbol_search::compare_search_syms): Now member of
4911 symbol_search. Change arguments.
4912 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4913 (symtab_symbol_info, rbreak_command): Update.
4914 * symtab.h (struct symbol_search) <next>: Remove.
4915 Add constructors.
4916 (symbol_search::operator<): New function.
4917 (symbol_search::operator==): New function.
4918 (search_symbols): Remove std::vector.
4919 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4920 (symbol_search::compare_search_syms): Declare.
4921
4922 2017-10-06 Yao Qi <yao.qi@linaro.org>
4923
4924 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4925 arch/aarch64-insn.o.
4926 Remove one rule.
4927 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4928
4929 2017-10-06 Yao Qi <yao.qi@linaro.org>
4930
4931 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4932 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4933 arch/arm-linux.o respectively.
4934 * configure.tgt: Likewise.
4935
4936 2017-10-06 Yao Qi <yao.qi@linaro.org>
4937
4938 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4939 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4940
4941 2017-10-06 Pedro Alves <palves@redhat.com>
4942
4943 * windows-nat.c: Include <algorithm>.
4944
4945 2017-10-06 Yao Qi <yao.qi@linaro.org>
4946
4947 * configure.tgt (i386_tobjs): New variable.
4948 (amd64_tobjs): New variable.
4949 Set $cpu_obs and $os_obs.
4950
4951 2017-10-06 Yao Qi <yao.qi@linaro.org>
4952
4953 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4954 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4955 (clean): Remove object files and dependency files.
4956 (distclean): Remove the directory.
4957 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4958 * configure: Re-generated.
4959 * configure.tgt: Replace amd64.o with arch/amd64.o.
4960
4961 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4962
4963 PR build/22188
4964 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4965 and SETEND.
4966
4967 2017-10-05 Pedro Alves <palves@redhat.com>
4968
4969 * linux-nat.c (linux_child_follow_fork): When following the parent
4970 and detaching the child, consult the parent thread's architecture
4971 instead of the child's.
4972
4973 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4974
4975 * ax.h: Do not include "doublest.h".
4976 (union agent_val): Remove.
4977
4978 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4979
4980 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4981 (decimal_to_string): Return std::string object.
4982 (decimal_from_string): Accept std::string object. Return bool.
4983 (decimal_from_integral, decimal_from_doublest): Remove.
4984 (decimal_from_longest): Add prototype.
4985 (decimal_from_ulongest): Likewise.
4986 (decimal_to_longest): Likewise.
4987 (decimal_from_doublest): Likewise.
4988 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4989 (MAX_DECIMAL_STRING): Move here.
4990 (decimal_to_string): Return std::string object.
4991 (decimal_from_string): Accept std::string object. Return bool.
4992 (decimal_from_integral): Remove, replace by ...
4993 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4994 (decimal_to_longest): New function.
4995 (decimal_from_floating): Remove, replace by ...
4996 (decimal_from_doublest): ... this new function.
4997 (decimal_to_doublest): Update to new decimal_to_string interface.
4998
4999 * value.c (unpack_long): Use decimal_to_longest.
5000 * valops.c (value_cast): Use decimal_from_doublest instead of
5001 decimal_from_floating. Use decimal_from_[u]longest isntead of
5002 decimal_from_integral.
5003 * valarith.c (value_args_as_decimal): Likewise.
5004 * valprint.c (print_decimal_floating): Update to new
5005 decimal_to_string interface.
5006 * printcmd.c (printf_decfloat): Likewise.
5007 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5008
5009 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5010
5011 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5012 * gdbtypes.c: Include "floatformat.h".
5013 * value.c: Likewise.
5014 * m68k-tdep.c: Likewise.
5015
5016 * findvar.c: Do not include "floatformat.h".
5017 * amd64-darwin-tdep.c: Likewise.
5018 * arm-linux-tdep.c: Likewise.
5019 * i386-darwin-tdep.c: Likewise.
5020 * i387-tdep.c: Likewise.
5021 * m68k-linux-tdep.c: Likewise.
5022 * mep-tdep.c: Likewise.
5023 * mips-tdep.c: Likewise.
5024 * nios2-tdep.c: Likewise.
5025 * s390-linux-tdep.c: Likewise.
5026 * sparc-obsd-tdep.c: Likewise.
5027 * sparc-tdep.c: Likewise.
5028 * sparc64-tdep.c: Likewise.
5029 * spu-tdep.c: Likewise.
5030 * tic6x-tdep.c: Likewise.
5031 * tilegx-tdep.c: Likewise.
5032 * vax-tdep.c: Likewise.
5033 * xstormy16-tdep.c: Likewise.
5034 * xtensa-tdep.c: Likewise.
5035
5036 * top.c: Do not include "doublest.h".
5037 * aarch64-tdep.c: Likewise.
5038 * alpha-tdep.c: Likewise.
5039 * arm-linux-tdep.c: Likewise.
5040 * m68k-linux-tdep.c: Likewise.
5041 * tilegx-tdep.c: Likewise.
5042 * xstormy16-tdep.c: Likewise.
5043
5044 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5045
5046 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5047 (mipsn32_fbsd_sigframe): Define.
5048 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5049 for FreeBSD/mipsn32.
5050
5051 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5052
5053 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5054 AT_HWCAP.
5055
5056 2017-10-05 Tristan Gingold <tgingold@free.fr>
5057
5058 * MAINTAINERS (Misc): Update my email address.
5059
5060 2017-10-04 Pedro Alves <palves@redhat.com>
5061
5062 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5063 it instead of target_gdbarch.
5064 (get_remote_state, get_remote_packet_size): Adjust
5065 get_remote_arch_state calls, passing down target_gdbarch
5066 explicitly.
5067 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5068 'gdbarch' and use it instead of target_gdbarch.
5069 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5070 passing down target_gdbarch explicitly.
5071 (struct stop_reply) <arch>: New field.
5072 (remote_parse_stop_reply): Use the stopped thread's architecture,
5073 not the current inferior's. Save the architecture in the
5074 stop_reply.
5075 (process_stop_reply): Use the stop reply's architecture.
5076 (process_g_packet, remote_fetch_registers)
5077 (remote_prepare_to_store, store_registers_using_G)
5078 (remote_store_registers): Adjust get_remote_arch_state calls,
5079 using the regcache's architecture.
5080 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5081 passing down target_gdbarch explicitly.
5082 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5083 beneath instead of calling target_gdbarch.
5084 * target.c (default_thread_architecture): Use the specified
5085 inferior's architecture, instead of the current inferior's
5086 architecture (via target_gdbarch).
5087
5088 2017-10-04 Pedro Alves <palves@redhat.com>
5089
5090 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5091 case.
5092 (regcache_print): Handle !target_has_registers here instead.
5093
5094 2017-10-04 Pedro Alves <palves@redhat.com>
5095
5096 * frame.c (create_test_frame): Delete.
5097 * frame.h (create_test_frame): Delete.
5098 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5099 (class regcache_test): Delete.
5100 (test_target_has_registers, test_target_has_stack)
5101 (test_target_has_memory, test_target_prepare_to_store)
5102 (test_target_store_registers): New functions.
5103 (test_target_ops): New class.
5104 (register_to_value_test): Error out if there's already a
5105 process_stratum (or higher) target pushed. Create a fuller mock
5106 environment, with mock target_ops, inferior, address space, thread
5107 and inferior_ptid.
5108 * progspace.c (struct address_space): Move to ...
5109 * progspace.h (struct address_space): ... here.
5110 * regcache.h (regcache::~regcache, regcache::raw_write)
5111 [GDB_SELF_TEST]: No longer virtual.
5112
5113 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5114
5115 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5116
5117 2017-10-04 Pedro Alves <palves@redhat.com>
5118
5119 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5120 out of 'between TRY and CATCH'.
5121
5122 2017-10-04 Pedro Alves <palves@redhat.com>
5123
5124 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5125 * common/common-exceptions.h (TRY): Open an outermost scope.
5126 Expand intro comment.
5127 (CATCH): Reindent.
5128 (END_CATCH): Close the outermost scope.
5129 * completer.c (complete_line_internal): Add missing END_CATCH.
5130
5131 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5132
5133 * NEWS (Changes since GDB 8.0): Add entry about new
5134 'set-cwd-on-gdbserver' feature.
5135 (New remote packets): Add entry for QSetWorkingDir.
5136 * common/common-inferior.h (set_inferior_cwd): New prototype.
5137 * infcmd.c (set_inferior_cwd): Remove "static".
5138 (show_cwd_command): Expand text to include remote debugging.
5139 * remote.c: Add PACKET_QSetWorkingDir.
5140 (remote_protocol_features) <QSetWorkingDir>: New entry for
5141 PACKET_QSetWorkingDir.
5142 (extended_remote_set_inferior_cwd): New function.
5143 (extended_remote_create_inferior): Call
5144 "extended_remote_set_inferior_cwd".
5145 (_initialize_remote): Call "add_packet_config_cmd" for
5146 QSetWorkingDir.
5147
5148 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5149
5150 * NEWS (New commands): Mention "set/show cwd".
5151 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5152 "cd" command's help text.
5153 * common/common-inferior.h (get_inferior_cwd): New prototype.
5154 * infcmd.c (inferior_cwd_scratch): New global variable.
5155 (set_inferior_cwd): New function.
5156 (get_inferior_cwd): Likewise.
5157 (set_cwd_command): Likewise.
5158 (show_cwd_command): Likewise.
5159 (_initialize_infcmd): Add "set/show cwd" commands.
5160 * inferior.h (class inferior) <cwd>: New field.
5161 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5162 (fork_inferior): Change inferior's cwd before its execution.
5163 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5164 to CreateProcess.
5165
5166 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5167
5168 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5169 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5170 (COMMON_OBS): Add gdb_tilde_expand.o.
5171 * common/gdb_tilde_expand.c: New file.
5172 * common/gdb_tilde_expand.h: Likewise.
5173
5174 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5175
5176 * gdbarch.sh (objfile): Remove duplicate declaration.
5177 * gdbarch.h: Regenerate.
5178
5179 2017-10-03 Tom Tromey <tom@tromey.com>
5180
5181 * utils.c (internal_vproblem): Use string_vprintf.
5182
5183 2017-10-03 Tom Tromey <tom@tromey.com>
5184
5185 * printcmd.c (info_symbol_command): Use std::string.
5186
5187 2017-10-03 Tom Tromey <tom@tromey.com>
5188
5189 * top.c (gdb_safe_append_history): Use std::string.
5190
5191 2017-10-03 Tom Tromey <tom@tromey.com>
5192
5193 * event-top.c (stdin_event_handler): Update.
5194 * main.c (captured_main_1): Update.
5195 * top.h (make_delete_ui_cleanup): Remove.
5196 (struct ui): Add constructor and destructor.
5197 (new_ui, delete_ui): Remove.
5198 * top.c (make_delete_ui_cleanup): Remove.
5199 (new_ui_command): Use std::unique_ptr.
5200 (delete_ui_cleanup): Remove.
5201 (ui::ui): Rename from new_ui. Update.
5202 (free_ui): Remove.
5203 (ui::~ui): Rename from delete_ui. Update.
5204
5205 2017-10-03 Tom Tromey <tom@tromey.com>
5206
5207 * symfile.c (load_progress): Use gdb::byte_vector.
5208
5209 2017-10-03 Tom Tromey <tom@tromey.com>
5210
5211 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5212 declaration.
5213 * printcmd.c (x_command): Remove unused declaration.
5214 * symfile.c (symbol_file_command): Remove unused declaration.
5215
5216 2017-10-03 Tom Tromey <tom@tromey.com>
5217
5218 * utils.c (internal_vproblem): Use std::string.
5219 (defaulted_query): Likewise.
5220
5221 2017-10-03 Tom Tromey <tom@tromey.com>
5222
5223 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5224 * top.c (execute_command_to_string): Update.
5225 * utils.c (make_cleanup_restore_page_info): Remove.
5226 (do_restore_page_info_cleanup): Remove.
5227 (set_batch_flag_and_restore_page_info):
5228 New.
5229 (make_cleanup_restore_page_info): Remove.
5230 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5231 (~set_batch_flag_and_restore_page_info): New
5232 (make_cleanup_restore_uinteger): Remove.
5233 (make_cleanup_restore_integer): Remove.
5234 (struct restore_integer_closure): Remove.
5235 (restore_integer): Remove.
5236 * utils.h (struct set_batch_flag_and_restore_page_info): New
5237 class.
5238 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5239 (make_cleanup_restore_page_info): Remove.
5240 (make_cleanup_restore_uinteger) Remove.
5241 (make_cleanup_restore_integer) Remove.
5242
5243 2017-10-03 Tom Tromey <tom@tromey.com>
5244
5245 * record-full.h (record_full_gdb_operation_disable_set): Return
5246 scoped_restore_tmpl<int>.
5247 * infrun.c (adjust_pc_after_break): Update.
5248 (handle_signal_stop): Update.
5249 * record-full.c (record_full_gdb_operation_disable_set): Return
5250 scoped_restore_tmpl<int>.
5251 (record_full_wait_1, record_full_insert_breakpoint)
5252 (record_full_remove_breakpoint, record_full_save)
5253 (record_full_goto_insn): Update.
5254
5255 2017-10-02 Tom Tromey <tom@tromey.com>
5256
5257 PR rust/22236:
5258 * rust-lang.c (rust_val_print_str): New function.
5259 (val_print_struct): Call it.
5260 (rust_subscript): Preserve name of slice type.
5261
5262 2017-10-02 Tom Tromey <tom@tromey.com>
5263
5264 * rust-lang.c (rust_subscript): Handle slices in
5265 EVAL_AVOID_SIDE_EFFECTS case.
5266
5267 2017-10-02 Tom Tromey <tom@tromey.com>
5268
5269 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5270
5271 2017-10-02 Tom Tromey <tom@tromey.com>
5272
5273 * rust-lang.h (rust_slice_type): Add "extern".
5274
5275 2017-10-02 Tom Tromey <tom@tromey.com>
5276 Pedro Alves <palves@redhat.com>
5277
5278 * ada-lang.h (ada_exc_info::operator<): Make const.
5279 (ada_exc_info::operator==): Make const.
5280 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5281 Make const.
5282
5283 2017-09-29 Tom Tromey <tom@tromey.com>
5284
5285 * target.c (read_whatever_is_readable): Change type of "result".
5286 Update.
5287 (free_memory_read_result_vector): Remove.
5288 (read_memory_robust): Change return type. Update.
5289 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5290 bin2hex, std::string.
5291 * target.h (memory_read_result_s): Remove typedef.
5292 (free_memory_read_result_vector): Remove.
5293 (read_memory_robust): Return std::vector.
5294
5295 2017-09-29 Tom Tromey <tom@tromey.com>
5296
5297 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5298
5299 2017-09-29 Tom Tromey <tom@tromey.com>
5300
5301 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5302 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5303 operator< and operator==.
5304 (ada_exceptions_list): Return a std::vector.
5305 * ada-lang.c (ada_exc_info::operator<): Rename from
5306 compare_ada_exception_info.
5307 (ada_exc_info::operator==): New.
5308 (sort_remove_dups_ada_exceptions_list): Change type of
5309 "exceptions".
5310 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5311 (ada_add_global_exceptions): Likewise.
5312 (ada_exceptions_list_1): Return a std::vector.
5313 (ada_exceptions_list): Likewise.
5314
5315 2017-09-29 Tom Tromey <tom@tromey.com>
5316
5317 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5318 'std::set *'.
5319 (print_one_inferior): Update.
5320 (free_vector_of_ints): Remove.
5321 (list_available_thread_groups): Change "ids" to std::set.
5322 (mi_cmd_list_thread_groups): Update.
5323 (struct collect_cores_data) <core>: Now a std::set.
5324 (collect_cores): Update.
5325 (unique): Remove.
5326 (print_one_inferior): Update.
5327
5328 2017-09-29 Tom Tromey <tom@tromey.com>
5329
5330 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5331 (mi_execute_async_cli_command): Likewise.
5332 (mi_cmd_trace_frame_collected): Use field_fmt.
5333
5334 2017-09-29 Tom Tromey <tom@tromey.com>
5335
5336 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5337 gdb::byte_vector.
5338
5339 2017-09-29 Tom Tromey <tom@tromey.com>
5340
5341 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5342
5343 2017-09-29 Tom Tromey <tom@tromey.com>
5344
5345 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5346
5347 2017-09-29 Tom Tromey <tom@tromey.com>
5348
5349 * varobj.h (varobj_gen_name): Return std::string.
5350 * varobj.c (varobj_gen_name): Return std::string.
5351 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5352 (mi_cmd_var_delete): Don't copy "name".
5353
5354 2017-09-29 Tom Tromey <tom@tromey.com>
5355
5356 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5357 (mi_cmd_break_insert_1): Update.
5358
5359 2017-09-29 Tom Tromey <tom@tromey.com>
5360
5361 * target.h (make_scoped_defer_target_commit_resume): Update.
5362 * target.c (make_scoped_defer_target_commit_resume): Rename from
5363 make_cleanup_defer_target_commit_resume. Return a
5364 scoped_restore.
5365 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5366
5367 2017-09-29 Tom Tromey <tom@tromey.com>
5368
5369 * main.c (captured_main_1): Remove unused declaration.
5370 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5371
5372 2017-09-29 Tom Tromey <tom@tromey.com>
5373
5374 * symtab.c (search_symbols): Remove unused outer cleanup.
5375 (make_source_files_completion_list): Remove unused declaration.
5376
5377 2017-09-29 Tom Tromey <tom@tromey.com>
5378
5379 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5380
5381 2017-09-29 Tom Tromey <tom@tromey.com>
5382
5383 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5384 gdb::byte_vector.
5385
5386 2017-09-29 Tom Tromey <tom@tromey.com>
5387
5388 * complaints.c (vcomplaint): Use std::string.
5389
5390 2017-09-29 Tom Tromey <tom@tromey.com>
5391
5392 * tracepoint.c (trace_variable_command): Use std::string.
5393 (encode_actions_1): Remove unused declarations.
5394 (create_tsv_from_upload): Use std::string.
5395
5396 2017-09-29 Tom Tromey <tom@tromey.com>
5397
5398 * cp-support.c (gdb_demangle): Use std::string.
5399
5400 2017-09-29 Tom Tromey <tom@tromey.com>
5401
5402 * stack.c (parse_frame_specification): Use std::string
5403 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5404
5405 2017-09-29 Tom Tromey <tom@tromey.com>
5406
5407 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5408
5409 2017-09-29 Tom Tromey <tom@tromey.com>
5410
5411 * utils.c (vfprintf_maybe_filtered): Use std::string.
5412 (vfprintf_unfiltered): Likewise.
5413
5414 2017-09-29 Tom Tromey <tom@tromey.com>
5415
5416 * event-top.c (top_level_prompt): Return std::string.
5417 (display_gdb_prompt): Update.
5418
5419 2017-09-29 Tom Tromey <tom@tromey.com>
5420
5421 * unittests/common-utils-selftests.c (format): New function.
5422 (string_vprintf_tests): New function.
5423 (_initialize_common_utils_selftests): Register new tests.
5424 * common/common-utils.c (string_vprintf): New function.
5425 * common/common-utils.h (string_vprintf): Declare.
5426
5427 2017-09-29 Pedro Alves <palves@redhat.com>
5428
5429 * common/rsp-low.c (unpack_varlen_hex): Constify.
5430 * common/rsp-low.h (unpack_varlen_hex): Constify.
5431 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5432 Constify.
5433 * remote.c (remote_set_permissions, read_ptid)
5434 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5435 (remote_static_tracepoint_marker_at)
5436 (remote_static_tracepoint_markers_by_strid)
5437 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5438 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5439 (parse_tracepoint_definition, parse_tsv_definition)
5440 (parse_static_tracepoint_marker_definition): Constify.
5441 * tracepoint.h (parse_static_tracepoint_marker_definition)
5442 (parse_trace_status, parse_tracepoint_status)
5443 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5444
5445 2017-09-29 Pedro Alves <palves@redhat.com>
5446
5447 * remote.c (target_buf, target_buf_size): Delete.
5448 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5449 Use the connection's packet buffer instead.
5450 All callers adjusted.
5451 (_initialize_remote): Remove references to target_buf and
5452 target_buf_size.
5453
5454 2017-09-28 Pedro Alves <palves@redhat.com>
5455
5456 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5457 unittests/common-utils-selftests.c.
5458 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5459 (COMMON_OBS): Remove utils-selftests.o.
5460 * utils-selftests.c: Move to ...
5461 * unittests/common-utils-selftests.c: ... here and rename self
5462 test to "string_printf".
5463
5464 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5465
5466 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5467 having NULL cus or tus.
5468
5469 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5470
5471 * arm-tdep.c: (convert_from_extended): Remove.
5472 (convert_to_extended): Likewise.
5473 (arm_extract_return_value): Use convert_typed_floating.
5474 (arm_store_return_value): Likewise.
5475
5476 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5477 * sh-tdep.c: Do not include "floatformat.h".
5478 (sh_littlebyte_bigword_type): New function.
5479 (sh_register_convert_to_virtual): Use convert_typed_floating.
5480 (sh_register_convert_to_raw): Likewise.
5481 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5482 (sh64_littlebyte_bigword_type): New function.
5483 (sh64_extract_return_value): Use convert_typed_floating.
5484 (sh64_register_convert_to_virtual): Likewise.
5485 (sh64_register_convert_to_raw): Likewise.
5486
5487 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5488
5489 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5490 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5491
5492 * gdbtypes.h (union type_specific): Make field floatformat hold
5493 just a single struct floatformat, not an array.
5494 (floatformat_from_type): Move here.
5495 * gdbtypes.c (floatformat_from_type): Move here. Update to
5496 changed TYPE_FLOATFORMAT definition.
5497 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5498 (recursive_dump_type): Likewise.
5499 (init_float_type): Install correct floatformat for byte order.
5500 (arch_float_type): Likewise.
5501
5502 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5503
5504 * gdbtypes.c (init_type): Change incoming argument from
5505 length-in-bytes to length-in-bits. Assert length is a
5506 multiple of TARGET_CHAR_BITS.
5507 (arch_type, arch_flags_type): Likewise.
5508 (init_integer_type): Update call to init_type.
5509 (init_character_type): Likewise.
5510 (init_boolean_type): Likewise.
5511 (init_float_type): Likewise.
5512 (init_decfloat_type): Likewise.
5513 (init_complex_type): Likewise.
5514 (init_pointer_type): Likewise.
5515 (objfile_type): Likewise.
5516 (arch_integer_type): Update call to arch_type.
5517 (arch_character_type): Likewise.
5518 (arch_boolean_type): Likewise.
5519 (arch_float_type): Likewise.
5520 (arch_decfloat_type): Likewise.
5521 (arch_complex_type): Likewise.
5522 (arch_pointer_type): Likewise.
5523 (gdbtypes_post_init): Likewise.
5524
5525 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5526 (read_base_type): Likewise.
5527 * mdebugread.c (basic_type): Likewise.
5528 * stabsread.c (dbx_init_float_type): Likewise.
5529 (rs6000_builtin_type): Likewise.
5530 (read_range_type): Likewise. Also, fix call to init_integer_type
5531 with erroneous length argument.
5532
5533 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5534 * d-lang.c (build_d_types): Likewise.
5535 * f-lang.c (build_fortran_types): Likewise.
5536 * go-lang.c (build_go_types): Likewise.
5537 * opencl-lang.c (build_opencl_types): Likewise.
5538 * jit.c (finalize_symtab): Likewise.
5539 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5540 (build_std_type_info_type): Likewise.
5541 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5542 update call to arch_flags_type.
5543
5544 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5545 arch_type.
5546 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5547 * windows-tdep.c (windows_get_tlb_type): Likewise.
5548
5549 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5550 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5551 * m32c-tdep.c (make_types): Likewise.
5552 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5553 (rl78_psw_type): Update call to arch_flags_type.
5554 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5555 * rx-tdep.c (rx_psw_type): Likewise.
5556 (rx_fpsw_type): Likewise.
5557 * sparc-tdep.c (sparc_psr_type): Likewise.
5558 (sparc_fsr_type): Likewise.
5559 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5560 (sparc64_ccr_type): Likewise.
5561 (sparc64_fsr_type): Likewise.
5562 (sparc64_fprs_type): Likewise.
5563
5564 2017-09-27 Tom Tromey <tom@tromey.com>
5565
5566 * findcmd.c (find_command): Constify.
5567
5568 2017-09-27 Tom Tromey <tom@tromey.com>
5569
5570 * ada-tasks.c (task_command_1, task_command): Constify.
5571
5572 2017-09-27 Tom Tromey <tom@tromey.com>
5573
5574 * symtab.c (maintenance_print_symbol_cache)
5575 (maintenance_flush_symbol_cache)
5576 (maintenance_print_symbol_cache_statistics): Constify.
5577
5578 2017-09-27 Tom Tromey <tom@tromey.com>
5579
5580 * inferior.c (detach_inferior_command, kill_inferior_command)
5581 (inferior_command): Constify.
5582
5583 2017-09-27 Tom Tromey <tom@tromey.com>
5584
5585 * regcache.c (regcache_print, maintenance_print_registers)
5586 (maintenance_print_raw_registers)
5587 (maintenance_print_cooked_registers)
5588 (maintenance_print_register_groups)
5589 (maintenance_print_remote_registers): Constify.
5590
5591 2017-09-27 Tom Tromey <tom@tromey.com>
5592
5593 * printcmd.c (map_display_numbers, undisplay_command)
5594 (enable_disable_display_command, enable_display_command)
5595 (disable_display_command): Constify.
5596
5597 2017-09-27 Tom Tromey <tom@tromey.com>
5598
5599 * breakpoint.h (delete_command): Don't declare.
5600 * breakpoint.c (delete_command, enable_once_command)
5601 (enable_count_command, enable_delete_command, breakpoint_1)
5602 (maintenance_info_breakpoints, stopin_command, stopat_command)
5603 (delete_command, delete_trace_command, save_breakpoints)
5604 (save_breakpoints_command, save_tracepoints_command): Constify.
5605
5606 2017-09-27 Tom Tromey <tom@tromey.com>
5607
5608 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5609 (skip_ws, extract_identifier, macro_define_command)
5610 (macro_undef_command, macro_list_command): Constify.
5611
5612 2017-09-27 Tom Tromey <tom@tromey.com>
5613
5614 * infcmd.c (environment_info, set_environment_command)
5615 (unset_environment_command, path_info, info_proc_cmd_1)
5616 (info_proc_cmd_mappings, info_proc_cmd_stat)
5617 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5618 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5619
5620 2017-09-27 Tom Tromey <tom@tromey.com>
5621
5622 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5623 Constify.
5624
5625 2017-09-27 Tom Tromey <tom@tromey.com>
5626
5627 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5628
5629 2017-09-27 Tom Tromey <tom@tromey.com>
5630
5631 * demangle.c (demangle_command): Constify.
5632
5633 2017-09-27 Tom Tromey <tom@tromey.com>
5634
5635 * progspace.c (maintenance_info_program_spaces_command):
5636 Constify.
5637
5638 2017-09-27 Tom Tromey <tom@tromey.com>
5639
5640 * compile/compile.c (check_raw_argument, compile_file_command)
5641 (compile_code_command, compile_print_command): Constify.
5642
5643 2017-09-27 Tom Tromey <tom@tromey.com>
5644
5645 * reggroups.c (maintenance_print_reggroups): Constify.
5646
5647 2017-09-27 Tom Tromey <tom@tromey.com>
5648
5649 * dwarf2read.c (save_gdb_index_command): Constify.
5650
5651 2017-09-27 Tom Tromey <tom@tromey.com>
5652
5653 * stap-probe.c (info_probes_stap_command): Constify.
5654
5655 2017-09-27 Tom Tromey <tom@tromey.com>
5656
5657 * fork-child.c (unset_exec_wrapper_command): Constify.
5658
5659 2017-09-27 Tom Tromey <tom@tromey.com>
5660
5661 * btrace.c (get_uint, get_context_size, no_chunk)
5662 (maint_btrace_packet_history_cmd)
5663 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5664 (maint_info_btrace_cmd): Constify.
5665
5666 2017-09-27 Tom Tromey <tom@tromey.com>
5667
5668 * reverse.c (delete_bookmark_command): Constify.
5669
5670 2017-09-27 Tom Tromey <tom@tromey.com>
5671
5672 * remote.c (set_memory_packet_size)
5673 (set_memory_write_packet_size, show_memory_write_packet_size)
5674 (set_memory_read_packet_size, show_memory_read_packet_size)
5675 (compare_sections_command, packet_command, remote_put_command)
5676 (remote_get_command, remote_delete_command): Constify.
5677
5678 2017-09-27 Tom Tromey <tom@tromey.com>
5679
5680 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5681 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5682 (set_mipsfpu_auto_command): Constify.
5683
5684 2017-09-27 Tom Tromey <tom@tromey.com>
5685
5686 * cli/cli-cmds.h (cd_command): Constify.
5687 * cli/cli-cmds.c (cd_command): Constify.
5688
5689 2017-09-27 Tom Tromey <tom@tromey.com>
5690
5691 * thread.c (thread_name_command, thread_find_command): Constify.
5692
5693 2017-09-27 Tom Tromey <tom@tromey.com>
5694
5695 * probe.c (enable_probes_command, disable_probes_command):
5696 Constify.
5697
5698 2017-09-27 Tom Tromey <tom@tromey.com>
5699
5700 * symfile.c (symbol_file_command): Constify.
5701 * gdbcore.h (deprecated_file_changed_hook): Constify.
5702 * exec.c (deprecated_file_changed_hook, exec_file_command)
5703 (file_command): Constify.
5704 * defs.h (symbol_file_command): Constify.
5705
5706 2017-09-27 Tom Tromey <tom@tromey.com>
5707
5708 * remote-fileio.c (set_system_call_allowed)
5709 (show_system_call_allowed): Constify.
5710
5711 2017-09-27 Tom Tromey <tom@tromey.com>
5712
5713 * tracepoint.c (delete_trace_variable_command)
5714 (tfind_end_command, tfind_start_command, tfind_pc_command)
5715 (tfind_tracepoint_command, tfind_line_command)
5716 (tfind_range_command, tfind_outside_command): Constify.
5717
5718 2017-09-27 Tom Tromey <tom@tromey.com>
5719
5720 * ax-gdb.c (maint_agent_printf_command, agent_command)
5721 (agent_eval_command): Constify.
5722
5723 2017-09-27 Tom Tromey <tom@tromey.com>
5724
5725 * tracepoint.c (info_scope_command): Constify.
5726 * python/python.c (gdbpy_decode_line): Constify.
5727 * python/py-breakpoint.c (bppy_init): Constify.
5728 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5729 * location.h: (new_linespec_location)
5730 (string_to_event_location_basic, string_to_event_location):
5731 Constify.
5732 * location.c (new_linespec_location)
5733 (string_to_event_location_basic, string_to_event_location):
5734 Constify.
5735 * linespec.h (decode_line_with_current_source)
5736 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5737 * linespec.c (linespec_lex_to_end)
5738 (decode_line_with_current_source)
5739 (decode_line_with_last_displayed): Constify.
5740 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5741 Constify.
5742 * cli/cli-cmds.c (edit_command, list_command): Constify.
5743 * breakpoint.h (until_break_command, watch_command_wrapper)
5744 (awatch_command_wrapper, rwatch_command_wrapper)
5745 (init_ada_exception_breakpoint): Constify.
5746 * breakpoint.c (break_command_1, dprintf_command)
5747 (break_range_command, watch_command_wrapper)
5748 (rwatch_command_wrapper, awatch_command_wrapper)
5749 (until_break_command, init_ada_exception_breakpoint)
5750 (strace_marker_create_sals_from_location, trace_command)
5751 (ftrace_command, strace_command, struct tracepoint): Constify.
5752 * ax-gdb.c (agent_command_1): Constify.
5753 * ada-lang.c (ada_exception_sal): Constify.
5754
5755 2017-09-27 Tom Tromey <tom@tromey.com>
5756
5757 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5758 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5759 (get_context_size, no_chunk, get_insn_history_modifiers)
5760 (cmd_record_insn_history, get_call_history_modifiers)
5761 (cmd_record_call_history): Constify.
5762
5763 2017-09-27 Tom Tromey <tom@tromey.com>
5764
5765 * source.c (show_substitute_path_command)
5766 (unset_substitute_path_command, set_substitute_path_command):
5767 Constify.
5768
5769 2017-09-27 Tom Tromey <tom@tromey.com>
5770
5771 * typeprint.c (maintenance_print_type): Constify.
5772 * maint.c (maintenance_dump_me, maintenance_demangle)
5773 (maintenance_time_display, maintenance_info_sections)
5774 (maintenance_print_statistics, maintenance_deprecate)
5775 (maintenance_undeprecate): Constify.
5776 (maintenance_do_deprecate): Constify. Use std::string.
5777 (maintenance_selftest): Constify.
5778 * gdbtypes.h (maintenance_print_type): Constify.
5779
5780 2017-09-27 Tom Tromey <tom@tromey.com>
5781
5782 * hppa-tdep.c (unwind_command): Constify.
5783
5784 2017-09-27 Tom Tromey <tom@tromey.com>
5785
5786 * target-descriptions.c (unset_tdesc_filename_cmd)
5787 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5788 Constify.
5789
5790 2017-09-27 Tom Tromey <tom@tromey.com>
5791
5792 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5793
5794 2017-09-27 Tom Tromey <tom@tromey.com>
5795
5796 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5797
5798 2017-09-27 Tom Tromey <tom@tromey.com>
5799
5800 * tui/tui-regs.c (tui_reg_command): Constify.
5801
5802 2017-09-27 Tom Tromey <tom@tromey.com>
5803
5804 * skip.c (skip_file_command, skip_function_command)
5805 (skip_enable_command, skip_disable_command, skip_delete_command):
5806 Constify.
5807
5808 2017-09-27 Tom Tromey <tom@tromey.com>
5809
5810 * record-btrace.c (cmd_record_btrace_bts_start)
5811 (cmd_record_btrace_pt_start): Constify.
5812
5813 2017-09-27 Tom Tromey <tom@tromey.com>
5814
5815 * symmisc.c (maintenance_print_symbols)
5816 (maintenance_print_msymbols, maintenance_print_objfiles)
5817 (maintenance_info_symtabs, maintenance_check_symtabs)
5818 (maintenance_expand_symtabs, maintenance_info_line_tables):
5819 Constify.
5820
5821 2017-09-27 Tom Tromey <tom@tromey.com>
5822
5823 * top.c (new_ui_command): Constify.
5824
5825 2017-09-27 Tom Tromey <tom@tromey.com>
5826
5827 * symfile.c (add_symbol_file_command)
5828 (remove_symbol_file_command, list_overlays_command)
5829 (map_overlay_command, unmap_overlay_command)
5830 (overlay_auto_command, overlay_manual_command)
5831 (overlay_off_command, overlay_load_command): Constify.
5832
5833 2017-09-27 Tom Tromey <tom@tromey.com>
5834
5835 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5836 (info_spu_mailbox_command, info_spu_dma_command)
5837 (info_spu_proxydma_command): Constify.
5838
5839 2017-09-27 Tom Tromey <tom@tromey.com>
5840
5841 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5842
5843 2017-09-27 Tom Tromey <tom@tromey.com>
5844
5845 * cli/cli-script.c (user_defined_command): Constify.
5846
5847 2017-09-27 Tom Tromey <tom@tromey.com>
5848
5849 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5850 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5851 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5852 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5853 (dump_binary_value, append_binary_memory, append_binary_value):
5854 Constify.
5855 (struct dump_context) <func>: Constify.
5856 (add_dump_command): Update.
5857
5858 2017-09-27 Tom Tromey <tom@tromey.com>
5859
5860 * cli/cli-cmds.c (show_version, show_configuration)
5861 (source_command, show_user): Constify.
5862
5863 2017-09-27 Tom Tromey <tom@tromey.com>
5864
5865 * target.c (maintenance_print_target_stack): Constify.
5866
5867 2017-09-27 Tom Tromey <tom@tromey.com>
5868
5869 * interps.c (interpreter_exec_cmd): Constify.
5870
5871 2017-09-27 Tom Tromey <tom@tromey.com>
5872
5873 * record-full.c (cmd_record_full_restore): Constify.
5874
5875 2017-09-27 Tom Tromey <tom@tromey.com>
5876
5877 * memattr.c (enable_mem_command, disable_mem_command)
5878 (delete_mem_command): Constify.
5879
5880 2017-09-27 Tom Tromey <tom@tromey.com>
5881
5882 * value.c (show_convenience): Constify.
5883
5884 2017-09-27 Tom Tromey <tom@tromey.com>
5885
5886 * gdbcore.h (core_file_command): Update.
5887 * corefile.c (core_file_command): Constify.
5888
5889 2017-09-27 Tom Tromey <tom@tromey.com>
5890
5891 * user-regs.c (maintenance_print_user_registers): Constify.
5892
5893 2017-09-27 Tom Tromey <tom@tromey.com>
5894
5895 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5896
5897 2017-09-27 Tom Tromey <tom@tromey.com>
5898
5899 * cp-support.c (first_component_command): Constify.
5900
5901 2017-09-27 Tom Tromey <tom@tromey.com>
5902
5903 * psymtab.c (maintenance_print_psymbols)
5904 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5905 Constify.
5906
5907 2017-09-27 Tom Tromey <tom@tromey.com>
5908
5909 * windows-tdep.c (display_tib): Constify.
5910
5911 2017-09-27 Tom Tromey <tom@tromey.com>
5912
5913 * linux-fork.c (delete_checkpoint_command)
5914 (detach_checkpoint_command): Constify.
5915
5916 2017-09-27 Tom Tromey <tom@tromey.com>
5917
5918 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5919
5920 2017-09-27 Tom Tromey <tom@tromey.com>
5921
5922 * arc-tdep.c (dump_arc_instruction_command): Constify.
5923
5924 2017-09-27 Tom Tromey <tom@tromey.com>
5925
5926 * valprint.c (set_radix, show_radix): Constify.
5927
5928 2017-09-27 Tom Tromey <tom@tromey.com>
5929
5930 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5931
5932 2017-09-27 Tom Tromey <tom@tromey.com>
5933
5934 * command.h (not_just_help_class_command): Update.
5935 * cli/cli-decode.h (not_just_help_class_command): Update.
5936 * cli/cli-decode.c (not_just_help_class_command): Constify.
5937
5938 2017-09-27 Tom Tromey <tom@tromey.com>
5939
5940 * gdb_bfd.c (maintenance_info_bfds): Constify.
5941
5942 2017-09-27 Tom Tromey <tom@tromey.com>
5943
5944 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5945 overloads.
5946 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5947 (do_const_cfunc): New function.
5948 (cmd_cfunc_eq): New overload.
5949 (cli_user_command_p): Check do_const_cfunc.
5950 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5951 const_cfunc.
5952 * command.h (add_cmd): Add const overload and no-function
5953 overload.
5954 (set_cmd_cfunc): Add const overload.
5955 (cmd_const_cfunc_ftype): Declare.
5956 (cmd_cfunc_eq): Add const overload.
5957 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5958 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5959 overload.
5960
5961 2017-09-27 Tom Tromey <tom@tromey.com>
5962
5963 * macroexp.c (get_next_token_for_substitution): New function.
5964 (substitute_args): Call it. Check for __VA_OPT__.
5965
5966 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5967 Pedro Alves <palves@redhat.com>
5968
5969 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5970 producer_is_icc_lt_14.
5971 (producer_is_icc_lt_14): New function.
5972 (check_producer): Add code for checking version of ICC.
5973 (producer_is_icc): Move to producer.c.
5974 (read_structure_type): Restrict ICC workaround to ICC<14.
5975 * producer.c: Include selftest.h.
5976 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5977 New functions.
5978 * producer.h (producer_is_icc): New declaration.
5979
5980 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5981
5982 * Makefile.in (SFILES): Add producer.c.
5983 (COMMON_OBS): Add producer.o
5984 * amd64-tdep.c (producer.h): Add new include.
5985 * dwarf2read.c (producer.h): Add new include.
5986 * producer.c: New file.
5987 * producer.h: New file.
5988 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5989 producer.c.
5990 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5991 producer.h.
5992
5993 2017-09-26 Matthias Klose <doko@ubuntu.com>
5994
5995 * configure.ac: Search ncursesw before ncurses.
5996 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5997 * gdb_curses.h: Include <ncursesw/ncurses.h>
5998 * config.in, configure: Regenerate.
5999
6000 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6001
6002 PR gdb/22185
6003 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6004 obsolete.
6005 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6006 Remove i386sol2 support.
6007 * configure.nat <i386sol2>: Remove.
6008 <sol2-64>: Fold into ...
6009 <sol2>: ... this.
6010 Move common settings to default section.
6011 Add sol-thread.o.
6012 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6013 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6014 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6015 <i[34567]86-*-solaris*>: Remove.
6016 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6017
6018 * configure.ac: Remove wctype in libw check.
6019 (_MSE_INT_H): Don't define on Solaris 7-9.
6020 <solaris*>: Remove libthread_db.so.1 check.
6021 * configure: Regenerate.
6022 * config.in: Regenerate.
6023
6024 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6025 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6026 (gdb_ps_size_t): Remove.
6027 Use base types in users.
6028 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6029
6030 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6031
6032 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6033
6034 PR build/22206
6035 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6036 (adi_is_addr_mapped): Likewise.
6037 (PSR_ICC): Don't redefine.
6038 (PSR_IMPL): Likewise.
6039
6040 2017-09-25 Tom Tromey <tom@tromey.com>
6041
6042 * regcache.c (regcache::dump): Use string_printf.
6043
6044 2017-09-25 Tom Tromey <tom@tromey.com>
6045
6046 * regcache.c (class regcache_invalidator): New.
6047 (struct register_to_invalidate): Remove.
6048 (make_cleanup_regcache_invalidate): Remove.
6049 (regcache::raw_write): Use regcache_invalidator.
6050
6051 2017-09-25 Tom Tromey <tom@tromey.com>
6052
6053 * spu-tdep.c (spu2ppu_sniffer): Update.
6054 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6055 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6056 Remove.
6057 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6058 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6059 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6060 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6061 (frame_pop): Update.
6062
6063 2017-09-25 Tom Tromey <tom@tromey.com>
6064
6065 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6066 * regcache.h (regcache_xfree): Don't declare.
6067 * regcache.c (regcache_xfree): Remove.
6068 (do_regcache_xfree): Use delete.
6069 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6070 * linux-fork.c (free_fork): Use delete.
6071 (fork_save_infrun_state): Likewise.
6072 * jit.c (jit_dealloc_cache): Use delete.
6073 * infrun.c (discard_infcall_suspend_state): Use delete.
6074
6075 2017-09-25 Tom Tromey <tom@tromey.com>
6076
6077 * regcache.h (regcache_xmalloc): Don't declare.
6078 (regcache_raw_set_cached_value): Update comment.
6079 * regcache.c (regcache_xmalloc): Remove.
6080 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6081 * jit.c (jit_frame_sniffer): Use new.
6082 * frame.c (frame_save_as_regcache): Use new.
6083
6084 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6085
6086 * NEWS: Advertise support for guarded-storage registers on IBM z.
6087
6088 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6089
6090 * s390-linux-nat.c (have_regset_gs): New static variable.
6091 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6092 control block and guarded-storage broadcast control regsets.
6093 (s390_read_description): Detect whether the target has
6094 guarded-storage support, return appropriate tdesc.
6095 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6096 (features/s390x-gs-linux64.c): Likewise.
6097 (struct gdbarch_tdep) <have_gs>: New field.
6098 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6099 (s390_gsbc_regset): New variables.
6100 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6101 and s390_gsbc_regset, if applicable.
6102 (s390_core_read_description): Check whether core file was from a
6103 target with guarded-storage support; include appropriate regsets.
6104 (s390_gdbarch_init): Add registers for guarded-storage support.
6105 (_initialize_s390_tdep): Initialize new target descriptions that
6106 include registers for guarded-storage support.
6107 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6108 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6109 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6110 (S390_NUM_REGS): Adjust macro definition.
6111 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6112 (tdesc_s390x_gs_linux64): New declarations.
6113
6114 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6115
6116 * features/s390-gs-linux64.xml: New file.
6117 * features/s390-gs.xml: New file.
6118 * features/s390-gsbc.xml: New file.
6119 * features/s390x-gs-linux64.xml: New file.
6120 * features/Makefile (WHICH): Add s390-gs-linux64 and
6121 s390x-gs-linux64.
6122 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6123 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6124 * features/s390-gs-linux64.c: New generated file.
6125 * features/s390x-gs-linux64.c: New file.
6126 * regformats/s390-gs-linux64.dat: New file.
6127 * regformats/s390x-gs-linux64.dat: New file.
6128
6129 2017-09-23 Tom Tromey <tom@tromey.com>
6130
6131 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6132
6133 2017-09-22 Tom Tromey <tom@tromey.com>
6134
6135 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6136 type to scoped_restore_tmpl.
6137 <scoped_input_handler>: Initialize m_quit_handler directly.
6138
6139 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6140
6141 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6142 (cd_command): Likewise. Free "current_directory" before
6143 assigning to it.
6144 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6145 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6146 * top.c (gdb_dirbuf): Remove global declaration.
6147 * top.h (gdb_dirbuf): Likewise.
6148
6149 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6150
6151 * gnulib/aclocal.m4: Regenerate.
6152 * gnulib/config.in: Regenerate.
6153 * gnulib/configure: Regenerate.
6154 * gnulib/import/Makefile.am: Regenerate.
6155 * gnulib/import/Makefile.in: Regenerate.
6156 * gnulib/import/assure.h: New file.
6157 * gnulib/import/at-func.c: Likewise
6158 * gnulib/import/chdir-long.c: New file.
6159 * gnulib/import/chdir-long.h: New file.
6160 * gnulib/import/cloexec.c: New file.
6161 * gnulib/import/cloexec.h: New file.
6162 * gnulib/import/close.c: New file.
6163 * gnulib/import/closedir.c: New file.
6164 * gnulib/import/dirent-private.h: New file.
6165 * gnulib/import/dup-safer.c: New file.
6166 * gnulib/import/dup.c: New file.
6167 * gnulib/import/dup2.c: New file.
6168 * gnulib/import/error.c: New file.
6169 * gnulib/import/error.h: New file.
6170 * gnulib/import/exitfail.c: New file.
6171 * gnulib/import/exitfail.h: New file.
6172 * gnulib/import/fchdir.c: New file.
6173 * gnulib/import/fcntl.c: New file.
6174 * gnulib/import/fcntl.in.h: New file.
6175 * gnulib/import/fd-hook.c: New file.
6176 * gnulib/import/fd-hook.h: New file.
6177 * gnulib/import/fd-safer.c: New file.
6178 * gnulib/import/fdopendir.c: New file.
6179 * gnulib/import/filename.h: New file.
6180 * gnulib/import/filenamecat-lgpl.c: New file.
6181 * gnulib/import/filenamecat.h: New file.
6182 * gnulib/import/fstat.c: New file.
6183 * gnulib/import/fstatat.c: New file.
6184 * gnulib/import/getcwd-lgpl.c: New file.
6185 * gnulib/import/getcwd.c: New file.
6186 * gnulib/import/getdtablesize.c: New file.
6187 * gnulib/import/getlogin_r.c: New file.
6188 * gnulib/import/getprogname.c: New file.
6189 * gnulib/import/getprogname.h: New file.
6190 * gnulib/import/gettext.h: New file.
6191 * gnulib/import/glob-libc.h: New file.
6192 * gnulib/import/glob.c: New file.
6193 * gnulib/import/glob.in.h: New file.
6194 * gnulib/import/intprops.h: New file.
6195 * gnulib/import/m4/chdir-long.m4: New file.
6196 * gnulib/import/m4/close.m4: New file.
6197 * gnulib/import/m4/closedir.m4: New file.
6198 * gnulib/import/m4/d-ino.m4: New file.
6199 * gnulib/import/m4/d-type.m4: New file.
6200 * gnulib/import/m4/dup.m4: New file.
6201 * gnulib/import/m4/dup2.m4: New file.
6202 * gnulib/import/m4/error.m4: New file.
6203 * gnulib/import/m4/fchdir.m4: New file.
6204 * gnulib/import/m4/fcntl.m4: New file.
6205 * gnulib/import/m4/fcntl_h.m4: New file.
6206 * gnulib/import/m4/fdopendir.m4: New file.
6207 * gnulib/import/m4/filenamecat.m4: New file.
6208 * gnulib/import/m4/fstat.m4: New file.
6209 * gnulib/import/m4/fstatat.m4: New file.
6210 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6211 * gnulib/import/m4/getcwd-path-max.m4: New file.
6212 * gnulib/import/m4/getcwd.m4: New file.
6213 * gnulib/import/m4/getdtablesize.m4: New file.
6214 * gnulib/import/m4/getlogin_r.m4: New file.
6215 * gnulib/import/m4/getprogname.m4: New file.
6216 * gnulib/import/m4/glob.m4: New file.
6217 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6218 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6219 * gnulib/import/m4/mempcpy.m4: New file.
6220 * gnulib/import/m4/memrchr.m4: New file.
6221 * gnulib/import/m4/mode_t.m4: New file.
6222 * gnulib/import/m4/msvc-inval.m4: New file.
6223 * gnulib/import/m4/msvc-nothrow.m4: New file.
6224 * gnulib/import/m4/open.m4: New file.
6225 * gnulib/import/m4/openat.m4: New file.
6226 * gnulib/import/m4/opendir.m4: New file.
6227 * gnulib/import/m4/readdir.m4: New file.
6228 * gnulib/import/m4/realloc.m4: New file.
6229 * gnulib/import/m4/rewinddir.m4: New file.
6230 * gnulib/import/m4/save-cwd.m4: New file.
6231 * gnulib/import/m4/strdup.m4: New file.
6232 * gnulib/import/m4/strerror.m4: New file.
6233 * gnulib/import/m4/unistd-safer.m4: New file.
6234 * gnulib/import/mempcpy.c: New file.
6235 * gnulib/import/memrchr.c: New file.
6236 * gnulib/import/msvc-inval.c: New file.
6237 * gnulib/import/msvc-inval.h: New file.
6238 * gnulib/import/msvc-nothrow.c: New file.
6239 * gnulib/import/msvc-nothrow.h: New file.
6240 * gnulib/import/open.c: New file.
6241 * gnulib/import/openat-die.c: New file.
6242 * gnulib/import/openat-priv.h: New file.
6243 * gnulib/import/openat-proc.c: New file.
6244 * gnulib/import/openat.c: New file.
6245 * gnulib/import/openat.h: New file.
6246 * gnulib/import/opendir.c: New file.
6247 * gnulib/import/pipe-safer.c: New file.
6248 * gnulib/import/readdir.c: New file.
6249 * gnulib/import/realloc.c: New file.
6250 * gnulib/import/rewinddir.c: New file.
6251 * gnulib/import/save-cwd.c: New file.
6252 * gnulib/import/save-cwd.h: New file.
6253 * gnulib/import/strdup.c: New file.
6254 * gnulib/import/strerror-override.c: New file.
6255 * gnulib/import/strerror-override.h: New file.
6256 * gnulib/import/strerror.c: New file.
6257 * gnulib/import/unistd--.h: New file.
6258 * gnulib/import/unistd-safer.h: New file.
6259 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6260 "getcwd" and "glob".
6261 * ser-tcp.c: Undefine "close" before redefining it.
6262
6263 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6264
6265 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6266 get rid of res_val.
6267
6268 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6269
6270 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6271 <sol2,sparc>: Likewise.
6272 <sol2-64,i386>: Likewise.
6273
6274 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6275 -Wdeprecated-declarations on *-*-solaris*.
6276 * configure: Regenerate.
6277
6278 * procfs.c: Include "nat/inferior.h".
6279 (procfs_info_proc): Fix typo.
6280
6281 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6282
6283 * remote.c (vector): Include.
6284 (struct private_thread_info): Add field, thread_handle.
6285 (free_private_thread_info): Deallocate storage associated with
6286 thread handle.
6287 (get_private_info_thread): Initialize `thread_handle' field.
6288 (struct thread_item): Add field, thread_handle.
6289 (clear_threads_listing_context): Deallocate storage associated
6290 with thread handle.
6291 (start_thread): Add support for "handle" attribute.
6292 (thread_attributes): Add "handle".
6293 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6294 field.
6295 (remote_update_thread_list): Update thread_handle.
6296 (remote_thread_handle_to_thread_info): New function.
6297 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6298
6299 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6300
6301 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6302 function.
6303 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6304 * python/python-internal.h (thread_object_type): Declare.
6305
6306 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6307
6308 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6309 (target_thread_handle_to_thread_info): Declare.
6310 * target.c (target_thread_handle_to_thread_info): New function.
6311 * target-delegates.c: Regenerate.
6312 * gdbthread.h (find_thread_by_handle): Declare.
6313 * thread.c (find_thread_by_handle): New function.
6314 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6315 function.
6316 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6317
6318 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6321
6322 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6323
6324 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6325
6326 2017-09-21 Yao Qi <yao.qi@linaro.org>
6327
6328 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6329 to gdb_target_obs.
6330
6331 2017-09-20 Tom Tromey <tom@tromey.com>
6332
6333 * breakpoint.c (struct counted_command_line): Remove.
6334 (breakpoint_commands): Update.
6335 (alloc_counted_command_line, incref_counted_command_line)
6336 (decref_counted_command_line, do_cleanup_counted_command_line)
6337 (make_cleanup_decref_counted_command_line): Remove.
6338 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6339 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6340 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6341 (save_breakpoints): Update.
6342 * breakpoint.h (counted_command_line): Now a typedef to
6343 shared_ptr.
6344 (struct breakpoint) <commands>: Now a counted_command_line.
6345 (struct bpstats) <command>: Likewise.
6346
6347 2017-09-20 Tom Tromey <tom@tromey.com>
6348
6349 * breakpoint.c (struct commands_info, do_map_commands_command):
6350 Remove.
6351 (commands_command_1): Update.
6352 (iterate_over_related_breakpoints): Take a function_view.
6353 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6354 (delete_command): Update.
6355 (map_breakpoint_numbers): Take a function_view.
6356 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6357 (disable_command): Update.
6358 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6359 (enable_command): Update.
6360 (struct disp_data, do_enable_breakpoint_disp)
6361 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6362 (do_map_enable_delete_breakpoint): Remove.
6363 (enable_once_command, enable_count_command, enable_delete_command)
6364 (delete_trace_variable_command): Update.
6365
6366 2017-09-20 Tom Tromey <tom@tromey.com>
6367
6368 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6369 (bpstat_clear): Use delete.
6370 (bpstats): New constructors.
6371 (bpstat_copy, bpstat_stop_status): Use new.
6372 (dprintf_after_condition_true): Update.
6373 * breakpoint.h (bpstats::bpstats): Add constructors.
6374 (bpstats::~bpstats): Add destructor.
6375
6376 2017-09-20 Pedro Alves <palves@redhat.com>
6377
6378 * eval.c (make_params): Delete, refactored as ...
6379 (class fake_method): ... this new type's ctor.
6380 (fake_method::~fake_method): New.
6381 (evaluate_subexp_standard): Use 'fake_method'.
6382
6383 2017-09-20 Tom Tromey <tom@tromey.com>
6384
6385 * windows-nat.c (get_windows_debug_event, windows_wait)
6386 (do_initial_windows_stuff, windows_attach): Update.
6387 * utils.c (vwarning, internal_vproblem): Update.
6388 (ui_unregister_input_event_handler_cleanup)
6389 (prepare_to_handle_input): Remove.
6390 (class scoped_input_handler): New.
6391 (defaulted_query, prompt_for_continue): Update.
6392 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6393 Update.
6394 * top.c (undo_terminal_modifications_before_exit): Update.
6395 * target/target.h (target_terminal_init, target_terminal_inferior)
6396 (target_terminal_ours): Don't declare.
6397 (class target_terminal): New.
6398 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6399 (target_terminal_ours_for_output)
6400 (make_cleanup_restore_target_terminal): Don't declare.
6401 (target_terminal_info): Remove.
6402 * target.c (enum terminal_state, terminal_state): Remove.
6403 (target_terminal::terminal_state): Define.
6404 (target_terminal::init): Rename from target_terminal_init.
6405 (target_terminal::inferior): Rename from
6406 target_terminal_inferior.
6407 (target_terminal::ours): Rename from target_terminal_ours.
6408 (target_terminal::ours_for_output): Rename from
6409 target_terminal_ours_for_output.
6410 (target_terminal::info): New method.
6411 (cleanup_restore_target_terminal)
6412 (make_cleanup_restore_target_terminal): Remove.
6413 * solib.c (handle_solib_event): Update.
6414 * remote.c (remote_serial_quit_handler): Update.
6415 (remote_terminal_inferior, remote_wait_as): Update.
6416 * record-full.c (record_full_wait_1): Update.
6417 * nto-procfs.c (procfs_create_inferior): Update.
6418 * nat/fork-inferior.c (startup_inferior): Update.
6419 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6420 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6421 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6422 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6423 (mi_breakpoint_created, mi_breakpoint_deleted)
6424 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6425 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6426 (mi_user_selected_context_changed, report_initial_inferior):
6427 Update.
6428 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6429 (linux_nat_terminal_inferior): Update.
6430 * infrun.c (follow_fork_inferior)
6431 (handle_vfork_child_exec_or_exit, do_target_resume)
6432 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6433 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6434 Update.
6435 * inflow.c (child_terminal_init, info_terminal_command): Update.
6436 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6437 (attach_command): Update.
6438 * infcall.c (call_thread_fsm_should_stop): Update.
6439 * gnu-nat.c (gnu_attach): Update.
6440 * extension.c (struct active_ext_lang_state)
6441 (restore_active_ext_lang): Update.
6442 * exceptions.c (print_flush): Update.
6443 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6444 (struct quit_handler_cleanup_data, restore_quit_handler)
6445 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6446 Remove.
6447 * cp-support.c (gdb_demangle): Update.
6448 * breakpoint.c (update_inserted_breakpoint_locations)
6449 (insert_breakpoint_locations, handle_jit_event)
6450 (disable_breakpoints_in_unloaded_shlib): Update.
6451 * annotate.c (annotate_breakpoints_invalid)
6452 (annotate_frames_invalid): Update.
6453
6454 2017-09-20 Tom Tromey <tom@tromey.com>
6455
6456 * main.c (catch_command_errors): Rename from
6457 catch_command_errors_const.
6458 (captured_main_1): Update.
6459
6460 2017-09-20 Pedro Alves <palves@redhat.com>
6461
6462 * cli/cli-cmds.c (list_command): Use print_sal_location.
6463 (print_sal_location): New function.
6464 (ambiguous_line_spec): Use print_sal_location.
6465 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6466 * symtab.c (find_function_start_sal): Likewise.
6467 * symtab.h (symtab_and_line::symbol): New field.
6468
6469 2017-09-20 Pedro Alves <palves@redhat.com>
6470
6471 * linespec.c (minsym_found): Handle non-text minsyms.
6472 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6473
6474 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6475
6476 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6477 backslash.
6478
6479 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6480
6481 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6482 vmovups instead vmovaps.
6483 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6484
6485 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6486
6487 * NEWS (Changes since GDB 8.0): Add starti.
6488 * infcmd.c (enum run_break): New.
6489 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6490 case.
6491 (run_command): Use enum run_how.
6492 (start_command): Likewise.
6493 (starti_command): New function.
6494 (RUN_ARGS_HELP): New macro.
6495 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6496 commands. Add starti command.
6497
6498 2017-09-19 Yao Qi <yao.qi@linaro.org>
6499
6500 * Makefile.in (monitor.o): Remove the rule.
6501
6502 2017-09-19 Yao Qi <yao.qi@linaro.org>
6503
6504 * annotate.h (struct annotate_arg_emitter): Use
6505 DISABLE_COPY_AND_ASSIGN.
6506 * common/refcounted-object.h (refcounted_object): Likewise.
6507 * completer.h (struct completion_result): Likewise.
6508 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6509 * filename-seen-cache.h (filename_seen_cache): Likewise.
6510 * gdbcore.h (thread_section_name): Likewise.
6511 * gdb_regex.h (compiled_regex): Likewise.
6512 * gdbthread.h (scoped_restore_current_thread): Likewise.
6513 * inferior.h (scoped_restore_current_inferior): Likewise.
6514 * jit.c (jit_reader): Likewise.
6515 * linespec.h (struct linespec_result): Likewise.
6516 * mi/mi-parse.h (struct mi_parse): Likewise.
6517 * nat/fork-inferior.c (execv_argv): Likewise.
6518 * progspace.h (scoped_restore_current_program_space): Likewise.
6519 * python/python-internal.h (class gdbpy_enter): Likewise.
6520 * regcache.h (regcache): Likewise.
6521 * target-descriptions.c (struct tdesc_reg): Likewise.
6522 (struct tdesc_type): Likewise.
6523 (struct tdesc_feature): Likewise.
6524 * ui-out.h (ui_out_emit_type): Likewise.
6525
6526 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6527
6528 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6529 label abort_expression.
6530
6531 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6532
6533 * common/buffer.c (buffer_xml_printf): Adjust.
6534 * common/xml-utils.c (xml_escape_text): Change return type to
6535 std::string, update code accordingly.
6536 * common/xml-utils.h (xml_escape_text): Change return type to
6537 std::string.
6538 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6539 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6540 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6541 Adjust.
6542
6543 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6544
6545 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6546 (SUBDIR_UNITTESTS_OBS): Add new object file.
6547 * unittests/xml-utils-selftests.c: New file.
6548
6549 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6550
6551 * common/selftest.h (selftest): New struct/interface.
6552 (register_test): Add name parameter, add new overload.
6553 (run_tests): Add filter parameter.
6554 (for_each_selftest_ftype): New typedef.
6555 (for_each_selftest): New declaration.
6556 * common/selftest.c (tests): Change type to
6557 map<string, unique_ptr<selftest>>.
6558 (simple_selftest): New struct.
6559 (register_test): New function.
6560 (register_test): Add name parameter and use it.
6561 (run_tests): Add filter parameter and use it. Add prints.
6562 Adjust to vector -> map change.
6563 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6564 registering selftests.
6565 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6566 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6567 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6568 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6569 * findvar.c (_initialize_findvar): Likewise.
6570 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6571 * maint.c (maintenance_selftest): Update call to run_tests.
6572 (maintenance_info_selftests): New function.
6573 (_initialize_maint_cmds): Register "maintenance info selftests"
6574 command. Update "maintenance selftest" doc.
6575 * regcache.c (_initialize_regcache): Add names when registering
6576 selftests.
6577 * rust-exp.y (_initialize_rust_exp): Likewise.
6578 * selftest-arch.c (gdbarch_selftest): New struct.
6579 (gdbarch_tests): Remove.
6580 (register_test_foreach_arch): Add name parameter. Call
6581 register_test.
6582 (tests_with_arch): Remove, move most content to
6583 gdbarch_selftest::operator().
6584 (_initialize_selftests_foreach_arch): Remove.
6585 * selftest-arch.h (register_test_foreach_arch): Add name
6586 parameter.
6587 (run_tests_with_arch): New declaration.
6588 * utils-selftests.c (_initialize_utils_selftests): Add names
6589 when registering selftests.
6590 * utils.c (_initialize_utils): Likewise.
6591 * unittests/array-view-selftests.c
6592 (_initialize_array_view_selftests): Likewise.
6593 * unittests/environ-selftests.c (_initialize_environ_selftests):
6594 Likewise.
6595 * unittests/function-view-selftests.c
6596 (_initialize_function_view_selftests): Likewise.
6597 * unittests/offset-type-selftests.c
6598 (_initialize_offset_type_selftests): Likewise.
6599 * unittests/optional-selftests.c
6600 (_initialize_optional_selftests): Likewise.
6601 * unittests/scoped_restore-selftests.c
6602 (_initialize_scoped_restore_selftests): Likewise.
6603 * NEWS: Document "maintenance selftest" and "maint info
6604 selftests".
6605
6606 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6607
6608 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6609 scoped_restore.
6610
6611 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6612
6613 * mi/mi-main.c (mi_load_progress): Make uiout variable
6614 a unique_ptr.
6615
6616 2017-09-15 Pedro Alves <palves@redhat.com>
6617
6618 * compile/compile-c-types.c (convert_enum, convert_int)
6619 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6620
6621 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6622
6623 * dwarf2read.c (copy_string): Remove.
6624 (parse_macro_definition): Replace copy_string with savestring.
6625
6626 2017-09-15 Yao Qi <yao.qi@linaro.org>
6627
6628 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6629 gdb_target_obs.
6630 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6631 Likewise.
6632 (i[34567]86-*-linux*): Likewise.
6633
6634 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6635
6636 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6637 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6638 <stack>: Change type to std::vector.
6639 <stack_len, stack_allocated>: Remove.
6640 <grow_stack>: Remove.
6641 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6642 (dwarf_expr_context::~dwarf_expr_context): Remove.
6643 (dwarf_expr_context::grow_stack): Remove.
6644 (dwarf_expr_context::push): Adjust.
6645 (dwarf_expr_context::pop): Adjust.
6646 (dwarf_expr_context::fetch): Adjust.
6647 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6648 (dwarf_expr_context::stack_empty_p): Adjust.
6649 (dwarf_expr_context::execute_stack_op): Adjust.
6650
6651 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6652
6653 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6654 return type to bool.
6655 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6656
6657 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6658
6659 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6660 Change type to bool.
6661 (dwarf_stack_value) <in_stack_memory>: Likewise.
6662 (dwarf_expr_context) <push_address>: Change parameter type to
6663 bool.
6664 <fetch_in_stack_memory>: Change return type to bool.
6665 <push>: Change parameter type to bool.
6666 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6667 to bool.
6668 (dwarf_expr_context::push_address): Likewise.
6669 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6670 to bool.
6671 (dwarf_expr_context::execute_stack_op): Adjust.
6672 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6673
6674 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6675
6676 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6677 (struct dwarf_expr_context) <n_pieces>: Remove.
6678 <pieces>: Change type to std::vector.
6679 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6680 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6681 pieces.
6682 (dwarf_expr_context::add_piece): Adjust.
6683 * dwarf2loc.c (struct piece_closure): Initialize fields.
6684 <n_pieces>: Remove.
6685 <pieces>: Change type to std::vector.
6686 (allocate_piece_closure): Adjust, change parameter to
6687 std::vector rvalue and std::move it to piece_closure.
6688 (rw_pieced_value): Adjust.
6689 (check_pieced_synthetic_pointer): Adjust.
6690 (indirect_synthetic_pointer): Adjust.
6691 (coerce_pieced_ref): Adjust.
6692 (free_pieced_value_closure): Adjust. Use delete to free
6693 piece_closure.
6694 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6695 to allocate_piece_closure.
6696 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6697
6698 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6699
6700 * probe.h (probe_ops_cp): Remove typedef.
6701 (DEF_VEC_P (probe_ops_cp)): Remove.
6702 (all_probe_ops): Change type to std::vector.
6703 * probe.c (info_probes_for_ops): Adjust to vector change.
6704 (probe_linespec_to_ops): Likewise.
6705 (all_probe_ops): Change type to std::vector.
6706 (_initialize_probe): Adjust to vector change.
6707 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6708 * elfread.c (elf_get_probes): Likewise.
6709 * stap-probe.c (_initialize_stap_probe): Likewise.
6710
6711 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6712
6713 * probe.h (struct bound_probe): Define constructors.
6714 * probe.c (bound_probe_s): Remove typedef.
6715 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6716 (collect_probes): Change return type to std::vector, remove
6717 cleanup.
6718 (compare_probes): Return bool, change parameter type. Change
6719 semantic to "less than".
6720 (gen_ui_out_table_header_info): Change parameter to std::vector
6721 and update.
6722 (exists_probe_with_pops): Likewise.
6723 (info_probes_for_ops): Update to std::vector change.
6724 (enable_probes_command): Likewise.
6725 (disable_probes_command): Likewise.
6726
6727 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6728
6729 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6730 vec to std::vector.
6731 * probe.c (parse_probes_in_pspace): Update.
6732 (find_probes_in_objfile): Update.
6733 (find_probe_by_pc): Update.
6734 (collect_probes): Update.
6735 (probe_any_get_probes): Update.
6736 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6737 return type to reference to std::vector.
6738 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6739 std::vector and update.
6740 (dtrace_process_dof): Likewise.
6741 (dtrace_get_probes): Likewise.
6742 * elfread.c (elf_get_probes): Change return type to std::vector,
6743 store an std::vector in bfd_data.
6744 (probe_key_free): Update to std::vector.
6745 * stap-probe.c (handle_stap_probe): Change parameter to
6746 std::vector and update.
6747 (stap_get_probes): Likewise.
6748 * symfile-debug.c (debug_sym_get_probes): Change return type to
6749 std::vector and update.
6750
6751 2017-09-11 Tom Tromey <tom@tromey.com>
6752
6753 * breakpoint.c (program_breakpoint_here_p): Update.
6754 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6755 from make_show_memory_breakpoints_cleanup. Return a
6756 scoped_restore_tmpl<int>.
6757 (restore_show_memory_breakpoints): Remove.
6758 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6759 * mem-break.c (memory_validate_breakpoint): Update.
6760 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6761 (ia64_memory_remove_breakpoint): Update.
6762 (ia64_breakpoint_from_pc): Update.
6763 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6764 from make_show_memory_breakpoints_cleanup.
6765
6766 2017-09-11 Tom Tromey <tom@tromey.com>
6767
6768 * d-namespace.c (d_lookup_symbol): Use std::string.
6769 (find_symbol_in_baseclass): Likewise.
6770
6771 2017-09-11 Tom Tromey <tom@tromey.com>
6772
6773 * ctf.c (ctf_start): Use std::string.
6774
6775 2017-09-11 Tom Tromey <tom@tromey.com>
6776
6777 * ada-lang.c (is_known_support_routine): Update.
6778 (ada_unhandled_exception_name_addr_from_raise): Update.
6779 * guile/scm-frame.c (gdbscm_frame_name): Update.
6780 * python/py-frame.c (frapy_name): Update.
6781 (frapy_function): Update.
6782 * stack.h (find_frame_funname): Update.
6783 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6784 (print_frame): Update.
6785
6786 2017-09-11 Tom Tromey <tom@tromey.com>
6787
6788 * findcmd.c (put_bits): Take a gdb::byte_vector.
6789 (parse_find_args): Return gdb::byte_vector. "args" now const.
6790 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6791 cleanups.
6792 (find_command): Update.
6793
6794 2017-09-11 Tom Tromey <tom@tromey.com>
6795
6796 * cli/cli-script.c (class scoped_restore_hook_in): New.
6797 (clear_hook_in_cleanup): Remove.
6798 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6799 scoped_restore_hook_in.
6800
6801 2017-09-11 Tom Tromey <tom@tromey.com>
6802
6803 * cli/cli-script.c (restore_interp): Remove.
6804 (read_command_lines): Use scoped_restore_interp.
6805 * interps.c (scoped_restore_interp::set_temp): Rename from
6806 interp_set_temp.
6807 * interps.h (class scoped_restore_interp): New.
6808 (interp_set_temp): Remove.
6809
6810 2017-09-11 Tom Tromey <tom@tromey.com>
6811
6812 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6813 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6814 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6815 scoped_restore.
6816 (mi_cmd_break_insert_1): Update.
6817 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6818 scoped_restore.
6819
6820 2017-09-11 Tom Tromey <tom@tromey.com>
6821
6822 * demangle.c (demangle_command): Update.
6823 * breakpoint.c (disable_command): Update.
6824 (enable_command): Update.
6825 (find_location_by_number): Make "number" const. Use
6826 get_number_trailer.
6827 * cli/cli-utils.c (extract_arg): Return std::string.
6828 * probe.c (parse_probe_linespec): Update. Change types.
6829 (collect_probes): Take string arguments.
6830 (parse_probe_linespec): Likewise.
6831 (info_probes_for_ops): Update.
6832 (enable_probes_command): Update.
6833 (disable_probes_command): Update.
6834 * break-catch-sig.c (catch_signal_split_args): Update.
6835 * mi/mi-parse.c (mi_parse): Update.
6836
6837 2017-09-11 Tom Tromey <tom@tromey.com>
6838
6839 * language.h (language_enum): Make argument const.
6840 * language.c (language_enum): Make argument const.
6841
6842 2017-09-11 Tom Tromey <tom@tromey.com>
6843
6844 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6845 as function.
6846 (skip_to_space): Rename from skip_to_space_const.
6847 * common/common-utils.c (skip_to_space): New function.
6848 (skip_to_space): Rename from skip_to_space_const.
6849 * cli/cli-utils.h (get_number): Rename from get_number_const.
6850 (extract_arg): Rename from extract_arg_const.
6851 * cli/cli-utils.c (get_number): Rename from get_number_const.
6852 (extract_arg): Rename from extract_arg_const.
6853 (number_or_range_parser::get_number): Use ::get_number.
6854 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6855 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6856 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6857 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6858 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6859 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6860 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6861 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6862
6863 2017-09-11 Tom Tromey <tom@tromey.com>
6864
6865 * python/python.c (do_start_initialization): Use
6866 py-event-types.def to initialize types.
6867 Define all object type structures.
6868 * python/python-internal.h: Don't declare event initialization
6869 functions.
6870 * python/py-threadevent.c (thread_event_object_type): Don't
6871 define.
6872 * python/py-stopevent.c (stop_event_object_type): Don't define.
6873 * python/py-signalevent.c (signal_event_object_type): Don't
6874 declare or define.
6875 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6876 (clear_objfiles_event_object_type): Don't declare or define.
6877 * python/py-infevents.c (inferior_call_pre_event_object_type)
6878 (inferior_call_post_event_object_type)
6879 (register_changed_event_object_type)
6880 (memory_changed_event_object_type): Don't declare or define.
6881 * python/py-inferior.c (new_thread_event_object_type)
6882 (new_inferior_event_object_type)
6883 (inferior_deleted_event_object_type): Don't declare or define.
6884 * python/py-exitedevent.c (exited_event_object_type): Don't
6885 declare or define.
6886 * python/py-evts.c (gdbpy_initialize_py_events): Use
6887 py-all-events.def.
6888 * python/py-events.h (thread_event_object_type): Don't declare.
6889 (events_object): Use py-all-events.def.
6890 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6891 py-event-types.def.
6892 * python/py-event-types.def: New file.
6893 * python/py-continueevent.c (create_continue_event_object): Don't
6894 declare or define.
6895 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6896 declare or define.
6897 * python/py-all-events.def: New file.
6898
6899 2017-09-11 Tom Tromey <tom@tromey.com>
6900
6901 * python/py-threadevent.c (create_thread_event_object): Return
6902 gdbpy_ref.
6903 * python/py-stopevent.h (create_stop_event_object)
6904 (create_breakpoint_event_object, create_signal_event_object):
6905 Update.
6906 * python/py-stopevent.c (create_stop_event_object): Return
6907 gdbpy_ref.
6908 (emit_stop_event): Update.
6909 * python/py-signalevent.c (create_signal_event_object): Return
6910 gdbpy_ref.
6911 * python/py-infevents.c (create_inferior_call_event_object):
6912 Update.
6913 * python/py-event.h (create_event_object)
6914 (create_thread_event_object): Update.
6915 * python/py-event.c (create_event_object): Return gdbpy_ref.
6916 * python/py-continueevent.c: Return gdbpy_ref.
6917 * python/py-bpevent.c (create_breakpoint_event_object): Return
6918 gdbpy_ref.
6919
6920 2017-09-11 Tom Tromey <tom@tromey.com>
6921
6922 PR python/15622:
6923 * NEWS: Add entry.
6924 * python/python.c (do_start_initialization): Initialize new event
6925 types.
6926 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6927 (gdbpy_initialize_inferior_deleted_event)
6928 (gdbpy_initialize_new_thread_event): Declare.
6929 * python/py-threadevent.c (create_thread_event_object): Add option
6930 "thread" parameter.
6931 * python/py-inferior.c (new_thread_event_object_type)
6932 (new_inferior_event_object_type)
6933 (inferior_deleted_event_object_type): Declare.
6934 (python_new_inferior, python_inferior_deleted): New functions.
6935 (add_thread_object): Emit new_thread event.
6936 (gdbpy_initialize_inferior): Attach new functions to corresponding
6937 observers.
6938 (new_thread, new_inferior, inferior_deleted): Define new event
6939 types.
6940 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6941 registries.
6942 * python/py-events.h (events_object) <new_inferior,
6943 inferior_deleted, new_thread>: New fields.
6944 * python/py-event.h (create_thread_event_breakpoint): Add optional
6945 "thread" parameter.
6946
6947 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6948
6949 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6950 check current_ui instead.
6951 (internal_vproblem): Likewise.
6952
6953 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * thread.c (print_thread_info_1): Remove unnecessary calls to
6956 uiout->is_mi_like_p.
6957
6958 2017-09-09 Tom Tromey <tom@tromey.com>
6959
6960 * namespace.h (add_using_directive): Update.
6961 * namespace.c (add_using_directive): Change type of excludes to
6962 std::vector.
6963 * dwarf2read.c (read_import_statement): Use std::vector.
6964 (read_namespace): Update.
6965 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6966
6967 2017-09-09 Tom Tromey <tom@tromey.com>
6968
6969 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6970
6971 2017-09-09 Tom Tromey <tom@tromey.com>
6972
6973 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6974
6975 2017-09-09 Tom Tromey <tom@tromey.com>
6976
6977 * stack.c (func_command): Use gdb::def_vector.
6978
6979 2017-09-09 Tom Tromey <tom@tromey.com>
6980
6981 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6982 ui_out_emit_list, ui_out_emit_tuple.
6983 (mi_cmd_var_update): Likewise.
6984
6985 2017-09-09 Tom Tromey <tom@tromey.com>
6986
6987 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6988 ui_out_redirect_pop.
6989 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6990 ui_out_redirect_pop.
6991 * utils.c (do_ui_out_redirect_pop)
6992 (make_cleanup_ui_out_redirect_pop): Remove.
6993 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6994 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6995 * ui-out.h (ui_out_redirect_pop): New class.
6996
6997 2017-09-09 Tom Tromey <tom@tromey.com>
6998
6999 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7000 (list_available_thread_groups, mi_cmd_list_thread_groups)
7001 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7002 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7003 Likewise.
7004
7005 2017-09-09 Tom Tromey <tom@tromey.com>
7006
7007 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7008 ui_out_emit_tuple.
7009
7010 2017-09-09 Tom Tromey <tom@tromey.com>
7011
7012 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7013 * stack.c (print_frame): Use ui_out_emit_tuple.
7014 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7015 (info_spu_mailbox_command, info_spu_dma_command)
7016 (info_spu_proxydma_command): Likewise.
7017 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7018 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7019 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7020 ui_out_emit_tuple.
7021 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7022
7023 2017-09-09 Tom Tromey <tom@tromey.com>
7024
7025 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7026 (class ui_out_emit_table): Update comment.
7027 * ui-out.c (do_cleanup_table_end)
7028 (make_cleanup_ui_out_table_begin_end): Remove.
7029 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7030 (info_spu_dma_cmdlist): Likewise.
7031 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7032 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7033 ui_out_emit_table.
7034
7035 2017-09-09 Tom Tromey <tom@tromey.com>
7036
7037 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7038 ui_out_emit_list, gdb::optional.
7039
7040 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7041
7042 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7043 prototype.
7044 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7045 prototype.
7046 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7047 prototype.
7048 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7049 * ada-exp.y: Remove _initialize_ada_exp prototype.
7050 * ada-lang.c: Remove _initialize_ada_language prototype.
7051 * ada-tasks.c: Remove _initialize_tasks prototype.
7052 * addrmap.c: Remove _initialize_addrmap prototype.
7053 * agent.c: Remove _initialize_agent prototype.
7054 * aix-thread.c: Remove _initialize_aix_thread prototype.
7055 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7056 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7057 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7058 prototype.
7059 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7060 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7061 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7062 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7063 prototype.
7064 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7065 prototype.
7066 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7067 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7068 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7069 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7070 prototype.
7071 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7072 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7073 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7074 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7075 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7076 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7077 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7078 prototype.
7079 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7080 prototype.
7081 * annotate.c: Remove _initialize_annotate prototype.
7082 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7083 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7084 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7085 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7086 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7087 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7088 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7089 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7090 prototype.
7091 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7092 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7093 * auto-load.c: Remove _initialize_auto_load prototype.
7094 * auxv.c: Remove _initialize_auxv prototype.
7095 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7096 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7097 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7098 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7099 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7100 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7101 prototype.
7102 * break-catch-throw.c: Remove _initialize_break_catch_throw
7103 prototype.
7104 * breakpoint.c: Remove _initialize_breakpoint prototype.
7105 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7106 * btrace.c: Remove _initialize_btrace prototype.
7107 * charset.c: Remove _initialize_charset prototype.
7108 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7109 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7110 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7111 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7112 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7113 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7114 * coffread.c: Remove _initialize_coffread prototype.
7115 * compile/compile.c: Remove _initialize_compile prototype.
7116 * complaints.c: Remove _initialize_complaints prototype.
7117 * completer.c: Remove _initialize_completer prototype.
7118 * copying.awk: Remove _initialize_copying prototype.
7119 * copying.c: Regenerate.
7120 * core-regset.c: Remove _initialize_core_regset prototype.
7121 * corefile.c: Remove _initialize_core prototype.
7122 * corelow.c: Remove _initialize_corelow prototype.
7123 * cp-abi.c: Remove _initialize_cp_abi prototype.
7124 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7125 * cp-support.c: Remove _initialize_cp_support prototype.
7126 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7127 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7128 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7129 * ctf.c: Remove _initialize_ctf prototype.
7130 * d-lang.c: Remove _initialize_d_language prototype.
7131 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7132 prototype.
7133 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7134 * dbxread.c: Remove _initialize_dbxread prototype.
7135 * dcache.c: Remove _initialize_dcache prototype.
7136 * demangle.c: Remove _initialize_demangler prototype.
7137 * disasm-selftests.c: Remove _initialize_disasm_selftests
7138 prototype.
7139 * disasm.c: Remove _initialize_disasm prototype.
7140 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7141 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7142 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7143 prototype.
7144 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7145 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7146 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7147 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7148 * elfread.c: Remove _initialize_elfread prototype.
7149 * exec.c: Remove _initialize_exec prototype.
7150 * extension.c: Remove _initialize_extension prototype.
7151 * f-lang.c: Remove _initialize_f_language prototype.
7152 * f-valprint.c: Remove _initialize_f_valprint prototype.
7153 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7154 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7155 * filesystem.c: Remove _initialize_filesystem prototype.
7156 * findcmd.c: Remove _initialize_mem_search prototype.
7157 * fork-child.c: Remove _initialize_fork_child prototype.
7158 * frame-base.c: Remove _initialize_frame_base prototype.
7159 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7160 * frame.c: Remove _initialize_frame prototype.
7161 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7162 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7163 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7164 * gcore.c: Remove _initialize_gcore prototype.
7165 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7166 * gdbarch.c: Regenerate.
7167 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7168 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7169 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7170 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7171 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7172 * go-lang.c: Remove _initialize_go_language prototype.
7173 * go32-nat.c: Remove _initialize_go32_nat prototype.
7174 * guile/guile.c: Remove _initialize_guile prototype.
7175 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7176 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7177 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7178 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7179 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7180 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7181 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7182 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7183 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7184 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7185 prototype.
7186 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7187 prototype.
7188 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7189 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7190 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7191 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7192 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7193 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7194 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7195 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7196 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7197 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7198 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7199 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7200 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7201 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7202 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7203 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7204 prototype.
7205 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7206 prototype.
7207 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7208 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7209 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7210 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7211 * infcall.c: Remove _initialize_infcall prototype.
7212 * infcmd.c: Remove _initialize_infcmd prototype.
7213 * inferior.c: Remove _initialize_inferiors prototype.
7214 * inflow.c: Remove _initialize_inflow prototype.
7215 * infrun.c: Remove _initialize_infrun prototype.
7216 * interps.c: Remove _initialize_interpreter prototype.
7217 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7218 * jit.c: Remove _initialize_jit prototype.
7219 * language.c: Remove _initialize_language prototype.
7220 * linux-fork.c: Remove _initialize_linux_fork prototype.
7221 * linux-nat.c: Remove _initialize_linux_nat prototype.
7222 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7223 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7224 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7225 * m2-lang.c: Remove _initialize_m2_language prototype.
7226 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7227 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7228 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7229 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7230 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7231 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7232 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7233 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7234 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7235 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7236 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7237 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7238 * machoread.c: Remove _initialize_machoread prototype.
7239 * macrocmd.c: Remove _initialize_macrocmd prototype.
7240 * macroscope.c: Remove _initialize_macroscope prototype.
7241 * maint.c: Remove _initialize_maint_cmds prototype.
7242 * mdebugread.c: Remove _initialize_mdebugread prototype.
7243 * memattr.c: Remove _initialize_mem prototype.
7244 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7245 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7246 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7247 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7248 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7249 * microblaze-linux-tdep.c: Remove
7250 _initialize_microblaze_linux_tdep prototype.
7251 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7252 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7253 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7254 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7255 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7256 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7257 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7258 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7259 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7260 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7261 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7262 prototype.
7263 * mipsread.c: Remove _initialize_mipsread prototype.
7264 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7265 prototype.
7266 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7267 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7268 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7269 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7270 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7271 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7272 prototype.
7273 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7274 * nto-procfs.c: Remove _initialize_procfs prototype.
7275 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7276 * objc-lang.c: Remove _initialize_objc_language prototype.
7277 * objfiles.c: Remove _initialize_objfiles prototype.
7278 * observer.c: Remove observer_test_first_notification_function,
7279 observer_test_second_notification_function,
7280 observer_test_third_notification_function, and
7281 _initialize_observer prototypes.
7282 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7283 * osabi.c: Remove _initialize_gdb_osabi prototype.
7284 * osdata.c: Remove _initialize_osdata prototype.
7285 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7286 * parse.c: Remove _initialize_parse prototype.
7287 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7288 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7289 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7290 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7291 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7292 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7293 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7294 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7295 * printcmd.c: Remove _initialize_printcmd prototype.
7296 * probe.c: Remove _initialize_probe prototype.
7297 * proc-api.c: Remove _initialize_proc_api prototype.
7298 * proc-events.c: Remove _initialize_proc_events prototype.
7299 * proc-service.c: Remove _initialize_proc_service prototype.
7300 * procfs.c: Remove _initialize_procfs prototype.
7301 * psymtab.c: Remove _initialize_psymtab prototype.
7302 * python/python.c: Remove _initialize_python prototype.
7303 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7304 * record-btrace.c: Remove _initialize_record_btrace prototype.
7305 * record-full.c: Remove _initialize_record_full prototype.
7306 * record.c: Remove _initialize_record prototype.
7307 * regcache.c: Remove _initialize_regcache prototype.
7308 * reggroups.c: Remove _initialize_reggroup prototype.
7309 * remote-notif.c: Remove _initialize_notif prototype.
7310 * remote-sim.c: Remove _initialize_remote_sim prototype.
7311 * remote.c: Remove _initialize_remote prototype.
7312 * reverse.c: Remove _initialize_reverse prototype.
7313 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7314 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7315 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7316 prototype.
7317 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7318 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7319 * rust-exp.y: Remove _initialize_rust_exp prototype.
7320 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7321 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7322 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7323 * score-tdep.c: Remove _initialize_score_tdep prototype.
7324 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7325 prototype.
7326 * ser-go32.c: Remove _initialize_ser_dos prototype.
7327 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7328 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7329 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7330 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7331 * serial.c: Remove _initialize_serial prototype.
7332 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7333 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7334 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7335 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7336 * skip.c: Remove _initialize_step_skip prototype.
7337 * sol-thread.c: Remove _initialize_sol_thread prototype.
7338 * solib-aix.c: Remove _initialize_solib_aix prototype.
7339 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7340 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7341 * solib-frv.c: Remove _initialize_frv_solib prototype.
7342 * solib-spu.c: Remove _initialize_spu_solib prototype.
7343 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7344 * solib-target.c: Remove _initialize_solib_target prototype.
7345 * solib.c: Remove _initialize_solib prototype.
7346 * source.c: Remove _initialize_source prototype.
7347 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7348 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7349 prototype.
7350 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7351 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7352 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7353 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7354 prototype.
7355 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7356 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7357 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7358 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7359 prototype.
7360 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7361 prototype.
7362 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7363 prototype.
7364 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7365 prototype.
7366 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7367 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7368 prototype.
7369 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7370 prototype.
7371 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7372 prototype.
7373 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7374 prototype.
7375 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7376 prototype.
7377 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7378 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7379 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7380 * stabsread.c: Remove _initialize_stabsread prototype.
7381 * stack.c: Remove _initialize_stack prototype.
7382 * stap-probe.c: Remove _initialize_stap_probe prototype.
7383 * std-regs.c: Remove _initialize_frame_reg prototype.
7384 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7385 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7386 * symfile.c: Remove _initialize_symfile prototype.
7387 * symmisc.c: Remove _initialize_symmisc prototype.
7388 * symtab.c: Remove _initialize_symtab prototype.
7389 * target-dcache.c: Remove _initialize_target_dcache prototype.
7390 * target-descriptions.c: Remove _initialize_target_descriptions
7391 prototype.
7392 * thread.c: Remove _initialize_thread prototype.
7393 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7394 prototype.
7395 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7396 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7397 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7398 prototype.
7399 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7400 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7401 * tracefile.c: Remove _initialize_tracefile prototype.
7402 * tracepoint.c: Remove _initialize_tracepoint prototype.
7403 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7404 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7405 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7406 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7407 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7408 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7409 * tui/tui.c: Remove _initialize_tui prototype.
7410 * typeprint.c: Remove _initialize_typeprint prototype.
7411 * user-regs.c: Remove _initialize_user_regs prototype.
7412 * utils.c: Remove _initialize_utils prototype.
7413 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7414 * valarith.c: Remove _initialize_valarith prototype.
7415 * valops.c: Remove _initialize_valops prototype.
7416 * valprint.c: Remove _initialize_valprint prototype.
7417 * value.c: Remove _initialize_values prototype.
7418 * varobj.c: Remove _initialize_varobj prototype.
7419 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7420 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7421 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7422 * windows-nat.c: Remove _initialize_windows_nat,
7423 _initialize_check_for_gdb_ini, and _initialize_loadable
7424 prototypes.
7425 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7426 * xcoffread.c: Remove _initialize_xcoffread prototype.
7427 * xml-support.c: Remove _initialize_xml_support prototype.
7428 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7429 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7430 prototype.
7431 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7432 prototype.
7433 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7434
7435 2017-09-08 Keith Seitz <keiths@redhat.com>
7436
7437 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7438 field.
7439
7440 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7441
7442 * f-valprint.c (f_val_print): Remove check for one byte
7443 sized integers. Remove printing of character type.
7444
7445 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7446 Christoph Weinmann <christoph.t.weinmann@intel.com>
7447 Bernhard Heckel <bernhard.heckel@intel.com>
7448
7449 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7450 to maintain proper indentation when printing pointers/refs.
7451
7452 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7453
7454 GDB 8.0.1 released.
7455
7456 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7457
7458 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7459
7460 2017-09-05 Tom Tromey <tom@tromey.com>
7461
7462 * parse.c (funcall_chain): Now a std::vector.
7463 (start_arglist, end_arglist): Simplify.
7464 (free_funcalls): Remove.
7465 (parse_exp_in_context_1): Remove cleanup.
7466
7467 2017-09-05 Tom Tromey <tom@tromey.com>
7468
7469 * go-exp.y (go_parse): Don't create a cleanup.
7470
7471 2017-09-05 Tom Tromey <tom@tromey.com>
7472
7473 * d-exp.y (PrimaryExpression): Use std::string.
7474 (d_parse): Don't create a cleanup.
7475
7476 2017-09-05 Tom Tromey <tom@tromey.com>
7477
7478 * utils.c (do_clear_parser_state): Remove.
7479 (make_cleanup_clear_parser_state): Remove.
7480 * p-exp.y (pascal_parse): Use scoped_restore.
7481 * m2-exp.y (m2_parse): Use scoped_restore.
7482 * f-exp.y (f_parse): Use scoped_restore.
7483 * d-exp.y (d_parse): Use scoped_restore.
7484 * c-exp.y (c_parse): Use scoped_restore.
7485 * ada-exp.y (ada_parse): Use scoped_restore.
7486 * utils.h (make_cleanup_clear_parser_state): Remove.
7487
7488 2017-09-06 Keith Seitz <keiths@redhat.com>
7489
7490 * dwarf2read.c (dw2_linkage_name_attr): New function.
7491 (dw2_linkage_name): New function.
7492 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7493 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7494 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7495
7496 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7497
7498 * config/djgpp/djconfig.sh: Correct shell portability issue.
7499
7500 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7501
7502 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7503
7504 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7505
7506 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7507 * NEWS: Mention new FreeBSD/mips native configuration.
7508 * configure.host: Add aarch64*-*-freebsd*.
7509 * configure.nat: Likewise.
7510 * aarch64-fbsd-nat.c: New file.
7511
7512 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7513
7514 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7515 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7516 * NEWS: Mention new FreeBSD/aarch64 target.
7517 * configure.tgt: Add aarch64*-*-freebsd*.
7518 * aarch64-fbsd-tdep.c: New file.
7519 * aarch64-fbsd-tdep.h: New file.
7520
7521 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7522
7523 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7524
7525 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7526
7527 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7528 of TLS symbols.
7529
7530 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7531
7532 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7533 call.
7534
7535 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7536
7537 * infrun.c (follow_exec): Call add_thread after
7538 target_find_description.
7539
7540 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7541
7542 * infrun.c (handle_inferior_event_1): When exec'ing, read
7543 stop_pc after follow_exec.
7544
7545 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7546
7547 * remote.c (process_g_packet): Update error message.
7548
7549 2017-09-05 Yao Qi <yao.qi@linaro.org>
7550
7551 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7552 targets.
7553
7554 2017-09-05 Pedro Alves <palves@redhat.com>
7555
7556 * eval.c (eval_call, evaluate_funcall): New functions, factored
7557 out from ...
7558 (evaluate_subexp_standard): ... this.
7559
7560 2017-09-05 Yao Qi <yao.qi@linaro.org>
7561
7562 * amd64-tdep.c (amd64_target_description): Create target
7563 descriptions.
7564 (_initialize_amd64_tdep): Don't call functions
7565 initialize_tdesc_amd64_*. Add self tests.
7566 * arch/amd64.c (amd64_create_target_description): Add parameter
7567 is_linux. Call set_tdesc_osabi if is_linux is true.
7568 * arch/amd64.h (amd64_create_target_description): Update the
7569 declaration.
7570 * arch/i386.c (i386_create_target_description): Add parameter
7571 is_linux. Call set_tdesc_osabi if is_linux is true.
7572 * arch/i386.h (i386_create_target_description): Update
7573 declaration.
7574 * configure.tgt: Add i386.o to gdb_target_obs.
7575 * features/Makefile (XMLTOC): Remove i386/*.xml.
7576 * features/i386/amd64-avx-avx512.c: Remove.
7577 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7578 * features/i386/amd64-avx-mpx.c: Remove.
7579 * features/i386/amd64-avx.c: Remove.
7580 * features/i386/amd64-mpx.c: Remove.
7581 * features/i386/amd64.c: Remove.
7582 * features/i386/i386-avx-avx512.c: Remove.
7583 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7584 * features/i386/i386-avx-mpx.c: Remove.
7585 * features/i386/i386-avx.c: Remove.
7586 * features/i386/i386-mmx.c: Remove.
7587 * features/i386/i386-mpx.c: Remove.
7588 * features/i386/i386.c: Remove.
7589 * i386-tdep.c: Don't include features/i386/i386*.c., include
7590 target-descriptions.h and arch/i386.h.
7591 (i386_target_description): Create target descriptions.
7592 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7593 functions. Do self tests.
7594
7595 2017-09-05 Yao Qi <yao.qi@linaro.org>
7596
7597 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7598 * features/i386/amd64-avx-avx512-linux.c: Removed.
7599 * features/i386/amd64-avx-linux.c: Removed.
7600 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7601 * features/i386/amd64-avx-mpx-linux.c: Removed.
7602 * features/i386/amd64-linux.c: Removed.
7603 * features/i386/amd64-mpx-linux.c: Removed.
7604 * features/i386/x32-avx-avx512-linux.c: Removed.
7605 * features/i386/x32-avx-linux.c: Removed.
7606 * features/i386/x32-linux.c: Removed.
7607
7608 2017-09-05 Yao Qi <yao.qi@linaro.org>
7609
7610 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7611 features/i386/*.c.
7612 (amd64_linux_read_description): Call
7613 amd64_create_target_description.
7614 * arch/amd64.c: New file.
7615 * arch/amd64.h: New file.
7616 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7617 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7618
7619 2017-09-05 Yao Qi <yao.qi@linaro.org>
7620
7621 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7622 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7623 (amd64_linux_read_description): Create target descriptions.
7624 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7625 functions. Add unit tests.
7626 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7627 x32-core.xml.
7628 * features/i386/64bit-avx.c: Generated.
7629 * features/i386/64bit-avx512.c: Generated.
7630 * features/i386/64bit-core.c: Generated.
7631 * features/i386/64bit-linux.c: Generated.
7632 * features/i386/64bit-mpx.c: Generated.
7633 * features/i386/64bit-pkeys.c: Generated.
7634 * features/i386/64bit-segments.c: Generated.
7635 * features/i386/64bit-sse.c: Generated.
7636 * features/i386/x32-core.c: Generated.
7637 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7638 c files for amd64-linux and x32-linux.
7639
7640 2017-09-05 Yao Qi <yao.qi@linaro.org>
7641
7642 * amd64-linux-tdep.c (amd64_linux_read_description): New
7643 function.
7644 (amd64_linux_core_read_description): Call
7645 amd64_linux_read_description.
7646 (amd64_linux_init_abi): Likewise.
7647 (amd64_x32_linux_init_abi): Likewise.
7648 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7649 * x86-linux-nat.c (x86_linux_read_description): Call
7650 amd64_linux_read_description.
7651
7652 2017-09-05 Yao Qi <yao.qi@linaro.org>
7653
7654 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7655 comments.
7656
7657 2017-09-05 Yao Qi <yao.qi@linaro.org>
7658
7659 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7660 * features/i386/i386-avx-avx512-linux.c: Remove.
7661 * features/i386/i386-avx-linux.c: Remove.
7662 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7663 * features/i386/i386-avx-mpx-linux.c: Remove.
7664 * features/i386/i386-linux.c: Remove.
7665 * features/i386/i386-mmx-linux.c: Remove.
7666 * features/i386/i386-mpx-linux.c: Remove.
7667
7668 2017-09-05 Yao Qi <yao.qi@linaro.org>
7669
7670 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7671 (SFILES): Add arch/i386.c.
7672 (HFILES_NO_SRCDIR): Add arch/i386.h.
7673 * arch/i386.c: New file.
7674 * arch/i386.h: New file.
7675 * arch/tdesc.h (allocate_target_description): Declare.
7676 (set_tdesc_architecture): Declare.
7677 (set_tdesc_osabi): Declare.
7678 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7679 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7680 include arch/i386.h.
7681 (i386_linux_read_description): Remove code and call
7682 i386_create_target_description.
7683 (set_tdesc_architecture): New function.
7684 (set_tdesc_osabi): New function.
7685 * target-descriptions.h (allocate_target_description): Remove.
7686
7687 2017-09-05 Yao Qi <yao.qi@linaro.org>
7688
7689 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7690 * target-descriptions.c (tdesc_create_feature): Likewise, and
7691 adjust code.
7692 * features/i386/32bit-avx.c: Re-generated.
7693 * features/i386/32bit-avx512.c: Re-generated.
7694 * features/i386/32bit-core.c: Re-generated.
7695 * features/i386/32bit-linux.c: Re-generated.
7696 * features/i386/32bit-mpx.c: Re-generated.
7697 * features/i386/32bit-pkeys.c: Re-generated.
7698 * features/i386/32bit-sse.c: Re-generated.
7699
7700 2017-09-05 Yao Qi <yao.qi@linaro.org>
7701
7702 * regformats/regdef.h (struct reg): Override operator == and !=.
7703
7704 2017-09-05 Yao Qi <yao.qi@linaro.org>
7705
7706 * arch/tdesc.h: New file.
7707 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7708 * target-descriptions.c: Update comments.
7709 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7710 declarations.
7711 * features/i386/32bit-avx.c: Re-generated.
7712 * features/i386/32bit-avx512.c: Re-generated.
7713 * features/i386/32bit-core.c: Re-generated.
7714 * features/i386/32bit-linux.c: Re-generated.
7715 * features/i386/32bit-mpx.c: Re-generated.
7716 * features/i386/32bit-pkeys.c: Re-generated.
7717 * features/i386/32bit-sse.c: Re-generated.
7718
7719 2017-09-05 Yao Qi <yao.qi@linaro.org>
7720
7721 * regformats/regdat.sh: Update generated code.
7722
7723 2017-09-05 Yao Qi <yao.qi@linaro.org>
7724
7725 * regformats/regdat.sh: Adjust code order.
7726
7727 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7728
7729 * expprint.c (dump_subexp_body_standard): Use constant format
7730 string in fprintf_filtered call.
7731
7732 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7733
7734 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7735 NetBSD/i386.
7736 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7737
7738 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7739
7740 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7741
7742 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7743
7744 * bsd-kvm.o: Define _KMEMUSER.
7745 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7746 * configure: Regenerate.
7747
7748 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7749
7750 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7751 * i386-fbsd-nat.c: Likewise.
7752
7753 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7754
7755 * unittests/array-view-selftests.c: Add include of <array>.
7756
7757 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7758
7759 * spu-tdep.c (flush_ea_cache): Add missing argument to
7760 call_function_by_hand.
7761
7762 2017-09-04 Pedro Alves <palves@redhat.com>
7763
7764 * NEWS (Safer support for debugging with no debug info): New.
7765
7766 2017-09-04 Pedro Alves <palves@redhat.com>
7767
7768 * c-exp.y (function_method, function_method_void): Add current
7769 instance flags to TYPE_INSTANCE.
7770 * dwarf2read.c (check_modifier): New.
7771 (compute_delayed_physnames): Assert that only C++ adds delayed
7772 physnames. Mark fn_fields as const/volatile depending on
7773 physname.
7774 * eval.c (make_params): New type_instance_flags parameter. Use
7775 it as the new type's instance flags.
7776 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7777 flags element and pass it to make_params.
7778 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7779 instance flags element.
7780 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7781 * gdbtypes.h: Include "enum-flags.h".
7782 (type_instance_flags): New enum-flags type.
7783 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7784 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7785 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7786 (follow_type_instance_flags): New function.
7787 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7788 * parser-defs.h (follow_type_instance_flags): Declare.
7789 * valops.c (value_struct_elt_for_reference): const/volatile must
7790 match too.
7791
7792 2017-09-04 Pedro Alves <palves@redhat.com>
7793
7794 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7795 function/method scopes; lookup the nested name as a function local
7796 static variable.
7797
7798 2017-09-04 Pedro Alves <palves@redhat.com>
7799
7800 (%type <voidval>): Add function_method.
7801 * c-exp.y (exp): New production for calls with no arguments.
7802 (function_method, function_method_void_or_typelist): New
7803 productions.
7804 (exp): New production for "method()::static_var".
7805 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7806 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7807 Handle OP_FUNC_STATIC_VAR.
7808 * parse.c (operator_length_standard):
7809 Handle OP_FUNC_STATIC_VAR.
7810
7811 2017-09-04 Pedro Alves <palves@redhat.com>
7812
7813 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7814 handling.
7815 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7816 Ditto.
7817 * parse.c (operator_length_standard, operator_check_standard):
7818 Ditto.
7819 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7820
7821 2017-09-04 Pedro Alves <palves@redhat.com>
7822
7823 * ax-gdb.c: Include "typeprint.h".
7824 (gen_expr_for_cast): New function.
7825 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7826 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7827 type is unknown.
7828 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7829 nodebug_data_symbol.
7830 * eval.c: Include "typeprint.h".
7831 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7832 Error out if symbol has unknown type.
7833 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7834 evaluate_subexp_for_cast.
7835 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7836 OP_VAR_MSYM_VALUE.
7837 (evaluate_subexp_for_cast): New function.
7838 * gdbtypes.c (init_nodebug_var_type): New function.
7839 (objfile_type): Use it to initialize types of variables with no
7840 debug info.
7841 * typeprint.c (error_unknown_type): New.
7842 * typeprint.h (error_unknown_type): New declaration.
7843 * compile/compile-c-types.c (convert_type_basic): Handle
7844 TYPE_CODE_ERROR; warn and fallback to int for variables with
7845 unknown type.
7846
7847 2017-09-04 Pedro Alves <palves@redhat.com>
7848
7849 * eval.c (evaluate_var_value): New function, factored out from ...
7850 (evaluate_subexp_standard): ... here.
7851
7852 2017-09-04 Pedro Alves <palves@redhat.com>
7853
7854 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7855 Remove useless assignments to 'op'.
7856
7857 2017-09-04 Pedro Alves <palves@redhat.com>
7858
7859 * eval.c (eval_skip_value): New function.
7860 (evaluate_subexp_standard): Use it.
7861
7862 2017-09-04 Pedro Alves <palves@redhat.com>
7863
7864 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7865 function name from symbol/minsym and pass it to
7866 error_call_unknown_return_type.
7867
7868 2017-09-04 Pedro Alves <palves@redhat.com>
7869
7870 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7871 * ax-gdb.c (gen_msym_var_ref): New function.
7872 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7873 * eval.c (evaluate_var_msym_value): New function.
7874 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7875 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7876 to call_function_by_hand.
7877 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7878 Handle OP_VAR_MSYM_VALUE.
7879 (union exp_element) <msymbol>: New field.
7880 * minsyms.h (struct type): Forward declare.
7881 (find_minsym_type_and_address): Declare.
7882 * parse.c (write_exp_elt_msym): New function.
7883 (write_exp_msymbol): Delete, refactored as ...
7884 (find_minsym_type_and_address): ... this new function.
7885 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7886 (operator_length_standard, operator_check_standard): Handle
7887 OP_VAR_MSYM_VALUE.
7888 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7889
7890 2017-09-04 Pedro Alves <palves@redhat.com>
7891
7892 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7893 TYPE_GNU_IFUNC specially here. Throw error if return type is
7894 unknown.
7895 * ada-typeprint.c (print_func_type): Handle functions with unknown
7896 return type.
7897 * c-typeprint.c (c_type_print_base): Handle functions and methods
7898 with unknown return type.
7899 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7900 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7901 * compile/compile-c-types.c: Include "objfiles.h".
7902 (convert_func): For functions with unknown return type, warn and
7903 default to int.
7904 * compile/compile-object-run.c (compile_object_run): Adjust call
7905 to call_function_by_hand_dummy.
7906 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7907 call_function_by_hand.
7908 * eval.c (evaluate_subexp_standard): Adjust calls to
7909 call_function_by_hand. Handle functions and methods with unknown
7910 return type. Pass expect_type to call_function_by_hand.
7911 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7912 return type.
7913 * gcore.c (call_target_sbrk): Adjust call to
7914 call_function_by_hand.
7915 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7916 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7917 an integer address type instead of nodebug.
7918 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7919 call_function_by_hand.
7920 * infcall.c (error_call_unknown_return_type): New function.
7921 (call_function_by_hand): New "default_return_type" parameter.
7922 Pass it down.
7923 (call_function_by_hand_dummy): New "default_return_type"
7924 parameter. Use it instead of defaulting to int. If there's no
7925 default and the return type is unknown, throw an error. If
7926 there's a default return type, and the called function has no
7927 debug info, then assume the function is prototyped.
7928 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7929 New "default_return_type" parameter.
7930 (error_call_unknown_return_type): New declaration.
7931 * linux-fork.c (call_lseek): Cast return type of lseek.
7932 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7933 call_function_by_hand.
7934 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7935 calls to call_function_by_hand.
7936 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7937 return type.
7938 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7939 (value_nsstring, print_object_command): Adjust calls to
7940 call_function_by_hand.
7941 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7942 functions with unknown return type.
7943 (pascal_type_print_func_varspec_suffix): New function.
7944 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7945 TYPE_CODE_METHOD>: Use it.
7946 * python/py-value.c (valpy_call): Adjust call to
7947 call_function_by_hand.
7948 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7949 call_function_by_hand.
7950 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7951 call_function_by_hand.
7952 * valops.c (value_allocate_space_in_inferior): Adjust call to
7953 call_function_by_hand.
7954 * typeprint.c (type_print_unknown_return_type): New function.
7955 * typeprint.h (type_print_unknown_return_type): New declaration.
7956
7957 2017-09-04 Pedro Alves <palves@redhat.com>
7958
7959 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7960 types with more than one parameter as prototyped.
7961
7962 2017-09-04 Pedro Alves <palves@redhat.com>
7963
7964 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7965 (disassemble_command): Use gdb_disassembly_flags instead of bare
7966 int.
7967 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7968 (dump_insns, do_mixed_source_and_assembly_deprecated)
7969 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7970 Use gdb_disassembly_flags instead of bare int.
7971 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7972 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7973 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7974 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7975 (enum gdb_disassembly_flag): ... values of this new enumeration.
7976 (gdb_disassembly_flags): Define.
7977 (gdb_disassembly)
7978 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7979 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7980 gdb_disassembly_flags instead of bare int.
7981 * record-btrace.c (btrace_insn_history)
7982 (record_btrace_insn_history, record_btrace_insn_history_range)
7983 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7984 instead of bare int.
7985 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7986 Use gdb_disassembly_flags instead of bare int.
7987 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7988 Define.
7989 * target-delegates.c: Regenerate.
7990 * target.c (target_insn_history, target_insn_history_from)
7991 (target_insn_history_range): Use gdb_disassembly_flags instead of
7992 bare int.
7993 * target.h: Include "disasm.h".
7994 (struct target_ops) <to_insn_history, to_insn_history_from,
7995 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7996 int.
7997 (target_insn_history, target_insn_history_from)
7998 (target_insn_history_range): Use gdb_disassembly_flags instead of
7999 bare int.
8000
8001 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8002
8003 * cli/cli-script.c (build_command_line): For if/while commands,
8004 check whether args is empty.
8005
8006 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8007
8008 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8009 (enum command_control_type): Likewise.
8010 (struct command_line): Likewise.
8011 (free_command_lines): Likewise.
8012 (struct command_lines_deleter): Likewise.
8013 (command_line_up): Likewise.
8014 (read_command_lines): Likewise.
8015 (read_command_lines_1): Likewise.
8016 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8017 (enum command_control_type): Likewise.
8018 (struct command_line): Likewise.
8019 (free_command_lines): Likewise.
8020 (struct command_lines_deleter): Likewise.
8021 (command_line_up): Likewise.
8022 (read_command_lines): Likewise.
8023 (read_command_lines_1): Likewise.
8024 * breakpoint.h: Include cli/cli-script.h.
8025 * extension-priv.h: Likewise.
8026 * gdbcmd.h: Likewise.
8027
8028 2017-09-04 Pedro Alves <palves@redhat.com>
8029
8030 * ada-lang.c (is_known_support_routine): Move sal declaration to
8031 where it is initialized.
8032 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8033 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8034 (clear_command, update_static_tracepoint): Remove init_sal
8035 references. Move declarations closer to initializations.
8036 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8037 initializations.
8038 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8039 references. Move sal declarations closer to initializations.
8040 * frame.c (find_frame_sal): Return a symtab_and_line via function
8041 return instead of output parameter. Remove init_sal references.
8042 * frame.h (find_frame_sal): Return a symtab_and_line via function
8043 return instead of output parameter.
8044 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8045 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8046 instead of memset.
8047 (gdbscm_find_pc_line): Remove init_sal reference.
8048 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8049 references. Move declarations closer to initializations.
8050 * infcmd.c (set_step_frame): Update. Move declarations closer to
8051 initializations.
8052 (finish_backward): Remove init_sal references. Move declarations
8053 closer to initializations.
8054 * infrun.c (process_event_stop_test, handle_step_into_function)
8055 (insert_hp_step_resume_breakpoint_at_frame)
8056 (insert_step_resume_breakpoint_at_caller): Likewise.
8057 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8058 (symbol_to_sal): Likewise.
8059 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8060 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8061 to its initialization.
8062 * reverse.c (save_bookmark_command): Use new/delete. Remove
8063 init_sal references. Move declarations closer to initializations.
8064 * source.c (get_current_source_symtab_and_line): Remove brace
8065 initialization.
8066 (set_current_source_symtab_and_line): Now takes the sal by const
8067 reference. Remove brace initialization.
8068 (line_info): Remove init_sal reference.
8069 * source.h (set_current_source_symtab_and_line): Now takes a
8070 symtab_and_line via const reference.
8071 * stack.c (set_current_sal_from_frame): Adjust.
8072 (print_frame_info): Adjust.
8073 (get_last_displayed_sal): Return the sal via function return
8074 instead of via output parameter. Simplify.
8075 (frame_info): Adjust.
8076 * stack.h (get_last_displayed_sal): Return the sal via function
8077 return instead of via output parameter.
8078 * symtab.c (init_sal): Delete.
8079 (find_pc_sect_line): Remove init_sal references. Move
8080 declarations closer to initializations.
8081 (find_function_start_sal): Remove init_sal references. Move
8082 declarations closer to initializations.
8083 * symtab.h (struct symtab_and_line): In-class initialize all
8084 fields.
8085 * tracepoint.c (set_traceframe_context)
8086 (print_one_static_tracepoint_marker): Remove init_sal references.
8087 Move declarations closer to initializations.
8088 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8089 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8090 declarations closer to initializations.
8091 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8092 init_sal references. Adjust.
8093
8094 2017-09-04 Pedro Alves <palves@redhat.com>
8095
8096 * ax-gdb.c (agent_command_1): Use range-for.
8097 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8098 * breakpoint.c: Include "common/array-view.h".
8099 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8100 parameter from struct symtabs_and_lines to
8101 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8102 (breakpoint_sals_to_pc): Change sals parameter from struct
8103 symtabs_and_lines to std::vector reference.
8104 (check_fast_tracepoint_sals): Change sals parameter from struct
8105 symtabs_and_lines to std::array_view. Use range-for.
8106 (decode_static_tracepoint_spec): Return a std::vector instead of
8107 symtabs_and_lines. Update.
8108 (create_breakpoint): Update.
8109 (break_range_command, until_break_command, clear_command): Update.
8110 (base_breakpoint_decode_location, bkpt_decode_location)
8111 (bkpt_probe_create_sals_from_location)
8112 (bkpt_probe_decode_location, tracepoint_decode_location)
8113 (tracepoint_probe_decode_location)
8114 (strace_marker_create_sals_from_location): Return a std::vector
8115 instead of symtabs_and_lines.
8116 (strace_marker_create_breakpoints_sal): Update.
8117 (strace_marker_decode_location): Return a std::vector instead of
8118 symtabs_and_lines. Update.
8119 (update_breakpoint_locations): Change struct symtabs_and_lines
8120 parameters to gdb::array_view. Adjust.
8121 (location_to_sals): Return a std::vector instead of
8122 symtabs_and_lines. Update.
8123 (breakpoint_re_set_default): Use std::vector instead of struct
8124 symtabs_and_lines.
8125 (decode_location_default): Return a std::vector instead of
8126 symtabs_and_lines. Update.
8127 * breakpoint.h: Include "common/array-view.h".
8128 (struct breakpoint_ops) <decode_location>: Now returns a
8129 std::vector instead of returning a symtabs_and_lines via output
8130 parameter.
8131 (update_breakpoint_locations): Change sals parameters to use
8132 gdb::array_view.
8133 * cli/cli-cmds.c (edit_command, list_command): Update to use
8134 std::vector and gdb::array_view.
8135 (ambiguous_line_spec): Adjust to use gdb::array_view and
8136 range-for.
8137 (compare_symtabs): Rename to ...
8138 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8139 const reference and adjust.
8140 (filter_sals): Rewrite using std::vector and standard algorithms.
8141 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8142 (jump_command): Update to use std::vector.
8143 * linespec.c (struct linespec_state) <canonical_names>: Update
8144 comment.
8145 (add_sal_to_sals_basic): Delete.
8146 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8147 (decode_line_2, create_sals_line_offset)
8148 (convert_address_location_to_sals, convert_linespec_to_sals)
8149 (convert_explicit_location_to_sals, parse_linespec)
8150 (event_location_to_sals, decode_line_full, decode_line_1)
8151 (decode_line_with_current_source)
8152 (decode_line_with_last_displayed, decode_objc)
8153 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8154 (linespec_result::~linespec_result): Adjust to use std::vector
8155 instead of symtabs_and_lines.
8156 * linespec.h (linespec_sals::sals): Now a std::vector.
8157 (struct linespec_result): Use std::vector, bool, and in-class
8158 initialization.
8159 (decode_line_1, decode_line_with_current_source)
8160 (decode_line_with_last_displayed): Return std::vector.
8161 * macrocmd.c (info_macros_command): Use std::vector.
8162 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8163 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8164 std::vector.
8165 * probe.h (parse_probes): Return a std::vector.
8166 * python/python.c (gdbpy_decode_line): Use std::vector and
8167 gdb::array_view.
8168 * source.c (select_source_symtab, line_info): Use std::vector.
8169 * stack.c (func_command): Use std::vector.
8170 * symtab.h (struct symtabs_and_lines): Delete.
8171 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8172
8173 2017-09-04 Pedro Alves <palves@redhat.com>
8174
8175 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8176 unittests/array-view-selftests.c.
8177 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8178 * common/array-view.h: New file.
8179 * unittests/array-view-selftests.c: New file.
8180
8181 2017-09-04 Pedro Alves <palves@redhat.com>
8182
8183 * cli/cli-cmds.c (edit_command): Pass message to
8184 ambiguous_line_spec.
8185 (list_command): Pass message to ambiguous_line_spec. Say
8186 "first"/"last" instead of "start" and "end" to be consistent with
8187 the manual.
8188 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8189 them to print formatted message.
8190
8191 2017-09-04 Pedro Alves <palves@redhat.com>
8192
8193 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8194 ftrace_update_insns by reference instead of pointer.
8195
8196 2017-09-04 Yao Qi <yao.qi@linaro.org>
8197
8198 * i386-go32-tdep.c: Include x86-xstate.h.
8199 (i386_go32_init_abi): Call i386_target_description.
8200 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8201 if xcr0 is X86_XSTATE_X87_MASK.
8202 * i386-tdep.h (tdesc_i386): Remove the declaration.
8203 (tdesc_i386_mmx): Likewise.
8204
8205 2017-09-04 Yao Qi <yao.qi@linaro.org>
8206
8207 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8208 X86_XSTATE_SSE_MASK instead of 0.
8209
8210 2017-09-04 Yao Qi <yao.qi@linaro.org>
8211
8212 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8213 i386_target_description.
8214 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8215 i386_target_description.
8216 * i386-tdep.c (i386_gdbarch_init): Likewise.
8217
8218 2017-09-04 Yao Qi <yao.qi@linaro.org>
8219
8220 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8221 (x86_darwin_init_abi_64): Call amd64_target_description.
8222 * amd64-dicos-tdep.c: Likewise.
8223 * amd64-fbsd-nat.c: Likewise.
8224 * amd64-fbsd-tdep.c: Likewise.
8225 * amd64-nbsd-tdep.c: Likewise.
8226 * amd64-obsd-tdep.c: Likewise.
8227 * amd64-sol2-tdep.c: Likewise.
8228 * amd64-windows-tdep.c: Likewise.
8229 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8230
8231 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8232
8233 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8234 (btrace_function) <insn>: Change type to use std::vector.
8235 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8236 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8237 ftrace_update_insns, ftrace_compute_global_level_offset,
8238 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8239 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8240 change to std::vector.
8241 (ftrace_update_insns): Adjust to change to std::vector, change
8242 type of INSN parameter.
8243 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8244 * record-btrace.c (btrace_call_history_insn_range,
8245 btrace_compute_src_line_range,
8246 record_btrace_frame_prev_register): Adjust to change to
8247 std::vector.
8248 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8249 to change to std::vector.
8250
8251 2017-09-03 Tom Tromey <tom@tromey.com>
8252
8253 * corefile.c (reopen_exec_file): Use std::string.
8254
8255 2017-09-03 Tom Tromey <tom@tromey.com>
8256
8257 * compile/compile.c (compile_register_name_mangled): Return
8258 std::string.
8259 * compile/compile-loc2c.c (pushf_register_address): Update.
8260 (pushf_register): Update.
8261 * compile/compile-c-types.c (convert_array): Update.
8262 * compile/compile-c-symbols.c (generate_vla_size): Update.
8263 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8264 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8265 (convert_one_symbol): Update.
8266 (generate_c_for_for_one_variable): Update.
8267 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8268 std::string.
8269 (generate_register_struct): Update.
8270 * compile/compile-internal.h (c_get_range_decl_name): Return a
8271 std::string.
8272 (compile_register_name_mangled): Return std::string.
8273
8274 2017-09-03 Tom Tromey <tom@tromey.com>
8275
8276 * utils.c (perror_string): Return a std::string.
8277 (throw_perror_with_name, perror_warning_with_name): Update.
8278
8279 2017-09-03 Tom Tromey <tom@tromey.com>
8280
8281 * demangle.c (demangle_command): Use std::string,
8282 unique_xmalloc_ptr.
8283
8284 2017-09-03 Tom Tromey <tom@tromey.com>
8285
8286 * cli/cli-setshow.c (do_set_command): Use std::string.
8287
8288 2017-09-03 Tom Tromey <tom@tromey.com>
8289
8290 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8291
8292 2017-09-03 Tom Tromey <tom@tromey.com>
8293
8294 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8295
8296 2017-09-03 Tom Tromey <tom@tromey.com>
8297
8298 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8299 gdb::unique_xmalloc_ptr.
8300
8301 2017-09-03 Tom Tromey <tom@tromey.com>
8302
8303 * thread.c (print_thread_info_1): Use string_printf.
8304 (thread_apply_command, thread_apply_all_command): Use
8305 std::string.
8306
8307 2017-09-03 Tom Tromey <tom@tromey.com>
8308
8309 * valprint.c (val_print_string): Update.
8310 * gdbcore.h (memory_error_message): Return std::string.
8311 * corefile.c (memory_error_message): Return std::string.
8312 (memory_error): Update.
8313 * breakpoint.c (insert_bp_location): Update.
8314
8315 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8316
8317 * target/waitstatus.h (target_waitstatus_to_string): Change
8318 return type to std::string.
8319 * target/waitstatus.c (target_waitstatus_to_string): Return
8320 std::string.
8321 * target.h (target_waitstatus_to_string): Remove declaration.
8322 * infrun.c (resume, clear_proceed_status_thread,
8323 print_target_wait_results, do_target_wait, save_waitstatus,
8324 stop_all_threads): Adjust.
8325 * record-btrace.c (record_btrace_wait): Adjust.
8326 * target-debug.h
8327 (target_debug_print_struct_target_waitstatus_p): Adjust.
8328
8329 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8330
8331 PR gdb/22046
8332 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8333 detection.
8334
8335 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8336
8337 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8338 for setting/unsetting environment variables on the remote target.
8339 (New remote packets): Add entries for QEnvironmentHexEncoded,
8340 QEnvironmentUnset and QEnvironmentReset.
8341 * common/environ.c (gdb_environ::operator=): Extend method to
8342 handle m_user_set_env_list and m_user_unset_env_list.
8343 (gdb_environ::clear): Likewise.
8344 (match_var_in_string): Change type of first parameter from 'char
8345 *' to 'const char *'.
8346 (gdb_environ::set): Extend method to handle
8347 m_user_set_env_list and m_user_unset_env_list.
8348 (gdb_environ::unset): Likewise.
8349 (gdb_environ::clear_user_set_env): New method.
8350 (gdb_environ::user_set_envp): Likewise.
8351 (gdb_environ::user_unset_envp): Likewise.
8352 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8353 m_user_unset_env_list on move constructor/assignment.
8354 (unset): Add new default parameter 'update_unset_list = true'.
8355 (clear_user_set_env): New method.
8356 (user_set_envp): Likewise.
8357 (user_unset_envp): Likewise.
8358 (m_user_set_env_list): New std::set.
8359 (m_user_unset_env_list): Likewise.
8360 * common/rsp-low.c (hex2str): New function.
8361 (bin2hex): New overload for bin2hex function.
8362 * common/rsp-low.c (hex2str): New prototype.
8363 (str2hex): New overload prototype.
8364 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8365 QEnvironmentUnset and QEnvironmentReset.
8366 (remote_protocol_features): Add QEnvironmentHexEncoded,
8367 QEnvironmentUnset and QEnvironmentReset packets.
8368 (send_environment_packet): New function.
8369 (extended_remote_environment_support): Likewise.
8370 (extended_remote_create_inferior): Call
8371 extended_remote_environment_support.
8372 (_initialize_remote): Add QEnvironmentHexEncoded,
8373 QEnvironmentUnset and QEnvironmentReset packet configs.
8374 * unittests/environ-selftests.c (gdb_selftest_env_var):
8375 New variable.
8376 (test_vector_initialization): New function.
8377 (test_init_from_host_environ): Likewise.
8378 (test_reinit_from_host_environ): Likewise.
8379 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8380 Likewise.
8381 (test_unset_set_empty_vector): Likewise.
8382 (test_vector_clear): Likewise.
8383 (test_std_move): Likewise.
8384 (test_move_constructor):
8385 (test_self_move): Likewise.
8386 (test_set_unset_reset): Likewise.
8387 (run_tests): Rewrite in terms of the functions above.
8388
8389 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8390
8391 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8392 (adi_available): Use a temp variable of type CORE_ADDR as argument
8393 3 when calling target_auxv_search.
8394 (adi_normalize_address): Use masks and xor operators to calculate
8395 normalized address.
8396 (adi_read_versions, adi_write_versions, adi_print_versions)
8397 (do_examine, do_assign): Use paddress.
8398
8399 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8400
8401 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8402 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8403 out of loop and add supply of FIR.
8404 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8405 add collect of FIR.
8406
8407 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8408
8409 PR gdb/21827
8410 * cli/cli-script.c (define_command): Don't convert command name
8411 to lower case.
8412
8413 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8414
8415 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8416 Update all callers accordingly. Remove all code blocks handling
8417 the case where DISPP is not NULL.
8418
8419 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8420
8421 PR symtab/22003
8422 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8423 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8424 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8425
8426 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8427
8428 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8429 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8430 (read_comp_units_from_section): New parameter abbrev_section, use
8431 read_and_check_comp_unit_head, allocate signatured_type if needed.
8432 (create_all_comp_units): Update read_comp_units_from_section caller.
8433
8434 2017-08-23 Pedro Alves <palves@redhat.com>
8435
8436 PR remote/21852
8437 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8438 to null_ptid and switch to thread without reading the registers
8439 after adding the inferior.
8440
8441 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8442
8443 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8444 compile-gcc.
8445 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8446 (compile_to_object): Implement compile_gcc.
8447 (_initialize_compile): Install "set compile-gcc". Initialize
8448 compile_gcc.
8449
8450 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8451
8452 * compile/compile.c (compile_to_object): Conditionally call
8453 set_verbose. Conditionally call compile or compile_v0.
8454
8455 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8456
8457 * sparc64-tdep.h: (adi_normalize_address): New export.
8458 * sparc-nat.h: (open_adi_tag_fd): New export.
8459 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8460 * sparc64-linux-tdep.c:
8461 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8462 (sparc64_linux_handle_segmentation_fault): New function.
8463 (sparc64_linux_init_abi): Register
8464 sparc64_linux_handle_segmentation_fault
8465 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8466 (sparc64_addr_bits_remove): New function.
8467 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8468 (MAX_PROC_NAME_SIZE): New macro.
8469 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8470 (sparc64adilist): New variable.
8471 (adi_proc_list): New variable.
8472 (find_adi_info): New function.
8473 (add_adi_info): New function.
8474 (get_adi_info_proc): New function.
8475 (get_adi_info): New function.
8476 (info_adi_command): New function.
8477 (read_maps_entry): New function.
8478 (adi_available): New function.
8479 (adi_normalize_address): New function.
8480 (adi_align_address): New function.
8481 (adi_convert_byte_count): New function.
8482 (adi_tag_fd): New function.
8483 (adi_is_addr_mapped): New function.
8484 (adi_read_versions): New function.
8485 (adi_write_versions): New function.
8486 (adi_print_versions): New function.
8487 (do_examine): New function.
8488 (do_assign): New function.
8489 (adi_examine_command): New function.
8490 (adi_assign_command): New function.
8491 (_initialize_sparc64_adi_tdep): New function.
8492
8493 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8494
8495 * breakpoint.c (breakpoints_info): Rename to ...
8496 (info_breakpoints_command): ... this.
8497 (watchpoints_info): Rename to ...
8498 (info_watchpoints_command): ... this.
8499 (tracepoints_info): Rename to ...
8500 (info_tracepoints_command): ... this.
8501 (_initialize_breakpoint): Adjust.
8502 * dcache.c (dcache_info): Rename to ...
8503 (info_display_command): ... this.
8504 (_initialize_dcache): Adjust.
8505 * frame.h (args_info): Rename to ...
8506 (info_args_command): ... this.
8507 (locals_info): Rename to ...
8508 (info_locals_command): ... this.
8509 * infcmd.c (nofp_registers_info): Rename to ...
8510 (info_registers_command): ... this.
8511 (float_info): Rename to ...
8512 (info_float_command): ... this.
8513 (program_info): Rename to ...
8514 (info_program_command): ... this.
8515 (all_registers_info): Rename to ...
8516 (info_all_registers_command): ... this.
8517 (vector_info): Rename to ...
8518 (info_vector_command): ... this.
8519 (float_info): Rename to ...
8520 (info_float_command): ... this.
8521 (_initialize_infcmd): Adjust.
8522 * inferior.h (term_info): Rename to ...
8523 (info_terminal_command): ... this.
8524 * inflow.c (term_info): Rename to ...
8525 (info_terminal_command): ... this.
8526 (_initialize_inflow): Adjust.
8527 * infrun.c (signals_info): Rename to ...
8528 (info_signals_command): ... this.
8529 (_initialize_infrun): Adjust.
8530 * objc-lang.c (classes_info): Rename to ...
8531 (info_classes_command): ... this.
8532 (selectors_info): Rename to ...
8533 (info_selectors_command): ... this.
8534 (_initialize_objc_language): Adjust.
8535 * printcmd.c (sym_info): Rename to ...
8536 (info_symbol_command): ... this.
8537 (address_info): Rename to ...
8538 (info_address_command): ... this.
8539 (display_info): Rename to ...
8540 (info_display_command): ... this.
8541 (_initialize_printcmd): Adjust.
8542 * reverse.c (bookmarks_info): Rename to ...
8543 (info_breakpoints_command): ... this.
8544 (_initialize_reverse): Adjust.
8545 * ser-go32.c (dos_info): Rename to ...
8546 (info_serial_command): ... this.
8547 (_initialize_ser_dos): Adjust.
8548 * skip.c (skip_info): Rename to ...
8549 (info_skip_command): ... this.
8550 (_initialize_step_skip): Adjust.
8551 * source.c (line_info): Rename to ...
8552 (info_line_command): ... this.
8553 (source_info): Rename to ...
8554 (info_source_command)
8555 * stack.c (frame_info): Rename to ...
8556 (info_frame_command): ... this.
8557 (locals_info): Rename to ...
8558 (info_locals_command): ... this.
8559 (args_info): Rename to ...
8560 (info_args_command): ... this.
8561 (_initialize_stack): Adjust.
8562 * symtab.c (sources_info): Rename to ...
8563 (info_sources_command): ... this.
8564 (variables_info): Rename to ...
8565 (info_variables_command): ... this.
8566 (functions_info): Rename to ...
8567 (info_functions_command): ... this.
8568 (types_info): Rename to ...
8569 (info_types_command): ... this.
8570 (_initialize_symtab): Adjust.
8571 * target.c (target_info): Rename to ...
8572 (info_target_command): ... this.
8573 (initialize_targets): Adjust.
8574 * tracepoint.c (tvariables_info): Rename to ...
8575 (info_tvariables_command): ... this.
8576 (scope_info): Rename to ...
8577 (info_scope_command): ... this.
8578 (trace_dump_actions): Adjust.
8579 (_initialize_tracepoint): Adjust.
8580
8581 2017-08-22 Tom Tromey <tom@tromey.com>
8582
8583 * breakpoint.h (install_breakpoint): Update.
8584 * breakpoint.c (add_solib_catchpoint): Update.
8585 (install_breakpoint): Change argument to a std::unique_ptr.
8586 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8587 (create_breakpoint_sal, create_breakpoint): Update.
8588 (watch_command_1, catch_exec_command_1)
8589 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8590 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8591 Return the breakpoint.
8592 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8593 (new_single_step_breakpoint): Update.
8594 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8595 std::unique_ptr.
8596 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8597 std::unique_ptr.
8598 * break-catch-sig.c (create_signal_catchpoint): Use
8599 std::unique_ptr.
8600 * ada-lang.c (create_ada_exception_catchpoint): Use
8601 std::unique_ptr.
8602
8603 2017-08-22 Tom Tromey <tom@tromey.com>
8604
8605 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8606
8607 2017-08-22 Tom Tromey <tom@tromey.com>
8608
8609 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8610 (lookup_partial_symbol): Update.
8611
8612 2017-08-22 Tom Tromey <tom@tromey.com>
8613
8614 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8615 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8616 (find_and_open_source, symtab_to_fullname): Update.
8617 * psymtab.c (psymtab_to_fullname): Update.
8618
8619 2017-08-22 Tom Tromey <tom@tromey.com>
8620
8621 * exec.c (exec_file_attach): Update.
8622 * linux-thread-db.c (try_thread_db_load): Update.
8623 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8624 * utils.c (gdb_realpath): Change return type.
8625 (gdb_realpath_keepfile): Update.
8626 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8627 (_initialize_utils): Register the new self test.
8628 * source.c (openp): Update.
8629 (find_and_open_source): Update.
8630 * nto-tdep.c (nto_find_and_open_solib): Update.
8631 * main.c (set_gdb_data_directory): Update.
8632 (captured_main_1): Update.
8633 * dwarf2read.c (dwarf2_get_dwz_file): Update
8634 (dw2_map_symbol_filenames): Update.
8635 * auto-load.c (auto_load_safe_path_vec_update): Update.
8636 (filename_is_in_auto_load_safe_path_vec): Change type of
8637 "filename_realp".
8638 (auto_load_objfile_script): Update.
8639 (file_is_auto_load_safe): Update. Use std::string.
8640 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8641
8642 2017-08-22 Tom Tromey <tom@tromey.com>
8643
8644 * utils.c (gdb_realpath_keepfile): Return a
8645 gdb::unique_xmalloc_ptr.
8646 * exec.c (exec_file_attach): Update.
8647 * utils.h (gdb_realpath_keepfile): Return a
8648 gdb::unique_xmalloc_ptr.
8649
8650 2017-08-22 Tom Tromey <tom@tromey.com>
8651
8652 * compile/compile.c (compile_file_command): Use
8653 gdb::unique_xmalloc_ptr, std::string.
8654 * utils.c (gdb_abspath): Change return type.
8655 * source.c (openp): Update.
8656 * objfiles.c (allocate_objfile): Update.
8657 * main.c (set_gdb_data_directory): Update.
8658 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8659
8660 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8661
8662 * cli-cmds.c (list_commands): List actual code around more than
8663 one location.
8664
8665 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8666
8667 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8668
8669 2017-08-21 Pedro Alves <palves@redhat.com>
8670
8671 PR gdb/19487
8672 * c-exp.y (variable production): Handle function aliases.
8673 * minsyms.c (msymbol_is_text): New function.
8674 * minsyms.h (msymbol_is_text): Declare.
8675 * symtab.c (find_function_alias_target): New function.
8676 * symtab.h (find_function_alias_target): Declare.
8677
8678 2017-08-21 Pedro Alves <palves@redhat.com>
8679
8680 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8681 typedefs.
8682 * typeprint.c (whatis_exp): If handling "whatis", and expression
8683 is OP_TYPE, strip one typedef level. Otherwise don't strip
8684 typedefs here.
8685 * valops.c (value_cast): Save "to" type before resolving
8686 stubs/typedefs. Use that type as resulting value's type.
8687
8688 2017-08-18 Tom Tromey <tom@tromey.com>
8689 Pedro Alves <palves@redhat.com>
8690
8691 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8692 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8693 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8694 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8695 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8696 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8697 (linux_get_siginfo_data): Add "thread" argument. Use
8698 scoped_restore.
8699 * linux-nat.c (linux_child_follow_fork)
8700 (check_stopped_by_watchpoint): Use scoped_restore.
8701 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8702 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8703 (restore_inferior_ptid, save_inferior_ptid): Remove.
8704 * btrace.c (btrace_fetch): Use scoped_restore.
8705 * bsd-uthread.c (bsd_uthread_fetch_registers)
8706 (bsd_uthread_store_registers): Use scoped_restore.
8707 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8708 scoped_restore.
8709 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8710 (aix_thread_xfer_partial): Use scoped_restore.
8711 * inferior.h (save_inferior_ptid): Remove.
8712
8713 2017-08-18 Yao Qi <yao.qi@linaro.org>
8714
8715 PR tdep/21818
8716 * arm-tdep.c (gdb_print_insn_arm): Mark
8717 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8718
8719 2017-08-18 Yao Qi <yao.qi@linaro.org>
8720
8721 * NEWS: Mention GDBserver's new option "--selftest".
8722 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8723 * selftest.c: Move it to common/selftest.c.
8724 * selftest.h: Move it to common/selftest.h.
8725 * selftest-arch.c (reset): New function.
8726 (tests_with_arch): Call reset.
8727
8728 2017-08-18 Yao Qi <yao.qi@linaro.org>
8729
8730 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8731 instead of exception_fprintf and printf_filtered.
8732
8733 2017-08-18 Yao Qi <yao.qi@linaro.org>
8734
8735 * selftest.c (register_self_test): Rename it to
8736 selftests::register_test.
8737 (run_self_tests): selftest::run_tests.
8738 * selftest.h: Update declarations.
8739 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8740 selftests::register_test_foreach_arch.
8741 * selftest-arch.h: Update declaration.
8742 * aarch64-tdep.c: Update.
8743 * arm-tdep.c: Likewise.
8744 * disasm-selftests.c: Likewise.
8745 * dwarf2loc.c: Likewise.
8746 * dwarf2-frame.c: Likewise.
8747 * findvar.c: Likewise.
8748 * gdbarch-selftests.c: Likewise.
8749 * maint.c (maintenance_selftest): Likewise.
8750 * regcache.c: Likewise.
8751 * rust-exp.y: Likewise.
8752 * selftest-arch.c: Likewise.
8753 * unittests/environ-selftests.c: Likewise.
8754 * unittests/function-view-selftests.c: Likewise.
8755 * unittests/offset-type-selftests.c: Likewise.
8756 * unittests/optional-selftests.c: Likewise.
8757 * unittests/scoped_restore-selftests.c: Likewise.
8758 * utils-selftests.c: Likewise.
8759
8760 2017-08-17 Pedro Alves <palves@redhat.com>
8761
8762 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8763 local.
8764
8765 2017-08-17 Pedro Alves <palves@redhat.com>
8766
8767 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8768 field.
8769 (reset_die_in_process): Delete, replaced by ...
8770 (process_die_scope): ... this new class. Make it responsible for
8771 freeing cu->line_header too.
8772 (process_die): Use process_die_scope.
8773 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8774 cu->line_header_die_owner. Don't release the line header if it's
8775 owned by the CU.
8776 (setup_type_unit_groups): Make the CU/DIE own the line header.
8777 Don't release the line header here.
8778
8779 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8780
8781 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8782
8783 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8784
8785 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8786 Single-Key mode
8787
8788 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8789
8790 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8791 mode command list.
8792
8793 2017-08-15 Stafford Horne <shorne@gmail.com>
8794
8795 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8796
8797 2017-08-15 Stafford Horne <shorne@gmail.com>
8798
8799 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8800
8801 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8802
8803 PR gdb/21954
8804 * infcmd.c (unset_environment_command): Use the 'clear' method on
8805 the environment instead of resetting it.
8806
8807 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8808
8809 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8810 platforms.
8811
8812 2017-08-14 Tom Tromey <tom@tromey.com>
8813
8814 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8815 (print_binary_chars): Likewise.
8816 (BITS_IN_BYTES): Remove.
8817
8818 2017-08-14 Tom Tromey <tom@tromey.com>
8819
8820 PR gdb/21675
8821 * valprint.c (LOW_ZERO): Change value to 034.
8822 (print_octal_chars): Add static_asserts for octal constants.
8823 * printcmd.c (print_scalar_formatted): Add 'd' case.
8824
8825 2017-08-11 Tom Tromey <tom@tromey.com>
8826
8827 * symfile.c (add_symbol_file_command): Use std::vector.
8828
8829 2017-08-14 Tom Tromey <tom@tromey.com>
8830
8831 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8832 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8833 std::move.
8834 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8835
8836 2017-08-11 Pedro Alves <palves@redhat.com>
8837
8838 * infrun.c (process_event_stop_test): Adjust
8839 function_name_is_marked_for_skip call.
8840 * skip.c: Include <list>.
8841 (skiplist_entry): Make it a class with private fields, and
8842 getters/setters.
8843 (skiplist_entry_chain): Delete.
8844 (skiplist_entries): New.
8845 (skiplist_entry_count): Delete.
8846 (highest_skiplist_entry_num): New.
8847 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8848 (add_skiplist_entry): Delete.
8849 (skiplist_entry::skiplist_entry): New.
8850 (skiplist_entry::add_entry): New.
8851 (skip_file_command, skip_function): Adjust.
8852 (compile_skip_regexp): Delete.
8853 (skip_command): Don't compile regexp here. Adjust to use
8854 skiplist_entry::add_entry.
8855 (skip_info): Adjust to use range-for and getters.
8856 (skip_enable_command, skip_disable_command): Adjust to use
8857 range-for and setters.
8858 (skip_delete_command): Adjust to use std::list.
8859 (add_skiplist_entry): Delete.
8860 (skip_file_p): Delete, refactored as ...
8861 (skiplist_entry::do_skip_file_p): ... this new method.
8862 (skip_gfile_p): Delete, refactored as ...
8863 (skiplist_entry::do_gskip_file_p): ... this new method.
8864 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8865 (skiplist_entry::skip_function_p): ... this new method.
8866 (function_name_is_marked_for_skip): Now returns bool, and takes
8867 the function sal by const reference. Adjust to use range-for and
8868 skiplist_entry methods.
8869 (_initialize_step_skip): Remove references to
8870 skiplist_entry_chain, skiplist_entry_count.
8871 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8872 takes the function sal by const reference.
8873
8874 2017-08-11 Yao Qi <yao.qi@linaro.org>
8875
8876 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8877 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8878 (dwarf2_frame_cache):
8879 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8880 RETURN_MASK_ALL and set *this_case to NULL.
8881 * frame-unwind.h: Update comments.
8882
8883 2017-08-11 Yao Qi <yao.qi@linaro.org>
8884
8885 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8886 (dwarf2_frame_state_copy_regs): Remove.
8887 (dwarf2_frame_state_free_regs): Remove.
8888 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8889 (dwarf2_restore_rule): Call method .alloc_regs instead of
8890 dwarf2_frame_state_alloc_regs.
8891 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8892 constructor. Call std::move.
8893 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8894 (dwarf2_frame_cache): Likewise.
8895
8896 [GDB_SELF_TEST]: Include selftest.h and
8897 selftest-arch.h.
8898 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8899 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8900 execute_cfa_program_test.
8901
8902 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8903 copy ctor, assignment operator, move assignment.
8904 <alloc_regs>: New method.
8905 <swap>: New method.
8906 (struct dwarf2_frame_state): Delete dtor.
8907 (dwarf2_frame_state_alloc_regs): Remove declaration.
8908 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8909 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8910
8911 2017-08-11 Yao Qi <yao.qi@linaro.org>
8912
8913 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8914 (dwarf2_frame_state::dwarf2_frame_state): New.
8915 (dwarf2_frame_state::~dwarf2_frame_state): New.
8916 (dwarf2_fetch_cfa_info): Update.
8917 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8918 rather than a pointer. Update code.
8919 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8920 dtor.
8921 <data_align, code_align, retaddr_column>: Change them to const.
8922 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8923 to bool.
8924
8925 2017-08-11 Yao Qi <yao.qi@linaro.org>
8926
8927 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8928 <loc.exp>: New field.
8929 * dwarf2-frame.c (execute_cfa_program): Update.
8930 (dwarf2_frame_prev_register): Update.
8931
8932 2017-08-10 Pedro Alves <palves@redhat.com>
8933
8934 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8935
8936 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8937
8938 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8939 (fbsd_pending_children): Use std::list.
8940 (fbsd_remember_child): Likewise.
8941 (fbsd_is_child_pending): Likewise.
8942 (fbsd_pending_vfork_done): Use std::forward_list.
8943 (fbsd_add_vfork_done): Likewise.
8944 (fbsd_is_vfork_done_pending): Likewise.
8945 (fbsd_next_vfork_done): Likewise.
8946
8947 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8948
8949 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8950 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8951 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8952 for `mapfilename'.
8953 (fbsd_xfer_partial): Use gdb::byte_vector.
8954 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8955
8956 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8957
8958 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8959 "filestuff.h".
8960 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8961
8962 2017-08-09 Tom Tromey <tom@tromey.com>
8963
8964 * skip.c (skiplist_entry): New constructor.
8965 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8966 (skiplist_entry::file_is_glob): Now bool.
8967 (skiplist_entry::file, skiplist_entry::function): Now
8968 std::string.
8969 (make_skip_entry): Return a unique_ptr. Use new.
8970 (free_skiplist_entry, free_skiplist_entry_cleanup)
8971 (make_free_skiplist_entry_cleanup): Remove.
8972 (skip_command, skip_disable_command, add_skiplist_entry)
8973 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8974 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8975 (function_name_is_marked_for_skip): Update.
8976 (skip_delete_command): Update. Use delete.
8977
8978 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8979
8980 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8981 (aarch64_linux_core_read_description): New function.
8982 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8983
8984 2017-08-09 Pedro Alves <palves@redhat.com>
8985
8986 * cp-name-parser.y (cp_comp_to_string): Return a
8987 gdb::unique_xmalloc_ptr<char>.
8988 * cp-support.c (replace_typedefs_qualified_name)
8989 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8990 (cp_canonicalize_string_full): Use op= instead of explicit
8991 convertion.
8992 (cp_class_name_from_physname, method_name_from_physname)
8993 (cp_func_name, cp_remove_params): Adjust to use
8994 gdb::unique_xmalloc_ptr<char>.
8995 * cp-support.h (cp_comp_to_string): Return a
8996 gdb::unique_xmalloc_ptr<char>.
8997 * python/py-type.c (typy_lookup_type): Adjust to use
8998 gdb::unique_xmalloc_ptr<char>.
8999
9000 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9001
9002 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9003
9004 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9005 Yao Qi <yao.qi@linaro.org>
9006
9007 * cp-support.c (cp_canonicalize_string_full): Use
9008 gdb::unique_xmalloc_ptr<char>.
9009 (cp_canonicalize_string): Likewise.
9010
9011 2017-08-09 Yao Qi <yao.qi@linaro.org>
9012
9013 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9014 * regformats/i386/amd64-avx-avx512.dat: Remove.
9015 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9016 * regformats/i386/amd64-avx-mpx.dat:Remove.
9017 * regformats/i386/amd64-avx.dat: Remove.
9018 * regformats/i386/amd64-mpx.dat: Remove.
9019 * regformats/i386/i386-avx-avx512.dat: Remove.
9020 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9021 * regformats/i386/i386-avx-mpx.dat: Remove.
9022 * regformats/i386/i386-mmx.dat: Remove.
9023 * regformats/i386/i386-mpx.dat: Remove.
9024
9025 2017-08-09 Yao Qi <yao.qi@linaro.org>
9026
9027 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9028 * amd64-tdep.c: Don't include features/i386/x32*.c.
9029 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9030 functions.
9031 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9032 and i386/x32-avx-avx512.
9033 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9034 and i386/x32.xml.
9035 * features/i386/x32-avx-avx512.c: Removed.
9036 * features/i386/x32-avx-avx512.xml: Removed.
9037 * features/i386/x32-avx.c: Removed.
9038 * features/i386/x32-avx.xml: Removed.
9039 * features/i386/x32.c: Removed.
9040 * features/i386/x32.xml: Removed.
9041 * regformats/i386/x32-avx-avx512.dat: Removed.
9042 * regformats/i386/x32-avx.dat: Removed.
9043 * regformats/i386/x32.dat: Removed.
9044
9045 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9046
9047 PR breakpoints/21886
9048 * mem-break.c (default_memory_insert_breakpoint): Use
9049 `->placed_address' rather than `->reqstd_address' for the
9050 breakpoint location.
9051
9052 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9053
9054 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9055 assertions.
9056
9057 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9058
9059 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9060 a union of `tdep_info', `tdesc_data' and `id'.
9061 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9062 rather than `info.tdep_info'.
9063 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9064 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9065 * i386-tdep.c (i386_gdbarch_init): Likewise.
9066 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9067 * mips-tdep.c (mips_gdbarch_init): Likewise.
9068 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9069 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9070 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9071 `info.tdep_info'.
9072 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9073 `info.tdep_info'.
9074 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9075 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9076 `info.tdep_info'.
9077 * spu-tdep.c (spu_gdbarch_init): Likewise.
9078 * gdbarch.h: Regenerate.
9079
9080 2017-08-07 Leszek Swirski <leszeks@google.com>
9081
9082 PR symtab/20899
9083 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9084
9085 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9086
9087 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9088 (gdbsim_open): Rename gdb_argv args object to argv.
9089
9090 2017-08-05 Tom Tromey <tom@tromey.com>
9091
9092 * compile/compile-object-load.c (compile_object_load): Use
9093 gdb::unique_xmalloc_ptr.
9094 * cli/cli-dump.c (scan_filename): Rename from
9095 scan_filename_with_cleanup. Change return type.
9096 (scan_expression): Rename from scan_expression_with_cleanup.
9097 Change return type.
9098 (dump_memory_to_file, dump_value_to_file, restore_command):
9099 Use gdb::unique_xmalloc_ptr. Update.
9100 * cli/cli-cmds.c (find_and_open_script): Use
9101 gdb::unique_xmalloc_ptr.
9102 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9103 * symmisc.c (maintenance_print_symbols)
9104 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9105 * symfile.c (symfile_bfd_open, generic_load)
9106 (add_symbol_file_command, remove_symbol_file_command): Use
9107 gdb::unique_xmalloc_ptr.
9108 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9109 * psymtab.c (maintenance_print_psymbols): Use
9110 gdb::unique_xmalloc_ptr.
9111 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9112 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9113 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9114 (reload_shared_libraries_1): Likewise.
9115
9116 2017-08-05 Tom Tromey <tom@tromey.com>
9117
9118 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9119 (rust_op_vector, rust_set_vector): New typedefs.
9120 (current_parser): New global.
9121 (work_obstack): Change to pointer type. Update all users.
9122 (rust_ast, pstate): Remove globals.
9123 (struct rust_parser): New.
9124 (%union) <params, field_inits>: Change type.
9125 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9126 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9127 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9128 (convert_params_to_types, convert_params_to_expression): Change
9129 type of "params".
9130 (ast_string): Change type of "fields".
9131 (rust_parse): Make a rust_parser. Remove cleanups.
9132 (rust_lex_tests): Make and install an auto_obstack.
9133
9134 2017-08-04 Yao Qi <yao.qi@linaro.org>
9135
9136 * configure.srv (ipa_x32_linux_regobj): New.
9137 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9138 instead of X86_TDESC_AVX512.
9139 (initialize_low_tracepoint): Call
9140 init_registers_x32_avx_avx512_linux.
9141
9142 2017-08-04 Yao Qi <yao.qi@linaro.org>
9143
9144 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9145
9146 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9147
9148 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9149
9150 2017-08-03 Tom Tromey <tom@tromey.com>
9151
9152 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9153 Remove.
9154 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9155
9156 2017-08-03 Tom Tromey <tom@tromey.com>
9157
9158 * python/py-param.c (compute_enum_values): Use gdb_argv.
9159
9160 2017-08-03 Tom Tromey <tom@tromey.com>
9161
9162 * utils.h (struct gdb_argv_deleter): New.
9163 (gdb_argv): New class.
9164 * utils.c (gdb_argv::reset): New method.
9165 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9166 * tracefile.c (tsave_command): Use gdb_argv.
9167 * top.c (new_ui_command): Use gdb_argv.
9168 * symmisc.c (maintenance_print_symbols)
9169 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9170 * symfile.c (symbol_file_command, generic_load)
9171 (remove_symbol_file_command): Use gdb_argv.
9172 * stack.c (backtrace_command): Use gdb_argv.
9173 * source.c (add_path, show_substitute_path_command)
9174 (unset_substitute_path_command, set_substitute_path_command):
9175 Use gdb_argv.
9176 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9177 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9178 * remote.c (extended_remote_run, remote_put_command)
9179 (remote_get_command, remote_delete_command): Use gdb_argv.
9180 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9181 (gdbsim_open): Use gdb_argv.
9182 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9183 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9184 * procfs.c (procfs_info_proc): Use gdb_argv.
9185 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9186 * infrun.c (handle_command): Use gdb_argv.
9187 * inferior.c (add_inferior_command, clone_inferior_command):
9188 Use gdb_argv.
9189 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9190 * exec.c (exec_file_command): Use gdb_argv.
9191 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9192 * compile/compile.c (build_argc_argv): Use gdb_argv.
9193
9194 2017-08-03 Tom Tromey <tom@tromey.com>
9195
9196 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9197
9198 2017-08-03 Tom Tromey <tom@tromey.com>
9199
9200 * python/python.c (compute_python_string): Return std::string.
9201 (gdbpy_eval_from_control_command): Update.
9202 (do_start_initialization): Use std::string.
9203 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9204 xstrprintf.
9205 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9206 xstrprintf.
9207
9208 2017-08-03 Tom Tromey <tom@tromey.com>
9209
9210 * top.h (do_restore_instream_cleanup): Remove.
9211 * top.c (do_restore_instream_cleanup): Remove.
9212 (read_command_file): Use scoped_restore.
9213 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9214
9215 2017-08-03 Tom Tromey <tom@tromey.com>
9216
9217 * cli/cli-script.c (execute_user_command)
9218 (execute_control_command): Use scoped_restore.
9219
9220 2017-08-03 Tom Tromey <tom@tromey.com>
9221
9222 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9223 (execute_user_command): Remove user_call_depth; use
9224 user_args_stack's size instead.
9225
9226 2017-08-03 Tom Tromey <tom@tromey.com>
9227
9228 * top.h (in_user_command): Remove.
9229 * top.c (in_user_command): Remove.
9230 * cli/cli-script.c (do_restore_user_call_depth)
9231 (execute_user_command): Update.
9232
9233 2017-08-03 Tom Tromey <tom@tromey.com>
9234
9235 * valops.c (search_struct_method): Use gdb::byte_vector.
9236 * valarith.c (value_concat): Use std::vector.
9237 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9238 (simple_search_memory): Likewise.
9239 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9240 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9241 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9242 * elfread.c (elf_rel_plt_read): Use std::string.
9243 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9244 * cli/cli-dump.c (restore_section_callback): Use
9245 gdb::byte_vector.
9246
9247 2017-08-03 Tom Tromey <tom@tromey.com>
9248
9249 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9250
9251 2017-08-03 Tom Tromey <tom@tromey.com>
9252
9253 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9254 (tui_register_format): Use scoped_restore.
9255
9256 2017-08-03 Tom Tromey <tom@tromey.com>
9257
9258 * reverse.c (exec_direction_default): Remove.
9259 (exec_reverse_once): Use scoped_restore.
9260 * remote.c (restore_remote_timeout): Remove.
9261 (remote_flash_erase, remote_flash_write, remote_flash_done)
9262 (readchar, remote_serial_write): Use scoped_restore.
9263 * cli/cli-script.c (struct source_cleanup_lines_args)
9264 (source_cleanup_lines): Remove.
9265 (script_from_file): Use scoped_restore.
9266 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9267 (source_command): Use scoped_restore.
9268
9269 2017-08-03 Tom Tromey <tom@tromey.com>
9270
9271 * utils.h (make_cleanup_free_so): Remove.
9272 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9273 * solist.h (struct so_deleter): New.
9274 (so_list_up): New typedef.
9275 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9276
9277 2017-08-03 Tom Tromey <tom@tromey.com>
9278
9279 * utils.h (make_cleanup_restore_current_language): Remove.
9280 * utils.c (do_restore_current_language)
9281 (make_cleanup_restore_current_language): Remove.
9282 * parse.c (parse_exp_in_context_1)
9283 (parse_expression_with_language): Use
9284 scoped_restore_current_language.
9285 * mi/mi-main.c (mi_cmd_execute): Use
9286 scoped_restore_current_language.
9287 * language.h (scoped_restore_current_language): New class.
9288
9289 2017-08-03 Tom Tromey <tom@tromey.com>
9290
9291 * compile/compile.c (cleanup_unlink_file): Remove.
9292 (compile_to_object): Use gdb::unlinker.
9293 (eval_compile_command): Likewise.
9294
9295 2017-08-03 Tom Tromey <tom@tromey.com>
9296
9297 * utils.h (make_cleanup_fclose): Remove.
9298 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9299
9300 2017-08-03 Tom Tromey <tom@tromey.com>
9301
9302 * top.c (open_terminal_stream): Return gdb_file_up.
9303 (new_ui_command): Update.
9304
9305 2017-08-03 Tom Tromey <tom@tromey.com>
9306
9307 * source.c (print_source_lines_base, forward_search_command)
9308 (reverse_search_command): Use gdb_file_up.
9309
9310 2017-08-03 Tom Tromey <tom@tromey.com>
9311
9312 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9313
9314 2017-08-03 Tom Tromey <tom@tromey.com>
9315
9316 * cli/cli-cmds.c (find_and_open_script): Change return type.
9317 Remove "streamp" and "full_path" parameters.
9318 (source_script_with_search): Update.
9319 * auto-load.c (source_script_file): Update.
9320 * cli/cli-cmds.h (find_and_open_script): Change type.
9321 (open_script): New struct.
9322
9323 2017-08-03 Tom Tromey <tom@tromey.com>
9324
9325 * xml-support.c (xml_fetch_content_from_file): Update.
9326 * ui-file.c (stdio_file::open): Update.
9327 * tracefile-tfile.c (tfile_start): Update.
9328 * remote.c (remote_file_put, remote_file_get): Update.
9329 * nat/linux-procfs.c (linux_proc_get_int)
9330 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9331 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9332 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9333 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9334 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9335 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9336 * linux-nat.c (linux_proc_pending_signals): Update.
9337 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9338 (file_closer): Remove.
9339 * compile/compile.c (compile_to_object): Update.
9340 * common/filestuff.h (struct gdb_file_deleter): New.
9341 (gdb_file_up): New typedef.
9342 (gdb_fopen_cloexec): Change return type.
9343 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9344 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9345 (dump_binary_file, restore_binary_file): Update.
9346 * auto-load.c (auto_load_objfile_script_1): Update.
9347
9348 2017-08-03 Tom Tromey <tom@tromey.com>
9349
9350 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9351 (info_static_tracepoint_markers_command): Likewise.
9352 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9353 * skip.c (skip_info): Use ui_out_emit_table.
9354 * progspace.c (print_program_space): Use ui_out_emit_table.
9355 * osdata.c (info_osdata): Use ui_out_emit_table.
9356 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9357 ui_out_emit_table.
9358 * linux-thread-db.c (info_auto_load_libthread_db): Use
9359 ui_out_emit_table.
9360 * inferior.c (print_inferior): Use ui_out_emit_table.
9361 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9362 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9363 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9364 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9365 * ui-out.h (class ui_out_emit_table): New.
9366
9367 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9368
9369 * mips-tdep.c (mips_fpu_type_str): New function.
9370 (mips_dump_tdep): Call it.
9371
9372 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9373
9374 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9375 `->mips_fpu_type'.
9376
9377 2017-07-31 Xavier Roirand <roirand@adacore.com>
9378
9379 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9380
9381 2017-07-27 Xavier Roirand <roirand@adacore.com>
9382
9383 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9384
9385 2017-07-26 Yao Qi <yao.qi@linaro.org>
9386
9387 * cli/cli-cmds.c (maintenancechecklist): New variable.
9388 * gdbcmd.h (maintenancechecklist): Declare it.
9389 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9390 Call i386_linux_read_description with different masks.
9391 * maint.c (maintenance_check_command): New function.
9392 (_initialize_maint_cmds): Call add_prefix_cmd.
9393 * target-descriptions.c (tdesc_reg): override operator != and ==.
9394 (tdesc_type): Likewise.
9395 (tdesc_feature): Likewise.
9396 (target_desc): Likewise.
9397 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9398 (maintenance_check_xml_descriptions): New function.
9399 (_initialize_target_descriptions) Add command "xml-descriptions".
9400 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9401
9402 2017-07-26 Yao Qi <yao.qi@linaro.org>
9403
9404 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9405 Include features/i386/32bit-*.c.
9406 (i386_linux_read_description): Generate target description if it
9407 doesn't exist.
9408 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9409 functions.
9410 * features/i386/32bit-linux.c: Re-generated.
9411 * features/i386/32bit-sse.c: Likewise.
9412 * target-descriptions.c (print_c_feature::visit): Print code to
9413 set register number if needed.
9414 (print_c_feature) <m_next_regnum>: New field.
9415
9416 2017-07-26 Yao Qi <yao.qi@linaro.org>
9417
9418 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9419 (FEATURE_XMLFILES): New.
9420 (FEATURE_CFILES): New.
9421 New rules.
9422 (clean-cfiles): Remove generated c files.
9423 * features/i386/32bit-avx.c: Generated.
9424 * features/i386/32bit-avx512.c: Generated.
9425 * features/i386/32bit-core.c: Generated.
9426 * features/i386/32bit-linux.c: Generated.
9427 * features/i386/32bit-mpx.c: Generated.
9428 * features/i386/32bit-pkeys.c: Generated.
9429 * features/i386/32bit-sse.c: Generated.
9430 * target-descriptions.c: Include algorithm.
9431 (tdesc_element_visitor): Add method visit_end.
9432 (print_c_tdesc): Implement visit_end.
9433 (print_c_tdesc:: m_filename_after_features): Move it to
9434 protected.
9435 (print_c_feature): New class.
9436 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9437 name starts with "i386/32bit-".
9438
9439 2017-07-26 Yao Qi <yao.qi@linaro.org>
9440
9441 * target-descriptions.c (tdesc_element_visitor): New class.
9442 (tdesc_element): New class.
9443 (tdesc_reg): Inherit from tdesc_element.
9444 (tdesc_reg::accept): New function.
9445 (tdesc_type): Inherit from tdesc_element.
9446 (tdesc_type::accept): New function.
9447 (tdesc_feature): Inherit from tdesc_element.
9448 (tdesc_feature::accept): New function.
9449 (target_desc): Inherit from tdesc_element.
9450 (target_desc::target_desc): New.
9451 (target_desc::~target_desc): New.
9452 (target_desc::accept): New.
9453 (allocate_target_description): Use new.
9454 (free_target_description): Use delete.
9455 (print_c_tdesc): New class.
9456 (maint_print_c_tdesc_cmd): Adjust.
9457
9458 * features/aarch64.c: Re-generated.
9459 * features/arc-arcompact.c: Re-generated.
9460 * features/arc-v2.c: Re-generated.
9461 * features/arm/arm-with-iwmmxt.c: Re-generated.
9462 * features/arm/arm-with-m.c: Re-generated.
9463 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9464 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9465 * features/arm/arm-with-neon.c: Re-generated.
9466 * features/arm/arm-with-vfpv2.c: Re-generated.
9467 * features/arm/arm-with-vfpv3.c: Re-generated.
9468 * features/i386/amd64-avx-avx512.c: Re-generated.
9469 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9470 * features/i386/amd64-avx.c: Re-generated.
9471 * features/i386/amd64-avx-linux.c: Re-generated.
9472 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9473 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9474 * features/i386/amd64-avx-mpx.c: Re-generated.
9475 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9476 * features/i386/amd64.c: Re-generated.
9477 * features/i386/amd64-linux.c: Re-generated.
9478 * features/i386/amd64-mpx.c: Re-generated.
9479 * features/i386/amd64-mpx-linux.c: Re-generated.
9480 * features/i386/i386-avx-avx512.c: Re-generated.
9481 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9482 * features/i386/i386-avx.c: Re-generated.
9483 * features/i386/i386-avx-linux.c: Re-generated.
9484 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9485 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9486 * features/i386/i386-avx-mpx.c: Re-generated.
9487 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9488 * features/i386/i386.c: Re-generated.
9489 * features/i386/i386-linux.c: Re-generated.
9490 * features/i386/i386-mmx.c: Re-generated.
9491 * features/i386/i386-mmx-linux.c: Re-generated.
9492 * features/i386/i386-mpx.c: Re-generated.
9493 * features/i386/i386-mpx-linux.c: Re-generated.
9494 * features/i386/x32-avx-avx512.c: Re-generated.
9495 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9496 * features/i386/x32-avx.c: Re-generated.
9497 * features/i386/x32-avx-linux.c: Re-generated.
9498 * features/i386/x32.c: Re-generated.
9499 * features/i386/x32-linux.c: Re-generated.
9500 * features/microblaze.c: Re-generated.
9501 * features/microblaze-with-stack-protect.c: Re-generated.
9502 * features/mips64-dsp-linux.c: Re-generated.
9503 * features/mips64-linux.c: Re-generated.
9504 * features/mips-dsp-linux.c: Re-generated.
9505 * features/mips-linux.c: Re-generated.
9506 * features/nds32.c: Re-generated.
9507 * features/nios2.c: Re-generated.
9508 * features/nios2-linux.c: Re-generated.
9509 * features/rs6000/powerpc-32.c: Re-generated.
9510 * features/rs6000/powerpc-32l.c: Re-generated.
9511 * features/rs6000/powerpc-403.c: Re-generated.
9512 * features/rs6000/powerpc-403gc.c : Re-generated.
9513 * features/rs6000/powerpc-405.c: Re-generated.
9514 * features/rs6000/powerpc-505.c: Re-generated.
9515 * features/rs6000/powerpc-601.c: Re-generated.
9516 * features/rs6000/powerpc-602.c: Re-generated.
9517 * features/rs6000/powerpc-603.c: Re-generated.
9518 * features/rs6000/powerpc-604.c: Re-generated.
9519 * features/rs6000/powerpc-64.c: Re-generated.
9520 * features/rs6000/powerpc-64l.c: Re-generated.
9521 * features/rs6000/powerpc-7400.c: Re-generated.
9522 * features/rs6000/powerpc-750.c: Re-generated.
9523 * features/rs6000/powerpc-860.c: Re-generated.
9524 * features/rs6000/powerpc-altivec32.c: Re-generated.
9525 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9526 * features/rs6000/powerpc-altivec64.c: Re-generated.
9527 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9528 * features/rs6000/powerpc-cell32l.c: Re-generated.
9529 * features/rs6000/powerpc-cell64l.c: Re-generated.
9530 * features/rs6000/powerpc-e500.c: Re-generated.
9531 * features/rs6000/powerpc-e500l.c: Re-generated.
9532 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9533 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9534 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9535 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9536 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9537 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9538 * features/rs6000/powerpc-vsx32.c: Re-generated.
9539 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9540 * features/rs6000/powerpc-vsx64.c: Re-generated.
9541 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9542 * features/rs6000/rs6000.c: Re-generated.
9543 * features/s390-linux32.c: Re-generated.
9544 * features/s390-linux32v1.c: Re-generated.
9545 * features/s390-linux32v2.c: Re-generated.
9546 * features/s390-linux64.c: Re-generated.
9547 * features/s390-linux64v1.c: Re-generated.
9548 * features/s390-linux64v2.c: Re-generated.
9549 * features/s390-te-linux64.c: Re-generated.
9550 * features/s390-tevx-linux64.c: Re-generated.
9551 * features/s390-vx-linux64.c: Re-generated.
9552 * features/s390x-linux64.c: Re-generated.
9553 * features/s390x-linux64v1.c: Re-generated.
9554 * features/s390x-linux64v2.c: Re-generated.
9555 * features/s390x-te-linux64.c: Re-generated.
9556 * features/s390x-tevx-linux64.c: Re-generated.
9557 * features/s390x-vx-linux64.c: Re-generated.
9558 * features/sparc/sparc32-solaris.c: Re-generated.
9559 * features/sparc/sparc64-solaris.c: Re-generated.
9560 * features/tic6x-c62x.c: Re-generated.
9561 * features/tic6x-c62x-linux.c: Re-generated.
9562 * features/tic6x-c64x.c: Re-generated.
9563 * features/tic6x-c64x-linux.c: Re-generated.
9564 * features/tic6x-c64xp.c: Re-generated.
9565 * features/tic6x-c64xp-linux.c: Re-generated.
9566
9567 2017-07-26 Yao Qi <yao.qi@linaro.org>
9568
9569 * i386-linux-tdep.c (i386_linux_read_description): New function.
9570 (i386_linux_core_read_description): Call
9571 i386_linux_read_description.
9572 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9573 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9574 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9575 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9576 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9577 * x86-linux-nat.c (x86_linux_read_description): Call
9578 i386_linux_read_description.
9579
9580 2017-07-26 Yao Qi <yao.qi@linaro.org>
9581
9582 * NEWS: Mention it.
9583 * features/Makefile (%.c: %.xml): Pass the xml file name to
9584 command "maint print c-tdesc".
9585 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9586 name from 'arg'.
9587
9588 2017-07-26 Yao Qi <yao.qi@linaro.org>
9589
9590 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9591 in-class initialization.
9592 (tdesc_create_feature): Call new instead of XCNEW.
9593 (free_target_description): Ue delete.
9594
9595 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9596
9597 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9598
9599 2017-07-25 Yao Qi <yao.qi@linaro.org>
9600
9601 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9602 constant.
9603 (amd64_x32_init_abi): Likewise.
9604 * amd64-tdep.h (amd64_init_abi): Update declaration.
9605 (amd64_x32_init_abi): Likewise.
9606
9607 2017-07-25 Yao Qi <yao.qi@linaro.org>
9608
9609 PR tdep/21717
9610 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9611 condition for FPSCR.
9612 (arm_linux_store_inferior_registers): Likewise.
9613
9614 2017-07-22 Tom Tromey <tom@tromey.com>
9615
9616 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9617 <syscalls_counts>: Now a std::vector.
9618 (get_catch_syscall_inferior_data): Use "new".
9619 (catch_syscall_inferior_data_cleanup): Use "delete".
9620 (insert_catch_syscall, remove_catch_syscall)
9621 (clear_syscall_counts): Update.
9622
9623 2017-07-22 Tom Tromey <tom@tromey.com>
9624
9625 * break-catch-syscall.c (syscall_catchpoint)
9626 <syscalls_to_be_caught>: Now a std::vector<int>
9627 (~syscall_catchpoint): Remove.
9628 (insert_catch_syscall, remove_catch_syscall)
9629 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9630 (print_mention_catch_syscall, print_recreate_catch_syscall):
9631 Update.
9632 (create_syscall_event_catchpoint): Change type of "filter"
9633 parameter.
9634 (catch_syscall_split_args): Return a std::vector.
9635 (catch_syscall_command_1, catching_syscall_number_1): Update.
9636
9637 2017-07-22 Tom Tromey <tom@tromey.com>
9638
9639 * break-catch-throw.c (struct exception_catchpoint)
9640 <exception_rx>: Now a std::string.
9641 (~exception_catchpoint): Remove.
9642 (print_one_detail_exception_catchpoint): Update.
9643 (handle_gnu_v3_exceptions): Change type of except_rx.
9644 (extract_exception_regexp): Return a std::string.
9645 (catch_exception_command_1): Update.
9646
9647 2017-07-22 Tom Tromey <tom@tromey.com>
9648
9649 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9650 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9651 std::vector.
9652 <catch_all>: Now a bool.
9653 (~signal_catchpoint): Remove.
9654 (signal_catchpoint_insert_location)
9655 (signal_catchpoint_remove_location)
9656 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9657 (signal_catchpoint_print_mention)
9658 (signal_catchpoint_print_recreate)
9659 (signal_catchpoint_explains_signal): Update.
9660 (create_signal_catchpoint): Change type of "filter" and
9661 "catch_all".
9662 (catch_signal_split_args): Return a std::vector. Change type of
9663 "catch_all".
9664 (catch_signal_command): Update.
9665
9666 2017-07-20 Pedro Alves <palves@redhat.com>
9667
9668 * ada-lang.c (ada_language_defn): Make extern.
9669 (_initialize_ada_language): Remove add_language call.
9670 * c-lang.c (c_language_defn, cplus_language_defn)
9671 (asm_language_defn, minimal_language_defn): Make extern.
9672 (_initialize_c_language): Delete.
9673 * completer.c (compare_cstrings): Delete, moved to utils.h.
9674 * d-lang.c (d_language_defn): Make extern.
9675 (_initialize_d_language): Remove add_language calls.
9676 * defs.h (enum language): Add comment.
9677 * f-lang.c (f_language_defn): Make extern.
9678 (_initialize_f_language): Remove add_language call.
9679 * go-lang.c (go_language_defn): Make extern.
9680 (_initialize_go_language): Remove add_language call.
9681 * language.c: Include <algorithm>.
9682 (languages): Redefine as const array.
9683 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9684 (set_language_command): Handle "local". Use for-range loop.
9685 (set_language): Remove loop.
9686 (language_enum): Rewrite.
9687 (language_def, language_str): Remove loops.
9688 (add_language): Delete.
9689 (add_set_language_command): New, based on add_languages.
9690 (skip_language_trampoline): Adjust.
9691 (local_language_defn): Delete.
9692 (language_gdbarch_post_init): Adjust.
9693 (_initialize_language): Remove add_language calls. Call
9694 add_set_language_command.
9695 * language.h (add_language): Delete.
9696 (auto_language_defn)
9697 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9698 (asm_language_defn, c_language_defn, cplus_language_defn)
9699 (d_language_defn, f_language_defn, go_language_defn)
9700 (m2_language_defn, objc_language_defn, opencl_language_defn)
9701 (pascal_language_defn, rust_language_defn): Declare.
9702 * m2-lang.c (m2_language_defn): Make extern.
9703 (_initialize_m2_language): Remove add_language call.
9704 * objc-lang.c (objc_language_defn): Make extern.
9705 (_initialize_objc_language): Remove add_language call.
9706 * opencl-lang.c (opencl_language_defn): Make extern.
9707 (_initialize_opencl_language): Remove add_language call.
9708 * p-lang.c (pascal_language_defn): Make extern.
9709 (_initialize_pascal_language): Delete.
9710 * rust-lang.c (rust_language_defn): Make extern.
9711 (_initialize_rust_language): Delete.
9712 * utils.h (compare_cstrings): New static inline function.
9713
9714 2017-07-20 Pedro Alves <palves@redhat.com>
9715
9716 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9717 (get_var_value): Constify parameters.
9718 (get_int_var_value): Change prototype.
9719 (to_fixed_range_type): Adjust.
9720 * ada-lang.h (get_int_var_value): Change prototype.
9721
9722 2017-07-20 Pedro Alves <palves@redhat.com>
9723
9724 * dwarf2read.c (dw2_lookup_symbol): Use
9725 SYMBOL_MATCHES_SEARCH_NAME.
9726 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9727
9728 2017-07-20 Pedro Alves <palves@redhat.com>
9729
9730 * block.c (block_iter_name_step, block_iter_name_first)
9731 (block_iter_name_next): Delete.
9732 (block_lookup_symbol_primary): Adjust to use
9733 dict_iter_match_first/dict_iter_match_next.
9734 * block.h (block_iter_name_first, block_iter_name_next): Delete
9735 declarations.
9736 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9737 dict_iter_match_first/dict_iter_match_next.
9738
9739 2017-07-20 Pedro Alves <palves@redhat.com>
9740
9741 * cp-support.c (cp_find_first_component_aux): Add missing case for
9742 end of string.
9743
9744 2017-07-18 David Blaikie <dblaikie@gmail.com>
9745
9746 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9747 of dwo_cu's dwo_file.
9748
9749 2017-07-18 Yao Qi <yao.qi@linaro.org>
9750
9751 * remote.c (store_registers_using_G): Remove one line comment.
9752
9753 2017-07-18 Yao Qi <yao.qi@linaro.org>
9754
9755 * regcache.c (regcache_cpy): Simplify it.
9756 (regcache::cpy_no_passthrough): Remove it.
9757 * regcache.h (cpy_no_passthrough): Remove it.
9758 (regcache_dup, regcache_cpy): Update comments.
9759
9760 2017-07-18 Pedro Alves <palves@redhat.com>
9761
9762 * remote-sim.c (sim_command_completer): Adjust to work with a
9763 completion_tracker instead of a VEC.
9764
9765 2017-07-17 Pedro Alves <palves@redhat.com>
9766
9767 * completer.c (complete_source_filenames): New function.
9768 (complete_address_and_linespec_locations): New function.
9769 (location_completer): Use complete_address_and_linespec_locations.
9770 (completion_tracker::build_completion_result): Honor the tracker's
9771 request to suppress append.
9772 * completer.h (completion_tracker::suppress_append_ws)
9773 (completion_tracker::set_suppress_append_ws): New methods.
9774 (completion_tracker::m_suppress_append_ws): New field.
9775 (complete_source_filenames): New declaration.
9776 * linespec.c (linespec_complete_what): New.
9777 (struct ls_parser) <complete_what, completion_word,
9778 completion_quote_char, completion_quote_end, completion_tracker>:
9779 New fields.
9780 (string_find_incomplete_keyword_at_end): New.
9781 (linespec_lexer_lex_string): Record quote char. If in completion
9782 mode, don't throw.
9783 (linespec_lexer_consume_token): Advance the completion word point.
9784 (linespec_lexer_peek_token): Save/restore completion info.
9785 (save_stream_and_consume_token): New.
9786 (set_completion_after_number): New.
9787 (linespec_parse_basic): Set what to complete next depending on
9788 token. Handle function and label completions specially.
9789 (parse_linespec): Disable objc shortcut in completion mode. Set
9790 what to complete next depending on token type. Skip keyword if in
9791 completion mode.
9792 (complete_linespec_component, linespec_complete): New.
9793 * linespec.h (linespec_complete): Declare.
9794
9795 2017-07-17 Pedro Alves <palves@redhat.com>
9796
9797 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9798 Handle 'operator<' / 'operator<<'.
9799
9800 2017-07-17 Pedro Alves <palves@redhat.com>
9801
9802 * completer.c (collect_explicit_location_matches): Handle
9803 MATCH_LABEL.
9804 (convert_explicit_location_to_linespec): New, factored out from
9805 ...
9806 (convert_explicit_location_to_sals): ... this.
9807 (complete_label): New.
9808 (linespec_complete_label, find_label_symbols_in_block): New.
9809 (find_label_symbols): Add completion_mode parameter and adjust to
9810 call find_label_symbols_in_block.
9811 * linespec.h (linespec_complete_label): Declare.
9812
9813 2017-07-17 Pedro Alves <palves@redhat.com>
9814
9815 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9816 complete_symbol_mode parameter.
9817 * cli/cli-cmds.c (complete_command): Get the completion result out
9818 of the handle_brkchars tracker if used a custom word point.
9819 * completer.c: Include "linespec.h".
9820 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9821 (advance_to_expression_complete_word_point): New.
9822 (completion_tracker::completes_to_completion_word): New.
9823 (complete_files_symbols): Pass down
9824 complete_symbol_mode::EXPRESSION.
9825 (explicit_options, probe_options): New.
9826 (collect_explicit_location_matches): Complete on the
9827 explictit_loc->foo instead of word. Use
9828 linespec_complete_function. Handle MATCH_LINE. Handle offering
9829 keyword and options completions.
9830 (backup_text_ptr): Delete.
9831 (skip_keyword): New.
9832 (complete_explicit_location): Remove 'word' parameter. Add
9833 language, quoted_arg_start and quoted_arg_end parameters.
9834 Rewrite, parsing left to right.
9835 (location_completer): Rewrite.
9836 (location_completer_handle_brkchars): New function.
9837 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9838 (enum complete_line_internal_reason): Adjust comments.
9839 (completion_tracker::discard_completions): New.
9840 (completer_handle_brkchars_func_for_completer): Handle
9841 location_completer.
9842 (gdb_custom_word_point_brkchars)
9843 (gdb_org_rl_basic_quote_characters): New.
9844 (gdb_completion_word_break_characters_throw)
9845 (completion_find_completion_word): Handle trackers that use a
9846 custom word point.
9847 (completion_tracker::advance_custom_word_point_by): New.
9848 (completion_tracker::build_completion_result): Don't rely on
9849 readline appending the quote char.
9850 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9851 use a custom word point.
9852 (gdb_rl_attempted_completion_function): Restore
9853 rl_basic_quote_characters.
9854 * completer.h (class completion_tracker): Extend intro comment.
9855 (completion_tracker::set_quote_char)
9856 (completion_tracker::quote_char)
9857 (completion_tracker::set_use_custom_word_point)
9858 (completion_tracker::use_custom_word_point)
9859 (completion_tracker::custom_word_point)
9860 (completion_tracker::set_custom_word_point)
9861 (completion_tracker::advance_custom_word_point_by)
9862 (completion_tracker::completes_to_completion_word)
9863 (completion_tracker::discard_completions): New methods.
9864 (completion_tracker::m_quote_char)
9865 (completion_tracker::m_use_custom_word_point)
9866 (completion_tracker::m_custom_word_point): New fields.
9867 (advance_to_expression_complete_word_point): Declare.
9868 * f-lang.c (f_collect_symbol_completion_matches): Add
9869 complete_symbol_mode parameter.
9870 * language.h (struct language_defn)
9871 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9872 parameter.
9873 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9874 (linespec_complete_function): New function.
9875 (linespec_lexer_lex_keyword): Adjust.
9876 * linespec.h (linespec_keywords, linespec_complete_function): New
9877 declarations.
9878 * location.c (find_end_quote): New function.
9879 (explicit_location_lex_one): Add explicit_completion_info
9880 parameter. Save quoting info. Don't throw if being called for
9881 completion. Don't handle Ada operators here.
9882 (is_cp_operator, skip_op_false_positives, first_of)
9883 (explicit_location_lex_one_function): New function.
9884 (string_to_explicit_location): Replace 'dont_throw' parameter with
9885 an explicit_completion_info pointer parameter. Handle it. Don't
9886 use explicit_location_lex_one to lex function names. Use
9887 explicit_location_lex_one_function instead.
9888 * location.h (struct explicit_completion_info): New.
9889 (string_to_explicit_location): Replace 'dont_throw' parameter with
9890 an explicit_completion_info pointer parameter.
9891 * symtab.c (default_collect_symbol_completion_matches_break_on):
9892 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9893 (default_collect_symbol_completion_matches)
9894 (collect_symbol_completion_matches): Add complete_symbol_mode
9895 parameter.
9896 (collect_symbol_completion_matches_type): Pass down
9897 complete_symbol_mode::EXPRESSION.
9898 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9899 parameter. Handle LINESPEC mode.
9900 * symtab.h (complete_symbol_mode): New.
9901 (default_collect_symbol_completion_matches_break_on)
9902 (default_collect_symbol_completion_matches)
9903 (collect_symbol_completion_matches)
9904 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9905 parameter.
9906
9907 2017-07-17 Pedro Alves <palves@redhat.com>
9908
9909 * utils.c (enum class strncmp_iw_mode): New.
9910 (strcmp_iw): Rename to ...
9911 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9912 parameters. Handle them.
9913 (strncmp_iw): New.
9914 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9915 * utils.h (strncmp_iw): Declare.
9916 (strcmp_iw): Move describing comments here.
9917
9918 2017-07-17 Pedro Alves <palves@redhat.com>
9919
9920 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9921 CP_OPERATOR_STR.
9922 * c-typeprint.c (is_type_conversion_operator): Use
9923 CP_OPERATOR_STR.
9924 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9925 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9926 CP_OPERATOR_LEN.
9927 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9928 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9929 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9930 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9931 CP_OPERATOR_STR.
9932 * location.c: Include "cp-support.h".
9933 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9934 CP_OPERATOR_STR.
9935 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9936 CP_OPERATOR_LEN.
9937
9938 2017-07-17 Pedro Alves <palves@redhat.com>
9939
9940 * cli/cli-cmds.c (complete_command): Use a completion tracker
9941 along with completion_find_completion_word for handle_brkchars
9942 phase.
9943 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9944 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9945 (struct gdb_rl_completion_word_info): New.
9946 (gdb_rl_find_completion_word): New.
9947 (completion_find_completion_word): New.
9948 * completer.h (completion_find_completion_word): Declare.
9949
9950 2017-07-17 Pedro Alves <palves@redhat.com>
9951
9952 * ada-lang.c (symbol_completion_match): Adjust comments.
9953 (symbol_completion_add): Replace vector parameter with
9954 completion_tracker parameter. Use it.
9955 (ada_make_symbol_completion_list): Rename to...
9956 (ada_collect_symbol_completion_matches): ... this. Add
9957 completion_tracker parameter and use it.
9958 (ada_language_defn): Adjust.
9959 * break-catch-syscall.c (catch_syscall_completer): Adjust
9960 prototype and work with completion_tracker instead of VEC.
9961 * breakpoint.c (condition_completer): Adjust prototype and work
9962 with completion_tracker instead of VEC.
9963 * c-lang.c (c_language_defn, cplus_language_defn)
9964 (asm_language_defn, minimal_language_defn): Adjust to renames.
9965 * cli/cli-cmds.c (complete_command): Rework using
9966 completion_tracker. Catch exceptions when completing.
9967 * cli/cli-decode.c (integer_unlimited_completer)
9968 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9969 with completion_tracker instead of VEC.
9970 * command.h (struct completion_tracker): Forward declare.
9971 (completer_ftype, completer_handle_brkchars_ftype): Change
9972 types.
9973 (complete_on_cmdlist, complete_on_enum): Adjust.
9974 * completer.c: Include <algorithm>.
9975 (struct gdb_completer_state): New.
9976 (current_completion): New global.
9977 (readline_line_completion_function): Delete.
9978 (noop_completer, filename_completer)
9979 (filename_completer_handle_brkchars, complete_files_symbols)
9980 (linespec_location_completer): Adjust to work with a
9981 completion_tracker instead of a VEC.
9982 (string_or_empty): New.
9983 (collect_explicit_location_matches): Adjust to work with a
9984 completion_tracker instead of a VEC.
9985 (explicit_location_completer): Rename to ...
9986 (complete_explicit_location): ... this and adjust to work with a
9987 completion_tracker instead of a VEC.
9988 (location_completer): Adjust to work with a completion_tracker
9989 instead of a VEC.
9990 (add_struct_fields): Adjust to work with a completion_list instead
9991 of VEC.
9992 (expression_completer): Rename to ...
9993 (complete_expression): ... this and adjust to work with a
9994 completion_tracker instead of a VEC. Use complete_files_symbols.
9995 (expression_completer): Reimplement on top of complete_expression.
9996 (symbol_completer): Adjust to work with a completion_tracker
9997 instead of a VEC.
9998 (enum complete_line_internal_reason): Add describing comments.
9999 (complete_line_internal_normal_command): Adjust to work with a
10000 completion_tracker instead of a VEC.
10001 (complete_line_internal): Rename to ...
10002 (complete_line_internal_1): ... this and adjust to work with a
10003 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10004 handle_brkchars phase.
10005 (new_completion_tracker): Delete.
10006 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10007 complete_line_internal_1.
10008 (free_completion_tracker): Delete.
10009 (INITIAL_COMPLETION_HTAB_SIZE): New.
10010 (completion_tracker::completion_tracker)
10011 (completion_tracker::~completion_tracker): New.
10012 (maybe_add_completion): Delete.
10013 (completion_tracker::maybe_add_completion)
10014 (completion_tracker::add_completion)
10015 (completion_tracker::add_completions): New.
10016 (throw_max_completions_reached_error): Delete.
10017 (complete_line): Adjust to work with a completion_tracker instead
10018 of a VEC. Don't create a completion_tracker_t or check for max
10019 completions here.
10020 (command_completer, command_completer_handle_brkchars)
10021 (signal_completer, reg_or_group_completer_1)
10022 (reg_or_group_completer, default_completer_handle_brkchars):
10023 Adjust to work with a completion_tracker.
10024 (gdb_completion_word_break_characters_throw): New.
10025 (gdb_completion_word_break_characters): Reimplement.
10026 (line_completion_function): Delete.
10027 (completion_tracker::recompute_lowest_common_denominator)
10028 (expand_preserving_ws)
10029 (completion_tracker::build_completion_result)
10030 (completion_result::completion_result)
10031 (completion_result::completion_result)
10032 (completion_result::~completion_result)
10033 (completion_result::completion_result)
10034 (completion_result::release_match_list, compare_cstrings)
10035 (completion_result::sort_match_list)
10036 (completion_result::reset_match_list)
10037 (gdb_rl_attempted_completion_function_throw)
10038 (gdb_rl_attempted_completion_function): New.
10039 * completer.h (completion_list, struct completion_result)
10040 (class completion_tracker): New.
10041 (complete_line): Add completion_tracker parameter.
10042 (readline_line_completion_function): Delete.
10043 (gdb_rl_attempted_completion_function): New.
10044 (noop_completer, filename_completer, expression_completer)
10045 (location_completer, symbol_completer, command_completer)
10046 (signal_completer, reg_or_group_completer): Update prototypes.
10047 (completion_tracker_t, new_completion_tracker)
10048 (make_cleanup_free_completion_tracker): Delete.
10049 (enum maybe_add_completion_enum): Delete.
10050 (maybe_add_completion): Delete.
10051 (throw_max_completions_reached_error): Delete.
10052 * corefile.c (complete_set_gnutarget): Adjust to work with a
10053 completion_tracker instead of a VEC.
10054 * cp-abi.c (cp_abi_completer): Adjust to work with a
10055 completion_tracker instead of a VEC.
10056 * d-lang.c (d_language_defn): Adjust.
10057 * disasm.c (disassembler_options_completer): Adjust to work with a
10058 completion_tracker instead of a VEC.
10059 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10060 (f_collect_symbol_completion_matches): ... this. Adjust to work
10061 with a completion_tracker instead of a VEC.
10062 (f_language_defn): Adjust.
10063 * go-lang.c (go_language_defn): Adjust.
10064 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10065 Adjust to work with a completion_tracker instead of a VEC.
10066 * infrun.c (handle_completer): Likewise.
10067 * interps.c (interpreter_completer): Likewise.
10068 * interps.h (interpreter_completer): Likewise.
10069 * language.c (unknown_language_defn, auto_language_defn)
10070 (local_language_defn): Adjust.
10071 * language.h (language_defn::la_make_symbol_completion_list):
10072 Rename to ...
10073 (language_defn::la_collect_symbol_completion_matches): ... this
10074 and adjust to work with a completion_tracker instead of a VEC.
10075 * m2-lang.c (m2_language_defn): Adjust.
10076 * objc-lang.c (objc_language_defn): Adjust.
10077 * opencl-lang.c (opencl_language_defn): Adjust.
10078 * p-lang.c (pascal_language_defn): Adjust.
10079 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10080 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10081 with a completion_tracker.
10082 * rust-lang.c (rust_language_defn): Adjust.
10083 * symtab.c (free_completion_list, do_free_completion_list)
10084 (return_val, completion_tracker): Delete.
10085 (completion_list_add_name, completion_list_add_symbol)
10086 (completion_list_add_msymbol, completion_list_objc_symbol)
10087 (completion_list_add_fields, add_symtab_completions): Add
10088 completion_tracker parameter and use it.
10089 (default_make_symbol_completion_list_break_on_1): Rename to...
10090 (default_collect_symbol_completion_matches_break_on): ... this.
10091 Add completion_tracker parameter and use it instead of allocating
10092 a completion tracker here.
10093 (default_make_symbol_completion_list_break_on): Delete old
10094 implementation.
10095 (default_make_symbol_completion_list): Delete.
10096 (default_collect_symbol_completion_matches): New.
10097 (make_symbol_completion_list): Delete.
10098 (collect_symbol_completion_matches): New.
10099 (make_symbol_completion_type): Rename to ...
10100 (collect_symbol_completion_matches_type): ... this. Add
10101 completion_tracker parameter and use it instead of VEC.
10102 (make_file_symbol_completion_list_1): Rename to...
10103 (collect_file_symbol_completion_matches): ... this. Add
10104 completion_tracker parameter and use it instead of VEC.
10105 (make_file_symbol_completion_list): Delete.
10106 (add_filename_to_list): Use completion_list instead of a VEC.
10107 (add_partial_filename_data::list): Now a completion_list.
10108 (make_source_files_completion_list): Work with a completion_list
10109 instead of a VEC.
10110 * symtab.h: Include "completer.h".
10111 (default_make_symbol_completion_list_break_on)
10112 (default_make_symbol_completion_list, make_symbol_completion_list)
10113 (make_symbol_completion_type, make_file_symbol_completion_list)
10114 (make_source_files_completion_list): Delete.
10115 (default_collect_symbol_completion_matches_break_on)
10116 (default_collect_symbol_completion_matches)
10117 (collect_symbol_completion_matches)
10118 (collect_symbol_completion_matches_type)
10119 (collect_file_symbol_completion_matches)
10120 (make_source_files_completion_list): New.
10121 * top.c (init_main): Don't install a rl_completion_entry_function
10122 hook. Install a rl_attempted_completion_function hook instead.
10123 * tui/tui-layout.c (layout_completer): Adjust to work with a
10124 completion_tracker.
10125 * tui/tui-regs.c (tui_reggroup_completer):
10126 * tui/tui-win.c (window_name_completer, focus_completer)
10127 (winheight_completer): Adjust to work with a completion_tracker.
10128 * value.c: Include "completer.h".
10129 (complete_internalvar): Adjust to work with a completion_tracker.
10130 * value.h (complete_internalvar): Likewise.
10131
10132 2017-07-17 Pedro Alves <palves@redhat.com>
10133
10134 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10135 renames.
10136 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10137 comments to completer_ftype's declaration.
10138 <completer_handle_brkchars>: Change type to
10139 completer_handle_brkchars_ftype.
10140 * command.h (completer_ftype): Add describing comment and give
10141 names to parameters.
10142 (completer_ftype_void): Rename to ...
10143 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10144 (set_cmd_completer_handle_brkchars): Adjust.
10145 * completer.c (filename_completer_handle_brkchars): New function.
10146 (complete_line_internal_normal_command): New function, factored
10147 out from ...
10148 (complete_line_internal): ... here.
10149 (command_completer_handle_brkchars)
10150 (default_completer_handle_brkchars)
10151 (completer_handle_brkchars_func_for_completer): New functions.
10152 * completer.h (set_gdb_completion_word_break_characters): Delete
10153 declaration.
10154 (completer_handle_brkchars_func_for_completer): New declaration.
10155 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10156 completer_handle_brkchars_func_for_completer.
10157
10158 2017-07-17 Pedro Alves <palves@redhat.com>
10159
10160 * completer.c (symbol_completer): New function, based on
10161 make_symbol_completion_list_fn.
10162 * completer.h (symbol_completer): New declaration.
10163 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10164 * python/py-cmd.c (completers): Adjust.
10165 * symtab.c (make_symbol_completion_list_fn): Delete.
10166 * symtab.h (make_symbol_completion_list_fn): Delete.
10167 * cli/cli-decode.c (add_cmd): Adjust.
10168
10169 2017-07-17 Pedro Alves <palves@redhat.com>
10170
10171 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10172 * dwarf2read.c: Include "filename-seen-cache.h".
10173 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10174 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10175 * filename-seen-cache.c: New file.
10176 * filename-seen-cache.h: New file.
10177 * symtab.c: Include "filename-seen-cache.h".
10178 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10179 (create_filename_seen_cache, clear_filename_seen_cache)
10180 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10181 to filename-seen-cache.h/filename-seen-cache.c.
10182 (output_source_filename, sources_info)
10183 (maybe_add_partial_symtab_filename)
10184 (make_source_files_completion_list): Adjust to use
10185 filename_seen_cache.
10186
10187 2017-07-17 Pedro Alves <palves@redhat.com>
10188
10189 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10190 fields.
10191 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10192 dwarf2_debug_sections*)): New.
10193 (dwarf2_per_objfile::dwarf2_per_objfile(const
10194 dwarf2_per_objfile&)): Declare as deleted.
10195 (dwarf2_per_objfile::operator=): Declare as deleted.
10196 (dwarf2_per_objfile::dwarf2_per_objfile)
10197 (dwarf2_per_objfile::~dwarf2_per_objfile)
10198 (dwarf2_per_objfile::free_cached_comp_units): New.
10199 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10200 ctor. Call dwarf2_per_objfile's ctor manually.
10201 (dwarf2_locate_sections): Deleted/refactored as ...
10202 (dwarf2_per_objfile::locate_sections): ... this new method.
10203 (free_cached_comp_units): Defer to
10204 dwarf2_per_objfile::free_cached_comp_units.
10205 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10206
10207 2017-07-14 Tom Tromey <tom@tromey.com>
10208
10209 PR rust/21764:
10210 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10211 parameter.
10212 <UNOP_SIZEOF>: Split into separate case.
10213 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10214
10215 2017-07-14 Tom Tromey <tom@tromey.com>
10216
10217 PR rust/21763:
10218 * symtab.c (symbol_matches_domain): Add language_rust to special
10219 case.
10220 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10221 treat LOC_TYPEDEF symbols as variables.
10222
10223 2017-07-14 Pedro Alves <palves@redhat.com>
10224
10225 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10226 symtabs matching all symtabs with SRCFILE as file name instead of
10227 only considering the first hit, with lookup_symtab.
10228
10229 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10230
10231 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10232 operator_name parameters.
10233 (gen_expr): Update function call.
10234
10235 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10236
10237 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10238 parameter.
10239 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10240 Likewise.
10241 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10242 parameter, use agent_expr::gdbarch instead, update function
10243 calls.
10244 (locexpr_tracepoint_var_ref): Likewise.
10245 (loclist_tracepoint_var_ref): Likewise.
10246 * ax-gdb.c (gen_trace_static_fields): Likewise.
10247 (gen_traced_pop): Likewise.
10248 (gen_frame_args_address): Likewise.
10249 (gen_frame_locals_address): Likewise.
10250 (gen_var_ref): Likewise.
10251 (gen_struct_ref_recursive): Likewise.
10252 (gen_static_field): Likewise.
10253 (gen_maybe_namespace_elt): Likewise.
10254 (gen_expr): Likewise.
10255 (gen_trace_for_var): Likewise.
10256 (gen_trace_for_expr): Likewise.
10257 (gen_trace_for_return_address): Likewise.
10258
10259 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10260
10261 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10262 parameter.
10263 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10264
10265 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10266
10267 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10268 from ax, update calls.
10269 (gen_usual_arithmetic): Likewise.
10270 (gen_integral_promotions): Likewise.
10271 (gen_bitfield_ref): Likewise.
10272 (gen_primitive_field): Likewise.
10273 (gen_struct_ref_recursive): Likewise.
10274 (gen_struct_ref): Likewise.
10275 (gen_maybe_namespace_elt): Likewise.
10276 (gen_struct_elt_for_reference): Likewise.
10277 (gen_namespace_elt): Likewise.
10278 (gen_aggregate_elt_ref): Likewise.
10279 (gen_expr): Get gdbarch from ax, update calls.
10280 (gen_expr_binop_rest): Likewise.
10281
10282 2017-07-13 Pedro Alves <palves@redhat.com>
10283
10284 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10285 as default tdesc.
10286 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10287 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10288 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10289 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10290 tdep.
10291 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10292 Get final tdesc from the tdep.
10293 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10294 default tdesc.
10295 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10296 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10297 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10298 Use it as default tdesc.
10299 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10300 down to amd_init_abi. No longer handle fallback tdesc here.
10301 * amd64-tdep.h (tdesc_x32): Declare.
10302 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10303 parameter.
10304 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10305 as default tdesc.
10306
10307 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10308
10309 * s390-linux-tdep.c (s390_process_record): Add support for
10310 instructions new in arch12.
10311
10312 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10313
10314 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10315 PT_GETFSBASE and PT_GETGSBASE.
10316 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10317 PT_SETGSBASE.
10318
10319 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10320
10321 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10322 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10323 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10324 those rules.
10325 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10326 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10327 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10328 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10329 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10330 * features/i386/amd64.xml: Add 64bit-segments.xml.
10331 * features/i386/amd64-avx-avx512.c: Regenerated.
10332 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10333 * features/i386/amd64-avx-mpx.c: Regenerated.
10334 * features/i386/amd64-avx.c: Regenerated.
10335 * features/i386/amd64-mpx.c: Regenerated.
10336 * features/i386/amd64.c: Regenerated.
10337 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10338 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10339 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10340 * regformats/i386/amd64-avx.dat: Regenerated.
10341 * regformats/i386/amd64-mpx.dat: Regenerated.
10342 * regformats/i386/amd64.dat: Regenerated.
10343
10344 2017-07-10 Yao Qi <yao.qi@linaro.org>
10345
10346 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10347 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10348
10349 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10350
10351 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10352 unsetenv.
10353 * gnulib/aclocal.m4: Regenerate.
10354 * gnulib/config.in: Regenerate.
10355 * gnulib/configure: Regenerate.
10356 * gnulib/import/Makefile.am: Regenerate.
10357 * gnulib/import/Makefile.in: Regenerate.
10358 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10359 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10360 * gnulib/import/m4/environ.m4: New file.
10361 * gnulib/import/m4/setenv.m4: New file.
10362 * gnulib/import/setenv.c: New file.
10363 * gnulib/import/unsetenv.c: New file.
10364
10365 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10366
10367 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10368 address when op is DW_OP_addr.
10369
10370 2017-07-09 Tom Tromey <tom@tromey.com>
10371
10372 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10373 check and apply to outer type.
10374
10375 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10376
10377 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10378 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10379 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10380 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10381
10382 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10383
10384 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10385
10386 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10387
10388 * corelow.c (get_core_siginfo): Remove.
10389 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10390 instead of get_core_siginfo.
10391 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10392 * gdbarch.h: Re-generate.
10393 * gdbarch.c: Re-generate.
10394 * linux-tdep.c (linux_core_xfer_siginfo): New.
10395 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10396
10397 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10398
10399 * corelow.c (thread_section_name): Move to ...
10400 * gdbcore.h (thread_section_name): ... here.
10401
10402 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10403
10404 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10405 (struct siginfo32): New.
10406 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10407 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10408 via ptrace(PT_LWPINFO).
10409
10410 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10411
10412 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10413 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10414 (fbsd_get_siginfo_type): New.
10415 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10416 (_initialize_fbsd_tdep): New.
10417
10418 2017-07-06 David Blaikie <dblaikie@gmail.com>
10419
10420 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10421 a singular dwo_unit*) to support multiple CUs in the same way that
10422 multiple TUs are supported.
10423 (create_cus_hash_table): Replace create_dwo_cu with a function for
10424 parsing multiple CUs from a DWO file.
10425 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10426 create_dwo_cu.
10427 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10428 htab_find, rather than comparing the signature to a singleton CU in
10429 the dwo_file.
10430
10431 2017-07-06 Pedro Alves <palves@redhat.com>
10432
10433 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10434
10435 2017-07-04 Pedro Alves <palves@redhat.com>
10436
10437 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10438 * gdbtypes.h (TYPE_STATIC): Delete.
10439 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10440 is_synchronized, is_native>: Delete.
10441 <dummy>: Bump.
10442 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10443 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10444 (TYPE_FN_FIELD_ABSTRACT): Delete.
10445
10446 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10447
10448 * buffer.h (buffer_finish): Fix spelling mistakes.
10449
10450 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10451
10452 * .dir-locals.el: Automatically switch to C-style comments in
10453 versions of Emacs that support the feature.
10454
10455 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10456 Pedro Alves <palves@redhat.com>
10457
10458 PR cli/21688
10459 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10460 (process_next_line): New variable 'inline_cmd'.
10461 Adjust 'if' clauses for "python", "compile" and "guile" to use
10462 'command_name_equals' and check for '!inline_cmd'.
10463
10464 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10465
10466 PR cli/21688
10467 * cli/cli-script.c (command_name_equals_not_inline): New function.
10468 (process_next_line): Adjust 'if' clauses for "python", "compile"
10469 and "guile" to use command_name_equals_not_inline.
10470
10471 2017-06-29 Pedro Alves <palves@redhat.com>
10472
10473 * completer.c (expression_completer): Call
10474 linespec_location_completer instead of location_completer.
10475
10476 2017-06-29 Pedro Alves <palves@redhat.com>
10477
10478 * completer.c (expression_completer): Remove code that recomputes
10479 'text' from 'word'.
10480
10481 2017-06-29 Yao Qi <yao.qi@linaro.org>
10482
10483 * regformats/regdat.sh: Generate code with
10484 "ifndef IN_PROCESS_AGENT".
10485
10486 2017-06-28 Pedro Alves <palves@redhat.com>
10487
10488 * command.h: Include "common/scoped_restore.h".
10489
10490 2017-06-28 Yao Qi <yao.qi@linaro.org>
10491
10492 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10493 instead of obstack_grow.
10494
10495 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10496
10497 PR gdb/21337
10498 * symfile.c (reread_symbols): Call objfiles_changed just before
10499 read_symbols.
10500
10501 2017-06-27 Pedro Alves <palves@redhat.com>
10502
10503 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10504 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10505 (completion_list_add_symbol, completion_list_add_msymbol):
10506 ... these new functions.
10507 (add_symtab_completions)
10508 (default_make_symbol_completion_list_break_on_1): Adjust.
10509
10510 2017-06-27 Pedro Alves <palves@redhat.com>
10511
10512 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10513 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10514 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10515 dtor.
10516 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10517 'storage_obstack' field an auto_obstack. In-class initialize all
10518 non-bitfield fields. Make minsyms_read bool.
10519 * symfile.c (read_symbols): Adjust.
10520
10521 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10522
10523 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10524 (gdbsim_store_register): Likewise.
10525
10526 2017-06-27 Pedro Alves <palves@redhat.com>
10527
10528 * c-exp.y (name_obstack): Now an auto_obstack.
10529 (yylex): Use auto_obstack::clear.
10530 (c_parse): Use auto_obstack::clear instead of reinitializing and
10531 freeing the obstack.
10532 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10533 * d-exp.y (name_obstack): Now an auto_obstack.
10534 (yylex): Use auto_obstack::clear.
10535 (d_parse): Use auto_obstack::clear instead of reinitializing and
10536 freeing the obstack.
10537 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10538 auto_obstack.
10539 * dwarf2read.c (create_addrmap_from_index)
10540 (dwarf2_build_psymtabs_hard)
10541 (update_enumeration_type_from_children): Likewise.
10542 * gdb_obstack.h (auto_obstack): New type.
10543 * go-exp.y (name_obstack): Now an auto_obstack.
10544 (build_packaged_name): Use auto_obstack::clear.
10545 (go_parse): Use auto_obstack::clear instead of reinitializing and
10546 freeing the obstack.
10547 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10548 auto_obstack.
10549 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10550 * rust-exp.y (work_obstack): Now an auto_obstack.
10551 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10552 reinitializing and freeing the obstack.
10553 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10554 (host_char_to_target): Use auto_obstack.
10555 * utils.h (make_cleanup_obstack_free): Delete declaration.
10556 * valprint.c (generic_emit_char, generic_printstr): Use
10557 auto_obstack.
10558
10559 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10560
10561 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10562 thread.
10563 (darwin_init_thread_list): Don't update dummy thread.
10564 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10565
10566 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10567
10568 * record-full.c (netorder16): Remove.
10569
10570 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10571
10572 * common/diagnostics.h: Define macros for GCC.
10573 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10574 * common/vec.h: Include diagnostics.h.
10575 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10576 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10577 warning.
10578
10579 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10580
10581 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10582 New macro.
10583 * ada-lex.l: Ignore deprecated register warnings.
10584
10585 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10586
10587 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10588 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10589
10590 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10591
10592 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10593 its own line.
10594
10595 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10596
10597 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10598
10599 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10600
10601 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10602 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10603 (xtensa_register_read_masked): Likewise.
10604
10605 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10606
10607 * common/environ.c (gdb_environ::unset): Update comment.
10608
10609 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10610
10611 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10612 registers.
10613
10614 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10615
10616 * record-full.c (record_full_exec_insn): Use byte_vector.
10617
10618 2017-06-22 Yao Qi <yao.qi@linaro.org>
10619
10620 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10621 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10622
10623 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10624
10625 * remote.c (cached_reg): Move from here...
10626 * regcache.h (cached_reg): ...to here.
10627 * python/py-unwind.c (struct reg_info): Remove.
10628 (cached_frame_info): Use cached_reg_t.
10629 (pyuw_prev_register): Likewise.
10630 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10631 (pyuw_dealloc_cache): Free all registers.
10632
10633 2017-06-22 Pedro Alves <palves@redhat.com>
10634 Simon Marchi <simon.marchi@ericsson.com>
10635
10636 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10637 warning.
10638 * common/diagnostics.h: New file.
10639
10640 2017-06-22 Pedro Alves <palves@redhat.com>
10641
10642 * common/agent.h: Add include guards.
10643
10644 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10645
10646 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10647 talk about addressable units instead of bytes.
10648
10649 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10650
10651 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10652 of '::const_iterator'.
10653
10654 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10655
10656 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10657 'unittests/environ-selftests.c'.
10658 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10659 * charset.c (find_charset_names): Declare object 'iconv_env'.
10660 Update code to use 'iconv_env' object. Remove call to
10661 'free_environ'.
10662 * common/environ.c: Include <utility>.
10663 (make_environ): Delete function.
10664 (free_environ): Delete function.
10665 (gdb_environ::clear): New function.
10666 (gdb_environ::operator=): New function.
10667 (gdb_environ::get): Likewise.
10668 (environ_vector): Delete function.
10669 (set_in_environ): Delete function.
10670 (gdb_environ::set): New function.
10671 (unset_in_environ): Delete function.
10672 (gdb_environ::unset): New function.
10673 (gdb_environ::envp): Likewise.
10674 * common/environ.h: Include <vector>.
10675 (struct gdb_environ): Delete; transform into...
10676 (class gdb_environ): ... this class.
10677 (free_environ): Delete prototype.
10678 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10679 environ_vector): Likewise.
10680 * infcmd.c (run_command_1): Update code to call
10681 'envp' from 'gdb_environ' class.
10682 (environment_info): Update code to call methods from 'gdb_environ'
10683 class.
10684 (unset_environment_command): Likewise.
10685 (path_info): Likewise.
10686 (path_command): Likewise.
10687 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10688 (inferior::inferior): Initialize 'environment' using the host's
10689 information.
10690 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10691 Include "environ.h".
10692 (class inferior) <environment>: Change type from 'struct
10693 gdb_environ' to 'gdb_environ'.
10694 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10695 methods from 'gdb_environ' class.
10696 * solib.c (solib_find_1): Likewise
10697 * unittests/environ-selftests.c: New file.
10698
10699 2017-06-20 Yao Qi <yao.qi@linaro.org>
10700
10701 * features/i386/i386-linux.xml: Exchange the order of including
10702 32bit-linux.xml and 32bit-sse.xml.
10703 * features/i386/i386-linux.c: Regenerated.
10704
10705 2017-06-20 Yao Qi <yao.qi@linaro.org>
10706
10707 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10708 Delete copy ctor and assignment operator.
10709 (tdesc_type): Likewise.
10710 (tdesc_feature): Likewise.
10711 (tdesc_free_reg): Remove.
10712 (tdesc_create_reg): Use new.
10713 (tdesc_free_type): Remove.
10714 (tdesc_create_vector): Use new.
10715 (tdesc_create_union): Likewise.
10716 (tdesc_create_flags): Likewise.
10717 (tdesc_create_enum): Likewise.
10718 (tdesc_free_feature): Delete.
10719 (free_target_description): Use delete.
10720
10721 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10722
10723 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10724 registers.
10725
10726 2017-06-19 Pedro Alves <palves@redhat.com>
10727
10728 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10729 after gdb::unlinker.
10730
10731 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10732
10733 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10734 gdb_environ to access an environment variable.
10735
10736 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10737
10738 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10739 gdb_byte*.
10740
10741 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10742
10743 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10744
10745 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10746
10747 * configure: Re-generate.
10748 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10749
10750 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10751
10752 * configure: Re-generate.
10753 * warning.m4: Pass -Werror to compiler when checking for
10754 supported warning flags.
10755
10756 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10757
10758 * Makefile.in (COMPILE.pre): Add "-x c++".
10759
10760 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10761 Pedro Alves <palves@redhat.com>
10762 Yao Qi <yao.qi@linaro.org>
10763
10764 * defs.h (RequireLongest): New.
10765 (extract_integer): Declare function template.
10766 (extract_signed_integer): Remove the declaration, but define it
10767 static inline.
10768 (extract_unsigned_integer): Likewise.
10769 (store_integer): Declare function template.
10770 (store_signed_integer): Remove the declaration, but define it
10771 static inline.
10772 (store_unsigned_integer): Likewise.
10773 * findvar.c (extract_integer): New function template.
10774 (extract_signed_integer): Remove.
10775 (extract_unsigned_integer): Remove.
10776 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10777 instantiations.
10778 (store_integer): New function template.
10779 (store_signed_integer): Remove.
10780 (store_unsigned_integer): Remove.
10781 (store_integer): Explicit instantiations.
10782 * regcache.c (regcache_raw_read_signed): Update.
10783 (regcache::raw_read): New function.
10784 (regcache::raw_read_signed): Remove.
10785 (regcache::raw_read_unsigned): Remove.
10786 (regcache_raw_read_unsigned): Update.
10787 (regcache_raw_write_unsigned): Update.
10788 (regcache::raw_write_signed): Remove.
10789 (regcache::raw_write): New function.
10790 (regcache_cooked_read_signed): Update.
10791 (regcache::raw_write_unsigned): Remove.
10792 (regcache::cooked_read_signed): Remove.
10793 (regcache_cooked_read_unsigned): Update.
10794 (regcache::cooked_read_unsigned): Remove.
10795 (regcache_cooked_write_signed): Update.
10796 (regcache_cooked_write_unsigned): Update.
10797 * regcache.h (regcache) <raw_read_signed>: Remove.
10798 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10799 <raw_read, raw_write>: New.
10800 <cooked_read_signed, cooked_write_signed>: Remove.
10801 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10802 <cooked_read, cooked_write>: New.
10803 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10804 (sh64_pseudo_register_write): Update.
10805
10806 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10807
10808 * arc-tdep.c (arc_disassembler_options): New variable.
10809 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10810 of default_print_insn.
10811 (arc_delayed_print_insn): Set info->section when needed,
10812 use default_print_insn to retrieve a disassembler.
10813
10814 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10815
10816 PR gdb/21574
10817 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10818 to mention $SHELL and startup-with-shell.
10819
10820 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10821
10822 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10823
10824 2017-06-14 Yao Qi <yao.qi@linaro.org>
10825
10826 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10827 default_print_insn instead of print_insn_aarch64.
10828 * arm-tdep.c (gdb_print_insn_arm): Call
10829 default_print_insn instead of print_insn_big_arm
10830 and print_insn_little_arm.
10831 * i386-tdep.c (i386_print_insn): Call default_print_insn
10832 instead of print_insn_i386.
10833 * ia64-tdep.c (ia64_print_insn): Call
10834 default_print_insn instead of print_insn_ia64.
10835 * mips-tdep.c (gdb_print_insn_mips): Call
10836 default_print_insn instead of print_insn_big_mips
10837 and print_insn_little_mips.
10838 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10839 instead of print_insn_spu.
10840
10841 2017-06-14 Pedro Alves <palves@redhat.com>
10842
10843 * ada-lang.c: Include "common/byte-vector.h".
10844 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10845 * charset.c (wchar_iterator::iterate): Resize the vector instead
10846 of reserving it.
10847 * common/byte-vector.h: Include "common/def-vector.h".
10848 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10849 * cli/cli-dump.c: Include "common/byte-vector.h".
10850 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10851 * common/byte-vector.h: New file.
10852 * common/def-vector.h: New file.
10853 * common/default-init-alloc.h: New file.
10854 * dwarf2loc.c: Include "common/byte-vector.h".
10855 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10856 instead of reserving it.
10857 * dwarf2read.c: Include "common/byte-vector.h".
10858 (data_buf::m_vec): Now a gdb::byte_vector.
10859 * gdb_regex.c: Include "common/def-vector.h".
10860 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10861 * mi/mi-main.c: Include "common/byte-vector.h".
10862 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10863 * printcmd.c: Include "common/byte-vector.h".
10864 (print_scalar_formatted): Use gdb::byte_vector.
10865 * valprint.c: Include "common/byte-vector.h".
10866 (maybe_negate_by_bytes, print_decimal_chars): Use
10867 gdb::byte_vector.
10868
10869 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10870
10871 * darwin-nat.c: Include "nat/fork-inferior.h".
10872
10873 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10874
10875 * configure.nat: Factor out Darwin bits that are not
10876 architecture-specific. Add fork-inferior.o.
10877
10878 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10879
10880 * configure.nat: Factor out AIX bits that are not
10881 architecture-specific. Add fork-inferior.o.
10882
10883 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10884
10885 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10886 (read_pieced_value, write_pieced_value): ...here. Reduce to
10887 wrappers that just call rw_pieced_value.
10888
10889 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10890
10891 * dwarf2loc.c (write_pieced_value): When writing the data for a
10892 memory piece, use write_memory_with_notification instead of
10893 write_memory.
10894
10895 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10896
10897 * valops.c (read_value_memory): Change embedded_offset to
10898 represent a bit offset instead of a byte offset.
10899 * value.h (read_value_memory): Adjust comment.
10900
10901 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10902
10903 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10904 dest_offset_bits and source_offset_bits.
10905 (write_pieced_value): Likewise.
10906
10907 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10908
10909 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10910 given by DW_OP_bit_piece.
10911 (write_pieced_value): Likewise.
10912
10913 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10914
10915 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10916 some other preparations to the places where sufficient information
10917 is available.
10918 (write_pieced_value): Likewise.
10919
10920 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10921
10922 * dwarf2loc.c (bits_to_bytes): New function.
10923 (read_pieced_value): Fix offset calculations for register pieces
10924 on big-endian targets.
10925 (write_pieced_value): Likewise.
10926
10927 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10928
10929 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10930 (write_pieced_value): Likewise.
10931
10932 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10933
10934 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10935 transfer the source value's least significant bits, instead of its
10936 lowest-addressed ones. Rename type_len to max_offset.
10937 (read_pieced_value): Mirror above changes to write_pieced_value as
10938 applicable.
10939
10940 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10941
10942 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10943 truncate full bytes from dest_offset_bits before using it as an
10944 offset into the buffer.
10945
10946 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10947
10948 * dwarf2loc.c (write_pieced_value): Include transfer size in
10949 byte-wise check.
10950
10951 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10952
10953 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10954 calculation of this_size.
10955
10956 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10957
10958 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10959 when targeting a bit-field.
10960 (write_pieced_value): Likewise.
10961
10962 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10963
10964 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10965 (allocate_piece_closure): Drop addr_size parameter.
10966 (dwarf2_evaluate_loc_desc_full): Adjust call to
10967 allocate_piece_closure.
10968
10969 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10970
10971 PR gdb/21226
10972 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10973 the LSB end, independent of endianness.
10974
10975 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10976
10977 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10978 size capping.
10979
10980 2017-06-13 Yao Qi <yao.qi@linaro.org>
10981
10982 * mips-linux-nat.c: Move include features/mips*-linux.c to
10983 mips-linux-tdep.c.
10984 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10985 to mips-linux-tdep.c.
10986 * mips-linux-tdep.c: Include features/mips*-linux.c
10987 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10988 functions.
10989 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10990 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10991 (tdesc_mips64_dsp_linux): Declare.
10992
10993 2017-06-12 Tom Tromey <tom@tromey.com>
10994
10995 * valprint.h (val_print_type_code_int): Remove.
10996 * valprint.c (generic_val_print_int): Always call
10997 val_print_scalar_formatted.
10998 (val_print_type_code_int): Remove.
10999 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11000 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11001 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11002 * ada-valprint.c (ada_val_print_num): Use
11003 val_print_scalar_formatted.
11004
11005 2017-06-12 Tom Tromey <tom@tromey.com>
11006
11007 * printcmd.c (print_scalar_formatted): Unify the two switches.
11008 Don't convert scalars to LONGEST.
11009
11010 2017-06-12 Tom Tromey <tom@tromey.com>
11011
11012 PR exp/16225:
11013 * valprint.h (print_decimal_chars): Update.
11014 * valprint.c (maybe_negate_by_bytes): New function.
11015 (print_decimal_chars): Add "is_signed" argument.
11016 * printcmd.c (print_scalar_formatted): Update.
11017
11018 2017-06-12 Tom Tromey <tom@tromey.com>
11019
11020 PR exp/16225:
11021 * valprint.h (print_binary_chars, print_hex_chars): Update.
11022 * valprint.c (val_print_type_code_int): Update.
11023 (print_binary_chars): Add "zero_pad" argument.
11024 (emit_octal_digit): New function.
11025 (print_octal_chars): Don't zero-pad.
11026 (print_decimal_chars): Likewise.
11027 (print_hex_chars): Add "zero_pad" argument.
11028 * sh64-tdep.c (sh64_do_fp_register): Update.
11029 * regcache.c (regcache::dump): Update.
11030 * printcmd.c (print_scalar_formatted): Update.
11031 * infcmd.c (default_print_one_register_info): Update.
11032
11033 2017-06-12 Pedro Alves <palves@redhat.com>
11034 Alan Hayward <alan.hayward@arm.com>
11035
11036 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11037 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11038 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11039 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11040 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11041
11042 2017-06-12 Pedro Alves <palves@redhat.com>
11043
11044 * dwarf2read.c (mapped_symtab::data): Now a vector of
11045 symtab_index_entry instead of vector of
11046 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11047 whether an element's name is NULL instead of checking whether the
11048 element itself is NULL.
11049 (find_slot): Change return type. Adjust.
11050 (hash_expand, , add_index_entry, uniquify_cu_indices)
11051 (write_hash_table): Adjust.
11052
11053 2017-06-12 Pedro Alves <palves@redhat.com>
11054
11055 * dwarf2read.c (recursively_count_psymbols): New function.
11056 (write_psymtabs_to_index): Call it to compute number of psyms and
11057 pass estimate size of psyms_seen to unordered_set's ctor.
11058
11059 2017-06-12 Pedro Alves <palves@redhat.com>
11060
11061 * dwarf2read.c (write_hash_table): Check if key already exists
11062 before emplacing.
11063
11064 2017-06-12 Pedro Alves <palves@redhat.com>
11065
11066 * dwarf2read.c (data_buf::append_space): Rename to...
11067 (data_buf::grow): ... this, and make private. Adjust all callers.
11068 (data_buf::append_uint): New method.
11069 (add_address_entry, write_one_signatured_type)
11070 (write_psymtabs_to_index): Use it.
11071
11072 2017-06-12 Pedro Alves <palves@redhat.com>
11073
11074 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11075 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11076 (data_buf::file_write): Call ::fwrite directly.
11077
11078 2017-06-12 Pedro Alves <palves@redhat.com>
11079
11080 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11081 std::vector::erase.
11082
11083 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11084
11085 Code cleanup: C++ify .gdb_index producer.
11086 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11087 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11088 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11089 (create_strtab, add_string): Remove.
11090 (file_write, data_buf): New.
11091 (struct symtab_index_entry): Use std::vector for cu_indices.
11092 (struct mapped_symtab): Use std::vector for data.
11093 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11094 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11095 Remove.
11096 (find_slot): Change return type. Update it to the new data structures.
11097 (hash_expand, add_index_entry): Update it to the new data structures.
11098 (offset_type_compare): Remove.
11099 (uniquify_cu_indices): Update it to the new data structures.
11100 (c_str_view, c_str_view_hasher, vector_hasher): New.
11101 (add_indices_to_cpool): Remove.
11102 (write_hash_table): Update it to the new data structures.
11103 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11104 (eq_psymtab_cu_index): Remove.
11105 (psym_index_map): New typedef.
11106 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11107 reference and std::unordered_map for cu_index_htab.
11108 (add_address_entry, add_address_entry_worker, write_address_map)
11109 (write_psymbols): Update it to the new data structures.
11110 (write_obstack): Remove.
11111 (struct signatured_type_index_data): Change types_list to a data_buf
11112 reference and psyms_seen to a std::unordered_set reference.
11113 (write_one_signatured_type, recursively_write_psymbols)
11114 (write_psymtabs_to_index): Update it to the new data structures.
11115
11116 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11117
11118 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11119 separate-debug-file commands.
11120 * symfile.h (separate_debug_file_debug): New global.
11121 * symfile.c (separate_debug_file_debug): New global.
11122 (separate_debug_file_exists, find_separate_debug_file): Add
11123 debug output.
11124 (_initialize_symfile): Add "set debug separate-debug-file"
11125 command.
11126 * build-id.c (build_id_to_debug_bfd,
11127 find_separate_debug_file_by_buildid): Add debug output.
11128
11129 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11130
11131 * gdbarch.sh (displaced_step_free_closure): Remove.
11132 * gdbarch.h, gdbarch.c: Re-generate.
11133 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11134 displaced_step_free_closure.
11135 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11136 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11137 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11138 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11139 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11140 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11141 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11142 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11143 * infrun.c (displaced_step_clear): Call xfree instead of
11144 gdbarch_displaced_step_free_closure.
11145
11146 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11147
11148 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11149 NULL".
11150
11151 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11152
11153 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11154 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11155 (mn10300_push_dummy_call): Likewise.
11156
11157 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11158
11159 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11160
11161 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11162
11163 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11164
11165 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11166
11167 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11168 able to start inferiors using a shell.
11169 (New remote packets): Announce new packet "QStartupWithShell".
11170 * remote.c: Add PACKET_QStartupWithShell.
11171 (extended_remote_create_inferior): Handle new
11172 PACKET_QStartupWithShell.
11173 (remote_protocol_features) <QStartupWithShell>: New entry for
11174 PACKET_QStartupWithShell.
11175 (_initialize_remote): Call "add_packet_config_cmd" for
11176 QStartupShell.
11177
11178 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11179 Pedro Alves <palves@redhat.com>
11180
11181 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11182 and "nat/fork-inferior.h".
11183 * common/common-inferior.h: New file, with contents from
11184 "gdb/inferior.h".
11185 * commom/common-utils.c: Include "common-utils.h".
11186 (stringify_argv): New function.
11187 * common/common-utils.h (stringify_argv): New prototype.
11188 * configure.nat: Add "fork-inferior.o" as a dependency for
11189 "*linux*", "fbsd*" and "nbsd*" hosts.
11190 * corefile.c (get_exec_file): Update comment.
11191 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11192 instead of "startup_inferior".
11193 (darwin_create_inferior): Call "add_thread_silent" after
11194 "fork_inferior".
11195 * fork-child.c: Cleanup unnecessary includes.
11196 (SHELL_FILE): Move to "common/common-fork-child.c".
11197 (environ): Likewise.
11198 (exec_wrapper): Initialize.
11199 (get_exec_wrapper): New function.
11200 (breakup_args): Move to "common/common-fork-child.c"; rename to
11201 "breakup_args_for_exec".
11202 (escape_bang_in_quoted_argument): Move to
11203 "common/common-fork-child.c".
11204 (saved_ui): New variable.
11205 (prefork_hook): New function.
11206 (postfork_hook): Likewise.
11207 (postfork_child_hook): Likewise.
11208 (gdb_startup_inferior): Likewise.
11209 (fork_inferior): Move to "common/common-fork-child.c". Update
11210 function to support gdbserver.
11211 (startup_inferior): Likewise.
11212 * gdbcore.h (get_exec_file): Remove declaration.
11213 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11214 instead of "startup_inferior". Call "add_thread_silent" after
11215 "fork_inferior".
11216 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11217 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11218 instead of "startup_inferior". Call "add_thread_silent" after
11219 "fork_inferior".
11220 * inferior.h: Include "common-inferior.h".
11221 (trace_start_error): Move to "common/common-utils.h".
11222 (trace_start_error_with_name): Likewise.
11223 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11224 (startup_inferior): Likewise.
11225 (gdb_startup_inferior): New prototype.
11226 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11227 * nat/fork-inferior.h: New file.
11228 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11229 instead of "startup_inferior". Call "add_thread_silent" after
11230 "fork_inferior".
11231 * target.h (target_terminal_init): Move prototype to
11232 "target/target.h".
11233 (target_terminal_inferior): Likewise.
11234 (target_terminal_ours): Likewise.
11235 * target/target.h (target_terminal_init): New prototype, moved
11236 from "target.h".
11237 (target_terminal_inferior): Likewise.
11238 (target_terminal_ours): Likewise.
11239 * utils.c (gdb_flush_out_err): New function.
11240
11241 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11242
11243 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11244 * common/common-gdbthread.h: New file, with parts from
11245 "gdb/gdbthread.h".
11246 * gdbthread.h: Include "common-gdbthread.h".
11247 (switch_to_thread): Moved to "common/common-gdbthread.h".
11248
11249 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11250
11251 * Makefile.in (SFILES): Add "common/job-control.c".
11252 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11253 (COMMON_OBS): Add "job-control.o".
11254 * common/job-control.c: New file, with contents from
11255 "gdb/inflow.c".
11256 * common/job-control.h: New file, with contents from "terminal.h".
11257 * fork-child.c: Include "job-control.h".
11258 * inflow.c: Include "job-control.h".
11259 (gdb_setpgid): Move to "common/common-inflow.c".
11260 (_initialize_inflow): Move setting of "job_control" to
11261 "handle_job_control".
11262 * terminal.h (job_control): Moved to "common/common-terminal.h".
11263 (gdb_setpgid): Likewise.
11264 * top.c: Include "job_control.h".
11265 * utils.c: Likewise.
11266 (job_control): Moved to "job-control.c".
11267
11268 2017-06-07 Pedro Alves <palves@redhat.com>
11269
11270 * Makefile.in (SFILES): Add gdb_regex.c.
11271 (COMMON_OBS): Add gdb_regex.o.
11272 * ada-lang.c (ada_add_standard_exceptions)
11273 (ada_add_exceptions_from_frame, name_matches_regex)
11274 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11275 parameter type to compiled_regex. Adjust.
11276 (ada_exceptions_list): Use compiled_regex.
11277 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11278 std::unique_ptr<compiled_regex>.
11279 (exception_catchpoint::~exception_catchpoint): Remove regfree
11280 call.
11281 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11282 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11283 * breakpoint.c (solib_catchpoint::compiled): Now a
11284 std::unique_ptr<compiled_regex>.
11285 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11286 (check_status_catch_solib): Adjust to use compiled_regex.
11287 (add_solib_catchpoint): Adjust to use compiled_regex.
11288 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11289 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11290 compiled_regex reference. Adjust to use it.
11291 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11292 declaration. Include "gdb_regex.h".
11293 (apropos_cmd): Change regex parameter to compiled_regex reference.
11294 * gdb_regex.c: New file.
11295 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11296 declarations.
11297 (class compiled_regex): New.
11298 * linux-tdep.c: Include "common/gdb_optional.h".
11299 (struct mapping_regexes): New, factored out from
11300 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11301 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11302 gdb::optional and remove cleanups. Adjust to compiled_regex.
11303 * probe.c: Include "common/gdb_optional.h".
11304 (collect_probes): Use compiled_regex and gdb::optional and remove
11305 cleanups.
11306 * skip.c: Include "common/gdb_optional.h".
11307 (skiplist_entry::compiled_function_regexp): Now a
11308 gdb::optional<compiled_regex>.
11309 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11310 (free_skiplist_entry): Remove regfree call.
11311 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11312 compiled_regex and gdb::optional.
11313 * symtab.c: Include "common/gdb_optional.h".
11314 (search_symbols): Use compiled_regex and gdb::optional.
11315 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11316 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11317 to gdb_regex.c.
11318
11319 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11320
11321 * regcache.c (regcache::save): Avoid buffer use.
11322 (regcache::dump): Likewise.
11323
11324 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11325
11326 * sh-tdep.c (sh_pseudo_register_read): Remove
11327 MAX_REGISTER_SIZE.
11328 (sh_pseudo_register_write): Likewise.
11329 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11330 (sh64_pseudo_register_write): Likewise
11331
11332 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11333
11334 * aarch64-tdep.c (aarch64_store_return_value): Use
11335 V_REGISTER_SIZE.
11336 (aarch64_pseudo_read_value): Likewise.
11337 (aarch64_pseudo_write): Likewise.
11338
11339 2017-06-06 Yao Qi <yao.qi@linaro.org>
11340
11341 * regformats/regdef.h (set_register_cache): Remove the
11342 declaration.
11343
11344 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11345
11346 * frame.c (frame_unwind_register_signed): Use
11347 frame_unwind_register_value.
11348
11349 2017-06-06 Pedro Alves <palves@redhat.com>
11350
11351 PR breakpoints/21553
11352 * breakpoint.c (create_breakpoints_sal_default)
11353 (init_breakpoint_sal, create_breakpoint_sal): Use
11354 gdb::unique_xmalloc_ptr for string parameters.
11355 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11356 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11357 (base_breakpoint_create_breakpoints_sal)
11358 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11359 (strace_marker_create_breakpoints_sal)
11360 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11361 string parameters.
11362 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11363 gdb::unique_xmalloc_ptr for string parameters.
11364 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11365 parameters.
11366
11367 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11368
11369 * alpha-tdep.c (alpha_register_to_value): Use
11370 get_frame_register_value.
11371 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11372
11373 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11374
11375 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11376 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11377 (ia64_value_to_register): Likewise.
11378 (ia64_extract_return_value): Likewise.
11379 (ia64_store_return_value): Likewise.
11380 (ia64_push_dummy_call): Likewise.
11381
11382 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11383
11384 GDB 8.0 released.
11385
11386 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11387
11388 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11389
11390 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11391
11392 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11393 parameter.
11394 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11395
11396 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11397
11398 * event-loop.c (poll_timers): Unallocate timer using delete
11399 instead of xfree.
11400
11401 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11402
11403 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11404 (struct breakpoint) <~breakpoint>: New.
11405 (struct watchpoint): Inherit from breakpoint.
11406 <~watchpoint>: New.
11407 <base>: Remove.
11408 (struct tracepoint): Inherit from breakpoint.
11409 <base>: Remove.
11410 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11411 (struct longjmp_breakpoint): Inherit from breakpoint.
11412 <~longjmp_breakpoint>: New.
11413 <base>: Remove.
11414 (new_breakpoint_from_type): Remove casts.
11415 (watchpoint_in_thread_scope): Remove reference to base field.
11416 (watchpoint_del_at_next_stop): Likewise.
11417 (update_watchpoint): Likewise.
11418 (watchpoint_check): Likewise.
11419 (bpstat_check_watchpoint): Likewise.
11420 (set_longjmp_breakpoint): Likewise.
11421 (struct fork_catchpoint): Inherit from breakpoint.
11422 <base>: Remove.
11423 (struct solib_catchpoint): Inherit from breakpoint.
11424 <~solib_catchpoint>: New.
11425 <base>: Remove.
11426 (dtor_catch_solib): Change to ...
11427 (solib_catchpoint::~solib_catchpoint): ... this.
11428 (breakpoint_hit_catch_solib): Remove reference to base field.
11429 (add_solib_catchpoint): Likewise.
11430 (create_fork_vfork_event_catchpoint): Likewise.
11431 (struct exec_catchpoint): Inherit from breakpoint.
11432 <~exec_catchpoint>: New.
11433 <base>: Remove.
11434 (dtor_catch_exec): Change to ...
11435 (exec_catchpoint::~exec_catchpoint): ... this.
11436 (dtor_watchpoint): Change to ...
11437 (watchpoint::~watchpoint): ... this.
11438 (watch_command_1): Remove reference to base field.
11439 (catch_exec_command_1): Likewise.
11440 (base_breakpoint_dtor): Change to ...
11441 (breakpoint::~breakpoint): ... this.
11442 (base_breakpoint_ops): Remove dtor field value.
11443 (longjmp_bkpt_dtor): Change to ...
11444 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11445 (strace_marker_create_breakpoints_sal): Remove reference to base
11446 field.
11447 (delete_breakpoint): Don't manually call breakpoint destructor.
11448 (create_tracepoint_from_upload): Remove reference to base field.
11449 (trace_pass_set_count): Likewise.
11450 (initialize_breakpoint_ops): Don't initialize
11451 momentary_breakpoint_ops, don't set dtors.
11452 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11453 <~ada_catchpoint>: New.
11454 <base>: Remove.
11455 (create_excep_cond_exprs): Remove reference to base field.
11456 (dtor_exception): Change to ...
11457 (ada_catchpoint::~ada_catchpoint): ... this.
11458 (dtor_catch_exception): Remove.
11459 (dtor_catch_exception_unhandled): Remove.
11460 (dtor_catch_assert): Remove.
11461 (create_ada_exception_catchpoint): Remove reference to base
11462 field.
11463 (initialize_ada_catchpoint_ops): Don't set dtors.
11464 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11465 breakpoint.
11466 <~signal_catchpoint>: New.
11467 <base>: Remove.
11468 (signal_catchpoint_dtor): Change to ...
11469 (signal_catchpoint::~signal_catchpoint): ... this.
11470 (create_signal_catchpoint): Remove reference to base field.
11471 (initialize_signal_catchpoint_ops): Don't set dtor.
11472 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11473 from breakpoint.
11474 <~syscall_catchpoint>: New.
11475 <base>: Remove.
11476 (dtor_catch_syscall): Change to ...
11477 (syscall_catchpoint::~syscall_catchpoint): ... this.
11478 (create_syscall_event_catchpoint): Remove reference to base
11479 field.
11480 (initialize_syscall_catchpoint_ops): Don't set dtor.
11481 * break-catch-throw.c (struct exception_catchpoint): Inherit
11482 from breakpoint.
11483 <~exception_catchpoint>: New.
11484 <base>: Remove.
11485 (dtor_exception_catchpoint): Change to ...
11486 (exception_catchpoint::~exception_catchpoint): ... this.
11487 (handle_gnu_v3_exceptions): Remove reference to base field.
11488 (initialize_throw_catchpoint_ops): Don't set dtor.
11489 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11490 field.
11491 * remote.c (remote_get_tracepoint_status): Likewise.
11492 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11493 * tracefile.c (tracefile_fetch_registers): Likewise.
11494 * tracepoint.c (actions_command): Likewise.
11495 (validate_actionline): Likewise.
11496 (tfind_1): Likewise.
11497 (get_traceframe_location): Likewise.
11498 (find_matching_tracepoint_location): Likewise.
11499 (parse_tracepoint_status): Likewise.
11500 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11501
11502 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11503
11504 * breakpoint.c (struct longjmp_breakpoint): New struct.
11505 (is_tracepoint_type): Change return type to bool.
11506 (is_longjmp_type): New function.
11507 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11508 (set_raw_breakpoint_without_location): Use
11509 new_breakpoint_from_type.
11510 (set_raw_breakpoint): Likewise.
11511
11512 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11513
11514 * breakpoint.c (new_breakpoint_from_type): New function.
11515 (create_breakpoint_sal): Use new_breakpoint_from_type and
11516 unique_ptr.
11517 (create_breakpoint): Likewise.
11518
11519 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11520
11521 * memattr.c (mem_info_command): Rename to ...
11522 (info_mem_command): ... this.
11523 (mem_enable_command): Rename to ...
11524 (enable_mem_command): ... this.
11525 (mem_disable_command): Rename to ...
11526 (disable_mem_command): ... this.
11527 (mem_delete_command): Rename to ...
11528 (delete_mem_command): ... this.
11529 (_initialize_mem): Adjust function names.
11530
11531 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11532
11533 * btrace.c (handle_pt_insn_events): New.
11534 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11535 STATUS. Split into this and ...
11536 (handle_pt_insn_event_flags): ... this.
11537
11538 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11539
11540 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11541 and struct pt_insn.resynced.
11542 * configure: Regenerated.
11543 * config.in: Regenerated.
11544
11545 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11546
11547 * btrace.c (ftrace_find_call_by_number): New function.
11548 (ftrace_new_function): Store objects, not pointers.
11549 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11550 ftrace_new_gap, ftrace_update_function,
11551 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11552 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11553 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11554 btrace_ends_with_single_insn, btrace_call_get): Account for
11555 btrace_thread_info::functions now storing objects.
11556 * btrace.h (struct btrace_thread_info): Add constructor.
11557 (struct btrace_thread_info) <functions>: Make std::vector.
11558 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11559 Initialize with default values.
11560 * record-btrace.c (record_btrace_frame_sniffer): Account for
11561 btrace_thread_info::functions now storing objects.
11562
11563 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11564
11565 * btrace.c: Remove typedef bfun_s.
11566 (ftrace_new_gap): Directly add gaps to the list of gaps.
11567 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11568 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11569 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11570 instead of gdb VEC.
11571
11572 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11573
11574 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11575 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11576 with btrace_thread_info::next_segment and
11577 btrace_thread_info::prev_segment.
11578 * btrace.h: Remove struct btrace_func_link.
11579 (struct btrace_function): Replace pair of function segment pointers
11580 with pair of indices.
11581 * python/py-record-btrace.c (btpy_call_prev_sibling,
11582 btpy_call_next_sibling): Replace references to
11583 btrace_thread_info::segment with btrace_thread_info::next_segment and
11584 btrace_thread_info::prev_segment.
11585 * record-btrace.c (record_btrace_frame_this_id): Use
11586 btrace_find_call_by_number.
11587
11588 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11589
11590 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11591 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11592 btrace_insn_next, btrace_insn_prev): Remove references to
11593 btrace_thread_info::flow.
11594 * btrace.h (struct btrace_function): Remove FLOW.
11595
11596 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11597
11598 * btrace.c (ftrace_find_call_by_number): New function.
11599 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11600 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11601 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11602 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11603 index.
11604 * btrace.h (struct btrace_function): Turn UP into an index.
11605 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11606 as an index.
11607 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11608 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11609 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11610
11611 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11612
11613 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11614 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11615 ftrace_update_function, ftrace_compute_global_level_offset,
11616 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11617 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11618 btrace_insn_end, btrace_is_empty): Remove references to
11619 btrace_thread_info::begin and btrace_thread_info::end.
11620 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11621 (struct btrace_thread_info) <functions>: Adjust comment.
11622 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11623 btrace_thread_info::begin.
11624
11625 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11626
11627 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11628 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11629 ftrace_update_function): Remove arguments that implicitly were always
11630 BTINFO->END.
11631 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11632 Don't pass BTINFO->END.
11633
11634 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11635
11636 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11637 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11638 btrace_find_insn_by_number): Replace function segment pointer with
11639 index.
11640 (btrace_insn_cmp): Simplify.
11641 * btrace.h: (struct btrace_insn_iterator) Rename index to
11642 insn_index. Replace function segment pointer with index into function
11643 segment vector.
11644 * record-btrace.c (record_btrace_call_history): Replace function
11645 segment pointer use with index.
11646 (record_btrace_frame_sniffer): Retrieve function call segment through
11647 vector.
11648 (record_btrace_set_replay): Remove defunc't safety check.
11649
11650 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11651
11652 * btrace.c (btrace_ends_with_single_insn): New function.
11653 (btrace_call_get, btrace_call_number, btrace_call_begin,
11654 btrace_call_end, btrace_call_next, btrace_call_prev,
11655 btrace_find_call_by_number): Use index into call segment vector
11656 instead of pointer.
11657 (btrace_call_cmp): Simplify.
11658 * btrace.h (struct btrace_call_iterator): Replace function call segment
11659 pointer with index into vector.
11660 * record-btrace.c (record_btrace_call_history): Use index instead of
11661 pointer.
11662
11663 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11664
11665 * btrace.c (btrace_insn_begin, btrace_insn_end,
11666 btrace_find_insn_by_number): Add btinfo to iterator.
11667 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11668
11669 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11670
11671 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11672 and save pointers directly.
11673 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11674 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11675 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11676 changed signature of functions.
11677 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11678 (btrace_fetch): Remove code that adds btrace_function pointers to
11679 vector of btrace_functions.
11680 (btrace_clear): Simplify freeing vector of btrace_functions.
11681
11682 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11683
11684 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11685 Replace VEC_* with std::vector functions.
11686 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11687 (struct btrace_thread_info)<functions>: Change type to std::vector.
11688
11689 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11690
11691 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11692 "Removed targets and native configurations" up. Merge duplicate
11693 "New commands" sub-sections. Add "New options" sub-sections.
11694
11695 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11696
11697 * defs.h (copy_integer_to_size): New declaration.
11698 * findvar.c (copy_integer_to_size): New function.
11699 (do_cint_test): New selftest function.
11700 (copy_integer_to_size_test): Likewise.
11701 (_initialize_findvar): Likewise.
11702 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11703 (mips_fbsd_collect_reg): Use raw_collect_integer.
11704 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11705 (mips64_fill_gregset): Use raw_collect_integer
11706 (mips64_fill_fpregset): Use raw_supply_integer.
11707 * regcache.c (regcache::raw_supply_integer): New function.
11708 (regcache::raw_collect_integer): Likewise.
11709 * regcache.h: (regcache::raw_supply_integer): New declaration.
11710 (regcache::raw_collect_integer): Likewise.
11711
11712 2017-05-24 Yao Qi <yao.qi@linaro.org>
11713
11714 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11715 (COMMON_OBS): Add gdbarch-selftests.o.
11716 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11717 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11718 * gdbarch-selftests.c: New file.
11719 * regcache.h (regcache) <~regcache>: Mark it virtual if
11720 GDB_SELF_TEST.
11721 <raw_write>: Likewise.
11722
11723 2017-05-24 Yao Qi <yao.qi@linaro.org>
11724
11725 * regcache.c (current_regcache): Change it to
11726 regcache::current_regcache.
11727 (regcache_observer_target_changed): Update.
11728 (regcache_thread_ptid_changed): Make it a regcache static
11729 method.
11730 (regcache_thread_ptid_changed): Update.
11731 (class regcache_access): New.
11732 (current_regcache_test): Update.
11733 (_initialize_regcache): Update.
11734 * regcache.h: Include forward_list.
11735 (regcache): Declare regcache_thread_ptid_changed and declare
11736 registers_changed_ptid as friend.
11737
11738 2017-05-24 Yao Qi <yao.qi@linaro.org>
11739
11740 * i387-tdep.c (i387_register_to_value): Use register_size
11741 instead of TYPE_LENGTH.
11742 * m68k-tdep.c (m68k_register_to_value): Likewise.
11743
11744 2017-05-24 Yao Qi <yao.qi@linaro.org>
11745
11746 * i387-tdep.c (i387_convert_register_p): Return false if type
11747 code isn't TYPE_CODE_FLT.
11748
11749 2017-05-24 Yao Qi <yao.qi@linaro.org>
11750
11751 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11752 length is 4.
11753 (alpha_register_to_value): Remove type length check.
11754 (alpha_value_to_register): Likewise.
11755
11756 2017-05-24 Yao Qi <yao.qi@linaro.org>
11757
11758 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11759 TYPE_CODE_FLT.
11760
11761 2017-05-24 Yao Qi <yao.qi@linaro.org>
11762
11763 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11764 TYPE_CODE_FLT or not.
11765
11766 2017-05-24 Yao Qi <yao.qi@linaro.org>
11767
11768 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11769 * avr-tdep.c (avr_gdbarch_init): Likewise.
11770 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11771 * cris-tdep.c (cris_gdbarch_init): Likewise.
11772 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11773 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11774 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11775 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11776 * mep-tdep.c (mep_gdbarch_init): Likewise.
11777 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11778 * mips-tdep.c (mips_gdbarch_init): Likewise.
11779 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11780 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11781 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11782 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11783 * v850-tdep.c (v850_gdbarch_init): Likewise.
11784
11785 2017-05-24 Yao Qi <yao.qi@linaro.org>
11786
11787 * selftest-arch.c (tests_with_arch): Call registers_changed
11788 and reinit_frame_cache.
11789 * selftest.c (run_self_tests): Likewise.
11790
11791 2017-05-24 Yao Qi <yao.qi@linaro.org>
11792
11793 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11794 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11795
11796 2017-05-24 Yao Qi <yao.qi@linaro.org>
11797
11798 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11799 set_gdbarch_print_insn.
11800
11801 2017-05-24 Yao Qi <yao.qi@linaro.org>
11802
11803 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11804 set_gdbarch_print_insn.
11805
11806 2017-05-24 Yao Qi <yao.qi@linaro.org>
11807
11808 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11809 set_gdbarch_print_insn.
11810 * arc-tdep.c (arc_gdbarch_init): Likewise.
11811 * arch-utils.c: include dis-asm.h.
11812 (default_print_insn): New function.
11813 * arch-utils.h (default_print_insn): Declare.
11814 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11815 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11816 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11817 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11818 * frv-tdep.c (frv_gdbarch_init): Likewise.
11819 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11820 * gdbarch.sh (print_insn): Use default_print_insn.
11821 * gdbarch.c: Regenerated.
11822 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11823 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11824 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11825 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11826 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11827 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11828 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11829 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11830 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11831 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11832 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11833 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11834 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11835 * mt-tdep.c (mt_gdbarch_init): Likewise.
11836 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11837 * nios2-tdep.c (nios2_print_insn): Remove.
11838 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11839 * rx-tdep.c (rx_gdbarch_init): Likewise.
11840 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11841 * score-tdep.c (score_print_insn): Remove.
11842 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11843 * sh-tdep.c (sh_gdbarch_init): Likewise.
11844 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11845 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11846 * tic6x-tdep.c (tic6x_print_insn): Remove.
11847 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11848 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11849 * v850-tdep.c (v850_gdbarch_init): Likewise.
11850 * vax-tdep.c (vax_gdbarch_init): Likewise.
11851 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11852 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11853
11854 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11855
11856 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11857 (MIPS_FP0_REGNUM): Remove.
11858 (MIPS_FSR_REGNUM): Remove.
11859 (mips_fbsd_supply_fpregs): Use mips_regnum.
11860 (mips_fbsd_supply_gregs): Likewise.
11861 (mips_fbsd_collect_fpregs): Likewise.
11862 (mips_fbsd_collect_gregs): Likewise.
11863
11864 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11865
11866 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11867 (getpfpregs_supplies): New function.
11868 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11869 getfpregs_supplies.
11870 (mips_fbsd_store_inferior_registers): Likewise.
11871
11872 2017-05-22 Pedro Alves <palves@redhat.com>
11873
11874 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11875 maintainer.
11876
11877 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11878
11879 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11880 (store_register): Likewise.
11881 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11882 (get_decimal_float_return_value): Likewise.
11883 (do_ppc_sysv_return_value): Likewise.
11884 (ppc64_sysv_abi_push_integer): Likewise.
11885 (ppc64_sysv_abi_push_freg): Likewise.
11886 (ppc64_sysv_abi_return_value_base): Likewise.
11887 (ppc64_sysv_abi_return_value): Likewise.
11888 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11889 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11890 * rs6000-nat.c: Likewise.
11891 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11892 (rs6000_value_to_register): Likewise.
11893 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11894
11895 2017-05-21 Tom Tromey <tom@tromey.com>
11896
11897 PR rust/21466:
11898 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11899 arrays as "[T]", not "[T; ]".
11900
11901 2017-05-19 Tom Tromey <tom@tromey.com>
11902
11903 PR rust/21484:
11904 * rust-lang.c (exp_descriptor_rust): New function.
11905 (rust_language_defn): Use it.
11906 * p-lang.c (pascal_language_defn): Update.
11907 * opencl-lang.c (opencl_language_defn): Update.
11908 * objc-lang.c (objc_language_defn): Update.
11909 * m2-lang.c (m2_language_defn): Update.
11910 * language.h (struct language_defn)
11911 <la_watch_location_expression>: New member.
11912 * language.c (unknown_language_defn, auto_language_defn)
11913 (local_language_defn): Update.
11914 * go-lang.c (go_language_defn): Update.
11915 * f-lang.c (f_language_defn): Update.
11916 * d-lang.c (d_language_defn): Update.
11917 * c-lang.h (c_watch_location_expression): Declare.
11918 * c-lang.c (c_watch_location_expression): New function.
11919 (c_language_defn, cplus_language_defn, asm_language_defn)
11920 (minimal_language_defn): Use it.
11921 * breakpoint.c (watch_command_1): Call
11922 la_watch_location_expression.
11923 * ada-lang.c (ada_language_defn): Update.
11924
11925 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11926
11927 PR tui/21482
11928 * gdb_curses.h (NOMACROS): Define.
11929 (NCURSES_NOMACROS): Define.
11930
11931 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11932
11933 PR tui/21482
11934 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11935 arg to char *.
11936 * tui/tui-wingeneral.c (box_win): Likewise.
11937 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11938 (tui_show_source_line): Likewise.
11939 (tui_show_exec_info_content): Likewise.
11940
11941 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11942
11943 * sparc-tdep.c (sparc_structure_return_p)
11944 (sparc_arg_on_registers_p): New functions.
11945 (sparc32_store_arguments): Use them.
11946 * sparc64-tdep.c (sparc64_16_byte_align_p)
11947 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11948 Handle TYPE_CODE_ARRAY.
11949
11950 2017-05-17 Yao Qi <yao.qi@linaro.org>
11951
11952 * cli/cli-decode.c (add_alias_cmd): New function.
11953 * command.h (add_alias_cmd): Declare.
11954 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11955 instead call add_alias_cmd.
11956
11957 2017-05-17 Pedro Alves <palves@redhat.com>
11958
11959 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11960 (nat_makefile_frag): ... this. All references updated.
11961 * configure.ac: Likewise.
11962 * configure.nat: Likewise. Enhance comments.
11963 * configure: Regenerate.
11964
11965 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11966
11967 * procfs.c (procfs_create_inferior): Change prototype to match
11968 definition.
11969
11970 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11971
11972 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11973 C++ compiler warning.
11974
11975 2017-05-12 Tom Tromey <tom@tromey.com>
11976
11977 PR rust/21483:
11978 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11979 recurse, just call value_struct_elt directly.
11980
11981 2017-05-12 Tom Tromey <tom@tromey.com>
11982
11983 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11984 OP_RUST_ARRAY>: Fix.
11985
11986 2017-05-12 Tom Tromey <tom@tromey.com>
11987
11988 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11989
11990 2017-05-09 Yao Qi <yao.qi@linaro.org>
11991
11992 * regcache.c: Include <forward_list>.
11993 (struct regcache_list): Remove.
11994 (current_regcache): Update.
11995 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11996 (regcache_thread_ptid_changed): Likewise.
11997 (registers_changed_ptid): Likewise.
11998 (current_regcache_size): Likewise.
11999
12000 2017-05-09 Yao Qi <yao.qi@linaro.org>
12001
12002 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12003 (current_regcache_size): New function.
12004 (current_regcache_test): New function.
12005 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12006
12007 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12008
12009 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12010 (print_gp_register_row): Use get_frame_register_value.
12011
12012 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12013
12014 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12015 (mips_supply_fpregset): Likewise.
12016 (mips64_supply_gregset): Likewise.
12017
12018 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12019
12020 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12021 regcache->raw_supply_zeroed.
12022
12023 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12024
12025 * configure.nat: Rearrange 'case' statements to match
12026 host before cpu.
12027
12028 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12029
12030 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12031 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12032 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12033 "@nat_extra_makefile_frag@".
12034 (Makefile): Remove dependency on "@frags@".
12035 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12036 (data-directory/Makefile): Likewise.
12037 * config/aarch64/linux.mh: Deleted; moved contents to
12038 "gdb/configure.nat".
12039 * config/alpha/alpha-linux.mh: Likewise.
12040 * config/alpha/nbsd.mh: Likewise.
12041 * config/arm/linux.mh: Likewise.
12042 * config/arm/nbsdelf.mh: Likewise.
12043 * config/i386/cygwin.mh: Likewise.
12044 * config/i386/cygwin64.mh: Likewise.
12045 * config/i386/darwin.mh: Likewise.
12046 * config/i386/fbsd.mh: Likewise.
12047 * config/i386/fbsd64.mh: Likewise.
12048 * config/i386/go32.mh: Likewise.
12049 * config/i386/i386gnu.mh: Likewise.
12050 * config/i386/i386sol2.mh: Likewise.
12051 * config/i386/linux.mh: Likewise.
12052 * config/i386/linux64.mh: Likewise.
12053 * config/i386/mingw.mh: Likewise.
12054 * config/i386/mingw64.mh: Likewise.
12055 * config/i386/nbsd64.mh: Likewise.
12056 * config/i386/nbsdelf.mh: Likewise.
12057 * config/i386/nto.mh: Likewise.
12058 * config/i386/obsd.mh: Likewise.
12059 * config/i386/obsd64.mh: Likewise.
12060 * config/i386/sol2-64.mh: Likewise.
12061 * config/ia64/linux.mh: Likewise.
12062 * config/m32r/linux.mh: Likewise.
12063 * config/m68k/linux.mh: Likewise.
12064 * config/m68k/nbsdelf.mh: Likewise.
12065 * config/m68k/obsd.mh: Likewise.
12066 * config/m88k/obsd.mh: Likewise.
12067 * config/mips/fbsd.mh: Likewise.
12068 * config/mips/linux.mh: Likewise.
12069 * config/mips/nbsd.mh: Likewise.
12070 * config/mips/obsd64.mh: Likewise.
12071 * config/pa/linux.mh: Likewise.
12072 * config/pa/nbsd.mh: Likewise.
12073 * config/pa/obsd.mh: Likewise.
12074 * config/powerpc/aix.mh: Likewise.
12075 * config/powerpc/fbsd.mh: Likewise.
12076 * config/powerpc/linux.mh: Likewise.
12077 * config/powerpc/nbsd.mh: Likewise.
12078 * config/powerpc/obsd.mh: Likewise.
12079 * config/powerpc/ppc64-linux.mh: Likewise.
12080 * config/powerpc/spu-linux.mh: Likewise.
12081 * config/s390/linux.mh: Likewise.
12082 * config/sh/nbsd.mh: Likewise.
12083 * config/sparc/fbsd.mh: Likewise.
12084 * config/sparc/linux.mh: Likewise.
12085 * config/sparc/linux64.mh: Likewise.
12086 * config/sparc/nbsd64.mh: Likewise.
12087 * config/sparc/nbsdelf.mh: Likewise.
12088 * config/sparc/obsd64.mh: Likewise.
12089 * config/sparc/sol2.mh: Likewise.
12090 * config/tilegx/linux.mh: Likewise.
12091 * config/vax/nbsdelf.mh: Likewise.
12092 * config/vax/obsd.mh: Likewise.
12093 * config/xtensa/linux.mh: Likewise.
12094 * config/i386/i386gnu.mn: New file, with excerpts from
12095 "config/i386/i386gnu.mh".
12096 * configure: Regenerate.
12097 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12098 *.mh files under "gdb/config".
12099 * configure.nat: New file, with contents from the
12100 "gdb/config/*/*.mh" files.
12101
12102 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12103
12104 * btrace.c (btrace_clear): Free insn vector.
12105
12106 2017-05-05 Pedro Alves <palves@redhat.com>
12107
12108 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12109 * configure: Regenerate.
12110
12111 2017-05-04 Pedro Alves <palves@redhat.com>
12112
12113 * Makefile.in (SFILES): Add progspace-and-thread.c.
12114 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12115 (COMMON_OBS): Add progspace-and-thread.o.
12116 * breakpoint.c: Include "progspace-and-thread.h".
12117 (update_inserted_breakpoint_locations)
12118 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12119 Use scoped_restore_current_pspace_and_thread.
12120 (create_std_terminate_master_breakpoint): Use
12121 scoped_restore_current_program_space.
12122 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12123 (print_breakpoint_location): Use
12124 scoped_restore_current_program_space.
12125 (bp_loc_is_permanent): Use
12126 scoped_restore_current_pspace_and_thread.
12127 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12128 (download_tracepoint_locations): Use
12129 scoped_restore_current_pspace_and_thread.
12130 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12131 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12132 (enum step_over_calls_kind): Moved from inferior.h.
12133 (class scoped_restore_current_thread): New class.
12134 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12135 declaration.
12136 (scoped_restore_current_thread): New class.
12137 * infcmd.c: Include "common/gdb_optional.h".
12138 (continue_1, proceed_after_attach): Use
12139 scoped_restore_current_thread.
12140 (notice_new_inferior): Use scoped_restore_current_thread.
12141 * inferior.c: Include "progspace-and-thread.h".
12142 (restore_inferior, save_current_inferior): Delete.
12143 (add_inferior_command, clone_inferior_command): Use
12144 scoped_restore_current_pspace_and_thread.
12145 * inferior.h (scoped_restore_current_inferior): New class.
12146 * infrun.c: Include "progspace-and-thread.h" and
12147 "common/gdb_optional.h".
12148 (follow_fork_inferior): Use
12149 scoped_restore_current_pspace_and_thread.
12150 (scoped_restore_exited_inferior): New class.
12151 (handle_vfork_child_exec_or_exit): Use
12152 scoped_restore_exited_inferior,
12153 scoped_restore_current_pspace_and_thread,
12154 scoped_restore_current_thread and scoped_restore.
12155 (fetch_inferior_event): Use scoped_restore_current_thread.
12156 * linespec.c (decode_line_full, decode_line_1): Use
12157 scoped_restore_current_program_space.
12158 * mi/mi-main.c: Include "progspace-and-thread.h".
12159 (exec_continue): Use scoped_restore_current_thread.
12160 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12161 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12162 * proc-service.c (ps_pglobal_lookup): Use
12163 scoped_restore_current_program_space.
12164 * progspace-and-thread.c: New file.
12165 * progspace-and-thread.h: New file.
12166 * progspace.c (release_program_space, clone_program_space): Use
12167 scoped_restore_current_program_space.
12168 (restore_program_space, save_current_program_space)
12169 (save_current_space_and_thread): Delete.
12170 (switch_to_program_space_and_thread): Moved to
12171 progspace-and-thread.c.
12172 * progspace.h (save_current_program_space)
12173 (save_current_space_and_thread): Delete declarations.
12174 (scoped_restore_current_program_space): New class.
12175 * remote.c (remote_btrace_maybe_reopen): Use
12176 scoped_restore_current_thread.
12177 * symtab.c: Include "progspace-and-thread.h".
12178 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12179 * thread.c (print_thread_info_1): Use
12180 scoped_restore_current_thread.
12181 (struct current_thread_cleanup): Delete.
12182 (do_restore_current_thread_cleanup)
12183 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12184 (scoped_restore_current_thread::~scoped_restore_current_thread):
12185 ... this new dtor.
12186 (make_cleanup_restore_current_thread): Rename/convert to ...
12187 (scoped_restore_current_thread::scoped_restore_current_thread):
12188 ... this new ctor.
12189 (thread_apply_all_command): Use scoped_restore_current_thread.
12190 (thread_apply_command): Use scoped_restore_current_thread.
12191 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12192 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12193
12194 2017-05-04 Pedro Alves <palves@redhat.com>
12195
12196 * thread.c (make_cleanup_restore_current_thread): Move
12197 find_thread_ptid call before the is_stopped call. Assert that the
12198 thread is found. Replace is_stopped call by checking the thread's
12199 state directly. Remove unnecessary NULL-thread check.
12200
12201 2017-05-04 Pedro Alves <palves@redhat.com>
12202
12203 * corelow.c (thread_section_name): New class.
12204 (get_core_register_section, get_core_siginfo): Use it.
12205
12206 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12207
12208 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12209 (get_core_register_section): Remove xfree of NULL pointer.
12210
12211 2017-05-03 Alan Hayward <alan.hayward@arm.com>
12212
12213 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12214 * regcache.c (regcache::raw_supply_zeroed): New function.
12215 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12216
12217 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12218
12219 * gdbarch.sh: Remove commented out definition of
12220 TARGET_CHAR_BIT.
12221 * gdbarch.h: Re-generate.
12222
12223 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12224
12225 * configure: Regenerate.
12226
12227 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12228
12229 * solib-target.c (solib_target_relocate_section_addresses):
12230 Remove num_section_bases, num_bases, segment_bases variables.
12231
12232 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12233
12234 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12235
12236 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12237
12238 * solib-target.c: Include <vector>
12239 (struct lm_info_target) <~lm_info_target>: Remove.
12240 <segment_bases, section_bases>: Change type to
12241 std::vector<CORE_ADDR>.
12242 (library_list_start_segment, library_list_start_section,
12243 library_list_end_library,
12244 solib_target_relocate_section_addresses): Adjust.
12245
12246 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12247
12248 * gdbarch.sh (software_single_step): Change return type to
12249 std::vector<CORE_ADDR>.
12250 * gdbarch.c, gdbarch.h: Re-generate.
12251 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12252 Adjust.
12253 (arm_deal_with_atomic_sequence_raw): Adjust.
12254 (thumb_get_next_pcs_raw): Adjust.
12255 (arm_get_next_pcs_raw): Adjust.
12256 (arm_get_next_pcs): Adjust.
12257 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12258 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12259 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12260 (alpha_software_single_step): Adjust.
12261 * alpha-tdep.h (alpha_software_single_step): Adjust.
12262 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12263 * arm-tdep.c (arm_software_single_step): Adjust.
12264 (arm_breakpoint_kind_from_current_state): Adjust.
12265 * arm-tdep.h (arm_software_single_step): Adjust.
12266 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12267 * cris-tdep.c (cris_software_single_step): Adjust.
12268 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12269 (micromips_deal_with_atomic_sequence): Adjust.
12270 (deal_with_atomic_sequence): Adjust.
12271 (mips_software_single_step): Adjust.
12272 * mips-tdep.h (mips_software_single_step): Adjust.
12273 * moxie-tdep.c (moxie_software_single_step): Adjust.
12274 * nios2-tdep.c (nios2_software_single_step): Adjust.
12275 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12276 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12277 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12278 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12279 * sparc-tdep.c (sparc_software_single_step): Adjust.
12280 * spu-tdep.c (spu_software_single_step): Adjust.
12281 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12282
12283 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12284
12285 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12286 * gdbarch.h: Re-generate.
12287
12288 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12289
12290 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12291 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12292 * python/py-instruction.c, python/py-instruction.h: New file.
12293 * python/py-record.c: Add py-instruction.h include.
12294 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12295 gdb.RecordInstruction.
12296 * python/python-internal.h: Add gdbpy_initialize_instruction
12297 declaration.
12298 * python/python.c (do_start_initialization): Add
12299 gdbpy_initialize_instruction.
12300
12301 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12302
12303 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12304 Remove.
12305 (btrace_func_from_recpy_func): New function.
12306 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12307 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12308 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12309 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12310 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12311 Also, use new helper functions.
12312 (btpy_list_item): Use new helper functions.
12313 (recpy_bt_function_call_history): Use new type name.
12314 (btpy_call_getset): Remove.
12315 (gdbpy_initialize_btrace): Remove code to initialize
12316 gdb.BtraceFunctionCall.
12317 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12318 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12319 recpy_bt_func_prev, recpy_bt_func_next): New export.
12320 * python/py-record.c (recpy_func_type): New static object.
12321 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12322 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12323 recpy_func_next): New function.
12324 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12325 (recpy_func_getset): New static object.
12326 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12327 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12328
12329 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12330
12331 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12332 (btpy_object, btpy_insn_type, btpy_new): Remove.
12333 (btpy_list_object): Use gdb.RecordInstruction type instead of
12334 gdb.BtraceInstruction type.
12335 (btrace_insn_from_recpy_insn): New function.
12336 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12337 btpy_new.
12338 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12339 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12340 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12341 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12342 instead of btpy_object.
12343 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12344 btpy_insn_data, btpy_insn_decode): Rename to ...
12345 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12346 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12347 recpy_bt_insn_decode): This. Also, use new helper functions.
12348 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12349 recpy_insn_type.
12350 (btpy_insn_getset): Remove.
12351 (gdbpy_initialize_btrace): Remove code to initialize
12352 gdb.BtraceInstruction. Use recpy_element_object.
12353 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12354 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12355 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12356 * python/py-record.c (recpy_insn_type): New static object.
12357 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12358 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12359 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12360 New function.
12361 (recpy_insn_getset): New static object.
12362 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12363 * python/py-record.h (recpy_element_object): New typedef.
12364 (recpy_insn_type, recpy_insn_new): New export.
12365
12366 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12367
12368 * py-record-btrace.c (btpy_insn_new): Removed.
12369 (btpy_insn_or_gap_new): New function.
12370 (btpy_insn_error): Removed.
12371 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12372 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12373 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12374 btpy_insn_or_gap_new instead of btpy_insn_new.
12375 (btpy_insn_getset): Remove btpy_insn_error.
12376 * py-record.c (recpy_gap_type): New static object.
12377 (recpy_gap_object): New typedef.
12378 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12379 recpy_gap_reason_string): New function.
12380 (recpy_gap_getset): New static object.
12381 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12382 * py-record.h (recpy_gap_new): New export.
12383
12384 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12385
12386 * python/py-record.c (recpy_ptid): Remove.
12387 (recpy_record_getset): Remove recpy_ptid.
12388
12389 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12390
12391 * btrace.c (btrace_fetch): Set inferior_ptid.
12392 * python/py-record-btrace.c: Add "py-record.h" include.
12393 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12394 recpy_bt_end, recpy_bt_instruction_history,
12395 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12396 in gdb.Record object instead of current ptid.
12397 * python/py-record.c: Include new "py-record.h" file.
12398 (recpy_record_object): Moved to py-record.h.
12399 * python/py-record.h: New file.
12400
12401 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12402
12403 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12404 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12405 indentation.
12406
12407 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12408
12409 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12410 the past maintainers section.
12411
12412 2017-04-28 Yao Qi <yao.qi@linaro.org>
12413
12414 * infcmd.c (get_return_value): Use regcache ctor, and remove
12415 cleanup.
12416
12417 2017-04-28 Yao Qi <yao.qi@linaro.org>
12418 Pedro Alves <palves@redhat.com>
12419
12420 * regcache.c (regcache::regcache): New tag dispatch ctor.
12421 (do_cooked_read): Moved above.
12422 (regcache_dup): Use the tag dispatch ctor..
12423 * regcache.h (regcache): Declare ctor, delete copy ctor and
12424 assignment operator, remove friend regcache_dup.
12425
12426 2017-04-28 Yao Qi <yao.qi@linaro.org>
12427
12428 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12429 call method save instead of regcache_cpy.
12430 * regcache.h (struct regcache): Make regcache_dup a friend.
12431
12432 2017-04-28 Yao Qi <yao.qi@linaro.org>
12433
12434 * regcache.c (struct regcache): Move to regcache.h
12435 (regcache::arch): New method.
12436 (regcache_get_ptid): Update.
12437 (get_regcache_arch): Call arch method.
12438 (get_regcache_aspace): Call method aspace.
12439 (register_buffer): Change it to method.
12440 (regcache_save): Change it to regcache::save.
12441 (regcache_restore): Likewise.
12442 (regcache_cpy_no_passthrough): Remove the declaration.
12443 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12444 (regcache_cpy_no_passthrough): Change it to method
12445 cpy_no_passthrough.
12446 (regcache_register_status): Change it to method
12447 get_register_status.
12448 (regcache_invalidate): Change it to method invalidate.
12449 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12450 (regcache_raw_update): Change it to method raw_update.
12451 (regcache_raw_read): Likewise.
12452 (regcache_raw_read_signed): Likewise.
12453 (regcache_raw_read_unsigned): Likewise.
12454 (regcache_raw_write_signed): Likewise.
12455 (regcache_raw_write_unsigned): Likewise.
12456 (regcache_cooked_read): Likewise.
12457 (regcache_cooked_read_value): Likewise.
12458 (regcache_cooked_read_signed): Likewise.
12459 (regcache_cooked_read_unsigned): Likewise.
12460 (regcache_cooked_write_signed): Likewise.
12461 (regcache_cooked_write_unsigned): Likewise.
12462 (regcache_raw_set_cached_value): Likewise.
12463 (regcache_raw_write): Likewise.
12464 (regcache_cooked_write): Likewise.
12465 (regcache_xfer_part): Likewise.
12466 (regcache_raw_read_part): Likewise.
12467 (regcache_raw_write_part): Likewise.
12468 (regcache_cooked_read_part): Likewise.
12469 (regcache_cooked_write_part): Likewise.
12470 (regcache_raw_supply): Likewise.
12471 (regcache_raw_collect): Likewise.
12472 (regcache_transfer_regset): Likewise.
12473 (regcache_supply_regset): Likewise.
12474 (regcache_collect_regset): Likewise.
12475 (regcache_debug_print_register): Likewise.
12476 (enum regcache_dump_what): Move it to regcache.h.
12477 (regcache_dump): Change it to method dump.
12478 * regcache.h (enum regcache_dump_what): New.
12479 (class regcache): New.
12480 * target.c (target_fetch_registers): Call method
12481 debug_print_register.
12482 (target_store_registers): Likewise.
12483
12484 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12485
12486 * windows-nat.c (struct lm_info_windows): Initialize field.
12487 (windows_make_so): Allocate lm_info_windows with new.
12488 (windows_free_so): Free lm_info_windows with delete.
12489
12490 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12491
12492 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12493 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12494 cleanup.
12495 (darwin_free_so): Free lm_info_darwin with delete.
12496
12497 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12498
12499 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12500 <l_addr_p>: Change type to bool.
12501 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12502 (svr4_free_so): Free lm_info_svr4 with delete.
12503 (svr4_copy_library_list): Replace memcpy with call to copy
12504 constructor.
12505 (library_list_start_library, svr4_default_sos): Allocate
12506 lm_info_svr4 with new.
12507
12508 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12509
12510 * solib-target.c (struct lm_info_target): Add destructor,
12511 initialize fields.
12512 <name>: Change type to std::string.
12513 (library_list_start_library): Allocate lm_info_target with new.
12514 (solib_target_free_library_list): Free lm_info_target with
12515 delete.
12516 (solib_target_current_sos): Adapt to std::string.
12517 (solib_target_free_so): Free lm_info_target with delete.
12518
12519 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12520
12521 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12522 fields.
12523 (frv_current_sos): Allocate lm_info_frv with new.
12524 (frv_relocate_main_executable): Free lm_info_frv with delete,
12525 allocate with new.
12526 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12527
12528 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12529
12530 * solib-frv.c (struct lm_info_frv): Fix indentation.
12531
12532 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12533
12534 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12535 map field.
12536 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12537 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12538 and allocate with new.
12539 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12540
12541 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12542
12543 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12544 <filename, member_name>: Change type to std::string.
12545 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12546 (library_list_start_library): Allocate lm_info_aix with new.
12547 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12548 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12549 with copy constructor.
12550
12551 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12552
12553 * solist.h (struct lm_info): Remove.
12554 (struct lm_info_base): New class.
12555 (struct so_list) <lm_info>: Change type to lm_info_base *.
12556 * nto-tdep.c (struct lm_info): Remove.
12557 (lm_addr): Adjust.
12558 * solib-aix.c (struct lm_info): Rename to ...
12559 (struct lm_info_aix): ... this. Extend lm_info_base.
12560 (lm_info_p): Rename to ...
12561 (lm_info_aix_p): ... this, and adjust.
12562 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12563 solib_aix_parse_libraries, library_list_start_library,
12564 solib_aix_free_library_list, solib_aix_parse_libraries,
12565 solib_aix_get_library_list,
12566 solib_aix_relocate_section_addresses, solib_aix_free_so,
12567 solib_aix_get_section_offsets,
12568 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12569 Adjust.
12570 (struct solib_aix_inferior_data) <library_list>: Adjust.
12571 * solib-darwin.c (struct lm_info): Rename to ...
12572 (struct lm_info_darwin): ... this. Extend lm_info_base.
12573 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12574 * solib-dsbt.c (struct lm_info): Rename to ...
12575 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12576 (struct dsbt_info) <main_executable_lm_info): Adjust.
12577 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12578 dsbt_relocate_section_addresses): Adjust.
12579 * solib-frv.c (struct lm_info): Rename to ...
12580 (struct lm_info_frv): ... this. Extend lm_info_base.
12581 (main_executable_lm_info): Adjust.
12582 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12583 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12584 find_canonical_descriptor_in_load_object,
12585 frv_fdpic_find_canonical_descriptor): Adjust.
12586 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12587 to lm_info_svr4.
12588 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12589 svr4_clear_so, svr4_copy_library_list,
12590 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12591 svr4_current_sos, svr4_fetch_objfile_link_map,
12592 solist_update_incremental): Adjust.
12593 * solib-svr4.h (struct lm_info_svr4): Move here from
12594 solib-svr4.c.
12595 * solib-target.c (struct lm_info): Rename to ...
12596 (struct lm_info_target): ... this. Extend lm_info_base.
12597 (lm_info_p): Rename to ...
12598 (lm_info_target_p): ... this.
12599 (solib_target_parse_libraries, library_list_start_segment,
12600 library_list_start_section, library_list_start_library,
12601 library_list_end_library, solib_target_free_library_list,
12602 solib_target_current_sos, solib_target_free_so,
12603 solib_target_relocate_section_addresses): Adjust.
12604 * windows-nat.c (struct lm_info): Rename to ...
12605 (struct lm_info_windows): ... this. Extend lm_info_base.
12606 (windows_make_so, handle_load_dll, handle_unload_dll,
12607 windows_xfer_shared_libraries): Adjust.
12608
12609 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12610
12611 * solib-darwin.c (struct darwin_so_list): Remove.
12612 (darwin_current_sos): Allocate an so_list object instead of a
12613 darwin_so_list, separately allocate an lm_info object.
12614 (darwin_free_so): Free lm_info.
12615
12616 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12617
12618 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12619 with fprintf_filtered.
12620
12621 2017-04-28 Yao Qi <yao.qi@linaro.org>
12622
12623 * regcache.c (regcache::regcache): New function.
12624 (regcache::~regcache): New function.
12625 (regcache_xmalloc_1): Remove.
12626 (regcache_xmalloc): Call new regcache.
12627 (regcache_xfree): Call delete regcache.
12628 (get_thread_arch_aspace_regcache): Call new regcache.
12629
12630 2017-04-28 Yao Qi <yao.qi@linaro.org>
12631
12632 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12633 lwp instead of ptid_get_lwp.
12634
12635 2017-04-28 Yao Qi <yao.qi@linaro.org>
12636
12637 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12638 lwp_info instead of getting from inferior_ptid.
12639
12640 2017-04-27 Keith Seitz <keiths@redhat.com>
12641
12642 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12643 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12644 (CV_CONVERSION_BADNESS): Define.
12645 (rank_one_type): Remove overly restrictive rvalue reference
12646 rank checks.
12647 Add cv-qualifier checks and subranks for type equality.
12648 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12649 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12650 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12651
12652 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12653
12654 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12655 count when creating the object.
12656
12657 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12658 Ulrich Weigand <uweigand@de.ibm.com>
12659
12660 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12661 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12662 is used in AIX.
12663 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12664 (process_xcoff_symbol): Likewise.
12665 (scan_xcoff_symtab): Likewise.
12666
12667 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12668
12669 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12670 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12671 (ia64_access_reg): Use get_frame_register_unsigned.
12672 (ia64_access_rse_reg): Likewise.
12673 (ia64_libunwind_frame_prev_register): Likewise.
12674
12675 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12676
12677 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12678 * gdbarch.c: Regenerated.
12679 * gdbarch.h: Regenerated.
12680 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12681 visibility external.
12682 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12683 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12684 (enum cfa_how_kind): Move to ...
12685 (struct dwarf2_frame_state_reg_info): Likewise.
12686 (struct dwarf2_frame_state): Likewise.
12687 * dwarf2-frame.h: ... here.
12688 (dwarf2_frame_state_alloc_regs): New declaration.
12689 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12690 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12691
12692 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12693
12694 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12695 regcache_raw_read_unsigned.
12696 (xtensa_pseudo_register_write): Likewise.
12697
12698 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12699
12700 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12701 (nds32_pseudo_register_write): Likewise.
12702
12703 2017-04-25 Yao Qi <yao.qi@linaro.org>
12704
12705 * regcache.c (struct regcache) <readonly_p>: Change its type
12706 to bool.
12707 (regcache_xmalloc_1): Update parameter type and callers update.
12708
12709 2017-04-25 Yao Qi <yao.qi@linaro.org>
12710
12711 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12712 set_gdbarch_wchar_bit.
12713 * arm-tdep.c (arm_gdbarch_init): Likewise.
12714
12715 2017-04-25 Pedro Alves <palves@redhat.com>
12716
12717 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12718 (BothAreRelocatable, memcopy, memmove): Don't define.
12719 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12720 macros.
12721
12722 2017-04-25 Pedro Alves <palves@redhat.com>
12723
12724 * common/common-defs.h: Include "common/poison.h".
12725 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12726 and adjust.
12727 * common/poison.h: New file.
12728 * common/traits.h: Include <type_traits>.
12729 (Not, Or, Requires): New, moved from common/function-view.h.
12730
12731 2017-04-25 Pedro Alves <palves@redhat.com>
12732
12733 * breakpoint.h (struct breakpoint): In-class initialize all
12734 fields. Make boolean fields "bool".
12735 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12736 memset call and initializations no longer necessary.
12737
12738 2017-04-25 Pedro Alves <palves@redhat.com>
12739
12740 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12741 reference.
12742 (pt_btrace_insn): New function.
12743 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12744
12745 2017-04-25 Pedro Alves <palves@redhat.com>
12746
12747 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12748 "base" field and inherit from "bp_location" instead. Add
12749 non-default ctor.
12750 (allocate_location_exception): Use new non-default ctor.
12751 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12752 (init_bp_location): Convert to ...
12753 (bp_location::bp_location): ... this new ctor, and remove memset
12754 call.
12755 (base_breakpoint_allocate_location): Use the new non-default ctor.
12756 * breakpoint.h (bp_location): Now a class. Declare default and
12757 non-default ctors. In-class initialize all members.
12758 (init_bp_location): Remove declaration.
12759
12760 2017-04-25 Pedro Alves <palves@redhat.com>
12761
12762 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12763 assignment operator.
12764
12765 2017-04-24 Yao Qi <yao.qi@linaro.org>
12766
12767 * doublest.c (convert_doublest_to_floatformat): Call
12768 floatformat_totalsize_bytes.
12769
12770 2017-04-22 Tom Tromey <tom@tromey.com>
12771
12772 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12773 ui_out_emit_list.
12774 * stack.c (print_frame): Use ui_out_emit_list.
12775 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12776 ui_out_emit_list.
12777 * mi/mi-main.c (print_one_inferior)
12778 (mi_cmd_data_list_register_names)
12779 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12780 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12781 ui_out_emit_list.
12782 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12783 (mi_output_solib_attribs): Use ui_out_emit_list,
12784 ui_out_emit_tuple.
12785 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12786 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12787 (mi_cmd_stack_list_args, list_args_or_locals): Use
12788 ui_out_emit_list.
12789 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12790 * breakpoint.c (print_solib_event, output_thread_groups): Use
12791 ui_out_emit_list.
12792
12793 2017-04-22 Tom Tromey <tom@tromey.com>
12794
12795 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12796 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12797 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12798
12799 2017-04-22 Tom Tromey <tom@tromey.com>
12800
12801 * tracepoint.c (tvariables_info_1)
12802 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12803
12804 2017-04-22 Tom Tromey <tom@tromey.com>
12805
12806 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12807 annotate_arg_emitter.
12808 * breakpoint.c (print_mention_watchpoint)
12809 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12810 * annotate.h (struct annotate_arg_emitter): New.
12811
12812 2017-04-22 Tom Tromey <tom@tromey.com>
12813
12814 * record-btrace.c (record_btrace_insn_history)
12815 (record_btrace_insn_history_range, record_btrace_call_history)
12816 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12817 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12818 ui_out_emit_tuple.
12819 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12820 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12821 * skip.c (skip_info): Use ui_out_emit_tuple.
12822 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12823 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12824 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12825 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12826 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12827 ui_out_emit_tuple.
12828 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12829 (output_register, mi_cmd_data_read_memory)
12830 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12831 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12832 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12833 Use ui_out_emit_tuple.
12834 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12835 ui_out_emit_tuple.
12836 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12837 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12838 * linux-thread-db.c (info_auto_load_libthread_db): Use
12839 ui_out_emit_tuple.
12840 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12841 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12842 * disasm.c (do_mixed_source_and_assembly_deprecated)
12843 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12844 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12845 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12846 * breakpoint.c (print_one_breakpoint_location)
12847 (print_one_breakpoint): Use ui_out_emit_tuple.
12848 * auto-load.c (print_script, info_auto_load_cmd): Use
12849 ui_out_emit_tuple.
12850 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12851
12852 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12853
12854 * thread.c (print_thread_info_1): Remove dead code.
12855
12856 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12857
12858 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12859 GDB_SELF_TEST.
12860 * arm-tdep.c (selftests::arm_record_test): Likewise.
12861
12862 2017-04-21 Yao Qi <yao.qi@linaro.org>
12863
12864 * regcache.c (regcache_restore): Remove argument 2. Replace
12865 argument 3 with regcache. Get register status from
12866 src->register_status and get register contents from
12867 register_buffer (src, regnum).
12868 (regcache_cpy): Update.
12869
12870 2017-04-19 Pedro Alves <palves@redhat.com>
12871
12872 * gdbthread.h (thread): Add missing closing parenthesis in
12873 comment.
12874
12875 2017-04-19 Pedro Alves <palves@redhat.com>
12876
12877 * common/refcounted-object.h: New file.
12878 * gdbthread.h: Include "common/refcounted-object.h".
12879 (thread_info): Inherit from refcounted_object and add comments.
12880 (thread_info::incref, thread_info::decref)
12881 (thread_info::m_refcount): Delete.
12882 (thread_info::deletable): Use the refcounted_object::refcount()
12883 method.
12884 * inferior.c (current_inferior_): Add comment.
12885 (set_current_inferior): Increment/decrement refcounts.
12886 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12887 not-deletable instead of comparing with the current inferior.
12888 (initialize_inferiors): Increment the initial inferior's refcount.
12889 * inferior.h (struct inferior): Forward declare.
12890 Include "common/refcounted-object.h".
12891 (current_inferior, set_current_inferior): Move declaration to
12892 before struct inferior's definition, and fix comment.
12893 (inferior): Inherit from refcounted_object. Add comments.
12894 * thread.c (switch_to_thread_no_regs): Reference the thread's
12895 inferior pointer directly instead of doing a ptid lookup.
12896 (switch_to_no_thread): New function.
12897 (switch_to_thread(thread_info *)): New function, factored out
12898 from ...
12899 (switch_to_thread(ptid_t)): ... this.
12900 (restore_current_thread): Delete.
12901 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12902 fields, and add 'inf' field.
12903 (do_restore_current_thread_cleanup): Check whether old->inf is
12904 alive instead of looking up an inferior by ptid. Use
12905 switch_to_thread and switch_to_no_thread.
12906 (restore_current_thread_cleanup_dtor): Use old->inf directly
12907 instead of lookup up an inferior by id. Decref the inferior.
12908 Don't restore 'removable'.
12909 (make_cleanup_restore_current_thread): Same the inferior pointer
12910 in old, instead of the inferior number. Incref the inferior.
12911 Don't save/clear 'removable'.
12912
12913 2017-04-19 Pedro Alves <palves@redhat.com>
12914
12915 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12916 unittests/scoped_restore-selftests.c.
12917 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12918 * common/scoped_restore.h (scoped_restore_base): Make "class".
12919 (scoped_restore_base::release): New public method.
12920 (scoped_restore_base::scoped_restore_base): New protected ctor.
12921 (scoped_restore_base::m_saved_var): New protected field.
12922 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12923 scoped_restore_base base class instead of m_saved_var directly.
12924 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12925 (scoped_restore_tmpl::scoped_restore_tmpl(const
12926 scoped_restore_tmpl<T>&)): Likewise.
12927 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12928 method.
12929 (scoped_restore_tmpl::saved_var): New method.
12930 (scoped_restore_tmpl::m_saved_var): Delete.
12931 * inferior.h (inferior::detaching): Now a bool.
12932 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12933 cleanup.
12934 * unittests/scoped_restore-selftests.c: New file.
12935
12936 2017-04-19 Pedro Alves <palves@redhat.com>
12937
12938 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12939 Re-sort in alphabetic order.
12940
12941 2017-04-18 Pedro Alves <palves@redhat.com>
12942
12943 * xml-support.c (obstack_xml_printf): Delete.
12944 * xml-support.h (obstack_xml_printf): Delete.
12945
12946 2017-04-18 Pedro Alves <palves@redhat.com>
12947
12948 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12949 vdebug, verror, body_text, start_element, end_element, name,
12950 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12951 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12952 is_xinclude>: Make private and add m_ prefix.
12953 (gdb_xml_parser::body_text): New method, based on ...
12954 (gdb_xml_body_text): ... this. Adjust.
12955 (gdb_xml_parser::vdebug): New method, based on ...
12956 (gdb_xml_debug): ... this. Adjust.
12957 (gdb_xml_parser::verror): New method, based on ...
12958 (gdb_xml_error): ... this. Adjust.
12959 (gdb_xml_parser::start_element): New method, based on ...
12960 (gdb_xml_start_element): ... this. Adjust.
12961 (gdb_xml_start_element_wrapper): Defer to
12962 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12963 (gdb_xml_parser::end_element): New method, based on ...
12964 (gdb_xml_end_element_wrapper): ... this. Adjust.
12965 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12966 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12967 (gdb_xml_parser::use_dtd): New method, based on ...
12968 (gdb_xml_use_dtd): ... this. Adjust.
12969 (gdb_xml_parser::parse): New method, based on ...
12970 (gdb_xml_parse): ... this. Adjust.
12971 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12972 (xinclude_start_include): Adjust to call the parser's name method.
12973 (xml_xinclude_default, xml_xinclude_start_doctype)
12974 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12975 method.
12976 (xml_process_xincludes): Adjust to call parser methods.
12977 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12978 declarations.
12979
12980 2017-04-18 Pedro Alves <palves@redhat.com>
12981
12982 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12983 gdb::optional<std::string>.
12984 * xml-support.c: Include <string>.
12985 (scope_level::scope_level(scope_level &&))
12986 (scope_level::~scope_level): Delete.
12987 (scope_level::body): Now a std::string.
12988 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12989 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12990 parameter.
12991 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12992 (xinclude_parsing_data::output): Now a std::string reference.
12993 (xinclude_start_include): Adjust.
12994 (xml_xinclude_default): Adjust.
12995 (xml_process_xincludes): Add 'output' parameter, and return bool.
12996 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12997 and return bool.
12998 * xml-tdesc.c: Include <unordered_map> and <string>.
12999 (tdesc_xml_cache): Delete.
13000 (tdesc_xml_cache_s): Delete.
13001 (xml_cache): Now an std::unordered_map.
13002 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13003 (target_fetch_description_xml): Change return type to
13004 gdb::optional<std::string>, and adjust.
13005 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13006 (target_fetch_description_xml): Change return type to
13007 gdb::optional<std::string>.
13008
13009 2017-04-18 Pedro Alves <palves@redhat.com>
13010
13011 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13012 unittests/optional-selftests.c.
13013 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13014 * unittests/optional-selftests.c: New file.
13015 * unittests/optional/assignment/1.cc: New file.
13016 * unittests/optional/assignment/2.cc: New file.
13017 * unittests/optional/assignment/3.cc: New file.
13018 * unittests/optional/assignment/4.cc: New file.
13019 * unittests/optional/assignment/5.cc: New file.
13020 * unittests/optional/assignment/6.cc: New file.
13021 * unittests/optional/assignment/7.cc: New file.
13022 * unittests/optional/cons/copy.cc: New file.
13023 * unittests/optional/cons/default.cc: New file.
13024 * unittests/optional/cons/move.cc: New file.
13025 * unittests/optional/cons/value.cc: New file.
13026 * unittests/optional/in_place.cc: New file.
13027 * unittests/optional/observers/1.cc: New file.
13028 * unittests/optional/observers/2.cc: New file.
13029
13030 2017-04-18 Pedro Alves <palves@redhat.com>
13031
13032 * common/gdb_optional.h: Include common/traits.h.
13033 (in_place_t): New type.
13034 (in_place): New constexpr variable.
13035 (optional::optional): Remove member initialization of
13036 m_instantiated.
13037 (optional::optional(in_place_t...)): New constructor.
13038 (optional::~optional): Use reset.
13039 (optional::optional(const optional&)): New.
13040 (optional::optional(const optional&&)): New.
13041 (optional::optional(T &)): New.
13042 (optional::optional(T &&)): New.
13043 (operator::operator=(const optional &)): New.
13044 (operator::operator=(optional &&)): New.
13045 (operator::operator= (const T &))
13046 (operator::operator= (T &&))
13047 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13048 (operator::reset): New.
13049 (operator::m_instantiated):: Add in-class initializer.
13050 * common/traits.h: Include <type_traits>.
13051 (struct And): New types.
13052
13053 2017-04-18 Pedro Alves <palves@redhat.com>
13054
13055 * xml-support.c: Include <vector>.
13056 (scope_level::scope_level(const gdb_xml_element *))
13057 (scope_level::scope_level(scope_level&&)): New.
13058 (scope_level::~scope_level): New.
13059 (scope_level_s): Delete.
13060 (gdb_xml_parser::scopes): Now a std::vector.
13061 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13062 Use std::vector.
13063 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13064 scope cleanup code.
13065 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13066 of the scopes member. Use std::vector::emplace_back.
13067
13068 2017-04-18 Pedro Alves <palves@redhat.com>
13069
13070 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13071 a bool.
13072 (gdb_xml_end_element): Change type of first parameter.
13073 (gdb_xml_cleanup): Rename to ...
13074 (gdb_xml_parser::~gdb_xml_parser): ... this.
13075 (gdb_xml_create_parser_and_cleanup): Delete with ...
13076 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13077 to this new ctor.
13078 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13079 using gdb_xml_create_parser_and_cleanup.
13080 (xinclude_parsing_data): Add ctor/dtor.
13081 (xml_xinclude_cleanup): Delete.
13082 (xml_process_xincludes): Create a local xinclude_parsing_data
13083 instead of heap-allocating one. Create a local gdb_xml_parser
13084 instead of heap-allocating one with
13085 gdb_xml_create_parser_and_cleanup.
13086
13087 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13088
13089 PR threads/20743
13090 * fbsd-nat.c (resume_one_thread_cb): Remove.
13091 (resume_all_threads_cb): Remove.
13092 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13093 iterate_over_threads.
13094
13095 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13096
13097 * NEWS: Create a new section for the next release branch.
13098 Rename the section of the current branch, now that it has
13099 been cut.
13100
13101 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13102
13103 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13104 * version.in: Bump version to 8.0.50.DATE-git.
13105
13106 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13107
13108 PR gdb/21385
13109 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13110 independently of the host, and fix build breakage on Cygwin.
13111
13112 2017-04-13 Pedro Alves <palves@redhat.com>
13113
13114 * inferior.c (free_inferior): Convert to ...
13115 (inferior::~inferior): ... this dtor.
13116 (inferior::inferior): New ctor, factored out from ...
13117 (add_inferior_silent): ... here. Allocate the inferior with a new
13118 expression.
13119 (delete_inferior): Call delete instead of free_inferior.
13120 * inferior.h (gdb_environ, continuation): Forward declare.
13121 (inferior): Now a class. Add in-class initialization to all
13122 members. Make boolean fields bool, except 'detaching'.
13123 (inferior::inferior): New explicit ctor.
13124 (inferior::~inferior): New.
13125
13126 2017-04-13 Pedro Alves <palves@redhat.com>
13127
13128 * inferior.c (init_inferior_list): Delete.
13129 * inferior.h (init_inferior_list): Delete.
13130
13131 2017-04-13 Pedro Alves <palves@redhat.com>
13132
13133 PR threads/13217
13134 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13135 (top level): Call it twice, with different thread sets.
13136
13137 2017-04-13 Pedro Alves <palves@redhat.com>
13138
13139 * thread.c: Include <algorithm>.
13140 (thread_array_cleanup): Delete.
13141 (scoped_inc_dec_ref): New class.
13142 (live_threads_count): New function.
13143 (set_thread_refcount): Delete.
13144 (tp_array_compar_ascending): Now a bool.
13145 (tp_array_compar): Convert to a std::sort comparison function.
13146 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13147 and live_threads_count.
13148
13149 2017-04-13 Pedro Alves <palves@redhat.com>
13150
13151 * infrun.c (follow_fork_inferior): Also switch the current
13152 inferior.
13153
13154 2017-04-13 Pedro Alves <palves@redhat.com>
13155
13156 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13157 before calling create_internal_breakpoint.
13158
13159 2017-04-13 Pedro Alves <palves@redhat.com>
13160
13161 * fork-child.c (execv_argv): New class.
13162 (breakup_args): Refactored as ...
13163 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13164 Copy arguments to storage and replace separators with NULL
13165 terminators in place.
13166 (escape_bang_in_quoted_argument): Adjust to return bool.
13167 (execv_argv::execv_argv): New ctor.
13168 (execv_argv::init_for_shell): New method, factored out from
13169 fork_inferior. Don't strdup strings into the vector.
13170 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13171 Remove free_vector_argv call.
13172
13173 2017-04-13 Yao Qi <yao.qi@linaro.org>
13174
13175 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13176 tdep->rx_psw_type.
13177
13178 2017-04-13 Yao Qi <yao.qi@linaro.org>
13179
13180 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13181 * rx-tdep.c (rx_gdbarch_init): Likewise.
13182
13183 2017-04-13 Pedro Alves <palves@redhat.com>
13184
13185 * breakpoint.h (struct breakpoint): Reindent.
13186
13187 2017-04-13 Pedro Alves <palves@redhat.com>
13188
13189 * breakpoint.c (bp_location): Rename to ...
13190 (bp_locations): ... this. All references updated.
13191 (bp_location_count): Rename to ...
13192 (bp_locations_count): ... this. All references updated.
13193 (bp_location_placed_address_before_address_max): Rename to ...
13194 (bp_locations_placed_address_before_address_max): ... this. All
13195 references updated.
13196 (bp_location_shadow_len_after_address_max): Rename to ...
13197 (bp_locations_shadow_len_after_address_max): ... this. All
13198 references updated.
13199 (bp_location_compare_addrs): Rename to ...
13200 (bp_locations_compare_addrs): ... this. All references updated.
13201 (bp_location_compare):Rename to ...
13202 (bp_locations_compare): ... this. All references updated.
13203 (bp_location_target_extensions_update): Rename to ...
13204 (bp_locations_target_extensions_update): ... this. All references
13205 updated.
13206
13207 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13208
13209 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13210 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13211 'sgtty.h'.
13212 * common/gdb_termios.h: New file, with parts of "terminal.h".
13213 * inflow.c: Include "gdb_termios.h".
13214 * ser-unix.c: Include "gdb_termios.h".
13215 * terminal.h: Move terminal-related defines to
13216 "common/gdb_termios.h".
13217
13218 2017-04-12 Tom Tromey <tom@tromey.com>
13219
13220 * probe.c (parse_probes): Update.
13221 * location.h (delete_event_location): Don't declare.
13222 (event_location_deleter::operator()): Update.
13223 * location.c (event_location_deleter::operator()): Rename from
13224 delete_event_location.
13225 * linespec.h (linespec_result) <location>: Change type to
13226 event_location_up.
13227 * linespec.c (canonicalize_linespec, event_location_to_sals)
13228 (decode_objc): Update.
13229 (linespec_result): Don't call delete_event_location.
13230 * breakpoint.c (create_breakpoints_sal)
13231 (bkpt_probe_create_sals_from_location)
13232 (strace_marker_create_sals_from_location): Update.
13233
13234 2017-04-12 Tom Tromey <tom@tromey.com>
13235
13236 * linespec.h (struct linespec_result): Add constructor and
13237 destructor.
13238 (init_linespec_result, destroy_linespec_result)
13239 (make_cleanup_destroy_linespec_result): Don't declare.
13240 * linespec.c (init_linespec_result): Remove.
13241 (linespec_result::~linespec_result): Rename from
13242 destroy_linespec_result. Update.
13243 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13244 Remove.
13245 * breakpoint.c (create_breakpoint, break_range_command)
13246 (decode_location_default): Update.
13247 * ax-gdb.c (agent_command_1): Update.
13248
13249 2017-04-12 Tom Tromey <tom@tromey.com>
13250
13251 * remote.c (remote_download_tracepoint): Update.
13252 * python/py-breakpoint.c (bppy_get_location): Update.
13253 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13254 (gdbscm_breakpoint_location): Update.
13255 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13256 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13257 Change type to event_location_up.
13258 * breakpoint.c (create_overlay_event_breakpoint)
13259 (create_longjmp_master_breakpoint)
13260 (create_std_terminate_master_breakpoint)
13261 (create_exception_master_breakpoint)
13262 (breakpoint_event_location_empty_p, print_breakpoint_location)
13263 (print_one_breakpoint_location, create_thread_event_breakpoint)
13264 (init_breakpoint_sal, create_breakpoint)
13265 (print_recreate_ranged_breakpoint, break_range_command)
13266 (init_ada_exception_breakpoint, say_where): Update.
13267 (base_breakpoint_dtor): Don't call delete_event_location.
13268 (bkpt_print_recreate, tracepoint_print_recreate)
13269 (dprintf_print_recreate, update_static_tracepoint)
13270 (breakpoint_re_set_default): Update.
13271
13272 2017-04-12 Tom Tromey <tom@tromey.com>
13273
13274 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13275 type of "to_do". Update.
13276 (compute_stack_depth): Use std::vector.
13277
13278 2017-04-12 Tom Tromey <tom@tromey.com>
13279
13280 * printcmd.c (find_instruction_backward): Use std::vector.
13281
13282 2017-04-12 Tom Tromey <tom@tromey.com>
13283
13284 * symfile.c (objfilep): Remove typedef.
13285 (reread_symbols): Use a std::vector.
13286
13287 2017-04-12 Tom Tromey <tom@tromey.com>
13288
13289 * mi/mi-main.c (exec_direction_forward): Remove.
13290 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13291 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13292 scoped_restore.
13293 * guile/guile.c (guile_repl_command, guile_command)
13294 (gdbscm_execute_gdb_command): Use scoped_restore.
13295 * go-exp.y (go_parse): Use scoped_restore.
13296 * d-exp.y (d_parse): Use scoped_restore.
13297 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13298 * c-exp.y (c_parse): Use scoped_restore.
13299
13300 2017-04-12 Tom Tromey <tom@tromey.com>
13301
13302 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13303 (mi_parse): Update return type.
13304 (mi_parse_free): Remove.
13305 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13306 (mi_parse::~mi_parse): Rename from mi_parse_free.
13307 (mi_parse_cleanup): Remove.
13308 (mi_parse): Return a unique_ptr. Use new.
13309 * mi/mi-main.c (mi_execute_command): Update.
13310
13311 2017-04-12 Tom Tromey <tom@tromey.com>
13312
13313 * location.c (explicit_location_lex_one): Return a
13314 unique_xmalloc_ptr.
13315 (string_to_explicit_location): Update. Remove cleanups.
13316
13317 2017-04-12 Tom Tromey <tom@tromey.com>
13318
13319 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13320 (compare_value_and_voffset): Change type. Update.
13321 (compute_vtable_size): Change type of "offset_vec".
13322 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13323 (gnuv3_get_typeid): Remove extraneous declaration.
13324
13325 2017-04-12 Tom Tromey <tom@tromey.com>
13326
13327 * charset.h (wchar_iterator): Fix comment.
13328
13329 2017-04-12 Tom Tromey <tom@tromey.com>
13330
13331 * charset.c (iconv_wrapper): New class.
13332 (cleanup_iconv): Remove.
13333 (convert_between_encodings): Use it.
13334
13335 2017-04-12 Tom Tromey <tom@tromey.com>
13336
13337 * symfile.h (increment_reading_symtab): Update type.
13338 * symfile.c (decrement_reading_symtab): Remove.
13339 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13340 * psymtab.c (psymtab_to_symtab): Update.
13341 * dwarf2read.c (dw2_instantiate_symtab): Update.
13342
13343 2017-04-12 Tom Tromey <tom@tromey.com>
13344
13345 * jit.c (struct jit_reader): Declare separately. Add constructor
13346 and destructor. Change type of "handle".
13347 (loaded_jit_reader): Define separately.
13348 (jit_reader_load): Update. New "new".
13349 (jit_reader_unload_command): Use "delete".
13350 * gdb-dlfcn.h (struct dlclose_deleter): New.
13351 (gdb_dlhandle_up): New typedef.
13352 (gdb_dlopen, gdb_dlsym): Update types.
13353 (gdb_dlclose): Remove.
13354 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13355 (gdb_dlsym): Change type of "handle".
13356 (make_cleanup_dlclose): Remove.
13357 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13358 * compile/compile-c-support.c (load_libcc): Update.
13359
13360 2017-04-12 Tom Tromey <tom@tromey.com>
13361
13362 * symtab.h (find_pcs_for_symtab_line): Change return type.
13363 * symtab.c (find_pcs_for_symtab_line): Change return type.
13364 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13365 type of "vec". Update.
13366 (ltpy_get_pcs_for_line): Update.
13367 * linespec.c (decode_digits_ordinary): Update.
13368
13369 2017-04-12 Tom Tromey <tom@tromey.com>
13370
13371 * tracepoint.c (actions_command): Update.
13372 * python/python.c (python_command, python_interactive_command):
13373 Update.
13374 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13375 * guile/guile.c (guile_command): Update.
13376 * defs.h (read_command_lines, read_command_lines_1): Return
13377 command_line_up.
13378 (command_lines_deleter): New struct.
13379 (command_line_up): New typedef.
13380 * compile/compile.c (compile_code_command)
13381 (compile_print_command): Update.
13382 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13383 command_line_up.
13384 (make_cleanup_free_command_lines): Remove.
13385 * cli/cli-script.c (get_command_line, read_command_lines_1)
13386 (copy_command_lines): Return command_line_up.
13387 (while_command, if_command, read_command_lines, define_command)
13388 (document_command): Update.
13389 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13390 Remove.
13391 * breakpoint.h (breakpoint_set_commands): Change type of
13392 "commands".
13393 * breakpoint.c (breakpoint_set_commands): Change type of
13394 "commands". Update.
13395 (do_map_commands_command, update_dprintf_command_list)
13396 (create_tracepoint_from_upload): Update.
13397
13398 2017-04-12 Tom Tromey <tom@tromey.com>
13399
13400 * tracepoint.c (scope_info): Update.
13401 * spu-tdep.c (spu_catch_start): Update.
13402 * python/python.c (gdbpy_decode_line): Update.
13403 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13404 * python/py-breakpoint.c (bppy_init): Update.
13405 * probe.c (parse_probes): Update.
13406 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13407 * location.h (event_location_deleter): New struct.
13408 (event_location_up): New typedef.
13409 (new_linespec_location, new_address_location, new_probe_location)
13410 (new_explicit_location, copy_event_location)
13411 (string_to_event_location, string_to_event_location_basic)
13412 (string_to_explicit_location): Update return type.
13413 (make_cleanup_delete_event_location): Remove.
13414 * location.c (new_linespec_location, new_address_location)
13415 (new_probe_location, new_explicit_location, copy_event_location):
13416 Return event_location_up.
13417 (delete_event_location_cleanup)
13418 (make_cleanup_delete_event_location): Remove.
13419 (string_to_explicit_location, string_to_event_location_basic)
13420 (string_to_event_location): Return event_location_up.
13421 * linespec.c (canonicalize_linespec, event_location_to_sals)
13422 (decode_line_with_current_source)
13423 (decode_line_with_last_displayed, decode_objc): Update.
13424 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13425 * completer.c (location_completer): Update.
13426 * cli/cli-cmds.c (edit_command, list_command): Update.
13427 * breakpoint.c (create_overlay_event_breakpoint)
13428 (create_longjmp_master_breakpoint)
13429 (create_std_terminate_master_breakpoint)
13430 (create_exception_master_breakpoint)
13431 (create_thread_event_breakpoint): Update.
13432 (init_breakpoint_sal): Update. Remove some dead code.
13433 (create_breakpoint_sal): Change type of "location". Update.
13434 (create_breakpoints_sal, create_breakpoint, break_command_1)
13435 (dprintf_command, break_range_command, until_break_command)
13436 (init_ada_exception_breakpoint)
13437 (strace_marker_create_sals_from_location)
13438 (update_static_tracepoint, trace_command, ftrace_command)
13439 (strace_command, create_tracepoint_from_upload): Update.
13440 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13441 * ax-gdb.c (agent_command_1): Update.
13442
13443 2017-04-12 Pedro Alves <palves@redhat.com>
13444
13445 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13446 * configure.tgt: Handle i[34567]86-*-go32* and
13447 i[34567]86-*-msdosdjgpp*.
13448 * i386-tdep.c (i386_svr4_reg_to_regnum):
13449 Make extern.
13450 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13451 i386-go32-tdep.c.
13452 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13453 * i386-go32-tdep.c: New file.
13454 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13455 declarations.
13456
13457 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13458
13459 * aix-thread.c (pd_status2str): Change return type to const char *.
13460
13461 2017-04-12 Pedro Alves <palves@redhat.com>
13462
13463 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13464 calls to set_gdbarch_gnu_triplet_regexp.
13465
13466 2017-04-12 Pedro Alves <palves@redhat.com>
13467
13468 PR gdb/21323
13469 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13470 New enum value.
13471 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13472 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13473 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13474 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13475 * gdbarch.h, gdbarch.c: Regenerate.
13476 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13477 gdbarch_wchar_bit and gdbarch_wchar_signed.
13478 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13479 * arm-tdep.c (arm_gdbarch_init): Likewise.
13480 * avr-tdep.c (avr_gdbarch_init): Likewise.
13481 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13482 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13483 * i386-tdep.c (i386_go32_init_abi): Likewise.
13484 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13485 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13486 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13487 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13488 * sh-tdep.c (sh_gdbarch_init): Likewise.
13489 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13490 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13491 * windows-tdep.c (windows_init_abi): Likewise.
13492 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13493
13494 2017-04-12 Pedro Alves <palves@redhat.com>
13495
13496 PR c++/21323
13497 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13498 cplus_primitive_type_char32_t>: New enum values.
13499 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13500 and cplus_primitive_type_char32_t.
13501 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13502 32, use the archtecture's built-in type for char16_t and char32_t,
13503 respectively. Otherwise, fallback to init_integer_type as before,
13504 but make the type unsigned, and issue a complaint.
13505 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13506
13507 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13508
13509 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13510 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13511
13512 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13513
13514 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13515 'const char *'.
13516
13517 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13518
13519 * common/common-utils.c (free_vector_argv): New function.
13520 * common/common-utils.h: Include <vector>.
13521 (free_vector_argv): New prototype.
13522 * darwin-nat.c (darwin_create_inferior): Rewrite function
13523 prototype in order to constify "exec_file" and accept a
13524 "std::string" for "allargs".
13525 * fork-child.c: Include <vector>.
13526 (breakup_args): Rewrite function, using C++.
13527 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13528 and accept "std::string" for "allargs". Update the code to
13529 calculate "argv" based on "allargs". Update calls to "exec_fun"
13530 and "execvp".
13531 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13532 order to constify "exec_file" and accept a "std::string" for
13533 "allargs".
13534 * go32-nat.c (go32_create_inferior): Likewise.
13535 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13536 * infcmd.c (run_command_1): Constify "exec_file". Use
13537 "std::string" for inferior arguments.
13538 * inferior.h (fork_inferior): Update prototype.
13539 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13540 prototype in order to constify "exec_file" and accept a
13541 "std::string" for "allargs".
13542 * nto-procfs.c (procfs_create_inferior): Likewise.
13543 * procfs.c (procfs_create_inferior): Likewise.
13544 * remote-sim.c (gdbsim_create_inferior): Likewise.
13545 * remote.c (extended_remote_run): Update code to accept
13546 "std::string" as argument.
13547 (extended_remote_create_inferior): Rewrite function prototype in
13548 order to constify "exec_file" and accept a "std::string" for
13549 "allargs".
13550 * rs6000-nat.c (super_create_inferior): Likewise.
13551 (rs6000_create_inferior): Likewise.
13552 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13553 * windows-nat.c (windows_create_inferior): Likewise.
13554
13555 2017-04-11 Pedro Alves <palves@redhat.com>
13556
13557 * thread.c: Fix whitespace throughout.
13558
13559 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13560
13561 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13562
13563 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13564
13565 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13566
13567 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13568
13569 PR gdb/21364
13570 * osdata.c (info_osdata): Check if 'type' is an empty string
13571 instead of NULL.
13572
13573 2017-04-10 Pedro Alves <palves@redhat.com>
13574
13575 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13576 (ptid_to_global_thread_id, in_thread_list)
13577 (do_captured_list_thread_ids, set_resumed, set_running)
13578 (set_executing, set_stop_requested, finish_thread_state)
13579 (validate_registers_access, can_access_registers_ptid)
13580 (print_thread_info_1, switch_to_thread)
13581 (do_restore_current_thread_cleanup)
13582 (make_cleanup_restore_current_thread, thread_command)
13583 (thread_name_command): Use operator== instead of ptid_equal.
13584
13585 2017-04-10 Pedro Alves <palves@redhat.com>
13586
13587 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13588 (current_thread_cleanup_chain): Delete.
13589 (restore_current_thread_cleanup_dtor)
13590 (make_cleanup_restore_current_thread): Remove references to
13591 current_thread_cleanup_chain.
13592
13593 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13594
13595 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13596 REG_UNKNOWN.
13597
13598 2017-04-10 Yao Qi <yao.qi@linaro.org>
13599
13600 PR gdb/19942
13601 * gdbthread.h (thread_info::deletable): New method.
13602 (thread_info::incref): New method.
13603 (thread_info::decref): New method.
13604 (thread_info::refcount): Move it to private.
13605 * infrun.c (save_stop_context): Call inc_refcount.
13606 (release_stop_context_cleanup): Likewise.
13607 * thread.c (set_thread_exited): New function.
13608 (init_thread_list): Delete "tp" only it is deletable, otherwise
13609 call set_thread_exited.
13610 (delete_thread_1): Call set_thread_exited.
13611 (current_thread_cleanup) <inferior_pid>: Remove.
13612 <thread>: New field.
13613 (restore_current_thread_ptid_changed): Removed.
13614 (do_restore_current_thread_cleanup): Adjust.
13615 (restore_current_thread_cleanup_dtor): Don't call
13616 find_thread_ptid.
13617 (set_thread_refcount): Use dec_refcount.
13618 (make_cleanup_restore_current_thread): Adjust.
13619 (thread_apply_all_command): Call inc_refcount.
13620 (_initialize_thread): Don't call
13621 observer_attach_thread_ptid_changed.
13622
13623 2017-04-10 Yao Qi <yao.qi@linaro.org>
13624
13625 * thread.c (delete_thread_1): Hoist code on marking thread as
13626 exited.
13627
13628 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13629
13630 * windows-nat.c (windows_detach): Initialize ptid with
13631 minus_one_ptid.
13632
13633 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13634
13635 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13636
13637 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13638
13639 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13640 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13641 (bfin_pseudo_register_write): Likewise
13642
13643 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13644
13645 * common/ptid.h (struct ptid): Change to...
13646 (class ptid_t): ... this.
13647 <ptid_t>: New constructors.
13648 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13649 matches>: New methods.
13650 <make_null, make_minus_one>: New static methods.
13651 <pid>: Rename to...
13652 <m_pid>: ...this.
13653 <lwp>: Rename to...
13654 <m_lwp>: ...this.
13655 <tid>: Rename to...
13656 <m_tid>: ...this.
13657 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13658 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13659 as references, move comment to class ptid_t.
13660 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13661 ptid_t static methods.
13662 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13663 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13664 Take ptid arguments as references, implement using ptid_t methods.
13665 * unittests/ptid-selftests.c: New file.
13666 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13667 unittests/ptid-selftests.c.
13668 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13669
13670 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13671
13672 * python/python.c (python_run_simple_file): Cast mode literal to
13673 non-const char pointer as expected by PyFile_FromString.
13674
13675 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13676
13677 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13678 minus_one_ptid and null_ptid.
13679
13680 2017-04-05 Pedro Alves <palves@redhat.com>
13681
13682 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13683 * configure: Regenerate.
13684
13685 2017-04-05 Pedro Alves <palves@redhat.com>
13686
13687 * ada-exp.y (yyerror): Constify.
13688 * ada-lang.c (bound_name, get_selections)
13689 (ada_variant_discrim_type)
13690 (ada_variant_discrim_name, ada_value_struct_elt)
13691 (ada_lookup_struct_elt_type, is_unchecked_variant)
13692 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13693 (catch_ada_exception_command_split)
13694 (catch_ada_assert_command_split, catch_assert_command)
13695 (ada_op_name): Constify.
13696 * ada-lang.h (ada_yyerror, get_selections)
13697 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13698 * arc-tdep.c (arc_print_frame_cache): Constify.
13699 * arm-tdep.c (arm_skip_stub): Constify.
13700 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13701 (gen_aggregate_elt_ref): Constify.
13702 * bcache.c (print_bcache_statistics): Constify.
13703 * bcache.h (print_bcache_statistics): Constify.
13704 * break-catch-throw.c (catch_exception_command_1):
13705 * breakpoint.c (struct ep_type_description::description):
13706 Constify.
13707 (add_solib_catchpoint): Constify.
13708 (catch_fork_command_1): Add cast.
13709 (add_catch_command): Constify.
13710 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13711 Constify.
13712 * bsd-uthread.c (bsd_uthread_state): Constify.
13713 * buildsym.c (patch_subfile_names): Constify.
13714 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13715 Constify.
13716 * c-exp.y (yyerror): Constify.
13717 (token::oper): Constify.
13718 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13719 * c-varobj.c (cplus_describe_child): Constify.
13720 * charset.c (find_charset_names): Add cast.
13721 (find_charset_names): Constify array and add const_cast.
13722 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13723 (edit_command): Constify.
13724 * cli/cli-decode.c (lookup_cmd): Constify.
13725 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13726 Constify.
13727 (struct dump_context): Constify.
13728 (add_dump_command, restore_command): Constify.
13729 * cli/cli-script.c (get_command_line): Constify.
13730 * cli/cli-script.h (get_command_line): Constify.
13731 * cli/cli-utils.c (check_for_argument): Constify.
13732 * cli/cli-utils.h (check_for_argument): Constify.
13733 * coff-pe-read.c (struct read_pe_section_data): Constify.
13734 * command.h (lookup_cmd): Constify.
13735 * common/print-utils.c (decimal2str): Constify.
13736 * completer.c (gdb_print_filename): Constify.
13737 * corefile.c (set_gnutarget): Constify.
13738 * cp-name-parser.y (yyerror): Constify.
13739 * cp-valprint.c (cp_print_class_member): Constify.
13740 * cris-tdep.c (cris_register_name, crisv32_register_name):
13741 Constify.
13742 * d-exp.y (yyerror): Constify.
13743 (struct token::oper): Constify.
13744 * d-lang.h (d_yyerror): Constify.
13745 * dbxread.c (struct header_file_location::name): Constify.
13746 (add_old_header_file, add_new_header_file, last_function_name)
13747 (dbx_next_symbol_text, add_bincl_to_list)
13748 (find_corresponding_bincl_psymtab, set_namestring)
13749 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13750 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13751 * defs.h (command_line_input, print_address_symbolic)
13752 (deprecated_readline_begin_hook): Constify.
13753 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13754 Constify.
13755 * event-top.c (handle_line_of_input): Constify and add cast.
13756 * exceptions.c (catch_errors): Constify.
13757 * exceptions.h (catch_errors): Constify.
13758 * expprint.c (print_subexp_standard, op_string, op_name)
13759 (op_name_standard, dump_raw_expression, dump_raw_expression):
13760 * expression.h (op_name, op_string, dump_raw_expression):
13761 Constify.
13762 * f-exp.y (yyerror): Constify.
13763 (struct token::oper): Constify.
13764 (struct f77_boolean_val::name): Constify.
13765 * f-lang.c (f_word_break_characters): Constify.
13766 * f-lang.h (f_yyerror): Constify.
13767 * fork-child.c (fork_inferior): Add cast.
13768 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13769 (new_variant): Constify.
13770 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13771 * gdbarch.c: Regenerate.
13772 * gdbcore.h (set_gnutarget): Constify.
13773 * go-exp.y (yyerror): Constify.
13774 (token::oper): Constify.
13775 * go-lang.h (go_yyerror): Constify.
13776 * go32-nat.c (go32_sysinfo): Constify.
13777 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13778 * guile/scm-cmd.c (cmdscm_function): Constify.
13779 * guile/scm-param.c (pascm_param_value): Constify.
13780 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13781 (h8300sx_register_name): Constify.
13782 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13783 Constify.
13784 * ia64-tdep.c (ia64_register_names): Constify.
13785 * infcmd.c (construct_inferior_arguments): Constify.
13786 (path_command, attach_post_wait): Constify.
13787 * language.c (show_range_command, show_case_command)
13788 (unk_lang_error): Constify.
13789 * language.h (language_defn::la_error)
13790 (language_defn::la_name_of_this): Constify.
13791 * linespec.c (decode_line_2): Constify.
13792 * linux-thread-db.c (thread_db_err_str): Constify.
13793 * lm32-tdep.c (lm32_register_name): Constify.
13794 * m2-exp.y (yyerror): Constify.
13795 * m2-lang.h (m2_yyerror): Constify.
13796 * m32r-tdep.c (m32r_register_names): Constify and make static.
13797 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13798 * m88k-tdep.c (m88k_register_name): Constify.
13799 * macroexp.c (appendmem): Constify.
13800 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13801 (upgrade_type, parse_external, parse_partial_symbols)
13802 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13803 (new_symbol): Constify.
13804 * memattr.c (mem_info_command): Constify.
13805 * mep-tdep.c (register_name_from_keyword): Constify.
13806 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13807 Constify.
13808 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13809 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13810 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13811 cast.
13812 (mi_execute_async_cli_command): Constify.
13813 * mips-tdep.c (mips_register_name): Constify.
13814 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13815 (am33_register_name, am33_2_register_name)
13816 * moxie-tdep.c (moxie_register_names): Constify.
13817 * nat/linux-osdata.c (osdata_type): Constify fields.
13818 * nto-tdep.c (nto_parse_redirection): Constify.
13819 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13820 (lookup_child_selector): Constify.
13821 (objc_methcall::name): Constify.
13822 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13823 (lookup_struct_typedef): Constify.
13824 * objfiles.c (pc_in_section): Constify.
13825 * objfiles.h (pc_in_section): Constify.
13826 * p-exp.y (struct token::oper): Constify.
13827 (yyerror): Constify.
13828 * p-lang.h (pascal_yyerror): Constify.
13829 * parser-defs.h (op_name_standard): Constify.
13830 (op_print::string): Constify.
13831 (exp_descriptor::op_name): Constify.
13832 * printcmd.c (print_address_symbolic): Constify.
13833 * psymtab.c (print_partial_symbols): Constify.
13834 * python/py-breakpoint.c (stop_func): Constify.
13835 (bppy_get_expression): Constify.
13836 * python/py-cmd.c (cmdpy_completer::name): Constify.
13837 (cmdpy_function): Constify.
13838 * python/py-event.c (evpy_add_attribute)
13839 (gdbpy_initialize_event_generic): Constify.
13840 * python/py-event.h (evpy_add_attribute)
13841 (gdbpy_initialize_event_generic): Constify.
13842 * python/py-evts.c (add_new_registry): Constify.
13843 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13844 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13845 * python/py-inferior.c (get_buffer): Add cast.
13846 * python/py-param.c (parm_constant::name): Constify.
13847 * python/py-unwind.c (fprint_frame_id): Constify.
13848 * python/python.c (gdbpy_parameter_value): Constify.
13849 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13850 * remote.c (memory_packet_config::name): Constify.
13851 (show_packet_config_cmd, remote_write_bytes)
13852 (remote_buffer_add_string):
13853 * reverse.c (exec_reverse_once): Constify.
13854 * rs6000-tdep.c (variant::name, variant::description): Constify.
13855 * rust-exp.y (rustyyerror): Constify.
13856 * rust-lang.c (rust_op_name): Constify.
13857 * rust-lang.h (rustyyerror): Constify.
13858 * serial.h (serial_ops::name): Constify.
13859 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13860 (sh_sh3e_register_name, sh_sh2e_register_name)
13861 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13862 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13863 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13864 (sh_sh4al_dsp_register_name): Constify.
13865 * sh64-tdep.c (sh64_register_name): Constify.
13866 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13867 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13868 * stabsread.c (patch_block_stabs, read_type_number)
13869 (ref_map::stabs, ref_add, process_reference)
13870 (symbol_reference_defined, define_symbol, define_symbol)
13871 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13872 (read_one_struct_field, read_struct_fields, read_baseclasses)
13873 (read_tilde_fields, read_struct_type, read_array_type)
13874 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13875 (read_huge_number, read_range_type, read_args, common_block_start)
13876 (find_name_end): Constify.
13877 * stabsread.h (common_block_start, define_symbol)
13878 (process_one_symbol, symbol_reference_defined, ref_add):
13879 * symfile.c (get_section_index, add_symbol_file_command):
13880 * symfile.h (get_section_index): Constify.
13881 * target-descriptions.c (tdesc_type::name): Constify.
13882 (tdesc_free_type): Add cast.
13883 * target.c (find_default_run_target):
13884 (add_deprecated_target_alias, find_default_run_target)
13885 (target_announce_detach): Constify.
13886 (do_option): Constify.
13887 * target.h (add_deprecated_target_alias): Constify.
13888 * thread.c (print_thread_info_1): Constify.
13889 * top.c (deprecated_readline_begin_hook, command_line_input):
13890 Constify.
13891 (init_main): Add casts.
13892 * top.h (handle_line_of_input): Constify.
13893 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13894 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13895 (tfind_command): Rename to ...
13896 (tfind_command_1): ... this and constify.
13897 (tfind_command): New function.
13898 (tfind_end_command, tfind_start_command): Adjust.
13899 (encode_source_string): Constify.
13900 * tracepoint.h (encode_source_string): Constify.
13901 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13902 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13903 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13904 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13905 * tui/tui-win.c (parse_scrolling_args): Constify.
13906 * tui/tui-windata.c (tui_erase_data_content): Constify.
13907 * tui/tui-windata.h (tui_erase_data_content): Constify.
13908 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13909 * tui/tui.c (tui_enable): Add cast.
13910 * utils.c (defaulted_query): Constify.
13911 (init_page_info): Add cast.
13912 (puts_debug, subset_compare): Constify.
13913 * utils.h (subset_compare): Constify.
13914 * varobj.c (varobj_format_string): Constify.
13915 * varobj.h (varobj_format_string): Constify.
13916 * vax-tdep.c (vax_register_name): Constify.
13917 * windows-nat.c (windows_detach): Constify.
13918 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13919 * xml-support.c (gdb_xml_end_element): Constify.
13920 * xml-tdesc.c (tdesc_start_reg): Constify.
13921 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13922 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13923 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13924
13925 2017-04-05 Pedro Alves <palves@redhat.com>
13926
13927 * proc-api.c (struct trans): Constify.
13928 (procfs_note): Constify.
13929 * proc-events.c (struct trans, syscall_table):
13930 * proc-flags.c (struct trans): Constify.
13931 * proc-utils.h (procfs_note): Constify.
13932 * proc-why.c (struct trans): Constify.
13933 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13934 (procfs_detach): Constify.
13935 * sol-thread.c (struct string_map): Constify.
13936 (td_err_string, td_state_string): Constify.
13937
13938 2017-04-05 Pedro Alves <palves@redhat.com>
13939
13940 * proc-api.c (procfs_filename): Don't initialize
13941 procfs_filename.
13942 (prepare_to_trace): Assume procfs_filename is non-NULL.
13943 (_initialize_proc_api): Give procfs_filename a default value here.
13944
13945 2017-04-05 Pedro Alves <palves@redhat.com>
13946
13947 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13948 'cond_string' parameter.
13949 (extract_exception_regexp): Constify 'string' parameter.
13950 (catch_exception_command_1): Constify.
13951 * breakpoint.c (init_catchpoint)
13952 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13953 parameter.
13954 (ep_parse_optional_if_clause, catch_fork_command_1)
13955 (catch_exec_command_1): Constify.
13956 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13957 parameter.
13958 (ep_parse_optional_if_clause): Constify.
13959 * cli/cli-utils.c (remove_trailing_whitespace)
13960 (check_for_argument): Constify.
13961 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13962 non-const overload.
13963 (check_for_argument): Likewise.
13964
13965 2017-04-05 Pedro Alves <palves@redhat.com>
13966
13967 * event-top.c (command_line_handler): Add cast to execute_command
13968 call.
13969 * record-btrace.c (cmd_record_btrace_bts_start)
13970 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13971 (cmd_record_btrace_start): Add cast to execute_command call.
13972 * record-full.c (record_full_goto_insn):
13973 * record.c (record_start, record_stop): Add cast to
13974 execute_command_to_string calls.
13975 (cmd_record_start): Add cast to execute_command calls.
13976
13977 2017-04-05 Pedro Alves <palves@redhat.com>
13978
13979 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13980 static inline function.
13981 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13982 array and use gdb_PyArg_ParseTupleAndKeywords.
13983 * python/py-cmd.c (cmdpy_init): Likewise.
13984 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13985 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13986 (infpy_search_memory): Likewise.
13987 * python/py-objfile.c (objfpy_add_separate_debug_file)
13988 (gdbpy_lookup_objfile): Likewise.
13989 * python/py-symbol.c (gdbpy_lookup_symbol)
13990 (gdbpy_lookup_global_symbol): Likewise.
13991 * python/py-type.c (gdbpy_lookup_type): Likewise.
13992 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13993 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13994 Likewise.
13995
13996 2017-04-05 Pedro Alves <palves@redhat.com>
13997
13998 * python/python-internal.h (gdb_PyGetSetDef): New type.
13999 * python/py-block.c (block_object_getset)
14000 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14001 * python/py-event.c (event_object_getset)
14002 (finish_breakpoint_object_getset): Likewise.
14003 * python/py-inferior.c (inferior_object_getset): Likewise.
14004 * python/py-infthread.c (thread_object_getset): Likewise.
14005 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14006 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14007 * python/py-objfile.c (objfile_getset): Likewise.
14008 * python/py-progspace.c (pspace_getset): Likewise.
14009 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14010 Likewise.
14011 * python/py-record.c (recpy_record_getset): Likewise.
14012 * python/py-symbol.c (symbol_object_getset): Likewise.
14013 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14014 Likewise.
14015 * python/py-type.c (type_object_getset, field_object_getset):
14016 Likewise.
14017 * python/py-value.c (value_object_getset): Likewise.
14018
14019 2017-04-05 Pedro Alves <palves@redhat.com>
14020
14021 * python/python-internal.h (gdb_PyObject_CallMethod)
14022 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14023 New functions.
14024 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14025 (PySys_GetObject, PySys_SetPath): New macros.
14026
14027 2017-04-05 Pedro Alves <palves@redhat.com>
14028
14029 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14030 info_osdata_command.
14031 * osdata.c (info_osdata_command): Rename to ...
14032 (info_osdata): ... this. Constify 'type' parameter, and remove
14033 the 'from_tty' parameter. Accept NULL TYPE.
14034 (info_osdata_command): New function.
14035 * osdata.h (info_osdata_command): Remove declaration.
14036 (info_osdata): New declaration.
14037
14038 2017-04-05 Pedro Alves <palves@redhat.com>
14039
14040 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14041 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14042 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14043 parameter.
14044 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14045 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14046 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14047 parameter.
14048 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14049 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14050 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14051 (mi_cmd_file_list_exec_source_files)
14052 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14053 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14054 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14055 parameter.
14056 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14057 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14058 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14059 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14060 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14061 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14062 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14063 'command' parameter.
14064 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14065 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14066 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14067 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14068 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14069 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14070 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14071 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14072 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14073 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14074 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14075 parameter.
14076 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14077 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14078 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14079 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14080 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14081 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14082 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14083 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14084 (mi_cmd_data_list_changed_registers)
14085 (mi_cmd_data_write_register_values)
14086 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14087 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14088 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14089 (mi_cmd_list_features, mi_cmd_list_target_features)
14090 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14091 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14092 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14093 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14094 (mi_cmd_trace_frame_collected): Constify 'command'
14095 parameter.
14096 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14097 'command' parameter.
14098
14099 2017-04-05 Pedro Alves <palves@redhat.com>
14100
14101 * ada-lang.c (ada_completer_word_break_characters): Now a const
14102 array.
14103 (ada_get_gdb_completer_word_break_characters): Constify.
14104 * completer.c (gdb_completer_command_word_break_characters)
14105 (gdb_completer_file_name_break_characters)
14106 (gdb_completer_quote_characters): Now const arrays.
14107 (get_gdb_completer_quote_characters): Constify.
14108 (set_rl_completer_word_break_characters): New function.
14109 (set_gdb_completion_word_break_characters)
14110 (complete_line_internal): Use it.
14111 * completer.h (get_gdb_completer_quote_characters): Constify.
14112 (set_rl_completer_word_break_characters): Declare.
14113 * f-lang.c (f_word_break_characters): Constify.
14114 * language.c (default_word_break_characters): Constify.
14115 * language.h (language_defn::la_word_break_characters): Constify.
14116 (default_word_break_characters): Constify.
14117 * top.c (init_main): Use set_rl_completer_word_break_characters.
14118
14119 2017-04-05 Pedro Alves <palves@redhat.com>
14120
14121 * aix-thread.c (aix_thread_pid_to_str)
14122 (aix_thread_extra_thread_info): Constify.
14123 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14124 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14125 (bsd_uthread_pid_to_str): Constify.
14126 * corelow.c (core_pid_to_str): Constify.
14127 * darwin-nat.c (darwin_pid_to_str): Constify.
14128 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14129 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14130 Constify.
14131 * gnu-nat.c (gnu_pid_to_str): Constify.
14132 * go32-nat.c (go32_pid_to_str): Constify.
14133 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14134 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14135 * inferior.c (inferior_pid_to_str): Constify.
14136 * linux-nat.c (linux_nat_pid_to_str): Constify.
14137 * linux-tdep.c (linux_core_pid_to_str): Constify.
14138 * linux-thread-db.c (thread_db_pid_to_str)
14139 (thread_db_extra_thread_info): Constify.
14140 * nto-tdep.c (nto_extra_thread_info): Constify.
14141 * nto-tdep.h (nto_extra_thread_info): Constify.
14142 * obsd-nat.c (obsd_pid_to_str): Constify.
14143 * procfs.c (procfs_pid_to_str): Constify.
14144 * ravenscar-thread.c (ravenscar_extra_thread_info)
14145 (ravenscar_pid_to_str): Constify.
14146 * remote-sim.c (gdbsim_pid_to_str): Constify.
14147 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14148 Constify.
14149 * sol-thread.c (solaris_pid_to_str): Constify.
14150 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14151 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14152 * target.c (default_pid_to_str, target_pid_to_str)
14153 (normal_pid_to_str, default_pid_to_str): Constify.
14154 * target.h (target_ops::to_pid_to_str)
14155 (target_ops::to_extra_thread_info): Constify.
14156 (target_pid_to_str, normal_pid_to_str): Constify.
14157 * windows-nat.c (windows_pid_to_str): Constify.
14158 * gdbarch.sh (core_pid_to_str): Constify.
14159 * target-delegates.c: Regenerate.
14160 * gdbarch.h, gdbarch.c: Regenerate.
14161
14162 2017-04-05 Pedro Alves <palves@redhat.com>
14163
14164 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14165 the memory of the temporary warning_pre_print override.
14166 * utils.c (warning_pre_print): Constify.
14167 * utils.h (warning_pre_print): Constify.
14168
14169 2017-04-05 Pedro Alves <palves@redhat.com>
14170
14171 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14172 (shell_command): New function.
14173 (make_command): Use std::string.
14174 (init_cli_cmds): Register shell_command instead of shell_escape.
14175
14176 2017-04-05 Pedro Alves <palves@redhat.com>
14177
14178 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14179 * tracepoint.c (default_collect): Don't initialize.
14180
14181 2017-04-05 Pedro Alves <palves@redhat.com>
14182
14183 * macroexp.c (macro_buffer::shared): Now a bool.
14184 (init_buffer): Update.
14185 (init_shared_buffer): Constify 'addr' parameter.
14186 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14187 casts.
14188
14189 2017-04-05 Pedro Alves <palves@redhat.com>
14190
14191 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14192 * disasm.c (set_disassembler_options): Constify local.
14193 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14194
14195 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14196
14197 PR gdb/21352
14198 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14199 option.
14200
14201 2017-04-05 Yao Qi <yao.qi@linaro.org>
14202
14203 * frame.c (frame_unwind_register_unsigned): Call
14204 frame_unwind_register_value.
14205
14206 2017-04-05 Yao Qi <yao.qi@linaro.org>
14207
14208 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14209 Use gdb_test_multiple, and don't match anchor.
14210
14211 2017-04-05 Pedro Alves <palves@redhat.com>
14212
14213 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14214 (Write After Approval): Remove Simon Marchi.
14215
14216 2017-04-05 Pedro Alves <palves@redhat.com>
14217
14218 * common/gdb_optional.h (optional::optional): Make constexpr and
14219 initialize m_dummy.
14220
14221 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14222
14223 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14224 (amd64fbsd_jmp_buf_reg_offset): Remove.
14225 (amd64fbsd_supply_uthread): Remove function.
14226 (amd64fbsd_collect_uthread): Remove function.
14227 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14228 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14229 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14230 (fbsd-nat.c): Update comment.
14231 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14232 (i386fbsd_jmp_buf_reg_offset): Remove.
14233 (i386fbsd_supply_uthread): Remove function.
14234 (i386fbsd_collect_uthread): Remove function.
14235 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14236
14237 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14238
14239 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14240 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14241 * NEWS: Mention that support for FreeBSD/alpha was removed.
14242 * alpha-fbsd-tdep.c: Delete file.
14243 * config/alpha/fbsd.mh: Delete file.
14244 * configure.host: Delete alpha*-*-freebsd* and
14245 alpha*-*-kfreebsd*-gnu.
14246 * configure.tgt: Delete alpha*-*-freebsd* and
14247 alpha*-*-kfreebsd*-gnu.
14248
14249 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14250
14251 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14252 amd64bsd_store_inferior_registers): Use ptid from regcache.
14253
14254 2017-04-04 Pedro Alves <palves@redhat.com>
14255
14256 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14257 data fields, make them private and add "m_" prefixes.
14258 (lnp_state_machine::lnp_state_machine): New ctor.
14259 (record_line, check_line_address, handle_set_discriminator)
14260 (handle_set_address, handle_advance_pc, handle_special_opcode)
14261 (handle_advance_line, handle_set_file, handle_negate_stmt)
14262 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14263 (end_sequence, advance_line): New methods.
14264 (m_gdbarch, m_record_lines_p): New fields.
14265 (lnp_reader_state): Delete.
14266 (dwarf_record_line): Rename to ...
14267 (lnp_state_machine::record_line): ... adjust.
14268 (init_lnp_state_machine): Delete.
14269 (lnp_state_machine::lnp_state_machine): New.
14270 (check_line_address): Rename to ...
14271 (lnp_state_machine::check_line_address): This.
14272 (dwarf_decode_lines_1): Remove reference to "reader_state".
14273 Adjust lnp_state_machine having a non-default ctor. Use bool.
14274 State machine internal state manipulation moved to
14275 lnp_state_machine methods.
14276
14277 2017-04-04 Pedro Alves <palves@redhat.com>
14278
14279 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14280 unittests/offset-type-selftests.c.
14281 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14282 * common/offset-type.h: New file.
14283 * common/preprocessor.h: New file.
14284 * common/traits.h: New file.
14285 * common/valid-expr.h: New file.
14286 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14287 sect_offset and cu_offset strong typedefs throughout.
14288 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14289 typedefs throughout.
14290 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14291 sect_offset and cu_offset strong typedefs throughout.
14292 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14293 typedefs throughout.
14294 * gdbtypes.h: Include "common/offset-type.h".
14295 (cu_offset): Now an offset type (strong typedef) instead of a
14296 struct.
14297 (sect_offset): Likewise.
14298 (union call_site_parameter_u): Rename "param_offset" field to
14299 "param_cu_off".
14300 * unittests/offset-type-selftests.c: New file.
14301
14302 2017-04-04 Pedro Alves <palves@redhat.com>
14303
14304 * common/underlying.h: New file.
14305 * dwarf2read.c: Include "common/gdb_optional.h" and
14306 "common/underlying.h".
14307 (dir_index, file_name_index): New types.
14308 (file_entry): Use them.
14309 (file_entry::include): Use to_underlying.
14310 (line_header::add_file_name): Use dir_index.
14311 (read_formatted_entries): Use gdb::optional. Read form before
14312 writting to file_entry.
14313 (dwarf_decode_line_header): Use dir_index.
14314 (lnp_state_machine::current_file): Use to_underlying.
14315 (lnp_state_machine::file): Change type to file_name_index.
14316 (dwarf_record_line): Use to_underlying.
14317 (init_lnp_state_machine): Use file_name_index.
14318 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14319
14320 2017-04-04 Pedro Alves <palves@redhat.com>
14321
14322 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14323 operator bool, has_value and get methods.
14324
14325 2017-04-04 Pedro Alves <palves@redhat.com>
14326
14327 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14328 fields.
14329 (line_header): Initialize all data fields. Change type of
14330 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14331 Change type of include_dirs to std::vector<const char *>. Remove
14332 num_include_dirs, include_dirs_size. Change type of file_names to
14333 std::vector<file_entry>. Remove num_file_names, file_names_size.
14334 (line_header::line_header): New.
14335 (line_header::add_include_dir, line_header::add_file_name): New
14336 methods.
14337 (line_header::include_dir_at): Remove NULL check.
14338 (line_header::file_name_at): Add const overload.
14339 (line_header_up): New unique_ptr typedef.
14340 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14341 std::vector. Remove free_line_header call.
14342 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14343 free_line_header call.
14344 (free_cu_line_header): Delete.
14345 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14346 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14347 Adjust to use std::vector.
14348 (free_line_header): Delete.
14349 (free_line_header_voidp): Use delete.
14350 (add_include_dir): Replace with ...
14351 (line_header::add_include_dir): ... this method. Use std::vector.
14352 (add_file_name): Replace with ...
14353 (line_header::add_file_name): ... this method. Use std::vector.
14354 (add_include_dir_stub): Delete.
14355 (read_formatted_entries): Remove memset.
14356 (dwarf_decode_line_header): Return a line_header_up instead of a
14357 raw pointer. Remove cleanup handling. Pass lambdas to
14358 read_formatted_entries. Adjust to use line_header methods.
14359 (dwarf_decode_lines_1): Adjust to use line_header methods.
14360 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14361 use std::vector.
14362
14363 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14364
14365 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14366 instead of struct ptid.
14367
14368 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14369
14370 * frame.c (get_frame_register_bytes): Unwind using value.
14371 (put_frame_register_bytes): Likewise.
14372
14373 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14374
14375 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14376 aggregate-like.
14377
14378 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14379
14380 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14381
14382 2017-03-29 Yao Qi <yao.qi@linaro.org>
14383
14384 * gdbthread.h (struct thread_info): Declare constructor and
14385 destructor. Add some in-class member initializers.
14386 * thread.c (free_thread): Remove.
14387 (init_thread_list): Call delete instead of free_thread.
14388 (new_thread): Call thread_info constructor.
14389 (thread_info::thread_info): New function.
14390 (thread_info::~thread_info): New function.
14391 (delete_thread_1): Call delete instead of free_thread.
14392 (make_cleanup_restore_current_thread): Move tp and frame to
14393 inner block.
14394
14395 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14396
14397 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14398 (arc_skip_prologue): Likewise.
14399 (arc_make_frame_cache): Likewise.
14400 (arc_pv_get_operand): New function.
14401 (arc_is_in_prologue): Likewise.
14402 (arc_analyze_prologue): Likewise.
14403 (arc_print_frame_cache): Likewise.
14404 (MAX_PROLOGUE_LENGTH): New constant.
14405
14406 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14407
14408 * configure.tgt: Add arc-insn.o.
14409 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14410 (dump_arc_instruction_command): New function.
14411 (arc_fprintf_disasm): Likewise.
14412 (arc_disassemble_info): Likewise.
14413 (arc_insn_get_operand_value): Likewise.
14414 (arc_insn_get_operand_value_signed): Likewise.
14415 (arc_insn_get_memory_base_reg): Likewise.
14416 (arc_insn_get_memory_offset): Likewise.
14417 (arc_insn_get_branch_target): Likewise.
14418 (arc_insn_dump): Likewise.
14419 (arc_insn_get_linear_next_pc): Likewise.
14420 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14421 (arc_disassemble_info): Likewise.
14422 (arc_insn_get_branch_target): Likewise.
14423 (arc_insn_get_linear_next_pc): Likewise.
14424 * NEWS: Mention new "maint print arc arc-instruction".
14425
14426 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14427
14428 * arc-tdep (maintenance_print_arc_list): New variable.
14429 (maintenance_print_arc_command): New function.
14430
14431 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14432
14433 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14434 Add "limm" and "reserved".
14435 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14436 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14437 * arc-tdep.h (arc_regnum): Likewise.
14438
14439 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14440
14441 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14442 for THREADPTR register.
14443 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14444 register.
14445 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14446 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14447 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14448
14449 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14450
14451 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14452 registers above gdbarch_num_regs (gdbarch) as privileged in
14453 call0 ABI.
14454
14455 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14456
14457 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14458 for a single specified register or for all registers in
14459 a0_base..a0_base + C0_NREGS range.
14460 (supply_gregset_reg): Call regcache_raw_supply for a single
14461 specified register or for all registers in a0_base..a0_base +
14462 C0_NREGS range.
14463
14464 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14465
14466 * arch/xtensa.h (C0_NREGS): Add definition.
14467 * xtensa-tdep.c (C0_NREGS): Remove definition.
14468
14469 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14470
14471 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14472 Drop xtensa_default_isa initialization.
14473 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14474
14475 2017-03-27 Pedro Alves <palves@redhat.com>
14476
14477 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14478 (file_entry::include_dir): New method.
14479 (line_header::include_dir_at, line_header::file_name_at): New
14480 methods.
14481 (setup_type_unit_groups, setup_type_unit_groups)
14482 (psymtab_include_file_name): Simplify using the new methods.
14483 (lnp_state_machine) <the_line_header>: New field.
14484 <file>: Add comment.
14485 (lnp_state_machine::current_file): New method.
14486 (dwarf_record_line): Simplify using the new methods.
14487 (init_lnp_state_machine): Initialize the "the_line_header" field.
14488 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14489 Simplify using the new methods.
14490
14491 2017-03-27 Pedro Alves <palves@redhat.com>
14492
14493 * cp-name-parser.y (make_empty): Delete.
14494 (demangler_special, nested_name, ptr_operator, array_indicator)
14495 (direct_declarator, declarator_1): Use fill_comp instead of
14496 make_empty.
14497
14498 2017-03-27 Pedro Alves <palves@redhat.com>
14499
14500 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14501 to ATTRIBUTE_PRINTF.
14502 * solib-target.c (library_list_start_list): Print "string" not
14503 "version".
14504 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14505 gdb_xml_error call.
14506
14507 2017-03-27 Pedro Alves <palves@redhat.com>
14508
14509 * dwarf2read.c (struct file_and_directory): New.
14510 (dwarf2_get_dwz_file): Adjust to use std::string.
14511 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14512 (find_file_and_directory): Adjust to return a file_and_directory
14513 object.
14514 (read_file_scope): Adjust to use file_and_directory. Remove
14515 make_cleanup/do_cleanups calls.
14516 (open_and_init_dwp_file): Adjust to use std::string. Remove
14517 make_cleanup/do_cleanups calls.
14518 * python/python.c (do_start_initialization): Adjust to ldirname
14519 returning a std::string.
14520 * utils.c (ldirname): Now returns a std::string.
14521 * utils.h (ldirname): Change return type to std::string.
14522 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14523 returning a std::string.
14524 * xml-tdesc.c (file_read_description_xml): Likewise.
14525
14526 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14527
14528 * regcache.c (regcache_debug_print_register): New function.
14529 * regcache.h (regcache_debug_print_register): New declaration.
14530 * target.c (debug_print_register): Remove.
14531 (target_fetch_registers): Call regcache_debug_print_register.
14532 (target_store_registers): Likewise.
14533
14534 2017-03-24 Pádraig Brady <pbrady@fb.com>
14535
14536 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14537 reference beyond the 'lh->include_dirs' array before accessing to
14538 it.
14539 (psymtab_include_file_name): Likewise.
14540 (dwarf_decode_lines_1): Likewise.
14541 (dwarf_decode_lines): Likewise.
14542 (file_file_name): Likewise.
14543
14544 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14545
14546 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14547 inferior_ptid.
14548 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14549 ps_lsetfpregs): Likewise.
14550 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14551 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14552 ps_lsetfpregs): Likewise.
14553 * target.c (target_fetch_registers, target_store_registers):
14554 Remove asserts.
14555
14556 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14557
14558 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14559
14560 2017-03-23 Yao Qi <yao.qi@linaro.org>
14561
14562 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14563 (_initialize_aarch64_tdep): Register it.
14564 (aarch64_record_load_store): Handle PRFM instruction.
14565 (aarch64_process_record_test): New function.
14566
14567 2017-03-23 Yao Qi <yao.qi@linaro.org>
14568
14569 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14570 indentation.
14571
14572 2017-03-23 Yao Qi <yao.qi@linaro.org>
14573
14574 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14575
14576 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14577
14578 python/python.c (do_start_initialization): Fix memory leak.
14579
14580 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14581
14582 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14583 using get_ptrace_pid.
14584 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14585 inferior_ptid.
14586 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14587 inferior_ptid instead of pid.
14588
14589 2017-03-22 Yao Qi <yao.qi@linaro.org>
14590
14591 * aarch64-tdep.c: Wrap locally used classes in anonymous
14592 namespace.
14593 * arm-tdep.c: Likewise.
14594 * linespec.c: Likewise.
14595 * ui-out.c: Likewise.
14596
14597 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14598
14599 PR gdb/19637
14600 * python/lib/gdb/printer/bound_registers.py: Import sys.
14601
14602 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14603
14604 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14605 windows_thread_info parameter and use it instead of
14606 current_thread.
14607 (windows_fetch_inferior_registers): Don't set current_thread,
14608 pass the thread to do_windows_fetch_inferior_registers. Use
14609 ptid from regcache instead of inferior_ptid.
14610 (do_windows_store_inferior_registers): Add windows_thread_info
14611 parameter and use it instead of current_thread.
14612 (windows_store_inferior_registers): Don't set current_thread,
14613 pass the thread to do_windows_store_inferior_registers. Use
14614 ptid from regcache instead of inferior_ptid.
14615
14616 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14617
14618 * ser-mingw.c (ser_windows_raw): Remove reference to
14619 struct serial::current_timeout.
14620
14621 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14622
14623 PR tdep/20928
14624 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14625 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14626 (sparc64_fsr_type): Fix %fsr decoding.
14627
14628 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14629
14630 * python/py-record-btrace.c (btpy_insn_data): Change return type
14631 for Python 2.
14632
14633 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14634
14635 * spu-linux-nat.c (spu_fetch_inferior_registers,
14636 spu_store_inferior_registers): Use ptid from regcache, set and
14637 restore inferior_ptid.
14638 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14639 Likewise.
14640
14641 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14642
14643 * i386-linux-nat.c (fetch_register, store_register,
14644 i386_linux_fetch_inferior_registers,
14645 i386_linux_store_inferior_registers): Use ptid from regcache.
14646 * ia64-linux-nat.c (ia64_linux_fetch_register,
14647 ia64_linux_store_register): Likewise.
14648 * inf-ptrace.c (inf_ptrace_fetch_register,
14649 inf_ptrace_store_register): Likewise.
14650 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14651 m32r_linux_store_inferior_registers): Likewise.
14652 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14653 m68kbsd_store_inferior_registers): Likewise.
14654 * m68k-linux-nat.c (fetch_register, store_register,
14655 m68k_linux_fetch_inferior_registers,
14656 m68k_linux_store_inferior_registers): Likewise.
14657 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14658 m88kbsd_store_inferior_registers): Likewise.
14659 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14660 mips_fbsd_store_inferior_registers): Likewise.
14661 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14662 mips64_linux_regsets_store_registers): Likewise.
14663 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14664 mipsnbsd_store_inferior_registers): Likewise.
14665 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14666 mips64obsd_store_inferior_registers): Likewise.
14667 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14668 Likewise.
14669 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14670 ppcfbsd_store_inferior_registers): Likewise.
14671 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14672 ppc_linux_store_inferior_registers): Likewise.
14673 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14674 ppcnbsd_store_inferior_registers): Likewise.
14675 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14676 ppcobsd_store_registers): Likewise.
14677 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14678 Likewise.
14679 * ravenscar-thread.c (ravenscar_fetch_registers,
14680 ravenscar_store_registers, ravenscar_prepare_to_store):
14681 Likewise.
14682 * record-btrace.c (record_btrace_fetch_registers,
14683 record_btrace_store_registers, record_btrace_prepare_to_store):
14684 Likewise.
14685 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14686 Lookup inferior using ptid from regcache, instead of
14687 current_inferior.
14688 * remote.c (remote_fetch_registers, remote_store_registers): Use
14689 ptid from regcache.
14690 * rs6000-nat.c (fetch_register, store_register): Likewise.
14691 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14692 s390_linux_store_inferior_registers): Likewise.
14693 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14694 shnbsd_store_inferior_registers): Likewise.
14695 * sol-thread.c (sol_thread_fetch_registers,
14696 sol_thread_store_registers): Likewise.
14697 * sparc-nat.c (sparc_fetch_inferior_registers,
14698 sparc_store_inferior_registers): Likewise.
14699 * tilegx-linux-nat.c (fetch_inferior_registers,
14700 store_inferior_registers): Likewise.
14701 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14702 vaxbsd_store_inferior_registers): Likewise.
14703 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14704 store_xtregs): Likewise.
14705
14706 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14707
14708 PR gdb/14441
14709 * NEWS: Mention support for rvalue references in GDB and python.
14710 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14711 supports both lvalue and rvalue references.
14712
14713 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14714
14715 PR gdb/14441
14716 * gdbtypes.c (rank_one_type): Implement overloading
14717 resolution rules regarding rvalue references.
14718
14719 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14720
14721 PR gdb/14441
14722 * aarch64-tdep.c (aarch64_type_align)
14723 (aarch64_extract_return_value, aarch64_store_return_value): Change
14724 lvalue reference type checks to general reference type checks.
14725 * amd64-tdep.c (amd64_classify): Likewise.
14726 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14727 Likewise.
14728 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14729 (arm_store_return_value): Likewise.
14730 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14731 * c-typeprint.c (c_print_type): Likewise.
14732 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14733 (cplus_number_of_children, cplus_describe_child): Likewise.
14734 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14735 * completer.c (expression_completer): Likewise.
14736 * cp-support.c (make_symbol_overload_list_adl_namespace):
14737 Likewise.
14738 * darwin-nat-info.c (info_mach_region_command): Likewise.
14739 * dwarf2loc.c (entry_data_value_coerce_ref)
14740 (value_of_dwarf_reg_entry): Likewise.
14741 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14742 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14743 Likewise.
14744 * findvar.c (extract_typed_address, store_typed_address):
14745 Likewise.
14746 * gdbtypes.c (rank_one_type): Likewise.
14747 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14748 * infcall.c (value_arg_coerce): Likewise.
14749 * language.c (pointer_type): Likewise.
14750 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14751 Likewise.
14752 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14753 * mn10300-tdep.c (mn10300_type_align): Likewise.
14754 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14755 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14756 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14757 Likewise.
14758 * printcmd.c (print_formatted, x_command): Likewise.
14759 * python/py-type.c (typy_get_composite, typy_template_argument):
14760 Likewise.
14761 * python/py-value.c (valpy_referenced_value)
14762 (valpy_get_dynamic_type, value_has_field): Likewise.
14763 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14764 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14765 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14766 * spu-tdep.c (spu_scalar_value_p): Likewise.
14767 * symtab.c (lookup_symbol_aux): Likewise.
14768 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14769 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14770 Likewise.
14771 * valops.c (value_cast_pointers, value_cast)
14772 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14773 (value_struct_elt, value_struct_elt_bitpos)
14774 (value_find_oload_method_list, find_overload_match)
14775 (value_rtti_indirect_type): Likewise.
14776 * valprint.c (val_print_scalar_type_p, generic_val_print):
14777 Likewise.
14778 * value.c (value_actual_type, value_as_address, unpack_long)
14779 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14780 (coerce_ref): Likewise.
14781 * varobj.c (varobj_get_value_type): Likewise.
14782
14783 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14784
14785 PR gdb/14441
14786 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14787 table of constants.
14788 * python/lib/gdb/command/explore.py: Support exploring values
14789 of rvalue reference types.
14790 * python/lib/gdb/types.py: Implement get_basic_type() for
14791 rvalue reference types.
14792 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14793 constant.
14794 * python/py-value.c (valpy_getitem): Add an rvalue reference
14795 check.
14796 (valpy_reference_value): Add new parameter "refcode".
14797 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14798 New wrappers for valpy_reference_value().
14799 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14800 (gdbpy_invoke_xmethod): Likewise.
14801
14802 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14803
14804 PR gdb/14441
14805 * dwarf2read.c (process_die, read_type_die_1): Handle the
14806 DW_TAG_rvalue_reference_type DIE.
14807 (read_tag_reference_type): Add new parameter "refcode".
14808
14809 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14810
14811 PR gdb/14441
14812 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14813 (c_type_print_modifier, c_type_print_varspec_suffix)
14814 (c_type_print_base): Support printing rvalue reference types.
14815 * c-valprint.c (c_val_print, c_value_print): Support printing
14816 rvalue reference values.
14817
14818 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14819
14820 PR gdb/14441
14821 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14822 typename.
14823 * cp-support.c (replace_typedefs): Handle
14824 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14825 * python/py-type.c (typy_lookup_type): Likewise.
14826
14827 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14828
14829 PR gdb/14441
14830 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14831 * parse.c (insert_type): Change assert statement.
14832 (follow_types): Handle rvalue reference types.
14833 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14834 constant.
14835
14836 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14837
14838 PR gdb/14441
14839 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14840 value_ref() interface.
14841 * c-valprint.c (c_value_print): Likewise.
14842 * infcall.c (value_arg_coerce): Likewise.
14843 * python/py-value.c (valpy_reference_value): Likewise.
14844 * valops.c (value_cast, value_reinterpret_cast)
14845 (value_dynamic_cast, typecmp): Likewise.
14846 (value_ref): Parameterize by kind of return value reference type.
14847 * value.h (value_ref): Add new parameter "refcode".
14848
14849 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14850
14851 PR gdb/14441
14852 * dwarf2read.c (read_tag_reference_type): Use
14853 lookup_lvalue_reference_type() instead of lookup_reference_type().
14854 * eval.c (evaluate_subexp_standard): Likewise.
14855 * f-exp.y: Likewise.
14856 * gdbtypes.c (make_reference_type, lookup_reference_type):
14857 Generalize with rvalue reference types.
14858 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14859 convenience wrappers for lookup_reference_type().
14860 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14861 reference kind parameter.
14862 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14863 wrappers for lookup_reference_type().
14864 * guile/scm-type.c (gdbscm_type_reference): Use
14865 lookup_lvalue_reference_type() instead of lookup_reference_type().
14866 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14867 * parse.c (follow_types): Likewise.
14868 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14869 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14870 Likewise.
14871 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14872 (gdbpy_invoke_xmethod): Likewise.
14873 * stabsread.c: Provide extra argument to make_reference_type()
14874 call.
14875 * valops.c (value_ref, value_rtti_indirect_type): Use
14876 lookup_lvalue_reference_type() instead of lookup_reference_type().
14877
14878 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14879
14880 PR gdb/14441
14881 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14882 (TYPE_IS_REFERENCE): New macro.
14883 (struct type): Add rvalue_reference_type field.
14884 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14885
14886 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14887
14888 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14889 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14890 New function definition.
14891 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14892 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14893 New function declaration.
14894 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14895 * mi/mi-interp.h: New file.
14896 * solib.c (info_sharedlibrary_command): Replace for loop with
14897 ALL_SO_LIBS macro
14898 * solib.h (update_solib_list): New function declaration.
14899 (so_list_head): Move macro.
14900 * solist.h (ALL_SO_LIBS): New macro.
14901
14902 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14903
14904 * infcmd.c (post_create_inferior): Remove unused argument in
14905 call to solib_add.
14906 * remote.c (remote_start_remote): Likewise.
14907 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14908 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14909 (enable_break): Likewise.
14910 * solib.c (update_solib_list): Remove unused target argument
14911 and its documentation.
14912 (solib_add): Remove unused target argument. Remove unused
14913 argument in call to update_solib_list.
14914 (info_sharedlibrary_command): Remove unused argument in call
14915 to update_solib_list.
14916 (sharedlibrary_command): Remove unused argument in call to
14917 solib_add.
14918 (handle_solib_event): Likewise.
14919 (reload_shared_libraries): Likewise.
14920 * solib.h (solib_add): Remove unused target argument.
14921
14922 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14923
14924 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14925 (s390_displaced_step_fixup): Cover relative branches with the
14926 default fixup handling. This fixes lack of support for some
14927 relative branch instructions.
14928
14929 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14930
14931 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14932 ptid from regcache.
14933
14934 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14935
14936 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14937 i386_darwin_store_inferior_registers): Use ptid from regcache.
14938
14939 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14940
14941 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14942 i386bsd_store_inferior_registers): Use ptid from regcache.
14943
14944 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14945
14946 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14947 hppaobsd_store_registers): Use ptid from regcache.
14948
14949 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14950
14951 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14952 hppanbsd_store_registers): Use ptid from regcache.
14953
14954 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14955
14956 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14957 from regcache. Use get_ptrace_pid.
14958
14959 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14960
14961 * corelow.c (get_core_register_section): Use ptid from regcache,
14962 update doc.
14963
14964 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14965
14966 * bsd-uthread.c (bsd_uthread_fetch_registers,
14967 bsd_uthread_store_registers): Use ptid from regcache, set and
14968 restore inferior_ptid.
14969
14970 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14971
14972 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14973 fetch_fp_regs, store_register, store_regs, store_fp_register,
14974 store_fp_regs): Use ptid from regcache.
14975
14976 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14977
14978 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14979 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14980 store_vfp_regs): Use ptid from regcache.
14981
14982 2017-03-17 Pedro Alves <palves@redhat.com>
14983
14984 PR remote/21188
14985 * ser-base.c (ser_base_wait_for): Add comment.
14986 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14987 version.
14988 * ser-unix.c (hardwire_raw): Remove reference to
14989 scb->current_timeout.
14990 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14991 (hardwire_ops): Install ser_base_readchar instead of
14992 hardwire_readchar.
14993 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14994 Remove fields.
14995
14996 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14997
14998 PR gdb/19637
14999 * python/lib/gdb/printer/bound_registers.py: Add support for
15000 Python 3.
15001
15002 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15003
15004 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15005 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15006 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15007 byte_offset to subobj_byte_offset. Fix the handling of
15008 DWARF_VALUE_STACK on big-endian targets when coming via an
15009 implicit pointer.
15010 (dwarf2_evaluate_loc_desc): Adjust call to
15011 dwarf2_evaluate_loc_desc_full.
15012 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15013 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15014
15015 2017-03-16 Yao Qi <yao.qi@linaro.org>
15016
15017 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15018 and REVSH instructions.
15019
15020 2017-03-16 Yao Qi <yao.qi@linaro.org>
15021
15022 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15023 (arm_record_test): Declare.
15024 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15025 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15026 align with the manual.
15027 (thumb_record_misc): Adjust the code order to align with the
15028 manual.
15029 (thumb2_record_decode_insn_handler): Fix instruction matching.
15030 (instruction_reader_thumb): New class.
15031 (arm_record_test): New function.
15032
15033 2017-03-16 Yao Qi <yao.qi@linaro.org>
15034
15035 * arm-tdep.c (abstract_memory_reader): New class.
15036 (instruction_reader): New class.
15037 (extract_arm_insn): Add argument 'reader'. Callers updated.
15038 (decode_insn): Likewise.
15039
15040 2017-03-16 Doug Evans <dje@google.com>
15041
15042 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15043 member. Change type of TYPE member to SCM. All uses updated.
15044 (lsscm_make_lazy_string_smob): Add assert.
15045 (lsscm_make_lazy_string): Flag bad length values.
15046 (lsscm_elt_type): New function.
15047 (gdbscm_lazy_string_to_value): Rewrite to use
15048 lsscm_safe_lazy_string_to_value.
15049 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15050 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15051 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15052 in incoming type.
15053 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15054 * guile/scm-type.c (tyscm_scm_to_type): New function.
15055
15056 2017-03-15 Doug Evans <dje@google.com>
15057
15058 PR python/17728, python/18439, python/18779
15059 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15060 member. Change type of TYPE member to PyObject *. All uses updated.
15061 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15062 (gdbpy_create_lazy_string_object): Flag bad length values.
15063 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15064 Handle typedefs in incoming type.
15065 (stpy_lazy_string_elt_type): New function.
15066 (gdbpy_extract_lazy_string): Call it.
15067 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15068 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15069 typedefs in incoming type.
15070
15071 2017-03-16 Doug Evans <dje@google.com>
15072
15073 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15074 * guile/scm-type.c (tyscm_scm_to_type): New function.
15075
15076 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15077
15078 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15079 "ULONGEST" for "skip".
15080
15081 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15082
15083 PR gdb/21220
15084 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15085 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15086 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15087 over ptrace peek/poke until end of buffer or error.
15088
15089 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15090
15091 * parse.c (length_of_subexp): Make static.
15092 * parser-defs.h (length_of_subexp): Remove.
15093
15094 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15095
15096 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15097 as well.
15098
15099 2017-03-14 Pedro Alves <palves@redhat.com>
15100
15101 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15102 (main): Use std::unique_ptr. Remove calls to
15103 cp_demangled_name_parse_free.
15104
15105 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15106
15107 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15108 alphabsd_store_inferior_registers): Use regcache->ptid instead
15109 of inferior_ptid.
15110
15111 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15112
15113 * aix-thread.c (aix_thread_fetch_registers,
15114 aix_thread_store_registers): Use regcache->ptid instead of
15115 inferior_ptid.
15116
15117 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15118
15119 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15120 store_gregs_to_thread, fetch_fpregs_from_thread,
15121 store_fpregs_to_thread): Use regcache->ptid instead of
15122 inferior_ptid.
15123
15124 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15125
15126 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15127 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15128 instead of inferior_ptid.
15129
15130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15131
15132 * target.c (target_fetch_registers, target_store_registers): Add
15133 assert.
15134
15135 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15136
15137 * regcache.h (regcache_get_ptid): New function.
15138 * regcache.c (regcache_get_ptid): New function.
15139
15140 2017-03-13 Mark Wielaard <mark@klomp.org>
15141
15142 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15143
15144 2017-03-10 Keith Seitz <keiths@redhat.com>
15145
15146 PR c++/8218
15147 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15148
15149 2017-03-08 Pedro Alves <palves@redhat.com>
15150
15151 PR gdb/18360
15152 * infrun.c (start_step_over, do_target_resume, resume)
15153 (restart_threads): Assert we're not resuming a thread that is
15154 meant to be stopped.
15155 (infrun_thread_stop_requested_callback): Delete.
15156 (infrun_thread_stop_requested): If the thread is internally
15157 stopped, queue a pending stop event and clear the thread's
15158 inline-frame state.
15159 (handle_stop_requested): New function.
15160 (handle_syscall_event, handle_inferior_event_1): Use
15161 handle_stop_requested.
15162 (handle_stop_requested): New function.
15163 (handle_signal_stop): Set the thread's stop_signal here instead of
15164 at caller.
15165 (finish_step_over): Clear step over info unconditionally.
15166 (handle_signal_stop): If the user had interrupted the event
15167 thread, consider the stop a random signal.
15168 (handle_signal_stop) <signal arrived while stepping over
15169 breakpoint>: Don't restart threads here.
15170 (stop_waiting): Don't clear step-over info here.
15171
15172 2017-03-08 Pedro Alves <palves@redhat.com>
15173
15174 PR 21206
15175 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15176 goes to argument 2, not 1.
15177
15178 2017-03-08 Pedro Alves <palves@redhat.com>
15179
15180 PR cli/21218
15181 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15182 display_gdb_prompt.
15183 (command_line_input): Add comment.
15184
15185 2017-03-08 Pedro Alves <palves@redhat.com>
15186
15187 PR tui/21216
15188 * tui/tui-file.c (tui_file::write): New.
15189 * tui/tui-file.h (tui_file): Override "write".
15190 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15191 factored out from ...
15192 (tui_puts): ... here.
15193 (tui_putc): Use them.
15194 (tui_write): New function.
15195 * tui/tui-io.h (tui_write): Declare.
15196
15197 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15198
15199 * Makefile.in (SFILES): Replace "environ.c" with
15200 "common/environ.c".
15201 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15202 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15203 to...
15204 * common/environ.c: ... here.
15205 * environ.h: Moved to...
15206 * common/environ.h: ... here.
15207
15208 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15209
15210 * gdbarch.sh (pstring_ptr): New static function.
15211 (gdbarch_disassembler_options): Use it.
15212 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15213 not valid_disassembler_option->name.
15214 * gdbarch.c: Regenerate.
15215
15216 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15217
15218 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15219
15220 2017-03-07 Pedro Alves <palves@redhat.com>
15221
15222 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15223
15224 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
15225
15226 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15227 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15228 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15229 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15230
15231 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15232
15233 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15234
15235 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15236
15237 * remote.c (remote_add_target_side_commands): Use range-based
15238 for loop.
15239
15240 2017-03-03 Yao Qi <yao.qi@linaro.org>
15241
15242 PR gdb/21165
15243 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15244 value is lazy.
15245 * valprint.c (common_val_print): Likewise.
15246
15247 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15248
15249 * NEWS: Mention new set/show disassembler-options commands.
15250 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15251 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15252 (prospective_options): New static variable.
15253 (gdb_disassembler::gdb_disassembler): Initialize
15254 m_di.disassembler_options.
15255 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15256 (get_disassembler_options): New function.
15257 (set_disassembler_options): Likewise.
15258 (set_disassembler_options_sfunc): Likewise.
15259 (show_disassembler_options_sfunc): Likewise.
15260 (disassembler_options_completer): Likewise.
15261 (_initialize_disasm): Likewise.
15262 * disasm.h (get_disassembler_options): New prototype.
15263 (set_disassembler_options): Likewise.
15264 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15265 (gdbarch_verify_disassembler_options): Likewise.
15266 * gdbarch.c: Regenerate.
15267 * gdbarch.h: Likewise.
15268 * arm-tdep.c (num_disassembly_options): Delete.
15269 (set_disassembly_style): Likewise.
15270 (arm_disassembler_options): New static variable.
15271 (set_disassembly_style_sfunc): Convert short style name into long
15272 option name. Call set_disassembler_options.
15273 (show_disassembly_style_sfunc): New function.
15274 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15275 set_gdbarch_verify_disassembler_options.
15276 (_initialize_arm_tdep): Delete regnames variable and update callers.
15277 (arm_disassembler_options): Initialize.
15278 (disasm_options): New variable.
15279 (num_disassembly_options): Rename from this...
15280 (num_disassembly_styles): ...to this. Compute by scanning through
15281 disasm_options.
15282 (valid_disassembly_styles): Initialize using disasm_options.
15283 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15284 set_arm_regname_option.
15285 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15286 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15287 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15288 set_gdbarch_verify_disassembler_options.
15289 * s390-tdep.c (s390_disassembler_options): New static variable.
15290 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15291 set_gdbarch_verify_disassembler_options.
15292
15293 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15294
15295 * remote.c (remote_add_target_side_condition): Remove "struct"
15296 keyword from range-based for loop.
15297
15298 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15299
15300 * remote.c (remote_add_target_side_condition): Use range-based
15301 for loop. Update comment.
15302
15303 2017-02-27 Yao Qi <yao.qi@linaro.org>
15304
15305 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15306
15307 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15308
15309 * regcache.c (regcache_raw_update): New function.
15310 (regcache_raw_read): Move code to regcache_raw_update.
15311 * regcache.h (regcache_raw_update): New declaration.
15312 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15313
15314 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15315
15316 * dwarf2read.c (create_debug_type_hash_table): Initialize
15317 header.signature and header.type_offset_in_tu.
15318
15319 2017-02-24 Pedro Alves <palves@redhat.com>
15320
15321 * symtab.c (make_file_symbol_completion_list_1): Use
15322 add_symtab_completions.
15323
15324 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15325
15326 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15327
15328 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15329
15330 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15331 I386_MAX_REGISTER_SIZE.
15332 (i386_pseudo_register_write): Likewise.
15333 (i386_process_record): Likewise.
15334 * i387-tdep.c (i387_supply_xsave): Likewise.
15335 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15336 (store_register): Likewise.
15337
15338 2017-02-23 Pedro Alves <palves@redhat.com>
15339
15340 * ada-lang.c: Include "common/function-view.h".
15341 (ada_iterate_over_symbols): Adjust to use function_view as
15342 callback type.
15343 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15344 (ada_make_symbol_completion_list): Use a lambda.
15345 (ada_exc_search_name_matches): Delete.
15346 (name_matches_regex): New.
15347 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15348 * compile/compile-c-support.c: Include "common/function-view.h".
15349 (print_one_macro): Change prototype to accept a ui_file pointer.
15350 (write_macro_definitions): Use a lambda.
15351 * dwarf2read.c: Include "common/function-view.h".
15352 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15353 (dw2_expand_symtabs_matching): Adjust to use function_view as
15354 callback type.
15355 * language.h: Include "common/function-view.h".
15356 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15357 function_view as callback type.
15358 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15359 * linespec.c: Include "common/function-view.h".
15360 (collect_info::add_symbol): New method.
15361 (struct symbol_and_data_callback, iterate_inline_only, struct
15362 symbol_matcher_data, iterate_name_matcher): Delete.
15363 (iterate_over_all_matching_symtabs): Adjust to use function_view
15364 as callback type and lambdas.
15365 (iterate_over_file_blocks): Adjust to use function_view as
15366 callback type.
15367 (decode_compound_collector): Now a class with private fields.
15368 (decode_compound_collector::release_symbols): New method.
15369 (collect_one_symbol): Rename to...
15370 (decode_compound_collector::operator()): ... this and adjust.
15371 (lookup_prefix_sym): decode_compound_collector construction bits
15372 move to decode_compound_collector ctor. Pass the
15373 decode_compound_collector object directly as callback. Remove
15374 cleanups and use decode_compound_collector::release_symbols
15375 instead.
15376 (symtab_collector): Now a class with private fields.
15377 (symtab_collector::release_symtabs): New method.
15378 (add_symtabs_to_list): Rename to...
15379 (symtab_collector::operator()): ... this and adjust.
15380 (collect_symtabs_from_filename): symtab_collector construction
15381 bits move to symtab_collector ctor. Pass the symtab_collector
15382 object directly as callback. Remove cleanups and use
15383 symtab_collector::release_symtabs instead.
15384 (collect_symbols): Delete.
15385 (add_matching_symbols_to_info): Use lambdas.
15386 * macrocmd.c (print_macro_callback): Delete.
15387 (info_macro_command): Use a lambda.
15388 (info_macros_command): Pass print_macro_definition as callable
15389 directly.
15390 (print_one_macro): Remove 'ignore' parameter.
15391 (macro_list_command): Adjust.
15392 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15393 (macro_for_each_data::user_data): Delete field.
15394 (foreach_macro): Adjust to call the function_view.
15395 (macro_for_each): Adjust to use function_view as callback type.
15396 (foreach_macro_in_scope): Adjust to call the function_view.
15397 (macro_for_each_in_scope): Adjust to use function_view as callback
15398 type.
15399 * macrotab.h: Include "common/function-view.h".
15400 (macro_callback_fn): Declare a prototype instead of a pointer.
15401 Remove "user_data" parameter.
15402 (macro_for_each, macro_for_each_in_scope): Adjust to use
15403 function_view as callback type.
15404 * psymtab.c (partial_map_expand_apply)
15405 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15406 Adjust to use function_view as callback type and to return bool.
15407 (psym_expand_symtabs_matching): Adjust to use function_view as
15408 callback types.
15409 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15410 to use function_view as callback type and to return bool.
15411 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15412 callback types.
15413 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15414 as callback types.
15415 * symfile.h: Include "common/function-view.h".
15416 (expand_symtabs_file_matcher_ftype)
15417 (expand_symtabs_symbol_matcher_ftype)
15418 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15419 return bool.
15420 (quick_symbol_functions::map_symtabs_matching_filename)
15421 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15422 function_view as callback type and return bool.
15423 (expand_symtabs_matching): Adjust to use function_view as callback
15424 type.
15425 (maintenance_expand_name_matcher)
15426 (maintenance_expand_file_matcher): Delete.
15427 (maintenance_expand_symtabs): Use lambdas.
15428 * symtab.c (iterate_over_some_symtabs): Adjust to use
15429 function_view as callback types and return bool.
15430 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15431 of a cleanup.
15432 (lookup_symtab_callback): Delete.
15433 (lookup_symtab): Use a lambda.
15434 (iterate_over_symbols): Adjust to use function_view as callback
15435 type.
15436 (struct search_symbols_data, search_symbols_file_matches)
15437 (search_symbols_name_matches): Delete.
15438 (search_symbols): Use a pair of lambdas.
15439 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15440 (symtab_expansion_callback): Delete.
15441 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15442 * symtab.h: Include "common/function-view.h".
15443 (iterate_over_some_symtabs): Adjust to use function_view as
15444 callback type and return bool.
15445 (iterate_over_symtabs): Adjust to use function_view as callback
15446 type.
15447 (symbol_found_callback_ftype): Remove 'data' parameter and return
15448 bool.
15449 (iterate_over_symbols): Adjust to use function_view as callback
15450 type.
15451
15452 2017-02-23 Pedro Alves <palves@redhat.com>
15453
15454 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15455 (%.o) <unittests/%.c>: New pattern.
15456 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15457 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15458 * common/function-view.h: New file.
15459 * unittests/function-view-selftests.c: New file.
15460 * configure: Regenerate.
15461
15462 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15463
15464 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15465 inferior_ptid.
15466 * go32-nat.c (go32_thread_alive): Likewise.
15467
15468 2017-02-23 Yao Qi <yao.qi@linaro.org>
15469
15470 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15471 delete.
15472
15473 2017-02-23 Yao Qi <yao.qi@linaro.org>
15474
15475 * varobj.c (varobj_clear_saved_item): Use delete instead of
15476 xfree.
15477 (update_dynamic_varobj_children): Likewise.
15478
15479 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15480
15481 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15482
15483 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15484
15485 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15486 m_enum_value to 0 in default constructor.
15487
15488 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15489
15490 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15491 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15492 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15493 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15494 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15495 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15496 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15497 IS_STORE_CONDITIONAL_INSN.
15498
15499 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15500
15501 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15502
15503 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15504
15505 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15506
15507 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15508
15509 * dwarf2read.c (skip_one_die, read_attribute_value)
15510 (dwarf2_const_value_attr, dump_die_shallow)
15511 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15512 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15513
15514 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15515
15516 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15517 (dwarf_parse_macro_header): Accept DWARF version 5.
15518 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15519
15520 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15521
15522 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15523 DW_AT_GNU_*.
15524 * common/common-exceptions.h (enum errors): Likewise.
15525 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15526 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15527 (dwarf_expr_context::execute_stack_op): Likewise.
15528 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15529 Likewise.
15530 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15531 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15532 (show_entry_values_debug, call_site_to_target_addr)
15533 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15534 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15535 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15536 (value_of_dwarf_block_entry, indirect_pieced_value)
15537 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15538 (disassemble_dwarf_expression): Likewise.
15539 * dwarf2read.c (process_die, inherit_abstract_dies)
15540 (read_call_site_scope): Likewise.
15541 * gdbtypes.h (struct func_type, struct call_site_parameter)
15542 (struct call_site): Likewise.
15543 * stack.c (read_frame_arg): Likewise.
15544 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15545
15546 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15547
15548 * defs.h (read_unsigned_leb128): New declaration.
15549 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15550 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15551 (dwarf2_find_location_expression): Call also
15552 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15553 * dwarf2loc.h (dwarf2_version): New declaration.
15554 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15555 rnglists.
15556 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15557 .debug_rnglists.
15558 (struct dwop_section_names): Add loclists_dwo.
15559 (dwop_section_names): Add .debug_loclists.dwo.
15560 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15561 (struct dwarf2_per_cu_data): Add dwarf_version.
15562 (struct dwo_sections): Add loclists.
15563 (struct attr_abbrev): Add implicit_const.
15564 (read_indirect_line_string): New declaration.
15565 (read_unsigned_leb128): Delete declaration.
15566 (rcuh_kind): New definition.
15567 (read_and_check_comp_unit_head): Change parameter
15568 is_debug_types_section to section_kind.
15569 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15570 (read_comp_unit_head): Change parameter abfd to section, add parameter
15571 section_kind. Handle DWARF-5.
15572 (error_check_comp_unit_head): Accept also DWARF version 5.
15573 (read_and_check_comp_unit_head): Change parameter
15574 is_debug_types_section to section_kind.
15575 (read_and_check_type_unit_head): Delete function.
15576 (read_abbrev_offset): Handle DWARF-5.
15577 (create_debug_type_hash_table): Add parameter section_kind. Process
15578 only DW_UT_type. Use signature and type_offset_in_tu from struct
15579 comp_unit_head.
15580 (create_debug_types_hash_table): Update create_debug_type_hash_table
15581 caller.
15582 (create_all_type_units): Call create_debug_type_hash_table.
15583 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15584 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15585 caller.
15586 (skip_one_die): Handle DW_FORM_implicit_const.
15587 (dwarf2_rnglists_process): New function.
15588 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15589 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15590 (read_attribute_value): Handle DW_FORM_implicit_const,
15591 DW_FORM_line_strp.
15592 (read_attribute): Handle DW_FORM_implicit_const.
15593 (read_indirect_string_at_offset_from): New function from
15594 read_indirect_string_at_offset.
15595 (read_indirect_string_at_offset): Call
15596 read_indirect_string_at_offset_from.
15597 (read_indirect_line_string_at_offset): New function.
15598 (read_indirect_string): New function comment.
15599 (read_indirect_line_string): New function.
15600 (read_unsigned_leb128): Make it global.
15601 (dwarf2_string_attr): Handle DWARF-5.
15602 (add_include_dir_stub, read_formatted_entries): New functions.
15603 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15604 Handle DWARF-5.
15605 (per_cu_header_read_in): Update read_comp_unit_head caller.
15606 (dwarf2_version): New function.
15607 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15608 rnglists.
15609 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15610 fields.
15611
15612 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15613
15614 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15615
15616 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15617
15618 * dwarf2read.c (dwarf2_ranges_process): New function from
15619 dwarf2_ranges_read.
15620 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15621 dwarf2_ranges_process.
15622
15623 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15624
15625 * dwarf2read.c (create_debug_type_hash_table): New function from
15626 create_debug_types_hash_table.
15627 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15628 (create_all_type_units, open_and_init_dwo_file): Update
15629 create_debug_types_hash_table callers.
15630
15631 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15632
15633 PR gdb/16188
15634 * fork-child.c (trace_start_error): Fix thinko. va_end should
15635 refer to 'ap', not 'args'.
15636
15637 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15638 Pedro Alves <palves@redhat.com>
15639
15640 PR gdb/16188
15641 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15642 calls succeeded.
15643 * fork-child.c (trace_start_error): New function.
15644 (trace_start_error_with_name): Likewise.
15645 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15646 * inf-ptrace.c (inf_ptrace_me): Likewise.
15647 * inferior.h (trace_start_error): New prototype.
15648 (trace_start_error_with_name): Likewise.
15649
15650 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15651
15652 PR gdb/21164
15653 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15654 NULL before using it.
15655 * symmisc.c (maintenance_print_symbols): Likewise.
15656 (maintenance_print_msymbols): Likewise.
15657
15658 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15659
15660 * NEWS: Add record Python bindings entry.
15661
15662 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15663
15664 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15665 py-record-full.o.
15666 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15667 * python/py-record-btrace.c, python/py-record-btrace.h,
15668 python/py-record-full.c, python/py-record-full.h: New file.
15669 * python/py-record.c: Add include for py-record-btrace.h and
15670 py-record-full.h.
15671 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15672 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15673 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15674 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15675 New definition.
15676 (gdbpy_initialize_btrace): New export.
15677 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15678
15679 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15680
15681 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15682 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15683 * python/py-record.c: New file.
15684 * python/python-internal.h (gdbpy_start_recording,
15685 gdbpy_current_recording, gdpy_stop_recording,
15686 gdbpy_initialize_record): New export.
15687 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15688 (python_GdbMethods): Add gdbpy_start_recording,
15689 gdbpy_current_recording and gdbpy_stop_recording.
15690
15691 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15692
15693 * record-btrace.c (record_btrace_record_method): New function.
15694 (init_record_btrace_ops): Initialize to_record_method.
15695 * record-full.c (record_full_record_method): New function.
15696 (init_record_full_ops, init_record_full_core_ops): Add
15697 record_full_record_method.
15698 * record.h (enum record_method): New enum.
15699 * target-debug.h (target_debug_print_enum_record_method: New define.
15700 * target-delegates.c: Regenerate.
15701 * target.c (target_record_method): New function.
15702 * target.h: Include record.h.
15703 (struct target_ops) <to_record_method>: New field.
15704 (target_record_method): New export.
15705
15706 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15707
15708 * record.h (record_start, record_stop): New export.
15709 * record.c (record_start, record_stop): New function.
15710
15711 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15712
15713 * btrace.c (btrace_fetch): Copy function call segments pointer
15714 into a vector.
15715 (btrace_clear): Clear the vector.
15716 (btrace_find_insn_by_number): Use binary search to find the correct
15717 function call segment.
15718 * btrace.h (brace_fun_p): New typedef.
15719 (struct btrace_thread_info) <functions>: New field.
15720
15721 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15722
15723 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15724 * btrace.c (btrace_decode_error): ... here. New function.
15725 * btrace.h (btrace_decode_error): New export.
15726
15727 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15728
15729 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15730 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15731 btrace_find_insn_by_number): Remove special case for gaps.
15732 * btrace.h (btrace_insn_get_error): New export.
15733 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15734 * record-btrace.c (btrace_insn_history): Print number for gaps.
15735 (record_btrace_info, record_btrace_goto): Handle gaps.
15736
15737 2017-02-14 Tom Tromey <tom@tromey.com>
15738
15739 PR python/13598:
15740 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15741 event.
15742 * python/py-evts.c (gdbpy_initialize_py_events): Add
15743 before_prompt registry.
15744 * python/py-events.h (events_object) <before_prompt>: New field.
15745
15746 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15747
15748 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15749
15750 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15751
15752 * symfile (_initialize_symfile): Add usage text to the load command's
15753 help text.
15754
15755 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15756
15757 * utils.c (defaulted_query): Don't query on secondary UIs.
15758
15759 2017-02-10 Tom Tromey <tom@tromey.com>
15760
15761 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15762
15763 2017-02-10 Tom Tromey <tom@tromey.com>
15764
15765 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15766 "cleanup" local.
15767 * python/py-type.c (typy_legacy_template_argument): Remove
15768 unnecessary "cleanup" local.
15769
15770 2017-02-10 Tom Tromey <tom@tromey.com>
15771
15772 * python/python.c (do_start_initialization): New function, from
15773 _initialize_python.
15774 (_initialize_python): Call do_start_initialization.
15775 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15776 goto.
15777
15778 2017-02-10 Tom Tromey <tom@tromey.com>
15779
15780 * python/py-prettyprint.c (pretty_print_one_value): Use
15781 gdbpy_ref.
15782
15783 2017-02-10 Tom Tromey <tom@tromey.com>
15784
15785 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15786 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15787 gdbpy_ref.
15788 * python/py-type.c (field_new): Use gdbpy_ref.
15789 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15790 gdbpy_ref.
15791 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15792 (py_free_pspace): Likewise.
15793 (pspace_to_pspace_object): Likewise.
15794 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15795 (py_free_objfile): Likewise.
15796 (objfile_to_objfile_object): Likewise.
15797 * python/py-inferior.c (delete_thread_object): Use
15798 gdbpy_ref.
15799 (infpy_read_memory): Likewise.
15800 (py_free_inferior): Likewise.
15801 * python/py-evtregistry.c (create_eventregistry_object): Use
15802 gdbpy_ref.
15803 * python/py-event.c (create_event_object): Use gdbpy_ref.
15804
15805 2017-02-10 Tom Tromey <tom@tromey.com>
15806
15807 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15808 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15809 used.
15810 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15811 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15812 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15813 python/py-framefilter.c, python/py-function.c,
15814 python/py-inferior.c, python/py-infevents.c,
15815 python/py-linetable.c, python/py-newobjfileevent.c,
15816 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15817 python/py-signalevent.c, python/py-stopevent.c,
15818 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15819 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15820 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15821 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15822
15823 2017-02-10 Tom Tromey <tom@tromey.com>
15824
15825 * ui-out.h (ui_out_emit_type): New class.
15826 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15827 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15828 and ui_out_emit_tuple.
15829 (enumerate_locals): Likewise.
15830 (py_mi_print_variables, py_print_locals, py_print_args): Use
15831 ui_out_emit_list.
15832 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15833 ui_out_emit_list.
15834 * common/gdb_optional.h: New file.
15835
15836 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15837
15838 * MAINTAINERS (Write After Approval): Update my e-mail address.
15839
15840 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15841
15842 PR gdb/21122
15843 * breakpoint.c (_initialize_breakpoint): Update the help description
15844 of the 'commands' command to indicate that it takes a list argument.
15845
15846 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15847
15848 * interps.c (current_interp_set_logging): Remove "return".
15849
15850 2017-02-09 Gary Benson <gbenson@redhat.com>
15851
15852 * symtab.c (add_symtab_completions): Prevent NULL pointer
15853 dereference.
15854
15855 2017-02-08 Pedro Alves <palves@redhat.com>
15856
15857 * interps.c (interp::interp): Remove reference to quiet_p.
15858 (interp_set): Make static. Remove dead "Switching to" output
15859 code.
15860 (interp_quiet_p, interp_set_quiet): Delete.
15861 (interpreter_exec_cmd): Don't set the interpreter quiet.
15862 * interps.h (interp_quiet_p): Make static.
15863 (class interp) <quiet_p>: Remove field
15864
15865 2017-02-08 Jerome Guitton <guitton@adacore.com>
15866
15867 * cli/cli-decode.c (find_command_name_length): Make it extern.
15868 * cli/cli-decode.h (find_command_name_length): Declare.
15869 * cli/cli-script.c (command_name_equals, line_first_arg):
15870 New functions.
15871 (process_next_line): Use cli-decode to parse command names.
15872 (build_command_line): Make args a constant pointer.
15873
15874 2017-02-08 Jerome Guitton <guitton@adacore.com>
15875
15876 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15877 Remove case-insensitive search.
15878
15879 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15880
15881 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15882 at the end of the line. Avoids an ARI warning.
15883
15884 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15885
15886 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15887 rdseed instructions.
15888 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15889
15890 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15891
15892 PR tdep/20936
15893 Provide and use sparc32 and sparc64 target description XML files.
15894 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15895 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15896 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15897 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15898 * features/sparc/sparc32-solaris.xml: New file.
15899 * features/sparc/sparc64-solaris.xml: New file.
15900 * features/sparc/sparc32-solaris.c: Generated.
15901 * features/sparc/sparc64-solaris.c: Generated.
15902 * sparc-tdep.h: Account for differences in target descriptions.
15903 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15904 (sparc32_register_type): Use target provided registers.
15905 (validate_tdesc_registers): New function.
15906 (sparc32_gdbarch_init): Use tdesc_has_registers.
15907 Set pseudoregister functions.
15908 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15909 (sparc64_register_type): Use target provided registers.
15910 (sparc64_init_abi): Set pseudoregister functions.
15911
15912 2017-02-03 Tom Tromey <tom@tromey.com>
15913
15914 PR rust/21097:
15915 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15916 with a single member.
15917
15918 2017-02-03 Pedro Alves <palves@redhat.com>
15919
15920 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15921 (cli_interp_base::~cli_interp_base): New.
15922 (cli_interp): New struct.
15923 (as_cli_interp): Cast the interp itself to cli_interp.
15924 (cli_interpreter_pre_command_loop): Rename to ...
15925 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15926 parameter.
15927 (cli_interpreter_init): Rename to ...
15928 (cli_interp::init): ... this. Remove 'self' parameter. Use
15929 boolean. Make extern.
15930 (cli_interpreter_resume): Rename to ...
15931 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15932 extern.
15933 (cli_interpreter_suspend): Rename to ...
15934 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15935 extern.
15936 (cli_interpreter_exec): Rename to ...
15937 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15938 extern.
15939 (cli_interpreter_supports_command_editing): Rename to ...
15940 (cli_interp_base::supports_command_editing): ... this. Remove
15941 'interp' parameter. Make extern.
15942 (cli_ui_out): Rename to ...
15943 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15944 Make extern.
15945 (cli_set_logging): Rename to ...
15946 (cli_interp_base::set_logging): ... this. Remove 'interp'
15947 parameter. Make extern.
15948 (cli_interp_procs): Delete.
15949 (cli_interp_factory): Adjust to use "new".
15950 * cli/cli-interp.h: Include "interps.h".
15951 (struct cli_interp_base): New struct.
15952 * interps.c (struct interp): Delete. Fields moved to interps.h.
15953 (interp_new): Delete.
15954 (interp::interp, interp::~interp): New.
15955 (interp_set): Use bool, and return void. Assume the interpreter
15956 has suspend, init and resume methods, and that the all return
15957 void.
15958 (set_top_level_interpreter): interp_set returns void.
15959 (interp_ui_out): Adapt.
15960 (current_interp_set_logging): Adapt.
15961 (interp_data): Delete.
15962 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15963 (interp_exec): Adapt.
15964 (top_level_interpreter_data): Delete.
15965 * interps.h (interp_init_ftype, interp_resume_ftype)
15966 (interp_suspend_ftype, interp_exec_ftype)
15967 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15968 (class interp): New.
15969 (interp_new): Delete.
15970 (interp_set): Now returns void. Use bool.
15971 (interp_data, top_level_interpreter_data): Delete.
15972 * mi/mi-common.h: Include interps.h.
15973 (class mi_interp): Inherit from interp. Define a ctor. Declare
15974 init, resume, suspect, exec, interp_ui_out, set_logging and
15975 pre_command_loop methods.
15976 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15977 (mi_interpreter_init): Rename to ...
15978 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15979 bool, return void and make extern. Adjust.
15980 (mi_interpreter_resume): ... Rename to ...
15981 (mi_interp::resume): ... this. Remove the 'data' parameter,
15982 return void and make extern. Adjust.
15983 (mi_interpreter_suspend): ... Rename to ...
15984 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15985 return void and make extern. Adjust.
15986 (mi_interpreter_exec): ... Rename to ...
15987 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15988 extern. Adjust.
15989 (mi_interpreter_pre_command_loop): ... Rename to ...
15990 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15991 parameter and make extern.
15992 (mi_on_normal_stop_1): Adjust.
15993 (mi_ui_out): Rename to ...
15994 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15995 parameter and make extern. Adjust.
15996 (mi_set_logging): Rename to ...
15997 (mi_interp::set_logging): ... this. Remove the 'interp'
15998 parameter and make extern. Adjust.
15999 (mi_interp_procs): Delete.
16000 (mi_interp_factory): Adjust to use 'new'.
16001 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16002 (mi_print_exception, mi_execute_command, mi_load_progress):
16003 Adjust.
16004 * tui/tui-interp.c (tui_interp): New class.
16005 (as_tui_interp): Return a tui_interp pointer.
16006 (tui_on_normal_stop, tui_on_signal_received)
16007 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16008 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16009 to use interp::interp_ui_out.
16010 (tui_init): Rename to ...
16011 (tui_interp::init): ... this. Remove the 'self' parameter, use
16012 bool, return void and make extern. Adjust.
16013 (tui_resume): Rename to ...
16014 (tui_interp::resume): ... this. Remove the 'data' parameter,
16015 return void and make extern. Adjust.
16016 (tui_suspend): Rename to ...
16017 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16018 return void and make extern. Adjust.
16019 (tui_ui_out): Rename to ...
16020 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16021 parameter, and make extern. Adjust.
16022 (tui_exec): Rename to ...
16023 (tui_interp::exec): ... this. Remove the 'data' parameter and
16024 make extern.
16025 (tui_interp_procs): Delete.
16026 (tui_interp_factory): Use "new".
16027
16028 2017-02-02 Tom Tromey <tom@tromey.com>
16029
16030 * rust-exp.y (ends_raw_string, space_then_number)
16031 (rust_identifier_start_p): Return bool.
16032 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16033 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16034 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16035 (rust_chartype_p): Return bool.
16036 (val_print_struct, rust_print_struct_def, rust_print_type):
16037 Update.
16038 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16039 Return bool.
16040
16041 2017-02-02 Tom Tromey <tom@tromey.com>
16042
16043 * rust-lang.c: Reindent.
16044
16045 2017-02-02 Tom Tromey <tom@tromey.com>
16046
16047 * rust-lang.h (rust_crate_for_block): Update.
16048 * rust-lang.c (rust_crate_for_block): Return std::string.
16049 (rust_get_disr_info): Use std:;string, not
16050 gdb::unique_xmalloc_ptr.
16051 * rust-exp.y (crate_name): Update.
16052
16053 2017-02-02 Pedro Alves <palves@redhat.com>
16054
16055 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16056 field out of gdb_disassembler_test and make it static.
16057
16058 2017-02-02 Pedro Alves <palves@redhat.com>
16059
16060 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16061 mi1_interp and mi_interp fields.
16062
16063 2017-02-02 Pedro Alves <palves@redhat.com>
16064
16065 * cli/cli-interp.c (struct saved_output_files, saved_output):
16066 Moved from cli/cli-logging.c.
16067 (cli_set_logging): New function.
16068 (cli_interp_procs): Install cli_set_logging.
16069 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16070 Declare.
16071 * cli/cli-logging.c (struct saved_output_files, saved_output):
16072 Moved to cli/cli-interp.c.
16073 (pop_output_files): Don't save outputs here.
16074 (make_logging_output): New function.
16075 (handle_redirections): Don't build tee nor save previous outputs
16076 here.
16077 * interps.c (current_interp_set_logging): Change prototype.
16078 Assume there's always a set_logging_proc method installed.
16079 * interps.h (interp_set_logging_ftype): Change prototype.
16080 (current_interp_set_logging): Change prototype and adjust comment.
16081 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16082 use make_logging_output.
16083 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16084 2017-02-02 Pedro Alves <palves@redhat.com>
16085
16086 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16087 from ...
16088 (set_logging_overwrite): ... here.
16089 (logging_no_redirect_file): Delete.
16090 (set_logging_redirect): Don't handle redirection on the fly.
16091 Instead warn that "logging off" / "logging on" is necessary.
16092 (pop_output_files): Delete references to logging_no_redirect_file.
16093 (show_logging_command): Always speak in terms of what will happen
16094 once logging is reenabled.
16095
16096 2017-02-02 Pedro Alves <palves@redhat.com>
16097
16098 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16099
16100 2017-02-02 Pedro Alves <palves@redhat.com>
16101
16102 * disasm.c (gdb_pretty_print_insn): Rename to ...
16103 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16104 Remove gdbarch parameter. Adapt to clear the object's buffers
16105 instead of allocating new buffers, and to print using the object's
16106 gdb_disassembler instead of calling gdb_print_insn.
16107 (dump_insns): Use gdb_pretty_print_disassembler.
16108 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16109 (gdb_pretty_print_disassembler): New class.
16110 * record-btrace.c (btrace_insn_history): Use
16111 gdb_pretty_print_disassembler.
16112
16113 2017-02-02 Pedro Alves <palves@redhat.com>
16114
16115 * ada-lang.c (type_as_string): Use string_file.
16116 * ada-valprint.c (ada_print_floating): Use string_file.
16117 * ada-varobj.c (ada_varobj_scalar_image)
16118 (ada_varobj_get_value_image): Use string_file.
16119 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16120 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16121 * breakpoint.c (update_inserted_breakpoint_locations)
16122 (insert_breakpoint_locations, reattach_breakpoints)
16123 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16124 (print_it_watchpoint): Use string_file.
16125 (save_breakpoints): Use stdio_file.
16126 * c-exp.y (oper): Use string_file.
16127 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16128 tee_file.
16129 (pop_output_files): Use delete.
16130 (handle_redirections): Use stdio_file and tee_file.
16131 * cli/cli-setshow.c (do_show_command): Use string_file.
16132 * compile/compile-c-support.c (c_compute_program): Use
16133 string_file.
16134 * compile/compile-c-symbols.c (generate_vla_size): Take a
16135 'string_file &' instead of a 'ui_file *'.
16136 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16137 of a 'ui_file *'. Use string_file.
16138 (generate_c_for_variable_locations): Take a 'string_file &'
16139 instead of a 'ui_file *'.
16140 * compile/compile-internal.h (generate_c_for_for_one_variable):
16141 Take a 'string_file &' instead of a 'ui_file *'.
16142 * compile/compile-loc2c.c (push, pushf, unary, binary)
16143 (print_label, pushf_register_address, pushf_register)
16144 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16145 'ui_file *'. Adjust.
16146 * compile/compile.c (compile_to_object): Use string_file.
16147 * compile/compile.h (compile_dwarf_expr_to_c)
16148 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16149 'ui_file *'.
16150 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16151 (replace_typedefs_qualified_name): Use string_file and
16152 obstack_copy0.
16153 * disasm.c (gdb_pretty_print_insn): Use string_file.
16154 (gdb_disassembly): Adjust reference the null_stream global.
16155 (do_ui_file_delete): Delete.
16156 (gdb_insn_length): Use null_stream.
16157 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16158 * dwarf2loc.c (dwarf2_compile_property_to_c)
16159 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16160 'string_file &' instead of a 'ui_file *'.
16161 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16162 * dwarf2read.c (do_ui_file_peek_last): Delete.
16163 (dwarf2_compute_name): Use string_file.
16164 * event-top.c (gdb_setup_readline): Use stdio_file.
16165 * gdbarch.sh (verify_gdbarch): Use string_file.
16166 * gdbtypes.c (safe_parse_type): Use null_stream.
16167 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16168 string_file.
16169 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16170 'string_file *' instead of a 'ui_file *'.
16171 (gdbscm_arch_disassemble): Use string_file.
16172 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16173 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16174 inherits from ui_file.
16175 (ioscm_file_port_delete, ioscm_file_port_rewind)
16176 (ioscm_file_port_put): Delete.
16177 (ioscm_file_port_write): Rename to ...
16178 (ioscm_file_port::write): ... this. Remove file_port_magic
16179 checks.
16180 (ioscm_file_port_new): Delete.
16181 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16182 ui_file_up.
16183 * guile/scm-type.c (tyscm_type_name): Use string_file.
16184 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16185 Use string_file.
16186 * infcmd.c (print_return_value_1): Use string_file.
16187 * infrun.c (print_target_wait_results): Use string_file.
16188 * language.c (add_language): Use string_file.
16189 * location.c (explicit_to_string_internal): Use string_file.
16190 * main.c (captured_main_1): Use null_file.
16191 * maint.c (maintenance_print_architecture): Use stdio_file.
16192 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16193 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16194 event_channel>: Change type to mi_console_file pointer.
16195 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16196 (mi_console_file_delete): Delete.
16197 (struct mi_console_file): Delete.
16198 (mi_console_file_magic): Delete.
16199 (mi_console_file_new): Delete.
16200 (mi_console_file::mi_console_file): New.
16201 (mi_console_file_delete): Delete.
16202 (mi_console_file_fputs): Delete.
16203 (mi_console_file::write): New.
16204 (mi_console_raw_packet): Delete.
16205 (mi_console_file::flush): New.
16206 (mi_console_file_flush): Delete.
16207 (mi_console_set_raw): Rename to ...
16208 (mi_console_file::set_raw): ... this.
16209 * mi/mi-console.h (class mi_console_file): New class.
16210 (mi_console_file_new, mi_console_set_raw): Delete.
16211 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16212 (mi_set_logging): Use delete and tee_file. Adjust.
16213 * mi/mi-main.c (output_register): Use string_file.
16214 (mi_cmd_data_evaluate_expression): Use string_file.
16215 (mi_cmd_data_read_memory): Use string_file.
16216 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16217 * mi/mi-out.c (mi_ui_out::main_stream): New.
16218 (mi_ui_out::rewind): Use main_stream and
16219 string_file.
16220 (mi_ui_out::put): Use main_stream and string_file.
16221 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16222 Allocate a 'string_file' instead.
16223 (mi_out_new): Don't allocate a mem_fileopen stream here.
16224 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16225 (mi_ui_out::main_stream): Declare method.
16226 * printcmd.c (eval_command): Use string_file.
16227 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16228 * python/py-arch.c (archpy_disassemble): Use string_file.
16229 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16230 * python/py-frame.c (frapy_str): Use string_file.
16231 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16232 Use string_file.
16233 * python/py-type.c (typy_str): Use string_file.
16234 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16235 * python/py-value.c (valpy_str): Use string_file.
16236 * record-btrace.c (btrace_insn_history): Use string_file.
16237 * regcache.c (regcache_print): Use stdio_file.
16238 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16239 * remote.c (escape_buffer): Use string_file.
16240 * rust-lang.c (rust_get_disr_info): Use string_file.
16241 * serial.c (serial_open_ops_1): Use stdio_file.
16242 (do_serial_close): Use delete.
16243 * stack.c (print_frame_arg): Use string_file.
16244 (print_frame_args): Remove local mem_fileopen stream, not used.
16245 (print_frame): Use string_file.
16246 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16247 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16248 Take a 'string_file *' instead of a 'ui_file *'.
16249 * top.c (new_ui): Use stdio_file and stderr_file.
16250 (free_ui): Use delete.
16251 (execute_command_to_string): Use string_file.
16252 (quit_confirm): Use string_file.
16253 * tracepoint.c (collection_list::append_exp): Use string_file.
16254 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16255 * tui/tui-file.c: Don't include "ui-file.h".
16256 (enum streamtype, struct tui_stream): Delete.
16257 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16258 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16259 (tui_file::tui_file): New method.
16260 (tui_file_fputs): Delete.
16261 (tui_file_get_strbuf): Delete.
16262 (tui_file::puts): New method.
16263 (tui_file_adjust_strbuf): Delete.
16264 (tui_file_flush): Delete.
16265 (tui_file::flush): New method.
16266 * tui/tui-file.h: Tweak intro comment.
16267 Include ui-file.h.
16268 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16269 (tui_file_adjust_strbuf): Delete declarations.
16270 (class tui_file): New class.
16271 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16272 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16273 (tui_register_format): Use string_stream.
16274 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16275 (tui_get_function_from_frame): Use string_file.
16276 * typeprint.c (type_to_string): Use string_file.
16277 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16278 (null_stream): New global.
16279 (ui_file_delete): Delete.
16280 (ui_file::ui_file): New.
16281 (null_file_isatty): Delete.
16282 (ui_file::~ui_file): New.
16283 (null_file_rewind): Delete.
16284 (ui_file::printf): New.
16285 (null_file_put): Delete.
16286 (null_file_flush): Delete.
16287 (ui_file::putstr): New.
16288 (null_file_write): Delete.
16289 (ui_file::putstrn): New.
16290 (null_file_read): Delete.
16291 (ui_file::putc): New.
16292 (null_file_fputs): Delete.
16293 (null_file_write_async_safe): Delete.
16294 (ui_file::vprintf): New.
16295 (null_file_delete): Delete.
16296 (null_file::write): New.
16297 (null_file_fseek): Delete.
16298 (null_file::puts): New.
16299 (ui_file_data): Delete.
16300 (null_file::write_async_safe): New.
16301 (gdb_flush, ui_file_isatty): Adjust.
16302 (ui_file_put, ui_file_rewind): Delete.
16303 (ui_file_write): Adjust.
16304 (ui_file_write_for_put): Delete.
16305 (ui_file_write_async_safe, ui_file_read): Adjust.
16306 (ui_file_fseek): Delete.
16307 (fputs_unfiltered): Adjust.
16308 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16309 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16310 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16311 (set_ui_file_data): Delete.
16312 (string_file::~string_file, string_file::write)
16313 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16314 (do_ui_file_as_string, ui_file_as_string): Delete.
16315 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16316 (struct mem_file): Delete.
16317 (mem_file_new): Delete.
16318 (stdio_file::stdio_file): New.
16319 (mem_file_delete): Delete.
16320 (stdio_file::stdio_file): New.
16321 (mem_fileopen): Delete.
16322 (stdio_file::~stdio_file): New.
16323 (mem_file_rewind): Delete.
16324 (stdio_file::set_stream): New.
16325 (mem_file_put): Delete.
16326 (stdio_file::open): New.
16327 (mem_file_write): Delete.
16328 (stdio_file_magic, struct stdio_file): Delete.
16329 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16330 (stdio_file::flush): New.
16331 (stdio_file_read): Rename to ...
16332 (stdio_file::read): ... this. Adjust.
16333 (stdio_file_write): Rename to ...
16334 (stdio_file::write): ... this. Adjust.
16335 (stdio_file_write_async_safe): Rename to ...
16336 (stdio_file::write_async_safe) ... this. Adjust.
16337 (stdio_file_fputs): Rename to ...
16338 (stdio_file::puts) ... this. Adjust.
16339 (stdio_file_isatty): Delete.
16340 (stdio_file_fseek): Delete.
16341 (stdio_file::isatty): New.
16342 (stderr_file_write): Rename to ...
16343 (stderr_file::write) ... this. Adjust.
16344 (stderr_file_fputs): Rename to ...
16345 (stderr_file::puts) ... this. Adjust.
16346 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16347 (stderr_file::stderr_file): New.
16348 (tee_file_magic): Delete.
16349 (struct tee_file): Delete.
16350 (tee_file::tee_file): New.
16351 (tee_file_new): Delete.
16352 (tee_file::~tee_file): New.
16353 (tee_file_delete): Delete.
16354 (tee_file_flush): Rename to ...
16355 (tee_file::flush): ... this. Adjust.
16356 (tee_file_write): Rename to ...
16357 (tee_file::write): ... this. Adjust.
16358 (tee_file::write_async_safe): New.
16359 (tee_file_fputs): Rename to ...
16360 (tee_file::puts): ... this. Adjust.
16361 (tee_file_isatty): Rename to ...
16362 (tee_file::isatty): ... this. Adjust.
16363 * ui-file.h (struct obstack, struct ui_file): Don't
16364 forward-declare.
16365 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16366 (ui_file_write_ftype)
16367 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16368 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16369 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16370 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16371 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16372 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16373 (set_ui_file_fseek): Delete.
16374 (ui_file_data, ui_file_delete, ui_file_rewind)
16375 (struct ui_file): New.
16376 (ui_file_up): New.
16377 (class null_file): New.
16378 (null_stream): Declare.
16379 (ui_file_write_for_put, ui_file_put): Delete.
16380 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16381 Delete.
16382 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16383 (gdb_fopen, tee_file_new): Delete.
16384 (struct string_file): New.
16385 (struct stdio_file): New.
16386 (stdio_file_up): New.
16387 (struct stderr_file): New.
16388 (class tee_file): New.
16389 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16390 of a 'ui_file *'. Adjust.
16391 * ui-out.h (class ui_out) <field_stream>: Likewise.
16392 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16393 (null_stream): Delete.
16394 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16395 Adjust.
16396 * utils.h (struct ui_file): Delete forward declaration..
16397 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16398 (error_stream): Take a 'string_file &' instead of a
16399 'ui_file *'.
16400 * varobj.c (varobj_value_get_print_value): Use string_file.
16401 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16402 * gdbarch.c: Regenerate.
16403
16404 2017-02-02 Pedro Alves <palves@redhat.com>
16405
16406 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16407 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16408 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16409 Adjust to call gdb_print_insn instead of
16410 gdb_disassembler::print_insn.
16411 (dump_insns, do_mixed_source_and_assembly_deprecated)
16412 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16413 'gdbarch' parameter. Remove gdb_disassembler parameter.
16414 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16415 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16416 declaration.
16417 (gdb_pretty_print_insn): Re-add declaration.
16418 * record-btrace.c (btrace_insn_history): Don't allocate a
16419 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16420
16421 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16422
16423 * disasm.h (gdb_disassembly): Remove file_string parameter.
16424 * disasm.c (gdb_disassembly): Likewise.
16425 * cli/cli-cmds.c (print_disassembly): Adapt.
16426 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16427 * stack.c (do_gdb_disassembly): Likewise.
16428
16429 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16430
16431 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16432 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16433 targets. And if the implicit value is longer than needed, extract
16434 the first bytes instead of the "least significant" ones.
16435
16436 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16437
16438 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16439 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16440 (btrace_fetch): Assert can_access_registers_ptid.
16441 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16442 validate_registers_access.
16443
16444 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16445
16446 * gdbthread.h (can_access_registers_ptid): New.
16447 * thread.c (can_access_registers_ptid): New.
16448
16449 2017-02-01 Pedro Alves <palves@redhat.com>
16450
16451 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16452
16453 2017-01-31 Pedro Alves <palves@redhat.com>
16454
16455 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16456 Fix typos.
16457
16458 2017-01-31 Pedro Alves <palves@redhat.com>
16459
16460 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16461 not used.
16462
16463 2017-01-31 Pedro Alves <palves@redhat.com>
16464
16465 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16466
16467 2017-01-31 Pedro Alves <palves@redhat.com>
16468
16469 * common/scoped_restore.h
16470 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16471 change the value's parameter type to T2.
16472 (make_scoped_restore): Likewise.
16473
16474 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16475 Richard Henderson <rth@redhat.com>
16476
16477 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16478 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16479 GS_BASE for older kernels.
16480 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16481 GS_BASE for older kernels.
16482 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16483 and GS_BASE to the offset table.
16484 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16485 system register group.
16486 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16487 for older kernels.
16488 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16489 amd64 ABI.
16490 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16491 AMD64_GSBASE_REGNUM.
16492 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16493 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16494 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16495 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16496 i386/64bit-segments.xml in those rules.
16497 * features/i386/64bit-segments.xml: New file.
16498 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16499 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16500 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16501 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16502 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16503 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16504 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16505 * features/i386/amd64-avx-linux.c: Regenerated.
16506 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16507 * features/i386/amd64-avx-mpx.c: Regenerated.
16508 * features/i386/amd64-avx512-linux.c: Regenerated.
16509 * features/i386/amd64-linux.c: Regenerated.
16510 * features/i386/amd64-mpx-linux.c: Regenerated.
16511 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16512 * features/i386/i386-avx-mpx.c: Regenerated.
16513 * features/i386/x32-avx-linux.c: Regenerated.
16514 * features/i386/x32-avx512-linux.c: Regenerated.
16515 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16516 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16517 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16518 * regformats/i386/amd64-linux.dat: Regenerated.
16519 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16520 * regformats/i386/x32-avx-linux.dat: Regenerated.
16521 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16522 * regformats/i386/x32-linux.dat: Regenerated.
16523
16524 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16525
16526 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16527 Set to AMD64_NUM_REGS.
16528
16529 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16530
16531 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16532 that checks validity of a register number.
16533
16534 2017-01-27 Kees Cook <keescook@google.com>
16535
16536 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16537 fetch_fpregs if target has fpa registers.
16538 (arm_linux_store_inferior_registers): Call store_fpregs if target
16539 has fpa registers.
16540
16541 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16542
16543 * cris-tdep.c (cris_gdbarch_init): Remove check for
16544 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16545
16546 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16547
16548 * corelow.c (get_core_register_section): Check for regset
16549 existence before checking for REGSET_VARIABLE_SIZE.
16550
16551 2017-01-26 Yao Qi <yao.qi@linaro.org>
16552 Pedro Alves <palves@redhat.com>
16553
16554 PR gdb/20939
16555 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16556 call memory_error, save memaddr instead.
16557 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16558 negative, cal memory_error.
16559 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16560
16561 2017-01-26 Yao Qi <yao.qi@linaro.org>
16562
16563 * disasm-selftests.c (memory_error_test): New function.
16564 (_initialize_disasm_selftests): Register memory_error_test.
16565
16566 2017-01-26 Yao Qi <yao.qi@linaro.org>
16567
16568 * Makefile.in (SFILES): Add disasm-selftests.c and
16569 selftest-arch.c.
16570 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16571 * disasm-selftests.c: New file.
16572 * selftest-arch.c: New file.
16573 * selftest-arch.h: New file.
16574
16575 2017-01-26 Yao Qi <yao.qi@linaro.org>
16576
16577 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16578 to bfd_arch_mep. Don't return 0 if section is not
16579 found. Call print_insn_mep.
16580
16581 2017-01-26 Pedro Alves <palves@redhat.com>
16582 Yao Qi <yao.qi@linaro.org>
16583
16584 * arm-tdep.c: Include "disasm.h".
16585 (gdb_print_insn_arm): Update code to get gdbarch.
16586 * disasm.c (dis_asm_read_memory): Change it to
16587 gdb_disassembler::dis_asm_read_memory.
16588 (dis_asm_memory_error): Likewise.
16589 (dis_asm_print_address): Likewise.
16590 (gdb_pretty_print_insn): Change it to
16591 gdb_disassembler::pretty_print_insn.
16592 (dump_insns): Add one argument gdb_disassemlber. All
16593 callers updated.
16594 (do_mixed_source_and_assembly_deprecated): Likewise.
16595 (do_mixed_source_and_assembly): Likewise.
16596 (do_assembly_only): Likewise.
16597 (gdb_disassembler::gdb_disassembler): New.
16598 (gdb_disassembler::print_insn): New.
16599 * disasm.h (class gdb_disassembler): New.
16600 (gdb_pretty_print_insn): Remove declaration.
16601 (gdb_disassemble_info): Likewise.
16602 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16603 (gdbscm_disasm_read_memory_worker): Update.
16604 (gdbscm_disasm_read_memory): Update.
16605 (gdbscm_disasm_memory_error): Remove.
16606 (gdbscm_disasm_print_address): Remove.
16607 (gdbscm_disassembler::gdbscm_disassembler): New.
16608 (gdbscm_print_insn_from_port): Update.
16609 * mips-tdep.c: Include disasm.h.
16610 (gdb_print_insn_mips): Update code to get gdbarch.
16611 * record-btrace.c (btrace_insn_history): Update.
16612 * spu-tdep.c: Include disasm.h.
16613 (struct spu_dis_asm_data): Remove.
16614 (struct spu_dis_asm_info): New.
16615 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16616 SPU id.
16617 (gdb_print_insn_spu): Cast disassemble_info to
16618 spu_dis_asm_info.
16619
16620 2017-01-26 Yao Qi <yao.qi@linaro.org>
16621
16622 * disasm.c (do_ui_file_delete): Delete.
16623 (gdb_insn_length): Move code creating stream to ...
16624 * utils.c (null_stream): ... here. New function.
16625 * utils.h (null_stream): Declare.
16626
16627 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16628
16629 * python/py-inferior.c (find_thread_object): Return directly
16630 from the loop. Remove "found" variable.
16631
16632 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16633
16634 GDB 7.12.1 released.
16635
16636 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16637
16638 * python/py-function.c (fnpy_call): Reorder declarations to have
16639 the gdbpy_enter object declared first.
16640 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16641
16642 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16643
16644 PR python/21068
16645 * python/python-internal.h (PyMem_RawMalloc): Define for
16646 Python < 3.4.
16647 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16648 PyMem_RawMalloc instead of PyMem_Malloc.
16649
16650 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16651 Luis Machado <lgustavo@codesourcery.com>
16652
16653 * NEWS (New commands): Mention flash-erase.
16654 (New MI commands): Mention target-flash-erase.
16655 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16656 command.
16657 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16658 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16659 * target.c (flash_erase_command): New function.
16660 (initialize_targets): Add new flash-erase command.
16661 * target.h (flash_erase_command): New declaration.
16662
16663 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16664
16665 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16666 HAVE_SYS_PROCFS_H is defined.
16667
16668 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16669
16670 * remote.c (struct cached_reg): Change data into a pointer.
16671 * (stop_reply_dtr): Free data pointers before deleting vector.
16672 (process_stop_reply): Likewise.
16673 (remote_parse_stop_reply): Allocate space for data
16674
16675 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16676
16677 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16678 MAX_REGISTER_SIZE.
16679 (amd64_pseudo_register_read_value): Likewise.
16680 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16681 (store_register_using_P): Likewise.
16682 * regcache.c (regcache_xfer_part): Likewise.
16683
16684 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16685
16686 Split real and pseudo registers.
16687 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16688 (sparc32_pseudo_regnum): New enum.
16689 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16690 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16691 (SPARC32_CP0_REGISTERS): New macro.
16692 (sparc32_pseudo_register_name): New function.
16693 (sparc32_register_name): Use sparc32_pseudo_register_name.
16694 (sparc32_pseudo_register_type): New function.
16695 (sparc32_register_type): Use sparc32_pseudo_register_type.
16696 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16697 pseudo register numbers.
16698 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16699 (SPARC64_CP0_REGISTERS): New macro.
16700 (sparc64_pseudo_register_name): New function.
16701 (sparc64_register_name): Use sparc64_pseudo_register_name.
16702 (sparc64_pseudo_register_type): New function.
16703 (sparc64_register_type): Use sparc64_pseudo_register_type.
16704 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16705 pseudo register numbers.
16706 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16707 sparc64_store_arguments): Handle pseudo register numbers.
16708
16709 2017-01-13 Yao Qi <yao.qi@linaro.org>
16710
16711 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16712 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16713 output.
16714 (getpkt_or_notif_sane_1): Likewise.
16715
16716 2017-01-13 Yao Qi <yao.qi@linaro.org>
16717
16718 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16719 of CC. Pass "-x c++-header" instead of "-x c".
16720
16721 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16722
16723 * remote.c (remote_can_async_p): Update comment.
16724
16725 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16726
16727 * linux-nat.c (linux_nat_can_async_p): Update comment.
16728
16729 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16730
16731 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16732
16733 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16734
16735 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16736
16737 2017-01-10 Tom Tromey <tom@tromey.com>
16738
16739 * python/py-type.c (typy_legacy_template_argument): Update.
16740 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16741 ~demangle_parse_info): Declare new members.
16742 (cp_demangled_name_to_comp): Return unique_ptr.
16743 (cp_demangled_name_parse_free)
16744 (make_cleanup_cp_demangled_name_parse_free)
16745 (cp_new_demangle_parse_info): Remove.
16746 * cp-support.c (do_demangled_name_parse_free_cleanup)
16747 (make_cleanup_cp_demangled_name_parse_free): Remove.
16748 (inspect_type, cp_canonicalize_string_full)
16749 (cp_canonicalize_string): Update.
16750 (mangled_name_to_comp): Change return type.
16751 (cp_class_name_from_physname, method_name_from_physname)
16752 (cp_func_name, cp_remove_params): Update.
16753 * cp-name-parser.y (demangle_parse_info): New constructor, from
16754 cp_new_demangle_parse_info.
16755 (~demangle_parse_info): New destructor, from
16756 cp_demangled_name_parse_free.
16757 (cp_merge_demangle_parse_infos): Update.
16758 (cp_demangled_name_to_comp): Change return type.
16759
16760 2017-01-10 Tom Tromey <tom@tromey.com>
16761
16762 * top.c (prevent_dont_repeat): Change return type.
16763 * python/python.c (execute_gdb_command): Use std::string.
16764 Update.
16765 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16766 * command.h (prevent_dont_repeat): Change return type.
16767 * breakpoint.c (bpstat_do_actions_1): Update.
16768
16769 2017-01-10 Tom Tromey <tom@tromey.com>
16770
16771 * value.h (scoped_value_mark::~scoped_value_mark): Call
16772 free_to_mark.
16773 (scoped_value_mark::free_to_mark): New method.
16774 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16775 scoped_value_mark.
16776
16777 2017-01-10 Tom Tromey <tom@tromey.com>
16778
16779 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16780 (valpy_reference_value, valpy_const_value, valpy_get_address)
16781 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16782 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16783 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16784 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16785 scoped_value_mark.
16786 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16787 * value.h (scoped_value_mark): New class.
16788
16789 2017-01-10 Tom Tromey <tom@tromey.com>
16790
16791 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16792 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16793 * psymtab.c (discard_psymtabs_upto): Remove.
16794 (make_cleanup_discard_psymtabs): Remove.
16795 (struct psymtab_state): Remove.
16796
16797 2017-01-10 Tom Tromey <tom@tromey.com>
16798
16799 * record-full.c (record_full_save_cleanups): Remove.
16800 (record_full_save): Use gdb::unlinker.
16801 * gcore.c (do_bfd_delete_cleanup): Remove.
16802 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16803 cleanups.
16804 * dwarf2read.c (unlink_if_set): Remove.
16805 (write_psymtabs_to_index): Use gdb::unlinker.
16806 * common/gdb_unlinker.h: New file.
16807
16808 2017-01-10 Tom Tromey <tom@tromey.com>
16809
16810 * windows-tdep.c (windows_xfer_shared_library): Update.
16811 * windows-nat.c (windows_make_so): Update.
16812 * utils.h (make_cleanup_bfd_unref): Remove.
16813 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16814 * symfile.h (symfile_bfd_open)
16815 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16816 * symfile.c (read_symbols, symbol_file_add)
16817 (separate_debug_file_exists): Update.
16818 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16819 (generic_load, reread_symbols): Update.
16820 * symfile-mem.c (symbol_file_add_from_memory): Update.
16821 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16822 (spu_symbol_file_add_from_memory): Update.
16823 * solist.h (struct target_so_ops) <bfd_open>: Return
16824 gdb_bfd_ref_ptr.
16825 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16826 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16827 gdb_bfd_ref_ptr.
16828 (solib_map_sections, reload_shared_libraries_1): Update.
16829 * solib-svr4.c (enable_break): Update.
16830 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16831 * solib-frv.c (enable_break2): Update.
16832 * solib-dsbt.c (enable_break): Update.
16833 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16834 gdb_bfd_ref_ptr.
16835 (darwin_solib_get_all_image_info_addr_at_init): Update.
16836 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16837 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16838 * record-full.c (record_full_save): Update.
16839 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16840 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16841 * minidebug.c (find_separate_debug_file_in_section): Return
16842 gdb_bfd_ref_ptr.
16843 * machoread.c (macho_add_oso_symfile): Change abfd to
16844 gdb_bfd_ref_ptr.
16845 (macho_symfile_read_all_oso): Update.
16846 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16847 (macho_symfile_read): Update.
16848 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16849 (jit_bfd_try_read_symtab): Update.
16850 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16851 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16852 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16853 gdb_bfd_ref_ptr.
16854 (gdb_bfd_ref_policy): New struct.
16855 (gdb_bfd_ref_ptr): New typedef.
16856 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16857 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16858 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16859 gdb_bfd_ref_ptr.
16860 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16861 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16862 (gcore_command): Update.
16863 * exec.c (exec_file_attach): Update.
16864 * elfread.c (elf_symfile_read): Update.
16865 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16866 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16867 (open_and_init_dwo_file): Update.
16868 (open_dwp_file): Return gdb_bfd_ref_ptr.
16869 (open_and_init_dwp_file): Update.
16870 * corelow.c (core_open): Update.
16871 * compile/compile-object-load.c (compile_object_load): Update.
16872 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16873 * coffread.c (coff_symfile_read): Update.
16874 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16875 gdb_bfd_ref_ptr. Rename.
16876 (dump_bfd_file, restore_command): Update.
16877 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16878 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16879 (find_separate_debug_file_by_buildid): Update.
16880
16881 2017-01-10 Tom Tromey <tom@tromey.com>
16882
16883 * common/gdb_ref_ptr.h: New file.
16884 * python/py-ref.h (struct gdbpy_ref_policy): New.
16885 (gdbpy_ref): Now a typedef.
16886
16887 2017-01-10 Tom Tromey <tom@tromey.com>
16888
16889 * utils.h (make_cleanup_htab_delete): Don't declare.
16890 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16891 Remove.
16892 * linespec.c (decode_compound_collector): Add constructor,
16893 destructor.
16894 (lookup_prefix_sym): Remove cleanup.
16895 (symtab_collector): Add constructor, destructor.
16896 (collect_symtabs_from_filename): Remove cleanup.
16897 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16898 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16899 Use htab_up.
16900 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16901 * dwarf2read.c (dw2_expand_symtabs_matching)
16902 (dw2_map_symbol_filenames, dwarf_decode_macros)
16903 (write_psymtabs_to_index): Use htab_up.
16904 * dwarf2loc.c (func_verify_no_selftailcall)
16905 (call_site_find_chain_1, func_verify_no_selftailcall)
16906 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16907 std::vector, gdb::unique_xmalloc_ptr.
16908 (call_sitep): Remove typedef.
16909 (dwarf2_locexpr_baton_eval): Remove unused variable.
16910
16911 2017-01-10 Tom Tromey <tom@tromey.com>
16912
16913 * python/python-internal.h (make_cleanup_py_decref)
16914 (make_cleanup_py_xdecref): Don't declare.
16915 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16916 (py_xdecref, make_cleanup_py_xdecref): Remove.
16917
16918 2017-01-10 Tom Tromey <tom@tromey.com>
16919
16920 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16921 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16922
16923 2017-01-10 Tom Tromey <tom@tromey.com>
16924
16925 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16926
16927 2017-01-10 Tom Tromey <tom@tromey.com>
16928
16929 * python/py-utils.c (unicode_to_encoded_string)
16930 (python_string_to_target_string)
16931 (python_string_to_target_python_string)
16932 (python_string_to_host_string, gdbpy_obj_to_string)
16933 (get_addr_from_python): Use gdbpy_ref.
16934
16935 2017-01-10 Tom Tromey <tom@tromey.com>
16936
16937 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16938 gdbpy_ref.
16939
16940 2017-01-10 Tom Tromey <tom@tromey.com>
16941
16942 * python/python.c (eval_python_command, gdbpy_decode_line)
16943 (gdbpy_run_events, gdbpy_start_type_printers)
16944 (gdbpy_apply_type_printers): Use gdbpy_ref.
16945
16946 2017-01-10 Tom Tromey <tom@tromey.com>
16947
16948 * python/py-param.c (get_doc_string, compute_enum_values): Use
16949 gdbpy_ref.
16950
16951 2017-01-10 Tom Tromey <tom@tromey.com>
16952
16953 * python/py-inferior.c (find_thread_object, build_inferior_list):
16954 Use gdbpy_ref.
16955
16956 2017-01-10 Tom Tromey <tom@tromey.com>
16957
16958 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16959
16960 2017-01-10 Tom Tromey <tom@tromey.com>
16961
16962 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16963 gdbpy_ref.
16964
16965 2017-01-10 Tom Tromey <tom@tromey.com>
16966
16967 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16968 extra incref.
16969 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16970 Use gdbpy_ref.
16971
16972 2017-01-10 Tom Tromey <tom@tromey.com>
16973
16974 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16975 gdbpy_ref.
16976
16977 2017-01-10 Tom Tromey <tom@tromey.com>
16978
16979 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16980 decref results of PyArg_ParseTupleAndKeywords.
16981
16982 2017-01-10 Tom Tromey <tom@tromey.com>
16983
16984 * python/python.c (python_run_simple_file): Use
16985 unique_xmalloc_ptr, gdbpy_ref.
16986
16987 2017-01-10 Tom Tromey <tom@tromey.com>
16988
16989 * python/py-prettyprint.c (print_stack_unless_memory_error)
16990 (print_string_repr, print_children): Use gdbpy_ref.
16991 (dummy_python_frame): New class.
16992 (dummy_python_frame::dummy_python_frame): Rename from
16993 push_dummy_python_frame.
16994 (py_restore_tstate): Remove.
16995
16996 2017-01-10 Tom Tromey <tom@tromey.com>
16997
16998 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16999
17000 2017-01-10 Tom Tromey <tom@tromey.com>
17001
17002 * python/python.c (ensure_python_env, restore_python_env):
17003 Remove.
17004 * python/python-internal.h (ensure_python_env): Don't declare.
17005 * varobj.h (varobj_ensure_python_env): Don't declare.
17006 * varobj.c (varobj_ensure_python_env): Remove.
17007
17008 2017-01-10 Tom Tromey <tom@tromey.com>
17009
17010 * varobj.c (varobj_value_get_print_value): Use
17011 gdbpy_enter_varobj.
17012
17013 2017-01-10 Tom Tromey <tom@tromey.com>
17014
17015 * python/py-prettyprint.c (print_string_repr, print_children):
17016 Update.
17017 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17018 of "encoding".
17019 * varobj.c (varobj_value_get_print_value): Update.
17020 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17021
17022 2017-01-10 Tom Tromey <tom@tromey.com>
17023
17024 * varobj.c (varobj_get_display_hint)
17025 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17026 (varobj_set_visualizer, free_variable): Use
17027 gdbpy_enter_varobj.
17028
17029 2017-01-10 Tom Tromey <tom@tromey.com>
17030
17031 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17032 (do_finish_initialization): New function. Use gdbpy_ref.
17033 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17034 do_finish_initialization.
17035
17036 2017-01-10 Tom Tromey <tom@tromey.com>
17037
17038 * python/py-param.c (get_set_value, get_show_value): Use
17039 gdbpy_enter, gdbpy_ref.
17040
17041 2017-01-10 Tom Tromey <tom@tromey.com>
17042
17043 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17044
17045 2017-01-10 Tom Tromey <tom@tromey.com>
17046
17047 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17048
17049 2017-01-10 Tom Tromey <tom@tromey.com>
17050
17051 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17052 Use gdbpy_enter_varobj.
17053
17054 2017-01-10 Tom Tromey <tom@tromey.com>
17055
17056 * varobj.c (gdbpy_enter_varobj): New constructor.
17057 * python/python-internal.h (gdbpy_enter_varobj): New class.
17058 * python/py-varobj.c (py_varobj_get_iterator): Use
17059 gdbpy_enter_varobj.
17060
17061 2017-01-10 Tom Tromey <tom@tromey.com>
17062
17063 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17064 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17065 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17066 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17067 unique_xmalloc_ptr.
17068 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17069
17070 2017-01-10 Tom Tromey <tom@tromey.com>
17071
17072 * python/py-xmethods.c (invoke_match_method): Use
17073 gdbpy_ref.
17074
17075 2017-01-10 Tom Tromey <tom@tromey.com>
17076
17077 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17078 gdbpy_enter, gdbpy_ref.
17079
17080 2017-01-10 Tom Tromey <tom@tromey.com>
17081
17082 * python/python.c (python_interactive_command): Use gdbpy_enter.
17083
17084 2017-01-10 Tom Tromey <tom@tromey.com>
17085
17086 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17087 gdbpy_ref.
17088
17089 2017-01-10 Tom Tromey <tom@tromey.com>
17090
17091 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17092 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17093
17094 2017-01-10 Tom Tromey <tom@tromey.com>
17095
17096 * utils.h (htab_deleter): New struct.
17097 (htab_up): New typedef.
17098 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17099 gdbpy_enter, gdbpy_ref, htab_up.
17100
17101 2017-01-10 Tom Tromey <tom@tromey.com>
17102
17103 * python/py-unwind.c (pending_frame_invalidate): Remove.
17104 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17105
17106 2017-01-10 Tom Tromey <tom@tromey.com>
17107
17108 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17109 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17110
17111 2017-01-10 Tom Tromey <tom@tromey.com>
17112
17113 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17114
17115 2017-01-10 Tom Tromey <tom@tromey.com>
17116
17117 * python/python.c (gdbpy_eval_from_control_command)
17118 (gdbpy_source_script, gdbpy_run_events)
17119 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17120 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17121 gdbpy_enter.
17122
17123 2017-01-10 Tom Tromey <tom@tromey.com>
17124
17125 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17126
17127 2017-01-10 Tom Tromey <tom@tromey.com>
17128
17129 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17130
17131 2017-01-10 Tom Tromey <tom@tromey.com>
17132
17133 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17134 (python_on_inferior_call_pre, python_on_inferior_call_post)
17135 (python_on_memory_change, python_on_register_change)
17136 (python_inferior_exit, python_new_objfile, add_thread_object)
17137 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17138
17139 2017-01-10 Tom Tromey <tom@tromey.com>
17140
17141 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17142 (bpfinishpy_handle_exit): Use gdbpy_enter.
17143
17144 2017-01-10 Tom Tromey <tom@tromey.com>
17145
17146 * python/py-cmd.c (cmdpy_destroyer)
17147 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17148 gdbpy_enter.
17149
17150 2017-01-10 Tom Tromey <tom@tromey.com>
17151
17152 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17153 gdbpy_enter.
17154 (gdbpy_breakpoint_has_cond): Likewise.
17155
17156 2017-01-10 Tom Tromey <tom@tromey.com>
17157
17158 * python/python.c (gdbpy_enter): New constructor.
17159 (~gdbpy_enter): New destructor.
17160 (restore_python_env, ensure_python_env): Rewrite.
17161 * python/python-internal.h (gdbpy_enter): New class.
17162
17163 2017-01-10 Tom Tromey <tom@tromey.com>
17164
17165 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17166
17167 2017-01-10 Tom Tromey <tom@tromey.com>
17168
17169 * python/py-value.c (value_has_field, get_field_flag)
17170 (get_field_type, valpy_getitem, convert_value_from_python): Use
17171 gdbpy_ref.
17172
17173 2017-01-10 Tom Tromey <tom@tromey.com>
17174
17175 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17176 gdbpy_ref.
17177
17178 2017-01-10 Tom Tromey <tom@tromey.com>
17179
17180 * python/py-prettyprint.c (search_pp_list)
17181 (find_pretty_printer_from_objfiles)
17182 (find_pretty_printer_from_progspace)
17183 (find_pretty_printer_from_gdb, find_pretty_printer)
17184 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17185 gdbpy_ref.
17186
17187 2017-01-10 Tom Tromey <tom@tromey.com>
17188
17189 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17190
17191 2017-01-10 Tom Tromey <tom@tromey.com>
17192
17193 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17194 (ltpy_get_all_source_lines): Use gdbpy_ref.
17195
17196 2017-01-10 Tom Tromey <tom@tromey.com>
17197
17198 * python/py-framefilter.c (extract_sym, extract_value)
17199 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17200 gdbpy_ref.
17201
17202 2017-01-10 Tom Tromey <tom@tromey.com>
17203
17204 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17205
17206 2017-01-10 Tom Tromey <tom@tromey.com>
17207
17208 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17209
17210 2017-01-10 Tom Tromey <tom@tromey.com>
17211
17212 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17213 gdbpy_ref.
17214
17215 2017-01-10 Tom Tromey <tom@tromey.com>
17216
17217 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17218
17219 2017-01-10 Tom Tromey <tom@tromey.com>
17220
17221 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17222 (typy_range): Use gdbpy_ref.
17223
17224 2017-01-10 Tom Tromey <tom@tromey.com>
17225
17226 * python/py-threadevent.c (create_thread_event_object): Use
17227 gdbpy_ref.
17228 * python/py-stopevent.c (create_stop_event_object): Simplify.
17229 (emit_stop_event): Use gdbpy_ref.
17230 * python/py-signalevent.c (create_signal_event_object): Use
17231 gdbpy_ref.
17232 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17233 (emit_new_objfile_event, create_clear_objfiles_event_object)
17234 (emit_clear_objfiles_event): Use gdbpy_ref.
17235 * python/py-infevents.c (create_inferior_call_event_object)
17236 (create_register_changed_event_object)
17237 (create_memory_changed_event_object, emit_inferior_call_event)
17238 (emit_memory_changed_event, emit_register_changed_event): Use
17239 gdbpy_ref.
17240 * python/py-exitedevent.c (create_exited_event_object)
17241 (emit_exited_event): Use gdbpy_ref.
17242 * python/py-event.h (evpy_emit_event): Remove
17243 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17244 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17245 * python/py-continueevent.c (emit_continue_event): Use
17246 gdbpy_ref.
17247 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17248 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17249 gdbpy_ref.
17250 * python/py-bpevent.c (create_breakpoint_event_object): Use
17251 gdbpy_ref.
17252
17253 2017-01-10 Tom Tromey <tom@tromey.com>
17254
17255 * python/py-ref.h: New file.
17256
17257 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17258
17259 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17260 void.
17261 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17262 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17263 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17264 * ui-out.c (ui_out::redirect): Likewise.
17265 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17266 * cli/cli-logging.c (set_logging_redirect): Update call site of
17267 ui_out::redirect.
17268 (handle_redirections): Likewise.
17269 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17270 * top.c (execute_command_to_string): Likewise.
17271 * utils.c (do_ui_out_redirect_pop): Likewise.
17272
17273 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17274
17275 * stack.c (_initialize_stack): Update "frame" command help message.
17276
17277 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17278
17279 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17280
17281 2017-01-06 Yao Qi <yao.qi@linaro.org>
17282
17283 * x86-linux-nat.h: Include gdb_proc_service.h.
17284
17285 2017-01-06 Yao Qi <yao.qi@linaro.org>
17286
17287 * ser-base.h: Include serial.h.
17288
17289 2017-01-06 Yao Qi <yao.qi@linaro.org>
17290
17291 * ppc-linux-tdep.h: Include ppc-tdep.h.
17292
17293 2017-01-06 Yao Qi <yao.qi@linaro.org>
17294
17295 * nat/amd64-linux-siginfo.h: Include signal.h.
17296
17297 2017-01-06 Yao Qi <yao.qi@linaro.org>
17298
17299 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17300
17301 2017-01-06 Yao Qi <yao.qi@linaro.org>
17302
17303 * mi/mi-parse.h: Include mi-cmds.h.
17304
17305 2017-01-06 Yao Qi <yao.qi@linaro.org>
17306
17307 * inf-loop.c: Don't include "target.h".
17308 * inf-loop.h: Include it here.
17309
17310 2017-01-06 Yao Qi <yao.qi@linaro.org>
17311
17312 * dfp.h: Include "dboulest.h" and "expression.h".
17313
17314 2017-01-06 Yao Qi <yao.qi@linaro.org>
17315
17316 * ax-gdb.h: Include "ax.h".
17317
17318 2017-01-06 Yao Qi <yao.qi@linaro.org>
17319
17320 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17321 with nat/gdb_ptrace.h.
17322
17323 2017-01-05 Yao Qi <yao.qi@linaro.org>
17324
17325 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17326 new line.
17327 (mips64_fbsd_sigframe_init): Likewise.
17328
17329 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17330
17331 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17332 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17333
17334 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17335
17336 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17337 * NEWS: Mention new FreeBSD/mips native configuration.
17338 * config/mips/fbsd.mh: New file.
17339 * configure.host: Add mips*-*-freebsd*.
17340 * mips-fbsd-nat.c: New file.
17341
17342 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17343
17344 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17345 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17346 * NEWS: Mention new FreeBSD/mips target.
17347 * configure.tgt: Add mips*-*-freebsd*.
17348 * mips-fbsd-tdep.c: New file.
17349 * mips-fbsd-tdep.h: New file.
17350
17351 2017-01-04 Yao Qi <yao.qi@linaro.org>
17352
17353 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17354 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17355
17356 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17357
17358 Update copyright year range in all GDB files.
17359
17360 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17361
17362 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17363
17364 For older changes see ChangeLog-2016.
17365 \f
17366 Local Variables:
17367 mode: change-log
17368 left-margin: 8
17369 fill-column: 74
17370 version-control: never
17371 coding: utf-8
17372 End:
This page took 0.393233 seconds and 4 git commands to generate.