]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Fix stepping past GNU ifunc resolvers (introduce lookup_msym_prefer)
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
20944a6e
PA
12018-04-26 Pedro Alves <palves@redhat.com>
2
3 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
4 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5 'want_trampoline' parameter by a lookup_msym_prefer parameter.
6 Handle it.
7 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8 (lookup_minimal_symbol_by_pc): Adjust.
9 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10 (lookup_solib_trampoline_symbol_by_pc): Adjust.
11 * minsyms.h (lookup_msym_prefer): New enum.
12 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
13 parameter by a lookup_msym_prefer parameter.
14
1adeb822
PA
152018-04-26 Pedro Alves <palves@redhat.com>
16
17 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
18 ends in "@plt" instead of looking at the symbol's section.
19
a0aca7b0
PA
202018-04-26 Pedro Alves <palves@redhat.com>
21
22 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
23 all references.
24 (find_pc_partial_function_gnu_ifunc): Rename to ...
25 (find_pc_partial_function): ... this, and remove references to
26 'is_gnu_ifunc_p'.
27 (find_pc_partial_function): Delete old implementation.
28 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
29
76af0f26
PA
302018-04-26 Pedro Alves <palves@redhat.com>
31
32 * linespec.c (struct bound_minimal_symbol_search_key): New.
33 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
34 skip first line if we found a GNU ifunc minimal symbol by name.
35 (compare_msymbols): Change parameters to work with a destructured
36 lhs minsym.
37 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
38 functions.
39
3467ec66
PA
402018-04-26 Pedro Alves <palves@redhat.com>
41
42 * breakpoint.c (set_breakpoint_location_function): Don't resolve
43 ifunc targets here. Instead, if we have an ifunc minsym, use its
44 address/name.
45 (add_location_to_breakpoint): Store the minsym and the objfile in
46 the breakpoint location.
47 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
48 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
49 Record the minsym in the sal.
50 * symtab.h (symtab_and_line) <msymbol>: New field.
51
28f4fa4d
PA
522018-04-26 Pedro Alves <palves@redhat.com>
53
54 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
55 unless we actually resolved the ifunc.
56
ca31ab1d
PA
572018-04-26 Pedro Alves <palves@redhat.com>
58
59 * c-exp.y (variable production): Prefer ifunc minsyms over
60 regular function symbols.
61 * symtab.c (find_gnu_ifunc): New function.
62 * minsyms.h (lookup_msym_prefer): New enum.
63 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
64 parameter by a lookup_msym_prefer parameter.
65 * symtab.h (find_gnu_ifunc): New declaration.
66
8388016d
PA
672018-04-26 Pedro Alves <palves@redhat.com>
68
69 * blockframe.c (find_gnu_ifunc_target_type): New function.
70 (find_function_type): New.
71 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
72 return a value with a memory address.
73 (eval_call): For calls to GNU ifunc functions, try to find the
74 type of the target function from the type that the resolver
75 returns.
76 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
77 symbols.
78 * infcall.c (find_function_return_type): Delete.
79 (find_function_addr): Add 'function_type' parameter. For calls to
80 GNU ifunc functions, try to find the type of the target function
81 from the type that the resolver returns, and return it via
82 FUNCTION_TYPE.
83 (call_function_by_hand_dummy): Adjust to use the function type
84 returned by find_function_addr.
85 (find_function_addr): Add 'function_type' parameter and move
86 description here.
87 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
88 declarations.
89
a376e11d
PA
902018-04-26 Pedro Alves <palves@redhat.com>
91
92 * c-exp.y (variable production): Skip finding an alias for ifunc
93 symbols.
94
02e169e2
PA
952018-04-26 Pedro Alves <palves@redhat.com>
96
97 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
98
249b5733
PA
992018-04-25 Pedro Alves <palves@redhat.com>
100
101 * infcmd.c (kill_command): Print the pid as string, not the whole
102 thread's ptid. Add comment. s/has been killed/killed/ in output
103 message.
104 * remote.c (remote_detach_1): Print the pid as string, not the
105 whole thread's ptid.
106
f67c0c91
SDJ
1072018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
108 Sergio Durigan Junior <sergiodj@redhat.com>
109 Pedro Alves <palves@redhat.com>
110
111 * infcmd.c (kill_command): Print message when inferior has
112 been killed.
113 * inferior.c (print_inferior_events): Remove 'static'. Set as
114 '1'.
115 (add_inferior): Improve message printed when
116 'print_inferior_events' is on.
117 (exit_inferior): Remove message printed when
118 'print_inferior_events' is on.
119 (detach_inferior): Improve message printed when
120 'print_inferior_events' is on.
121 (initialize_inferiors): Use 'add_inferior_silent' to set
122 'current_inferior_'.
123 * inferior.h (print_inferior_events): Declare here as
124 'extern'.
125 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
126 '[Detaching...]' messages when 'print_inferior_events' is on.
127 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
128 as prefix/suffix for messages. Remove periods. Fix erroneous
129 'Detaching after fork from child...', replace it by '... from
130 parent...'.
131 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
132 prefix/suffix when printing 'Detaching...' messages. Print
133 them when 'print_inferior_events' is on.
134 * remote.c (remote_detach_1): Print message when detaching
135 from inferior and '!is_fork_parent'.
136
e427af18
TT
1372018-04-24 Tom Tromey <tom@tromey.com>
138
139 * cli-out.h: Reindent.
140
05b1d8d6
TT
1412018-04-24 Tom Tromey <tom@tromey.com>
142
143 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
144 (cli_ui_out::do_field_string): Use fputs_filtered.
145 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
146
a95c7dab
TT
1472018-04-23 Tom Tromey <tom@tromey.com>
148
149 * guile/scm-frame.c (gdbscm_frame_read_var): Use
150 gdb::unique_xmalloc_ptr.
151
458412c3
TT
1522018-04-23 Tom Tromey <tom@tromey.com>
153
154 * configure: Rebuild.
155
db86b02b
RS
1562018-04-22 Rajendra SY <rajendra.sy@gmail.com>
157
158 PR gdb/23095
159 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
160 prepare_for_testing. Set normal_bp to r_debug_state if target
161 is bsd.
162
00aecdcf
PA
1632018-04-21 Pedro Alves <palves@redhat.com>
164 Rajendra SY <rajendra.sy@gmail.com>
165
166 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
167 * remote.c (extended_remote_attach): In all-stop mode, mark the
168 thread as executing.
169
224608c3
PW
1702018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
171
172 * thread.c (thread_apply_all_command): Fix comment.
173 (thread_command): Fix comment.
174
3b74854b
AH
1752018-04-10 Alan Hayward <alan.hayward@arm.com>
176
177 * common/tdesc.h (tdesc_create_feature): Remove xml filename
178 parameter.
179 * features/aarch64-core.c (create_feature_aarch64_core):
180 Regenerate.
181 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
182 Likewise.
183 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
184 Likewise.
185 * features/i386/32bit-avx512.c
186 (create_feature_i386_32bit_avx512): Likewise.
187 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
188 Likewise.
189 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
190 Likewise.
191 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
192 Likewise.
193 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
194 Likewise.
195 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
196 Likewise.
197 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
198 Likewise.
199 * features/i386/64bit-avx512.c
200 (create_feature_i386_64bit_avx512): Likewise.
201 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
202 Likewise.
203 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
204 Likewise.
205 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
206 Likewise.
207 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
208 Likewise.
209 * features/i386/64bit-segments.c
210 (create_feature_i386_64bit_segments): Likewise.
211 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
212 Likewise.
213 * features/i386/x32-core.c
214 (create_feature_i386_x32_core): Likewise.
215 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
216 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
217 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
218 * target-descriptions.c: In generated code, don't pass xml
219 filename.
220
e98577a9
AH
2212018-04-18 Alan Hayward <alan.hayward@arm.com>
222
223 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
224 (print_xml_feature::visit_post): Likewise.
225 (print_xml_feature::visit): Likewise.
226 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
227 (print_xml_feature): Add new class.
228 * regformats/regdat.sh: Null xmltarget on feature targets.
229 * target-descriptions.c (struct target_desc): Add xmltarget.
230 (maintenance_check_tdesc_xml_convert): Add unittest function.
231 (tdesc_get_features_xml): Add function to get xml.
232 (maintenance_check_xml_descriptions): Test xml generation.
233 * xml-tdesc.c (string_read_description_xml): Add function.
234 * xml-tdesc.h (string_read_description_xml): Add declaration.
235
ad7fc756
AH
2362018-04-18 Alan Hayward <alan.hayward@arm.com>
237
238 * features/Makefile: Add feature marker to targets with new style
239 target descriptions.
240 * regformats/aarch64.dat: Regenerate.
241 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
242 * regformats/i386/amd64-avx-linux.dat: Likewise.
243 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
244 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
245 * regformats/i386/amd64-linux.dat: Likewise.
246 * regformats/i386/amd64-mpx-linux.dat: Likewise.
247 * regformats/i386/amd64.dat: Likewise.
248 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
249 * regformats/i386/i386-avx-linux.dat: Likewise.
250 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
251 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
252 * regformats/i386/i386-linux.dat: Likewise.
253 * regformats/i386/i386-mmx-linux.dat: Likewise.
254 * regformats/i386/i386-mpx-linux.dat: Likewise.
255 * regformats/i386/i386.dat: Likewise.
256 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
257 * regformats/i386/x32-avx-linux.dat: Likewise.
258 * regformats/i386/x32-linux.dat: Likewise.
259 * regformats/tic6x-c62x-linux.dat: Likewise.
260 * regformats/tic6x-c64x-linux.dat: Likewise.
261 * regformats/tic6x-c64xp-linux.dat: Likewise.
262 * regformats/regdat.sh: Parse feature marker.
263
d278f585
AH
2642018-04-18 Alan Hayward <alan.hayward@arm.com>
265
266 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
267 (tdesc_osabi_name): Likewise.
268 * target-descriptions.c (tdesc_architecture_name): Add new
269 function.
270 (tdesc_osabi_name): Likewise.
271
eee8a18d
AH
2722018-04-18 Alan Hayward <alan.hayward@arm.com>
273
274 * common/tdesc.c (tdesc_predefined_type): Move to here.
275 (tdesc_named_type): Likewise.
276 (tdesc_create_vector): Likewise.
277 (tdesc_create_struct): Likewise.
278 (tdesc_set_struct_size): Likewise.
279 (tdesc_create_union): Likewise.
280 (tdesc_create_flags): Likewise.
281 (tdesc_create_enum): Likewise.
282 (tdesc_add_field): Likewise.
283 (tdesc_add_typed_bitfield): Likewise.
284 (tdesc_add_bitfield): Likewise.
285 (tdesc_add_flag): Likewise.
286 (tdesc_add_enum_value): Likewise.
287 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
288 (struct tdesc_type_vector): Likewise.
289 (struct tdesc_type_field): Likewise.
290 (struct tdesc_type_with_fields): Likewise.
291 (tdesc_create_enum): Add declaration.
292 (tdesc_add_typed_bitfield): Likewise.
293 (tdesc_add_enum_value): Likewise.
294 * target-descriptions.c (tdesc_type_field): Move from here.
295 (tdesc_type_builtin): Likewise.
296 (tdesc_type_vector): Likewise.
297 (tdesc_type_with_fields): Likewise.
298 (tdesc_predefined_types): Likewise.
299 (tdesc_named_type): Likewise.
300 (tdesc_create_vector): Likewise.
301 (tdesc_create_struct): Likewise.
302 (tdesc_set_struct_size): Likewise.
303 (tdesc_create_union): Likewise.
304 (tdesc_create_flags): Likewise.
305 (tdesc_create_enum): Likewise.
306 (tdesc_add_field): Likewise.
307 (tdesc_add_typed_bitfield): Likewise.
308 (tdesc_add_bitfield): Likewise.
309 (tdesc_add_flag): Likewise.
310 (tdesc_add_enum_value): Likewise.
311 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
312 (tdesc_add_typed_bitfield): Likewise.
313 (tdesc_add_enum_value): Likewise.
314
82ec9bc7
AH
3152018-04-18 Alan Hayward <alan.hayward@arm.com>
316
317 * common/tdesc.c (tdesc_feature::accept): Move to here.
318 (tdesc_feature::operator==): Likewise.
319 (tdesc_create_reg): Likewise.
320 * common/tdesc.h (tdesc_type_kind): Likewise.
321 (struct tdesc_type): Likewise.
322 (struct tdesc_feature): Likewise.
323 * regformats/regdat.sh: Create a feature.
324 * target-descriptions.c (tdesc_type_kind): Move from here.
325 (tdesc_type): Likewise.
326 (tdesc_type_up): Likewise.
327 (tdesc_feature): Likewise.
328 (tdesc_create_reg): Likewise.
329
ea3e7d71
AH
3302018-04-18 Alan Hayward <alan.hayward@arm.com>
331
332 * Makefile.in: Add arch/tdesc.c
333 * common/tdesc.c: New file.
334 * common/tdesc.h (tdesc_element_visitor): Move to here.
335 (tdesc_element): Likewise.
336 (tdesc_reg): Likewise.
337 (tdesc_reg_up): Likewise.
338 * regformats/regdef.h (reg): Add offset to constructors.
339 * target-descriptions.c (tdesc_element_visitor): Move from here.
340 (tdesc_element): Likewise.
341 (tdesc_reg): Likewise.
342 (tdesc_reg_up): Likewise.
343
bedda9ac
TT
3442018-04-17 Tom Tromey <tom@tromey.com>
345
346 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
347 discriminant field.
348
a037790e
TT
3492018-04-17 Tom Tromey <tom@tromey.com>
350
351 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
352
c7dcbf88
AA
3532018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
354
355 * symtab.c (print_symbol_info): Skip printing filename and line
356 number when `last' is NULL.
357 (symtab_symbol_info): Use empty string instead of NULL for first
358 invocation of print_symbol_info.
359 (rbreak_command): Pass NULL to `last' parameter of
360 print_symbol_info.
361
07d28c77
SM
3622018-04-16 Simon Marchi <simon.marchi@ericsson.com>
363
364 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
365 instead of nullptr.
366
8a3de5e1
PA
3672018-04-16 Pedro Alves <palves@redhat.com>
368
369 * MAINTAINERS (sh): Remove.
370 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
371 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
372 (ALLDEPFILES): Remove sh64-tdep.c.
373 * NEWS: Mentions that support for SH-5/SH64 is removed.
374 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
375 (sh*-*-openbsd*): Ditto.
376 (sh64-*-elf*): Remove.
377 (sh*): Remove.
378 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
379 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
380 * sh-tdep.c: No longer include "sh64-tdep.h".
381 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
382 * sh64-tdep.c, sh64-tdep.h: Remove files.
383
a2a79012
PA
3842018-04-16 Pedro Alves <palves@redhat.com>
385
386 * MAINTAINERS: Remove m88k.
387 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
388 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
389 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
390 * NEWS: Mention that support for m88k was removed.
391 * configure.host (m88*-*-*): Remove support.
392 * configure.nat (m88k-*-*): Remove support.
393 * configure.tgt (m88*-*-openbsd*): Remove.
394 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
395
eda4efb1
SM
3962018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
397
398 * configure.tgt (x86_tobjs): New variable.
399 (amd64_tobjs, i386_tobjs): Use it.
400
b744723f
AA
4012018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
402
403 * symtab.c (print_symbol_info): Precede the symbol definition by
404 the line number when available.
405 * NEWS: Advertise this enhancement.
406
4a4495d6
MM
4072018-04-13 Markus Metzger <markus.t.metzger@intel.com>
408
409 * NEWS (New options): announce set/show record btrace cpu.
410 * btrace.c: Include record-btrace.h.
411 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
412 the vendor is unknown.
413 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
414 Maybe overwrite the btrace configuration's cpu.
415 (btrace_compute_ftrace): Add cpu parameter. Update callers.
416 (btrace_fetch): Add cpu parameter. Update callers.
417 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
418 Maybe overwrite the btrace configuration's cpu. Skip enabling
419 errata workarounds if the vendor is unknown.
420 * python/py-record-btrace.c: Include record-btrace.h.
421 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
422 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
423 * record-btrace.c (record_btrace_cpu_state_kind): New.
424 (record_btrace_cpu): New.
425 (set_record_btrace_cpu_cmdlist): New.
426 (record_btrace_get_cpu): New.
427 (require_btrace_thread, record_btrace_info)
428 (record_btrace_resume_thread): Call record_btrace_get_cpu.
429 (cmd_set_record_btrace_cpu_none): New.
430 (cmd_set_record_btrace_cpu_auto): New.
431 (cmd_set_record_btrace_cpu): New.
432 (cmd_show_record_btrace_cpu): New.
433 (_initialize_record_btrace): Initialize set/show record btrace cpu
434 commands.
435 * record-btrace.h (record_btrace_get_cpu): New.
436
69f90c75
MM
4372018-04-13 Markus Metzger <markus.t.metzger@intel.com>
438
439 * record.c (set_record_command): Fix typo in message.
440
b85310e1
MM
4412018-04-13 Markus Metzger <markus.t.metzger@intel.com>
442
443 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
444
1d509aa6
MM
4452018-04-13 Markus Metzger <markus.t.metzger@intel.com>
446
447 * infrun.c (process_event_stop_test): Call
448 gdbarch_in_indirect_branch_thunk.
449 * gdbarch.sh (in_indirect_branch_thunk): New.
450 * gdbarch.c: Regenerated.
451 * gdbarch.h: Regenerated.
452 * x86-tdep.h: New.
453 * x86-tdep.c: New.
454 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
455 (HFILES_NO_SRCDIR): Add x86-tdep.h.
456 (ALLDEPFILES): Add x86-tdep.c.
457 * arch-utils.h (default_in_indirect_branch_thunk): New.
458 * arch-utils.c (default_in_indirect_branch_thunk): New.
459 * i386-tdep: Include x86-tdep.h.
460 (i386_in_indirect_branch_thunk): New.
461 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
462 function.
463 * amd64-tdep: Include x86-tdep.h.
464 (amd64_in_indirect_branch_thunk): New.
465 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
466
b4be9bfd
JK
4672018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
468
469 PR gdb/23053
470 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
471 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
472 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
473 regression.
474
53d7df28
TT
4752018-04-12 Tom Tromey <tom@tromey.com>
476
477 * rust-lang.c (rust_print_struct_def): Remove univariant code.
478 (rust_evaluate_subexp): Likewise.
479
70b33f19
PA
4802018-04-12 Pedro Alves <palves@redhat.com>
481
482 * procfs.c (procfs_detach): Make forward declaration's prototype
483 match definition's protototype.
484 (proc_get_LDT_entry): Remove stale do_cleanups call.
485
436411b1
PA
4862018-04-12 Pedro Alves <palves@redhat.com>
487
488 * target.h (target_ops::to_has_exited): Delete.
489 (target_has_exited): Delete.
490 * target-delegates.c: Regenerate.
491
20db9c52
PA
4922018-04-11 Pedro Alves <palves@redhat.com>
493
494 * target.c (fileio_fh_t::t): Add comment.
495 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
496 (target_fileio_close): Handle a NULL target.
497 (invalidate_fileio_fh): New.
498 (target_close): Call it.
499 * remote.c (remote_hostio_send_command): No longer check whether
500 remote_desc is open.
501
5ff79300
PA
5022018-04-11 Pedro Alves <palves@redhat.com>
503
504 * target.c (fileio_fh_t): Make it a named struct instead of a
505 typedef.
506 (fileio_fh_t::is_closed): New method.
507 (DEF_VEC_O (fileio_fh_t)): Remove.
508 (fileio_fhandles): Now a std::vector.
509 (is_closed_fileio_fh): Delete.
510 (acquire_fileio_fd): Adjust. Rename parameters.
511 (release_fileio_fd): Adjust.
512 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
513 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
514 (target_fileio_close): Adjust.
515
6e22e10d
SM
5162018-04-10 Simon Marchi <simon.marchi@ericsson.com>
517
518 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
519 index.
520
731f534f
PA
5212018-04-10 Pedro Alves <palves@redhat.com>
522
523 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
524 (scoped_finish_thread_state): New class.
525 * infcmd.c (run_command_1): Use it instead of finish_thread_state
526 cleanup.
527 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
528 (fetch_inferior_event, normal_stop): Likewise.
529 * thread.c (finish_thread_state_cleanup): Delete.
530
d5f4488f
SM
5312018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
532 Pedro Alves <palves@redhat.com>
533
534 * value.c: Include "selftest.h" and "common/array-view.h".
535 (struct range) <operator ==>: New.
536 (test_ranges_contain): New.
537 (check_ranges_vector): New.
538 (test_insert_into_bit_range_vector): New.
539 (_initialize_values): Register selftests.
540 * common/array-view.h (operator==, operator!=): New.
541
b24531ed
SM
5422018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
543
544 * common/gdb_vecs.h (unordered_remove): Add overload that takes
545 an iterator.
546 * inline-frame.c: Include <algorithm>.
547 (struct inline_state): Add constructor.
548 (inline_state_s): Remove.
549 (DEF_VEC_O(inline_state_s)): Remove.
550 (inline_states): Change type to std::vector.
551 (find_inline_frame_state): Adjust to std::vector.
552 (allocate_inline_frame_state): Remove.
553 (clear_inline_frame_state): Adjust to std::vector.
554 (skip_inline_frames): Adjust to std::vector.
555
c252925c
SM
5562018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
557
558 * tracepoint.h (struct trace_state_variable): Add constructor.
559 <name>: Change type to std::string.
560 * tracepoint.c (tsv_s): Remove.
561 (DEF_VEC_O(tsv_s)): Remove.
562 (tvariables): Change to std::vector.
563 (create_trace_state_variable): Adjust to std::vector.
564 (find_trace_state_variable): Likewise.
565 (find_trace_state_variable_by_number): Likewise.
566 (delete_trace_state_variable): Likewise.
567 (trace_variable_command): Adjust to std::string.
568 (delete_trace_variable_command): Likewise.
569 (tvariables_info_1): Adjust to std::vector.
570 (save_trace_state_variables): Likewise.
571 (start_tracing): Likewise.
572 (merge_uploaded_trace_state_variables): Adjust to std::vector
573 and std::string.
574 * target.h (struct target_ops)
575 <to_download_trace_state_variable>: Pass reference to
576 trace_state_variable.
577 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
578 * target-delegates.c: Re-generate.
579 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
580 (mi_tsv_deleted): Likewise.
581 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
582 * remote.c (remote_download_trace_state_variable): Change
583 pointer to reference and adjust.
584 * make-target-delegates (parse_argtypes): Handle references.
585 (write_function_header): Likewise.
586 (munge_type): Likewise.
587
c9638d26
SM
5882018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
589
590 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
591 string_view-selftests.c.
592 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
593 testsuite.
594 * unittests/basic_string_view/cons/char/1.cc: Likewise.
595 * unittests/basic_string_view/cons/char/2.cc: Likewise.
596 * unittests/basic_string_view/cons/char/3.cc: Likewise.
597 * unittests/basic_string_view/element_access/char/1.cc:
598 Likewise.
599 * unittests/basic_string_view/element_access/char/empty.cc:
600 Likewise.
601 * unittests/basic_string_view/element_access/char/front_back.cc:
602 Likewise.
603 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
604 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
605 Likewise.
606 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
607 Likewise.
608 * unittests/basic_string_view/modifiers/swap/char/1.cc:
609 Likewise.
610 * unittests/basic_string_view/operations/compare/char/1.cc:
611 Likewise.
612 * unittests/basic_string_view/operations/compare/char/13650.cc:
613 Likewise.
614 * unittests/basic_string_view/operations/copy/char/1.cc:
615 Likewise.
616 * unittests/basic_string_view/operations/data/char/1.cc:
617 Likewise.
618 * unittests/basic_string_view/operations/find/char/1.cc:
619 Likewise.
620 * unittests/basic_string_view/operations/find/char/2.cc:
621 Likewise.
622 * unittests/basic_string_view/operations/find/char/3.cc:
623 Likewise.
624 * unittests/basic_string_view/operations/find/char/4.cc:
625 Likewise.
626 * unittests/basic_string_view/operations/rfind/char/1.cc:
627 Likewise.
628 * unittests/basic_string_view/operations/rfind/char/2.cc:
629 Likewise.
630 * unittests/basic_string_view/operations/rfind/char/3.cc:
631 Likewise.
632 * unittests/basic_string_view/operations/substr/char/1.cc:
633 Likewise.
634 * unittests/basic_string_view/operators/char/2.cc: Likewise.
635 * unittests/string_view-selftests.c: New file.
636
fdc11678
SM
6372018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
638
639 * unittests/basic_string_view/capacity/1.cc: New file.
640 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
641 * unittests/basic_string_view/cons/char/1.cc: New file.
642 * unittests/basic_string_view/cons/char/2.cc: New file.
643 * unittests/basic_string_view/cons/char/3.cc: New file.
644 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
645 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
646 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
647 * unittests/basic_string_view/element_access/char/1.cc: New file.
648 * unittests/basic_string_view/element_access/char/2.cc: New file.
649 * unittests/basic_string_view/element_access/char/empty.cc: New file.
650 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
651 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
652 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
653 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
654 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
655 * unittests/basic_string_view/include.cc: New file.
656 * unittests/basic_string_view/inserters/char/1.cc: New file.
657 * unittests/basic_string_view/inserters/char/2.cc: New file.
658 * unittests/basic_string_view/inserters/char/3.cc: New file.
659 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
660 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
661 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
662 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
663 * unittests/basic_string_view/literals/types.cc: New file.
664 * unittests/basic_string_view/literals/values.cc: New file.
665 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
666 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
667 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
668 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
669 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
670 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
671 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
672 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
673 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
674 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
675 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
676 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
677 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
678 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
679 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
680 * unittests/basic_string_view/operations/data/char/1.cc: New file.
681 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
682 * unittests/basic_string_view/operations/find/char/1.cc: New file.
683 * unittests/basic_string_view/operations/find/char/2.cc: New file.
684 * unittests/basic_string_view/operations/find/char/3.cc: New file.
685 * unittests/basic_string_view/operations/find/char/4.cc: New file.
686 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
687 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
688 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
689 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
690 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
691 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
692 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
693 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
694 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
695 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
696 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
697 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
698 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
699 * unittests/basic_string_view/operators/char/2.cc: New file.
700 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
701 * unittests/basic_string_view/range_access/char/1.cc: New file.
702 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
703 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
704 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
705 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
706 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
707 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
708 * unittests/basic_string_view/requirements/typedefs.cc: New file.
709 * unittests/basic_string_view/typedefs.cc: New file.
710 * unittests/basic_string_view/types/1.cc: New file.
711
8345c4a2
SM
7122018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
713
714 * common/gdb_string_view.h: Remove libstdc++ implementation
715 details, adjust to gdb reality.
716 * common/gdb_string_view.tcc: Likewise.
717 * cli/cli-script.c (struct string_view): Remove.
718 (user_args) <m_args>: Change element type to gdb::string_view.
719 (user_args::insert_args): Adjust.
720
7adcdf08
SM
7212018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
722
723 * common/gdb_string_view.h: New file.
724 * common/gdb_string_view.tcc: New file.
725
41260ac2
SM
7262018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
727
728 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
729 * configure: Re-generate.
730
0bee6dd4
PA
7312018-04-09 Pedro Alves <palves@redhat.com>
732
733 * gdbarch.sh: Include "observable.h" instead of "observer.h".
734 (set_target_gdbarch): Call
735 gdb::observers::architecture_changed.notify instead of
736 observer_notify_architecture_changed.
737
6f14adc5
SM
7382018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
739
740 * tracepoint.c (struct current_traceframe_cleanup): Remove.
741 (do_restore_current_traceframe_cleanup): Remove.
742 (restore_current_traceframe_cleanup_dtor): Remove.
743 (make_cleanup_restore_current_traceframe): Remove.
744 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
745 New.
746 * tracepoint.h (struct scoped_restore_current_traceframe): New.
747 * infrun.c (fetch_inferior_event): Use
748 scoped_restore_current_traceframe.
749
b2bdb8cf
SM
7502018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
751
752 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
753 Remove.
754 <n_allocated_type_units>: Remove.
755 <all_type_units>: Change to std::vector.
756 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
757 to std::vector change.
758 (dwarf2_per_objfile::get_cutu): Likewise.
759 (dwarf2_per_objfile::get_tu): Likewise.
760 (create_signatured_type_table_from_index): Likewise.
761 (create_signatured_type_table_from_debug_names): Likewise.
762 (dw2_symtab_iter_next): Likewise.
763 (dw2_print_stats): Likewise.
764 (dw2_expand_all_symtabs): Likewise.
765 (dw2_expand_marked_cus): Likewise.
766 (dw2_debug_names_iterator::next): Likewise.
767 (dwarf2_initialize_objfile): Likewise.
768 (add_signatured_type_cu_to_table): Likewise.
769 (create_all_type_units): Likewise.
770 (add_type_unit): Likewise.
771 (struct tu_abbrev_offset): Add constructor.
772 (build_type_psymtabs_1): Adjust to std::vector change.
773 (print_tu_stats): Likewise.
774 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
775 (write_debug_names): Likewise.
776
b76e467d
SM
7772018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
778
779 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
780 Make an std::vector.
781 <n_comp_units>: Remove.
782 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
783 to std::vector change.
784 (dwarf2_per_objfile::get_cutu): Likewise.
785 (dwarf2_per_objfile::get_cu): Likewise.
786 (create_cus_from_index): Likewise.
787 (create_addrmap_from_index): Likewise.
788 (create_addrmap_from_aranges): Likewise.
789 (dwarf2_read_index): Likewise.
790 (dw2_find_last_source_symtab): Likewise.
791 (dw2_map_symtabs_matching_filename): Likewise.
792 (dw2_symtab_iter_next): Likewise.
793 (dw2_print_stats): Likewise.
794 (dw2_expand_all_symtabs): Likewise.
795 (dw2_expand_symtabs_with_fullname): Likewise.
796 (dw2_expand_marked_cus): Likewise.
797 (dw2_map_symbol_filenames): Likewise.
798 (create_cus_from_debug_names): Likewise.
799 (dwarf2_read_debug_names): Likewise.
800 (dw2_debug_names_iterator::next): Likewise.
801 (dwarf2_initialize_objfile): Likewise.
802 (set_partial_user): Likewise.
803 (dwarf2_build_psymtabs_hard): Likewise.
804 (read_comp_units_from_section): Remove arguments, adjust to
805 std::vector change.
806 (create_all_comp_units): Adjust to std::vector and
807 read_comp_units_from_section changes.
808 (dwarf2_find_containing_comp_unit): Adjust to std::vector
809 change.
810 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
811 (psyms_seen_size): Likewise.
812 (write_gdbindex): Likewise.
813 (write_debug_names): Likewise.
814
12359b5e
SM
8152018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
816
817 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
818 with dwarf2_per_objfile.
819 (create_cus_from_index): Likewise.
820 (create_signatured_type_table_from_index): Likewise.
821 (dwarf2_read_index): Likewise.
822 (dwarf2_initialize_objfile): Likewise.
823 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
824 per_cu rather than get_dwarf2_per_objfile.
825
ff4c9fec
SM
8262018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
827
828 * dwarf2read.h (struct signatured_type): Forward declare.
829 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
830 New methods.
831 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
832 (dw2_get_cutu): ...this.
833 (dwarf2_per_objfile::get_cu): Rename from...
834 (dw2_get_cu): ...this.
835 (dwarf2_per_objfile::get_tu): New.
836 (create_addrmap_from_index): Adjust.
837 (create_addrmap_from_aranges): Adjust.
838 (dw2_find_last_source_symtab): Adjust.
839 (dw2_map_symtabs_matching_filename): Adjust.
840 (dw2_symtab_iter_next): Adjust.
841 (dw2_print_stats): Adjust.
842 (dw2_expand_all_symtabs): Adjust.
843 (dw2_expand_symtabs_with_fullname): Adjust.
844 (dw2_expand_marked_cus): Adjust.
845 (dw_expand_symtabs_matching_file_matcher): Adjust.
846 (dw2_map_symbol_filenames): Adjust.
847 (dw2_debug_names_iterator::next): Adjust.
848 (dwarf2_initialize_objfile): Adjust.
849 (set_partial_user): Adjust.
850 (dwarf2_build_psymtabs_hard): Adjust.
851
5ca3fcb6
SM
8522018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
853
854 * dwarf2read.c (create_signatured_type_table_from_debug_names):
855 Remove unused variables.
856 (dw2_map_symtabs_matching_filename): Likewise.
857 (dwarf2_record_block_ranges): Likewise.
858 (dwarf2_read_addr_index): Likewise.
859 (follow_die_offset): Likewise.
860
b2e586e8
SM
8612018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
862
863 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
864 to symbol_file_add_main.
865
7c4e78cf
SM
8662018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
867
868 PR mi/22299
869 * mi/mi-console.c (do_fputc_async_safe): New.
870 (mi_console_file::write_async_safe): New.
871 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
872 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
873 New.
874 * ui-file.c (ui_file::putstrn): Adjust call to
875 fputstrn_unfiltered.
876 * utils.c (printchar): Replace do_fputs and do_fprintf
877 parameters by do_fputc.
878 (fputstr_filtered): Adjust call to printchar.
879 (fputstr_unfiltered): Likewise.
880 (fputstrn_filtered): Likewise.
881 (fputstrn_unfiltered): Add do_fputc parameter, pass to
882 printchar.
883 * utils.h (do_fputc_ftype): New typedef.
884 (fputstrn_unfiltered): Add do_fputc parameter.
885
5dc026d3
SM
8862018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
887
888 * regformats/i386/i386-avx.dat: Remove.
889
c912f608
SM
8902018-04-07 Simon Marchi <simon.marchi@ericsson.com>
891
892 PR gdb/22979
893 * amd64-tdep.c (amd64_none_init_abi): New function.
894 (amd64_x32_none_init_abi): New function.
895 (_initialize_amd64_tdep): Register handlers for x86-64 and
896 x64_32 with GDB_OSABI_NONE.
897 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
898 GDB_OSABI_NONE osabi.
899
26540402
SM
9002018-04-07 Simon Marchi <simon.marchi@ericsson.com>
901
902 PR gdb/22980
903 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
904 GDB_OSABI_NONE.
905 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
906 * osabi.c (gdb_osabi_names): Add "unknown" entry.
907
9018be22
SM
9082018-04-07 Simon Marchi <simon.marchi@ericsson.com>
909
910 * common/byte-vector.h (char_vector): New type.
911 * target.h (target_read_alloc): Return
912 gdb::optional<byte_vector>.
913 (target_read_stralloc): Return gdb::optional<char_vector>.
914 (target_get_osdata): Return gdb::optional<char_vector>.
915 * target.c (target_read_alloc_1): Templatize. Replacement
916 manual memory management with vector.
917 (target_read_alloc): Change return type, adjust.
918 (target_read_stralloc): Change return type, adjust.
919 (target_get_osdata): Change return type, adjust.
920 * auxv.c (struct auxv_info) <length>: Remove.
921 <data>: Change type to gdb::optional<byte_vector>.
922 (auxv_inferior_data_cleanup): Free auxv_info with delete.
923 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
924 (target_auxv_search): Adjust.
925 (fprint_target_auxv): Adjust.
926 * avr-tdep.c (avr_io_reg_read_command): Adjust.
927 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
928 (linux_make_corefile_notes): Adjust.
929 * osdata.c (get_osdata): Adjust.
930 * remote.c (remote_get_threads_with_qxfer): Adjust.
931 (remote_memory_map): Adjust.
932 (remote_traceframe_info): Adjust.
933 (btrace_read_config): Adjust.
934 (remote_read_btrace): Adjust.
935 (remote_pid_to_exec_file): Adjust.
936 * solib-aix.c (solib_aix_get_library_list): Adjust.
937 * solib-dsbt.c (decode_loadmap): Don't free buf.
938 (dsbt_get_initial_loadmaps): Adjust.
939 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
940 * solib-target.c (solib_target_current_sos): Adjust.
941 * tracepoint.c (sdata_make_value): Adjust.
942 * xml-support.c (xinclude_start_include): Adjust.
943 (xml_fetch_content_from_file): Adjust.
944 * xml-support.h (xml_fetch_another): Change return type.
945 (xml_fetch_content_from_file): Change return type.
946 * xml-syscall.c (xml_init_syscalls_info): Adjust.
947 * xml-tdesc.c (file_read_description_xml): Adjust.
948 (fetch_available_features_from_target): Change return type.
949 (target_fetch_description_xml): Adjust.
950 (target_read_description_xml): Adjust.
951
14c88955
TT
9522018-04-06 Tom Tromey <tom@tromey.com>
953
954 * value.c (~value): Update.
955 (struct value) <contents>: Now unique_xmalloc_ptr.
956 (value_contents_bits_eq, allocate_value_contents)
957 (value_contents_raw, value_contents_all_raw)
958 (value_contents_for_printing, value_contents_for_printing_const)
959 (set_value_enclosing_type): Update.
960
0c7e6dd8
TT
9612018-04-06 Tom Tromey <tom@tromey.com>
962
963 * value.c (range_s): Remove typedef, VEC.
964 (struct range): Add operator<.
965 (range_lessthan): Remove.
966 (ranges_contain): Change type.
967 (~value): Update.
968 (struct value) <unavailable, optimized_out>: Now std::vector.
969 (value_entirely_available)
970 (value_entirely_covered_by_range_vector)
971 (value_entirely_unavailable, value_entirely_optimized_out):
972 Update.
973 (insert_into_bit_range_vector): Change argument type.
974 (find_first_range_overlap): Likewise.
975 (struct ranges_and_idx, value_contents_bits_eq)
976 (require_not_optimized_out, require_available): Update.
977 (ranges_copy_adjusted): Change argument types.
978 (value_optimized_out, value_copy, value_fetch_lazy): Update.
979
2c8331b9
TT
9802018-04-06 Tom Tromey <tom@tromey.com>
981
982 * value.c (~value): Update.
983 (struct value) <parent>: Now a value_ref_ptr.
984 (value_parent, set_value_parent, value_address, value_copy):
985 Update.
986
466ce3ae
TT
9872018-04-06 Tom Tromey <tom@tromey.com>
988
989 * value.c (struct value): Add constructor, destructor, and member
990 initializers.
991 (allocate_value_lazy, value_decref): Update.
992
062d818d
TT
9932018-04-06 Tom Tromey <tom@tromey.com>
994
995 * value.c (struct value) <released, next>: Remove.
996 (all_values): Now a std::vector.
997 (allocate_value_lazy): Update.
998 (value_next): Remove.
999 (value_mark, value_free_to_mark, release_value)
1000 (value_release_to_mark): Update.
1001
a6535de1
TT
10022018-04-06 Tom Tromey <tom@tromey.com>
1003
1004 * value.h (fetch_subexp_value, value_release_to_mark): Update.
1005 (free_value_chain): Remove.
1006 * value.c (free_value_chain): Remove.
1007 (value_release_to_mark): Return a std::vector.
1008 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
1009 std::vector.
1010 (check_condition): Update.
1011 * eval.c (fetch_subexp_value): Change "val_chain" to a
1012 std::vector.
1013 * breakpoint.c (update_watchpoint): Update.
1014 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
1015
b5621201
TT
10162018-04-06 Tom Tromey <tom@tromey.com>
1017
1018 * value.h (free_all_values): Remove.
1019 * value.c (free_all_values): Remove.
1020
4d0266a0
TT
10212018-04-06 Tom Tromey <tom@tromey.com>
1022
1023 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
1024 (value_history_chain, value_history_count): Remove.
1025 (value_history): New global.
1026 (record_latest_value, access_value_history, show_values)
1027 (preserve_values): Update.
1028
b4d61099
TT
10292018-04-06 Tom Tromey <tom@tromey.com>
1030
1031 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
1032 * varobj.c (varobj_set_display_format, varobj_set_value)
1033 (install_default_visualizer, construct_visualizer)
1034 (install_new_value, ~varobj, varobj_get_value_type)
1035 (my_value_of_variable, varobj_editable_p): Update.
1036 * c-varobj.c (c_describe_child, c_value_of_variable)
1037 (cplus_number_of_children, cplus_describe_child): Update.
1038 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
1039 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
1040 (ada_value_of_variable, ada_value_is_changeable_p): Update.
1041
9b558729
TT
10422018-04-06 Tom Tromey <tom@tromey.com>
1043
1044 * printcmd.c (last_examine_address): Change type to
1045 value_ref_ptr.
1046 (do_examine, x_command): Update.
1047
850645cf
TT
10482018-04-06 Tom Tromey <tom@tromey.com>
1049
1050 * value.c (release_value): Update.
1051 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
1052 (struct bpstats) <val>: Now a value_ref_ptr.
1053 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
1054 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
1055 (~watchpoint, print_it_watchpoint, watch_command_1)
1056 (invalidate_bp_value_on_memory_change): Update.
1057
22bc8444
TT
10582018-04-06 Tom Tromey <tom@tromey.com>
1059
1060 * varobj.c (varobj_clear_saved_item)
1061 (update_dynamic_varobj_children, install_new_value, ~varobj):
1062 Update.
1063 * value.h (value_incref): Move declaration earlier.
1064 (value_decref): Rename from value_free.
1065 (struct value_ref_policy): New.
1066 (value_ref_ptr): New typedef.
1067 (struct value_deleter): Remove.
1068 (gdb_value_up): Remove typedef.
1069 (release_value): Change return type.
1070 (release_value_or_incref): Remove.
1071 * value.c (set_value_parent): Update.
1072 (value_incref): Change return type.
1073 (value_decref): Rename from value_free.
1074 (value_free_to_mark, free_all_values, free_value_chain): Update.
1075 (release_value): Return value_ref_ptr.
1076 (release_value_or_incref): Remove.
1077 (record_latest_value, set_internalvar, clear_internalvar):
1078 Update.
1079 * stack.c (info_frame_command): Don't call value_free.
1080 * python/py-value.c (valpy_dealloc, valpy_new)
1081 (value_to_value_object): Update.
1082 * printcmd.c (do_examine): Update.
1083 * opencl-lang.c (lval_func_free_closure): Update.
1084 * mi/mi-main.c (register_changed_p): Don't call value_free.
1085 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
1086 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
1087 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
1088 value_free.
1089 * guile/scm-value.c (vlscm_free_value_smob)
1090 (vlscm_scm_from_value): Update.
1091 * frame.c (frame_register_unwind, frame_unwind_register_signed)
1092 (frame_unwind_register_unsigned, get_frame_register_bytes)
1093 (put_frame_register_bytes): Don't call value_free.
1094 * findvar.c (address_from_register): Don't call value_free.
1095 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
1096 * dwarf2loc.c (entry_data_value_free_closure)
1097 (value_of_dwarf_reg_entry, free_pieced_value_closure)
1098 (dwarf2_evaluate_loc_desc_full): Update.
1099 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
1100 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
1101 (~watchpoint, watch_command_1)
1102 (invalidate_bp_value_on_memory_change): Update.
1103 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
1104
7f8a5d38
SM
11052018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
1106
1107 PR gdb/23022
1108 * warning.m4: Add -Wno-error=deprecated-register.
1109 * configure: Re-generate.
1110
8a76bd3b
TT
11112018-04-05 Tom Tromey <tom@tromey.com>
1112
1113 * linespec.h: Remove include of "vec.h".
1114
8e8d776e
TT
11152018-04-05 Tom Tromey <tom@tromey.com>
1116
1117 * linespec.c (typep): Remove typedef.
1118 (find_methods, find_superclass_methods): Take a std::vector.
1119 (find_method): Use std::vector.
1120
9b2f8581
TT
11212018-04-05 Tom Tromey <tom@tromey.com>
1122
1123 * utils.c (compare_strings): Remove.
1124 * utils.h (compare_strings): Remove.
1125 * objc-lang.h (find_imps): Update.
1126 * objc-lang.c (find_methods): Take a std::vector.
1127 (uniquify_strings, find_imps): Likewise.
1128 * linespec.c (find_methods): Take a std::vector.
1129 (decode_objc): Use std::vector.
1130 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
1131 a std::vector.
1132 (find_method, find_function_symbols): Use std::vector.
1133
459a2e4c
TT
11342018-04-05 Tom Tromey <tom@tromey.com>
1135
1136 * completer.c (completion_tracker::completion_tracker): Remove
1137 cast.
1138 (completion_tracker::discard_completions): Likewise.
1139 * breakpoint.c (ambiguous_names_p): Remove cast.
1140 * ada-lang.c (_initialize_ada_language): Remove cast.
1141 * utils.h (streq): Update.
1142 (streq_hash): Add new declaration.
1143 * utils.c (streq): Return bool.
1144 (streq_hash): New function.
1145
9be2c17a
TT
11462018-04-05 Tom Tromey <tom@tromey.com>
1147
1148 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
1149 Remove a string copy.
1150
f73c6ece
TT
11512018-04-05 Tom Tromey <tom@tromey.com>
1152
1153 * linespec.c (filter_results): Use std::vector.
1154 (decode_line_2, decode_line_full): Update.
1155
53a0f8a2
TT
11562018-04-05 Tom Tromey <tom@tromey.com>
1157
1158 * linespec.c (canonical_to_fullform): Return std::string.
1159 (filter_results): Update.
1160 (struct decode_line_2_item): Add constructor.
1161 <fullform, displayform>: Now std::string.
1162 (decode_line_2_compare_items): Now a std::sort comparator.
1163 (decode_line_2): Update.
1164
a5b5adf5
TT
11652018-04-05 Tom Tromey <tom@tromey.com>
1166
1167 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
1168 (unexpected_linespec_error): Update.
1169 (linespec_parse_basic, parse_linespec): Update.
1170
6a307fc5
TT
11712018-04-05 Tom Tromey <tom@tromey.com>
1172
1173 * linespec.c (linespec_parse_basic): Reindent.
1174
41c1efc6
TT
11752018-04-05 Tom Tromey <tom@tromey.com>
1176
1177 * minsyms.h (iterate_over_minimal_symbols): Update.
1178 * minsyms.c (iterate_over_minimal_symbols): Take a
1179 gdb::function_view.
1180 * linespec.c (struct collect_minsyms): Remove.
1181 (compare_msyms): Now a std::sort comparator.
1182 (add_minsym): Add parameters.
1183 (search_minsyms_for_name): Update. Use std::vector.
1184
c5edbf3d
TT
11852018-04-03 Tom Tromey <tom@tromey.com>
1186
1187 * mipsread.c (read_alphacoff_dynamic_symtab): Use
1188 gdb::byte_vector.
1189
b39efc48
WP
11902018-04-02 Weimin Pan <weimin.pan@oracle.com>
1191
1192 * MAINTAINERS (Write After Approval): Add Weimin Pan.
1193
121ad66c 11942018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
1195
1196 PR gdb/16959
1197 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
1198 printing static type.
1199
09473be8
TT
12002018-04-01 Tom Tromey <tom@tromey.com>
1201
1202 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
1203 (rs6000_xfer_shared_libraries): Update.
1204
ec1f2d91
SM
12052018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
1206
1207 * common/gdb_vecs.h (char_ptr): Remove.
1208 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
1209
d8611974
SM
12102018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1211
1212 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
1213 with std::vector.
1214 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
1215
a18ba4e4
SM
12162018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1217
1218 * tracepoint.h (struct uploaded_tp): Initialize fields.
1219 <actions, step_actions, cmd_strings>: Change type to
1220 std::vector<char *>.
1221 * tracepoint.c (get_uploaded_tp): Allocate with new.
1222 (free_uploaded_tps): Free with delete.
1223 (parse_tracepoint_definition): Adjust to std::vector change.
1224 * breakpoint.c (read_uploaded_action): Likewise.
1225 (create_tracepoint_from_upload): Likewise.
1226 * ctf.c (ctf_write_uploaded_tp): Likewise.
1227 (SET_ARRAY_FIELD): Likewise.
1228 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
1229
a7961323
TT
12302018-03-30 Tom Tromey <tom@tromey.com>
1231
1232 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
1233 std::unique_ptr.
1234 (svr4_keep_data_in_core): Update.
1235 (svr4_read_so_list): Update.
1236
e83e4e24
TT
12372018-03-30 Tom Tromey <tom@tromey.com>
1238
1239 * windows-nat.c (handle_output_debug_string, handle_exception):
1240 Update.
1241 * target.h (target_read_string): Update.
1242 * target.c (target_read_string): Change "string" to
1243 unique_xmalloc_ptr.
1244 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
1245 Update.
1246 * solib-frv.c (frv_current_sos): Update.
1247 * solib-dsbt.c (dsbt_current_sos): Update.
1248 * solib-darwin.c (darwin_current_sos): Update.
1249 * linux-thread-db.c (inferior_has_bug): Update.
1250 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
1251 Update. Remove alloca.
1252 * ada-lang.c (ada_main_name): Update.
1253
263db9a1
TT
12542018-03-30 Tom Tromey <tom@tromey.com>
1255
1256 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
1257 (struct dwo_file_deleter): New.
1258 (dwo_file_up): New typedef.
1259 (open_and_init_dwo_file): Use dwo_file_up.
1260 (free_dwo_file_cleanup): Remove.
1261
5dafb3d1
TT
12622018-03-30 Tom Tromey <tom@tromey.com>
1263
1264 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
1265 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
1266
11ed8cad
TT
12672018-03-30 Tom Tromey <tom@tromey.com>
1268
1269 * dwarf2read.c (class free_cached_comp_units): New class.
1270 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
1271 (free_cached_comp_units): Remove function.
1272
9ae79dac
TT
12732018-03-30 Tom Tromey <tom@tromey.com>
1274
1275 * utils.h (make_cleanup_unpush_target): Remove.
1276 * inf-ptrace.c (struct target_unpusher): New.
1277 (target_unpush_up) New typedef.
1278 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
1279 target_unpush_up.
1280 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
1281
5aa89276
TT
12822018-03-27 Tom Tromey <tom@tromey.com>
1283
1284 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
1285
1dbeed45
TT
12862018-03-27 Pedro Alves <palves@redhat.com>
1287 Tom Tromey <tom@tromey.com>
1288
1289 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
1290 destructor. Now a class.
1291 (gdb_readline_wrapper_cleanup): Remove function.
1292 (gdb_readline_wrapper): Remove cleanups.
1293
c819b2c0
TT
12942018-03-27 Tom Tromey <tom@tromey.com>
1295
1296 * typeprint.h (struct type_print_options) <local_typedefs,
1297 global_typedefs>: Remove "struct" keyword.
1298 (class typedef_hash_table): New class.
1299 (recursively_update_typedef_hash, add_template_parameters)
1300 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
1301 (find_typedef_in_hash): Don't declare.
1302 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
1303 (typedef_hash_table::recursively_update): Rename from
1304 recursively_update_typedef_hash. Now a member.
1305 (typedef_hash_table::add_template_parameters): Rename from
1306 add_template_parameters. Now a member.
1307 (typedef_hash_table::typedef_hash_table): Now a constructor;
1308 rename from create_typedef_hash.
1309 (typedef_hash_table::~typedef_hash_table): Now a destructor;
1310 rename from free_typedef_hash.
1311 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
1312 (do_free_global_table): Remove.
1313 (typedef_hash_table::typedef_hash_table): New constructor; renamed
1314 from copy_type_recursive.
1315 (create_global_typedef_table): Remove.
1316 (typedef_hash_table::find_global_typedef): Now a member of
1317 typedef_hash_table.
1318 (typedef_hash_table::find_typedef): Rename from
1319 find_typedef_in_hash; now a member.
1320 (whatis_exp): Update.
1321 * extension.h (struct ext_lang_type_printers): Add constructor and
1322 destructor.
1323 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
1324 declare.
1325 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
1326 Now a constructor; rename from start_ext_lang_type_printers.
1327 (ext_lang_type_printers): Now a destructor; rename from
1328 free_ext_lang_type_printers.
1329 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
1330 Update.
1331 (c_type_print_base_struct_union): Update. Remove cleanups.
1332
608219fb
TT
13332018-03-27 Tom Tromey <tom@tromey.com>
1334
1335 * dwarf-index-write.c: Include <cmath>.
1336
3fcded8f
JB
13372018-03-27 Joel Brobecker <brobecker@adacore.com>
1338
1339 * NEWS: Add entry describing new "set|show varsize-limit" command.
1340 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
1341 command.
1342 * printcmd.c (_initialize_printcmd): Add "set var" alias of
1343 "set variable".
1344
cd4fb1b2
SM
13452018-03-27 Simon Marchi <simon.marchi@ericsson.com>
1346
1347 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
1348 dwarf-index-write.c
1349 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
1350 * dwarf-index-common.c: New file.
1351 * dwarf-index-common.h: New file.
1352 * dwarf-index-write.c: New file.
1353 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
1354 (struct dwarf2_section_info): Move from here.
1355 (dwarf2_section_info_def): Likewise.
1356 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
1357 (offset_type): Likewise.
1358 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
1359 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
1360 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
1361 (byte_swap): Likewise.
1362 (MAYBE_SWAP): Likewise.
1363 (dwarf2_per_cu_ptr): Likewise.
1364 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
1365 (struct tu_stats): Likewise.
1366 (struct dwarf2_per_objfile): Likewise.
1367 (struct dwarf2_per_cu_data): Likewise.
1368 (struct signatured_type): Likewise.
1369 (sig_type_ptr): Likewise.
1370 (DEF_VEC_P (sig_type_ptr)): Likewise.
1371 (INDEX4_SUFFIX): Likewise.
1372 (INDEX5_SUFFIX): Likewise.
1373 (DEBUG_STR_SUFFIX): Likewise.
1374 (dwarf2_read_section): Make non-static.
1375 (mapped_index_string_hash): Move from here.
1376 (dwarf5_djb_hash): Likewise.
1377 (file_write): Likewise.
1378 (class data_buf): Likewise.
1379 (struct symtab_index_entry): Likewise.
1380 (struct mapped_symtab): Likewise.
1381 (find_slot): Likewise.
1382 (hash_expand): Likewise.
1383 (add_index_entry): Likewise.
1384 (uniquify_cu_indices): Likewise.
1385 (class c_str_view): Likewise.
1386 (class c_str_view_hasher): Likewise.
1387 (class vector_hasher): Likewise.
1388 (write_hash_table): Likewise.
1389 (psym_index_map): Likewise.
1390 (struct addrmap_index_data): Likewise.
1391 (add_address_entry): Likewise.
1392 (add_address_entry_worker): Likewise.
1393 (write_address_map): Likewise.
1394 (symbol_kind): Likewise.
1395 (write_psymbols): Likewise.
1396 (struct signatured_type_index_data): Likewise.
1397 (write_one_signatured_type): Likewise.
1398 (recursively_count_psymbols): Likewise.
1399 (recursively_write_psymbols): Likewise.
1400 (class debug_names): Likewise.
1401 (check_dwarf64_offsets): Likewise.
1402 (psyms_seen_size): Likewise.
1403 (write_gdbindex): Likewise.
1404 (write_debug_names): Likewise.
1405 (assert_file_size): Likewise.
1406 (write_psymtabs_to_index): Likewise.
1407 (save_gdb_index_command): Likewise.
1408 (_initialize_dwarf2_read): Don't register the "save gdb-index"
1409 command.
1410 * dwarf2read.h: New file.
1411
59cc4834
JB
14122018-03-27 Joel Brobecker <brobecker@adacore.com>
1413
1414 PR gdb/22670
1415 * dwarf2read.c (dwarf2_physname): Do not return the demangled
1416 symbol name if the CU's language stores symbol names in linkage
1417 format.
1418 * language.h (struct language_defn)
1419 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
1420 all instances of this struct.
1421
67501539
TT
14222018-03-26 Tom Tromey <tom@tromey.com>
1423
1424 * stack.c (backtrace_command_1): Remove verbose code.
1425
76c939ac
TT
14262018-03-26 Tom Tromey <tom@tromey.com>
1427
1428 * python/py-framefilter.c (py_print_type): Don't catch
1429 exceptions. Return void.
1430 (py_print_value): Likewise.
1431 (py_print_single_arg): Likewise.
1432 (enumerate_args): Don't catch exceptions.
1433 (py_print_args): Likewise.
1434 (py_print_frame): Likewise.
1435 (gdbpy_apply_frame_filter): Catch exceptions here.
1436
9507b29c
TT
14372018-03-26 Tom Tromey <tom@tromey.com>
1438
1439 * stack.c (_initialize_stack): Remove trailing newlines from help
1440 text. Add "Usage" line to "backtrace" help.
1441
eb68e487
TT
14422018-03-26 Tom Tromey <tom@tromey.com>
1443
1444 PR python/16486:
1445 * python/py-framefilter.c (py_print_args): Call wrap_hint.
1446
1f111921
TT
14472018-03-26 Tom Tromey <tom@tromey.com>
1448
1449 * python/py-framefilter.c (py_print_single_arg): Return
1450 EXT_LANG_BT_ERROR from catch.
1451
fb7eb8b5
TT
14522018-03-26 Tom Tromey <tom@tromey.com>
1453
1454 PR backtrace/15584:
1455 * stack.c (backtrace_command_1): Move some code into no-filters
1456 "if".
1457
4ca59a9f
TT
14582018-03-26 Tom Tromey <tom@tromey.com>
1459
1460 * python/py-framefilter.c (throw_quit_or_print_exception): New
1461 function.
1462 (gdbpy_apply_frame_filter): Use it.
1463
92256134
TT
14642018-03-26 Tom Tromey <tom@tromey.com>
1465
1466 PR cli/17716:
1467 * python/py-framefilter.c (py_print_type, py_print_value)
1468 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
1469 RETURN_MASK_ERROR.
1470
7a630bc2
TT
14712018-03-26 Tom Tromey <tom@tromey.com>
1472
1473 * python/py-framefilter.c (enumerate_args): Use
1474 gdb::unique_xmalloc_ptr.
1475
63283d4a
TT
14762018-03-26 Tom Tromey <tom@tromey.com>
1477
1478 * python/py-framefilter.c (py_print_frame): Return
1479 EXT_LANG_BT_OK.
1480 (gdbpy_apply_frame_filter): Update comment.
1481 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
1482 Remove.
1483 <EXT_LANG_BT_NO_FILTERS>: Change value.
1484
978d6c75
TT
14852018-03-26 Tom Tromey <tom@tromey.com>
1486
1487 PR backtrace/15582:
1488 * stack.c (backtrace_command): Parse "hide" argument.
1489 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
1490 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
1491 constant.
1492
1cf7e640
TT
14932018-03-26 Tom Tromey <tom@tromey.com>
1494
1495 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
1496 add "flags".
1497 (backtrace_command): Remove "fulltrace", add "flags".
1498
ea3b0687
TT
14992018-03-26 Tom Tromey <tom@tromey.com>
1500
1501 * stack.c (backtrace_command): Rewrite command line parsing.
1502
9f034d75
SM
15032018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1504
1505 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
1506
ce1459e5
SM
15072018-03-26 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * filename-seen-cache.h: Add include guard.
1510
4f7ae6f5
KS
15112018-03-26 Keith Seitz <keiths@redhat.com>
1512
1513 * symfile.c (place_section): Remove "struct" from section_addr_info
1514 in comment.
1515 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
1516 "struct" keyword from section_addr_info.
1517
5cd3e386
AH
15182018-03-26 Alan Hayward <alan.hayward@arm.com>
1519
1520 * regformats/regdef.h (reg): Add constructors.
1521
3e5ef9a4
PA
15222018-03-25 Pedro Alves <palves@redhat.com>
1523
1524 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
1525 if then/else bodies in var_func_name extraction.
1526
c88d2fcc 15272018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
1528
1529 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
1530 lookup_minimal_symbol() to find symbol entry.
1531 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
1532
b7fee5a3
KS
15332018-03-23 Keith Seitz <keiths@redhat.com>
1534
1535 PR c++/22968
1536 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
1537 nested type definitions for C++, too.
1538
2cc9b304
TT
15392018-03-23 Tom Tromey <tom@tromey.com>
1540
1541 * machoread.c (struct oso_el): Add a constructor. Don't define as
1542 a typedef.
1543 (macho_register_oso): Remove.
1544 (macho_symtab_read): Take a std::vector.
1545 (oso_el_compare_name): Now a std::sort comparator.
1546 (macho_symfile_read_all_oso): Take a std::vector.
1547 (macho_symfile_read): Use std::vector. Remove cleanups.
1548
a2b2bc12
TT
15492018-03-22 Tom Tromey <tom@tromey.com>
1550
1551 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
1552 (record_full_goto_bookmark): Use std::string.
1553
7a8f494c
PFC
15542018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1555
1556 PR tdep/18295
1557 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
1558 a single mask.
1559
dd6d677f
PFC
15602018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1561
1562 * rs6000-tdep.c (store_insn_p): New function.
1563 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
1564 and cr_reg to their unshifted values. Use store_insn_p to
1565 match LR saves using either R1 or fdata->alloca_reg. Use
1566 store_insn_p to match CR saves. Set alloca_reg_offset
1567 when alloca_reg and framep are set. Remove lr_reg shift
1568 when assigning to fdata->lr_register.
1569
26d6cec4
AA
15702018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1571
1572 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
1573 command line args instead of emitting a warning.
1574
5d9310c4
SM
15752018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 * tracepoint.h (struct static_tracepoint_marker): Initialize
1578 fields, define default constructor, move constructor and move
1579 assignment, disable the rest.
1580 <str_id, extra>: Make std::string.
1581 (release_static_tracepoint_marker): Remove.
1582 (free_current_marker): Remove.
1583 * tracepoint.c (free_current_marker): Remove.
1584 (parse_static_tracepoint_marker_definition): Adjust to
1585 std::string, use new hex2str overload.
1586 (release_static_tracepoint_marker): Remove.
1587 (print_one_static_tracepoint_marker): Get marker by reference
1588 and adjust to std::string.
1589 (info_static_tracepoint_markers_command): Adjust to std::vector
1590 changes
1591 * target.h (static_tracepoint_marker_p): Remove typedef.
1592 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
1593 (struct target_ops) <to_static_tracepoint_marker_at>: Return
1594 bool.
1595 <to_static_tracepoint_markers_by_strid>: Return std::vector.
1596 * target-debug.h
1597 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
1598 (target_debug_print_std_vector_static_tracepoint_marker): New.
1599 (target_debug_print_struct_static_tracepoint_marker_p): Rename
1600 to...
1601 (target_debug_print_static_tracepoint_marker_p): ... this.
1602 * target-delegates.c: Re-generate.
1603 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
1604 Make std::string.
1605 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
1606 (decode_static_tracepoint_spec): Adjust to std::vector.
1607 (tracepoint_print_one_detail): Adjust to std::string.
1608 (strace_marker_decode_location): Adjust to std::string.
1609 (update_static_tracepoint): Adjust to std::string, remove call
1610 to release_static_tracepoint_marker.
1611 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1612 Adjust to std::vector.
1613 * remote.c (remote_static_tracepoint_marker_at): Return bool.
1614 (remote_static_tracepoint_markers_by_strid): Adjust to
1615 std::vector.
1616 * common/rsp-low.h (hex2str): New overload with explicit count
1617 of bytes.
1618 * common/rsp-low.c (hex2str): New overload with explicit count
1619 of bytes.
1620 * unittests/rsp-low-selftests.c (test_hex2str): New function.
1621 (_initialize_rsp_low_selftests): Add test_hex2str test.
1622 * unittests/tracepoint-selftests.c
1623 (test_parse_static_tracepoint_marker_definition): Adjust to
1624 std::string.
1625
62c222b6
SM
16262018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1627
1628 * tracepoint.c (parse_static_tracepoint_marker_definition):
1629 Consider case where the definition is followed by more
1630 definitions.
1631 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1632 tracepoint-selftests.c.
1633 * unittests/tracepoint-selftests.c: New.
1634
7eb2418f
PFC
16352018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1636
1637 * MAINTAINERS (Write After Approval): Add Pedro Franco de
1638 Carvalho.
1639
7cbe16e9
SR
16402018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1641
3d6b3b82 1642 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 1643
4ee89e90
SR
16442018-03-20 Stephen Roberts <stephen.roberts@arm.com>
1645
3d6b3b82 1646 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 1647
92630041
TT
16482018-03-19 Tom Tromey <tom@tromey.com>
1649
1650 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
1651 "IDENT" production.
1652
76727919
TT
16532018-03-19 Pedro Alves <palves@redhat.com>
1654 Tom Tromey <tom@tromey.com>
1655
1656 * unittests/observable-selftests.c: New file.
1657 * common/observable.h: New file.
1658 * observable.h: New file.
1659 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
1660 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
1661 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
1662 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
1663 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
1664 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
1665 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
1666 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
1667 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
1668 python/py-breakpoint.c, python/py-finishbreakpoint.c,
1669 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
1670 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
1671 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
1672 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
1673 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
1674 tui/tui-interp.c, valops.c: Update all users.
1675 * tui/tui-hooks.c (tui_bp_created_observer)
1676 (tui_bp_deleted_observer, tui_bp_modified_observer)
1677 (tui_inferior_exit_observer, tui_before_prompt_observer)
1678 (tui_normal_stop_observer, tui_register_changed_observer):
1679 Remove.
1680 (tui_observers_token): New global.
1681 (attach_or_detach, tui_attach_detach_observers): New functions.
1682 (tui_install_hooks, tui_remove_hooks): Use
1683 tui_attach_detach_observers.
1684 * record-btrace.c (record_btrace_thread_observer): Remove.
1685 (record_btrace_thread_observer_token): New global.
1686 * observer.sh: Remove.
1687 * observer.c: Rename to observable.c.
1688 * observable.c (namespace gdb_observers): Define new objects.
1689 (observer_debug): Move into gdb_observers namespace.
1690 (struct observer, struct observer_list, xalloc_observer_list_node)
1691 (xfree_observer_list_node, generic_observer_attach)
1692 (generic_observer_detach, generic_observer_notify): Remove.
1693 (_initialize_observer): Update.
1694 Don't include observer.inc.
1695 * Makefile.in (generated_files): Remove observer.h, observer.inc.
1696 (clean mostlyclean): Likewise.
1697 (observer.h, observer.inc): Remove targets.
1698 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
1699 (COMMON_SFILES): Use observable.c, not observer.c.
1700 * .gitignore: Remove observer.h.
1701
1cb1f3da
TT
17022018-03-18 Tom Tromey <tom@tromey.com>
1703
1704 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
1705 gdb::def_vector.
1706 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
1707
a06ab151
TT
17082018-03-17 Tom Tromey <tom@tromey.com>
1709
1710 * auto-load.c (auto_load_objfile_script_1): Use std::string.
1711
770623f7
TT
17122018-03-17 Tom Tromey <tom@tromey.com>
1713
1714 * target.c (class scoped_target_fd): New.
1715 (target_fileio_close_cleanup): Remove.
1716 (target_fileio_read_alloc_1): Use scoped_target_fd.
1717
39be3c7e
SM
17182018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1719
1720 * silent-rules.mk: New.
1721 * Makefile.in: Include silent-rules.mk
1722 (srcdir, VPATH, top_srcdir): Move up.
1723 (COMPILE): Add ECHO_CXX.
1724 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
1725 (init.c): Add ECHO_INIT_C.
1726 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1727 (version.c): Add ECHO_GEN.
1728 (printcmd.o): Add ECHO_CXX.
1729 (target-float.o): Add ECHO_CXX.
1730 (ada-exp.o): Add ECHO_CXX.
1731 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
1732 (insight$(EXEEXT)): Add ECHO_CXXLD.
1733 * gnulib/configure.ac: Add AM_SILENT_RULES.
1734 * gnulib/aclocal.m4: Re-generate.
1735 * gnulib/configure: Re-generate.
1736 * gnulib/import/Makefile.in: Re-generate.
1737
37e136b1
TT
17382018-03-16 Tom Tromey <tom@tromey.com>
1739
1740 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
1741 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
1742 * utils.c (do_free_section_addr_info)
1743 (make_cleanup_free_section_addr_info): Remove.
1744 * symfile.h (struct other_sections): Add constructor.
1745 (struct section_addr_info): Remove.
1746 (section_addr_info): New typedef.
1747 (struct sym_fns) <sym_offsets>: Change type of parameter.
1748 (build_section_addr_info_from_objfile)
1749 (relative_addr_info_to_section_offsets, addr_info_make_relative)
1750 (default_symfile_offsets, symbol_file_add)
1751 (symbol_file_add_from_bfd)
1752 (build_section_addr_info_from_section_table): Update.
1753 (alloc_section_addr_info, free_section_addr_info): Don't declare.
1754 * symfile.c (alloc_section_addr_info): Remove.
1755 (build_section_addr_info_from_section_table): Change return type.
1756 Update.
1757 (build_section_addr_info_from_bfd)
1758 (build_section_addr_info_from_objfile): Likewise.
1759 (free_section_addr_info): Remove.
1760 (relative_addr_info_to_section_offsets): Change type of "addrs".
1761 (addrs_section_compar): Now a std::sort comparator.
1762 (addrs_section_sort): Change return type.
1763 (addr_info_make_relative): Change type of "addrs". Update.
1764 (default_symfile_offsets, syms_from_objfile_1)
1765 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
1766 (symbol_file_add_separate): Update.
1767 (symbol_file_add): Change type of "addrs". Update.
1768 (add_symbol_file_command): Update. Remove cleanups.
1769 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
1770 cleanups.
1771 * symfile-debug.c (debug_sym_offsets): Change type of "info".
1772 * solib.c (solib_read_symbols): Update.
1773 * objfiles.c (objfile_relocate): Update. Remove cleanups.
1774 * machoread.c (macho_symfile_offsets): Update.
1775 * jit.c (jit_bfd_try_read_symtab): Update.
1776
03afa6ef
SM
17772018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1780 unittests/utils-selftests.c.
1781 * unittests/utils-selftests.c: New file.
1782
3ae9ce5d
TT
17832018-03-14 Tom Tromey <tom@tromey.com>
1784
1785 PR cli/14977:
1786 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
1787 for NULL.
1788
b8c2339b
TT
17892018-03-14 Tom Tromey <tom@tromey.com>
1790
1791 PR cli/19918:
1792 * printcmd.c (printf_pointer): Allow "-" in format.
1793
80ae639d
TT
17942018-03-14 Tom Tromey <tom@tromey.com>
1795
1796 * printcmd.c (_initialize_printcmd): Add usage to printf.
1797
0d671d99
YQ
17982018-03-14 Yao Qi <qiyao@sourceware.org>
1799
1800 * MAINTAINERS: Update my email address.
1801
b577b6af
TT
18022018-03-13 Tom Tromey <tom@tromey.com>
1803
1804 * machoread.c (macho_check_dsym): Change filenamep to a
1805 std::string*.
1806 (macho_symfile_read): Update.
1807 * symfile.c (load_command): Use std::string.
1808
89a3b63e
AB
18092018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
1810
1811 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
1812 to error message string.
1813 (riscv_register_name): Use xsnprintf instead of sprintf.
1814 (riscv_insn::fetch_instruction): Use gdb_assert instead of
1815 internal_error.
1816 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
1817 error.
1818 (riscv_push_dummy_call): Likewise.
1819
984c7238
TT
18202018-03-12 Tom Tromey <tom@tromey.com>
1821
1822 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
1823 Use gdb::byte_vector.
1824 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
1825
933522d1
YQ
18262018-03-12 Yao Qi <yao.qi@linaro.org>
1827
1828 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
1829 parameter type to readable_regcache.
1830 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
1831 the declaration.
1832
be2daae6
TT
18332018-03-11 Tom Tromey <tom@tromey.com>
1834
1835 * dwarf2read.c (struct nextfield): Add initializers.
1836 (struct nextfnfield): Remove.
1837 (struct fnfieldlist): Add initializers. Remove "length" and
1838 "head", use std::vector.
1839 (struct decl_field_list): Remove.
1840 (struct field_info): Add initializers.
1841 <fields, baseclasses>: Now std::vector.
1842 <nbaseclasses, nfnfields, typedef_field_list_count,
1843 nested_types_list_count>: Remove.
1844 (dwarf2_add_field, dwarf2_add_type_defn)
1845 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
1846 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
1847 (process_structure_scope): Update.
1848
484cf504
TT
18492018-03-11 Tom Tromey <tom@tromey.com>
1850
1851 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
1852 for use by std::sort.
1853 (build_type_psymtabs_1): Use std::vector.
1854
9bd8e0b0
EZ
18552018-03-09 Eli Zaretskii <eliz@gnu.org>
1856
1857 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
1858 and LIBMPFR in the printed configuration.
1859
5dc1a704
TT
18602018-03-08 Tom Tromey <tom@tromey.com>
1861
1862 * source.c (get_filename_and_charpos): Use scoped_fd.
1863 * nto-procfs.c (procfs_open_1): Use scoped_fd.
1864 (procfs_pidlist): Likewise.
1865 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
1866 (iterate_over_mappings): Likewise.
1867
fdf07f3a
TT
18682018-03-08 Tom Tromey <tom@tromey.com>
1869
1870 * infcall.c (struct call_return_meta_info)
1871 <stack_temporaries_enabled>: Remove.
1872 (get_call_return_value, call_function_by_hand_dummy): Update.
1873 * thread.c (disable_thread_stack_temporaries): Remove.
1874 (enable_thread_stack_temporaries): Remove.
1875 (thread_stack_temporaries_enabled_p): Return bool.
1876 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
1877 (get_last_thread_stack_temporary): Update.
1878 * eval.c (evaluate_subexp): Update.
1879 * gdbthread.h (class enable_thread_stack_temporaries): Now a
1880 class, not a function.
1881 (value_ptr, value_vec): Remove typedefs.
1882 (class thread_info) <stack_temporaries_enabled>: Now bool.
1883 <stack_temporaries>: Now a std::vector.
1884 (thread_stack_temporaries_enabled_p)
1885 (value_in_thread_stack_temporaries): Return bool.
1886
567a3e54
SM
18872018-03-08 Simon Marchi <simon.marchi@ericsson.com>
1888
1889 * remote.c (putpkt_binary): Fix omitted bytes reporting.
1890 (getpkt_or_notif_sane_1): Likewise.
1891
00b40057
SM
18922018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1893
1894 * build-id.c (build_id_to_debug_bfd): Use std::string.
1895
a8dbfd58
SM
18962018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1897
1898 * build-id.c (find_separate_debug_file_by_buildid): Return
1899 std::string.
1900 * build-id.h (find_separate_debug_file_by_buildid): Return
1901 std::string.
1902 * coffread.c (coff_symfile_read): Adjust to std::string.
1903 * elfread.c (elf_symfile_read): Adjust to std::string.
1904 * symfile.c (separate_debug_file_exists): Change parameter to
1905 std::string.
1906 (find_separate_debug_file): Return std::string.
1907 (find_separate_debug_file_by_debuglink): Return std::string.
1908 * symfile.h (find_separate_debug_file_by_debuglink): Return
1909 std::string.
1910
e6a58aa8
SM
19112018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1912
1913 * common/xml-utils.c (xml_escape_text): Move code to...
1914 (xml_escape_text_append): ... this new function.
1915 * common/xml-utils.h (xml_escape_text_append): New declaration.
1916 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
1917 New function.
1918 (_initialize_xml_utils): register test_xml_escape_text_append as
1919 a selftest.
1920
4ef0bef6
AH
19212018-03-07 Alan Hayward <alan.hayward@arm.com>
1922
1923 * defs.h: Remove MAX_REGISTER_SIZE.
1924 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
1925 asserts.
1926 * python/py-unwind.c (pyuw_sniffer): Likewise.
1927
e0d3522b
TT
19282018-03-07 Tom Tromey <tom@tromey.com>
1929
1930 * linux-tdep.c (linux_info_proc): Update.
1931 * target.h (struct target_ops) <to_fileio_readlink>: Return
1932 optional<string>.
1933 (target_fileio_readlink): Return optional<string>.
1934 * remote.c (remote_hostio_readlink): Return optional<string>.
1935 * inf-child.c (inf_child_fileio_readlink): Return
1936 optional<string>.
1937 * target.c (target_fileio_readlink): Return optional<string>.
1938
ea005f31
AB
19392018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
1940
1941 * regcache.c (cooked_read_test): Add riscv to the list of
1942 architectures that have a save_reggroup.
1943
e95a97d4
AA
19442018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
1945
1946 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
1947 value is not a dynamic class object.
1948
d8344f3d
TT
19492018-03-06 Tom Tromey <tom@tromey.com>
1950
1951 * rust-exp.y: Formatting fixes.
1952
9add17f2
AB
19532018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1954
1955 * riscv-tdep.c (riscv_register_name): Remove target description
1956 support.
1957 (riscv_gdbarch_init): Remove target description check.
1958
c9486dfe
AB
19592018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1960
1961 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
1962 comment.
1963 * riscv-tdep.h: Likewise.
1964
d74aff3d
AB
19652018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1966
1967 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
1968 (riscv_pseudo_register_write): Delete.
1969 (riscv_gdbarch_init): Remove all use of pseudo registers.
1970
7ea78b59
SM
19712018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1972
1973 * record-btrace.c (btrace_print_lines): Replace cleanup
1974 parameter with RAII equivalents.
1975 (btrace_insn_history): Replace cleanup with RAII equivalents.
1976 * ui-out.h (make_cleanup_ui_out_list_begin_end,
1977 make_cleanup_ui_out_tuple_begin_end): Remove.
1978 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
1979 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
1980 make_cleanup_ui_out_list_begin_end): Remove.
1981
53127008
SM
19822018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1983
1984 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
1985 parameter types to std::vector. Use bool.
1986 (record_btrace_wait): Replace VEC(tp_t) with
1987 std::vector<thread_info *>.
1988 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
1989
228f1508
SM
19902018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
1991
1992 * record-btrace.c (record_btrace_disable_callback): Remove.
1993 (struct scoped_btrace_disable): New.
1994 (record_btrace_open): Use scoped_btrace_disable.
1995
b2970c23
AB
19962018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
1997
1998 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
1999 reading values from registers.
2000
fb294655
AB
20012018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2002
2003 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
2004 where appropriate.
2005
cab5bb9d
AB
20062018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2007
2008 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
2009 change parameter type. Use GDB's print functions, and use
2010 core_addr_to_string where appropriate.
2011 (riscv_push_dummy_call): Use core_addr_to_string where
2012 appropriate, update call to riscv_print_arg_location, and reindent
2013 a few lines.
2014 (riscv_return_value): Update call to riscv_print_arg_location.
2015
dbbb1059
AB
20162018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2017 Tim Newsome <tim@sifive.com>
2018 Albert Ou <a0u@eecs.berkeley.edu>
2019 Darius Rad <darius@bluespec.com>
2020
2021 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
2022 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
2023 (ALLDEPFILES): Add riscv-tdep.c
2024 * configure.tgt: Add riscv support.
2025 * riscv-tdep.c: New file.
2026 * riscv-tdep.h: New file.
2027 * NEWS: Mention new target.
2028 * MAINTAINERS: Add entry for riscv.
2029
5dc43913
AB
20302018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2031
2032 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
2033 fields within aggregates.
2034
3dea1ef7
SM
20352018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
2036
2037 * record-btrace.c (btrace_print_lines): Change type of flags to
2038 gdb_disassembly_flags.
2039
7efba073
JB
20402018-03-04 John Baldwin <jhb@FreeBSD.org>
2041
2042 * fbsd-nat.c: Include "inf-ptrace.h".
2043 (USE_SIGTRAP_SIGINFO): Conditionally define.
2044 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
2045 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
2046 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
2047 function.
2048 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
2049 Likewise.
2050 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
2051 Likewise.
2052 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
2053 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
2054 "supports_stopped_by_hw_breakpoint" target methods.
2055
386a8676
JB
20562018-03-04 John Baldwin <jhb@FreeBSD.org>
2057
2058 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
2059 * fbsd-nat.c (debug_fbsd_nat): New variable.
2060 (show_fbsd_nat_debug): New function.
2061 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
2062 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
2063
12279366
JB
20642018-03-04 John Baldwin <jhb@FreeBSD.org>
2065
2066 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
2067 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
2068 prototype.
2069 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
2070 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
2071 method.
2072
54693cf5
SM
20732018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2074
2075 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
2076 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
2077
ccb2231c
SM
20782018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2079
2080 * charset.c (struct charset_vector): New.
2081 (charsets): Change type to charset_vector.
2082 (find_charset_names): Adjust.
2083 (add_one): Adjust.
2084 (_initialize_charset): Adjust.
2085
6fb16ce6
SM
20862018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2087
2088 * progspace.h (struct program_space) <deleted_solibs>: Change
2089 type to std::vector<std::string>.
2090 * progspace.c (clear_program_space_solib_cache): Adjust.
2091 * breakpoint.c (print_solib_event): Adjust.
2092 (check_status_catch_solib): Adjust.
2093 * solib.c (update_solib_list): Adjust.
2094 * ui-out.h (class ui_out) <field_string>: New overload.
2095 * ui-out.c (ui_out::field_string): New overload.
2096
564b1e3f
SM
20972018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2098
2099 * progspace.h (struct program_space): Add constructor and
2100 destructor, initialize fields.
2101 (add_program_space): Remove.
2102 * progspace.c (add_program_space): Rename to...
2103 (program_space::program_space): ... this.
2104 (release_program_space): Rename to...
2105 (program_space::~program_space): ... this.
2106 (delete_program_space): Use delete to delete program_space.
2107 (initialize_progspace): Use new to allocate program_space.
2108 * inferior.c (add_inferior_with_spaces): Likewise.
2109 (clone_inferior_command): Likewise.
2110 * infrun.c (follow_fork_inferior): Likewise.
2111 (handle_vfork_child_exec_or_exit): Likewise.
2112
e80aaf61
SM
21132018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2114
2115 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
2116 (delim_string_to_char_ptr_vec): Return std::vector of
2117 gdb::unique_xmalloc_ptr.
2118 (dirnames_to_char_ptr_vec_append): Take std::vector of
2119 gdb::unique_xmalloc_ptr.
2120 (dirnames_to_char_ptr_vec): Return std::vector of
2121 gdb::unique_xmalloc_ptr.
2122 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
2123 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
2124 (delim_string_to_char_ptr_vec): Return an std::vector of
2125 gdb::unique_xmalloc_ptr, adjust the code.
2126 (dirnames_to_char_ptr_vec_append): Take an std::vector of
2127 gdb::unique_xmalloc_ptr, adjust the code.
2128 (dirnames_to_char_ptr_vec): Return an std::vector of
2129 gdb::unique_xmalloc_ptr, adjust the code.
2130 * auto-load.c (auto_load_safe_path_vec): Change type to
2131 std::vector of gdb::unique_xmalloc_ptr.
2132 (auto_load_expand_dir_vars): Return an std::vector of
2133 gdb::unique_xmalloc_ptr, adjust the code.
2134 (auto_load_safe_path_vec_update): Adjust.
2135 (filename_is_in_auto_load_safe_path_vec): Adjust.
2136 (auto_load_objfile_script_1): Adjust.
2137 * build-id.c (build_id_to_debug_bfd): Adjust.
2138 * linux-thread-db.c (thread_db_load_search): Adjust.
2139 * source.c (add_path): Adjust.
2140 (openp): Adjust.
2141 * symfile.c (find_separate_debug_file): Adjust.
2142 * utils.c (do_free_char_ptr_vec): Remove.
2143 (make_cleanup_free_char_ptr_vec): Remove.
2144
ab818ade
SDJ
21452018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
2146
2147 PR gdb/22907
2148 * common/pathstuff.c: Conditionally include "<windows.h>".
2149
e1e6f073
GS
21502018-03-01 Georg Sauthoff <mail@georg.so>
2151
2152 PR gdb/22888
2153 * gcore.in: Quote variables and switch interpreter to bash.
2154
c7b15a66
TT
21552018-03-01 Tom Tromey <tom@tromey.com>
2156
2157 * dwarf2read.c (alloc_discriminant_info): Fix default_index
2158 assertion. Add assertion for discriminant_index.
2159 (quirk_rust_enum): Use correct base type name in univariant case.
2160
0cb7c7b0
SM
21612018-03-01 Simon Marchi <simon.marchi@ericsson.com>
2162
2163 * record.c (get_call_history_modifiers): Return a
2164 record_print_flags.
2165 (cmd_record_call_history): Adjust.
2166 * record-btrace.c (record_btrace_call_history): Adjust.
2167 (record_btrace_call_history_range): Adjust.
2168 (record_btrace_call_history_from): Adjust.
2169 * target-debug.h (target_debug_print_record_print_flags): New.
2170 * target-delegates.c: Re-generate.
2171 * target.c (target_call_history): Change flags type.
2172 (target_call_history_from): Likewise.
2173 (target_call_history_range): Likewise.
2174 * target.h (struct target_ops) <target_call_history>: Likewise.
2175 (target_call_history_from): Likewise.
2176 (target_call_history_range): Likewise.
2177
25e3c82c
SDJ
21782018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2179 Simon Marchi <simon.marchi@polymtl.ca>
2180
2181 * common/common-utils.c: Include "sys/stat.h".
2182 (is_regular_file): Move here from "source.c"; change return
2183 type to "bool".
2184 * common/common-utils.h (is_regular_file): New prototype.
2185 * common/pathstuff.c (contains_dir_separator): New function.
2186 * common/pathstuff.h (contains_dir_separator): New prototype.
2187 * source.c: Don't include "sys/stat.h".
2188 (is_regular_file): Move to "common/common-utils.c".
2189
b4987c95
SDJ
21902018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2191
2192 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
2193 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
2194 * auto-load.c: Include "common/pathstuff.h".
2195 * common/common-def.h (current_directory): Move here.
2196 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
2197 function.
2198 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
2199 prototype.
2200 * common/pathstuff.c: New file.
2201 * common/pathstuff.h: New file.
2202 * compile/compile.c: Include "common/pathstuff.h".
2203 * defs.h (current_directory): Move to "common/common-defs.h".
2204 * dwarf2read.c: Include "common/pathstuff.h".
2205 * exec.c: Likewise.
2206 * guile/scm-safe-call.c: Likewise.
2207 * linux-thread-db.c: Likewise.
2208 * main.c: Likewise.
2209 * nto-tdep.c: Likewise.
2210 * objfiles.c: Likewise.
2211 * source.c: Likewise.
2212 * symtab.c: Likewise.
2213 * utils.c: Include "common/pathstuff.h".
2214 (gdb_realpath): Move to "common/pathstuff.c".
2215 (gdb_realpath_keepfile): Likewise.
2216 (gdb_abspath): Likewise.
2217 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
2218 (gdb_realpath_keepfile): Likewise.
2219 (gdb_abspath): Likewise.
2220
f169cfdc
JB
22212018-02-28 John Baldwin <jhb@FreeBSD.org>
2222
2223 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
2224 wildcard process pid for super_resume for kernels with a
2225 specific bug.
2226
e05cac70
PM
22272018-02-27 Phil Muldoon <pmuldoon@redhat.com>
2228
2229 * compile/compile.c (get_args): Add additional comments
2230 explaining function.
2231
55089490
TT
22322018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
2233 Tom Tromey <tom@tromey.com>
2234
2235 * target.h (memory_write_request_s): Remove typedef. Don't define
2236 VEC.
2237 (target_write_memory_blocks): Change argument to std::vector.
2238 (struct memory_write_request): Add constructor.
2239 * target-memory.c (compare_block_starting_address): Return bool.
2240 Change argument types.
2241 (claim_memory): Change arguments to use std::vector.
2242 (split_regular_and_flash_blocks, blocks_to_erase)
2243 (compute_garbled_blocks): Likewise.
2244 (cleanup_request_data, cleanup_write_requests_vector): Remove.
2245 (target_write_memory_blocks): Change argument to std::vector.
2246 * symfile.c (struct load_section_data): Add constructor and
2247 destructor. Use std::vector for "requests".
2248 (struct load_progress_data): Add initializers.
2249 (load_section_callback): Update. Use "new".
2250 (clear_memory_write_data): Remove.
2251 (generic_load): Update.
2252
0c305b61
AH
22532018-02-27 Alan Hayward <alan.hayward@arm.com>
2254
2255 * arch/aarch64.h: Use common/tdesc.h.
2256
c5196c92
MR
22572018-02-26 Maciej W. Rozycki <macro@mips.com>
2258
2259 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
2260 architecture with a 64-bit ABI.
2261
37c33887
MR
22622018-02-26 Maciej W. Rozycki <macro@mips.com>
2263
2264 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
2265 ahead of target description loading.
2266
d4dd3282
TT
22672018-02-26 Tom Tromey <tom@tromey.com>
2268
2269 * stack.c (backtrace_command_1): Update.
2270 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
2271 of "flags".
2272 * python/py-framefilter.c (py_print_frame)
2273 (gdbpy_apply_frame_filter): Change type of "flags".
2274 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
2275 of "flags".
2276 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
2277 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
2278 * extension.h (enum frame_filter_flag): Rename from
2279 frame_filter_flags.
2280 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
2281 (apply_ext_lang_frame_filter): Change type of "flags".
2282 * extension.c (apply_ext_lang_frame_filter): Change type of
2283 "flags".
2284 * extension-priv.h (struct extension_language_ops)
2285 <apply_frame_filter>: Change type of "flags".
2286
6893c19a
TT
22872018-02-26 Tom Tromey <tom@tromey.com>
2288
2289 PR python/16497:
2290 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
2291 off-by-one in py_end computation.
2292 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
2293 PRINT_MORE_FRAMES.
2294 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
2295 constant.
2296
2ddeaf8a
TT
22972018-02-26 Tom Tromey <tom@tromey.com>
2298
2299 * dwarf2read.c (struct variant_field): New.
2300 (struct nextfield) <variant>: New field.
2301 (dwarf2_add_field): Handle DW_TAG_variant_part.
2302 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
2303 discriminated union.
2304 (read_structure_type): Handle DW_TAG_variant_part.
2305 (handle_struct_member_die): New function, extracted from
2306 process_structure_scope. Handle DW_TAG_variant.
2307 (process_structure_scope): Handle discriminated unions. Call
2308 handle_struct_member_die.
2309
c9317f21
TT
23102018-02-26 Tom Tromey <tom@tromey.com>
2311
2312 * rust-lang.h (rust_last_path_segment): Declare.
2313 * rust-lang.c (rust_last_path_segment): Now public. Change
2314 contract.
2315 (struct disr_info): Remove.
2316 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
2317 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
2318 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
2319 (rust_enum_p, rust_enum_variant): New function.
2320 (rust_underscore_fields): Remove "offset" parameter.
2321 (rust_print_enum): New function.
2322 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
2323 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
2324 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
2325 enums.
2326 (rust_internal_print_type): New function, from rust_print_type.
2327 Remove enum code.
2328 (rust_print_type): Call rust_internal_print_type.
2329 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
2330 Update enum handling.
2331 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
2332 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
2333 (rust_union_quirks): New functions.
2334 (process_full_comp_unit, process_full_type_unit): Call
2335 rust_union_quirks.
2336 (process_structure_scope): Update rust_unions if necessary.
2337
7c22600a
TT
23382018-02-26 Tom Tromey <tom@tromey.com>
2339
2340 * value.h (value_union_variant): Declare.
2341 * valops.c (value_union_variant): New function.
2342 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
2343 (struct discriminant_info): New.
2344 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
2345 enumerator.
2346 (struct main_type) <flag_discriminated_union>: New field.
2347
15ce8941
TT
23482018-02-26 Tom Tromey <tom@tromey.com>
2349
2350 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2351 unittests/unpack-selftests.c.
2352 * unittests/unpack-selftests.c: New file.
2353 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
2354
48fbe735
YQ
23552018-02-26 Yao Qi <yao.qi@linaro.org>
2356
2357 * dwarf2read.c (struct partial_die_info) <read>: New method.
2358 (read_partial_die): Remove the declaration.
2359 (load_partial_dies): Update.
2360 (partial_die_info::partial_die_info):
2361 (read_partial_die): Change it to partial_die_info::read.
2362
52356b79
YQ
23632018-02-26 Yao Qi <yao.qi@linaro.org>
2364
2365 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
2366 (fixup_partial_die): Remove declaration.
2367 (scan_partial_symbols): Update.
2368 (partial_die_parent_scope): Likewise.
2369 (partial_die_full_name): Likewise.
2370 (fixup_partial_die): Change it to partial_die_info::fixup.
2371
35cc7ed7
YQ
23722018-02-26 Yao Qi <yao.qi@linaro.org>
2373
2374 * dwarf2read.c (read_partial_die): Update the declaration.
2375 (load_partial_dies): Caller update.
2376 (read_partial_die): Remove one argument abbrev_len.
2377
6f06d47b
YQ
23782018-02-26 Yao Qi <yao.qi@linaro.org>
2379
2380 * dwarf2read.c (struct partial_die_info): Add ctor, delete
2381 assignment operator.
2382 (load_partial_dies): Use ctor and copy ctor.
2383 (read_partial_die): Update.
2384 (dwarf2_cu::find_partial_die): Use ctor.
2385
d590ff25
YQ
23862018-02-26 Yao Qi <yao.qi@linaro.org>
2387
2388 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
2389 (find_partial_die_in_comp_unit): Change it to
2390 dwarf2_cu::find_partial_die.
2391 (find_partial_die): Update.
2392
fd0a254f
YQ
23932018-02-26 Yao Qi <yao.qi@linaro.org>
2394
2395 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
2396 is NULL.
2397
cd9983dd
YQ
23982018-02-26 Yao Qi <yao.qi@linaro.org>
2399
2400 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
2401
f46cd62a
AH
24022018-02-26 Alan Hayward <alan.hayward@arm.com>
2403
2404 * arch/amd64.h: Use common/tdesc.h.
2405 * arch/i386.c: Likewise.
2406 * arch/i386.h: Likewise.
2407 * arch/tic6x.c: Likewise.
2408 * arch/tdesc.h: Move file from here...
2409 * common/tdesc.h: ...to here.
2410 * features/aarch64-core.c: Regenerate.
2411 * features/aarch64-fpu.c: Regenerate.
2412 * features/i386/32bit-avx.c: Regenerate.
2413 * features/i386/32bit-avx512.c: Regenerate.
2414 * features/i386/32bit-core.c: Regenerate.
2415 * features/i386/32bit-linux.c: Regenerate.
2416 * features/i386/32bit-mpx.c: Regenerate.
2417 * features/i386/32bit-pkeys.c: Regenerate.
2418 * features/i386/32bit-sse.c: Regenerate.
2419 * features/i386/64bit-avx.c: Regenerate.
2420 * features/i386/64bit-avx512.c: Regenerate.
2421 * features/i386/64bit-core.c: Regenerate.
2422 * features/i386/64bit-linux.c: Regenerate.
2423 * features/i386/64bit-mpx.c: Regenerate.
2424 * features/i386/64bit-pkeys.c: Regenerate.
2425 * features/i386/64bit-segments.c: Regenerate.
2426 * features/i386/64bit-sse.c: Regenerate.
2427 * features/i386/x32-core.c: Regenerate.
2428 * features/tic6x-c6xp.c: Regenerate.
2429 * features/tic6x-core.c: Regenerate.
2430 * features/tic6x-gp.c: Regenerate.
2431 * target-descriptions.c: Use common/tdesc.h.
2432 * target-descriptions.h: Likewise.
2433
9b292f68
TT
24342018-02-24 Tom Tromey <tom@tromey.com>
2435
2436 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
2437 (try_thread_db_load_from_dir, thread_db_load_search): Use
2438 std::string.
2439 (info_auto_load_libthread_db_compare): Return bool. Change
2440 argument types.
2441 (info_auto_load_libthread_db): Use std::vector, std::string.
2442 Remove cleanups.
2443
281d762b
TT
24442018-02-24 Tom Tromey <tom@tromey.com>
2445
2446 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
2447 std::string.
2448 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
2449 std::string*.
2450 * gdbarch.c: Rebuild.
2451 * gdbarch.h: Rebuild.
2452 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
2453 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
2454 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
2455 std::string*.
2456
9d8780f0
SM
24572018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
2458
2459 * gdbtypes.h (sect_offset): Change type to uint64_t.
2460 (sect_offset_str): New function.
2461 * dwarf2read.c (create_addrmap_from_aranges): Use
2462 sect_offset_str.
2463 (error_check_comp_unit_head): Likewise.
2464 (create_debug_type_hash_table): Likewise.
2465 (read_cutu_die_from_dwo): Likewise.
2466 (init_cutu_and_read_dies): Likewise.
2467 (init_cutu_and_read_dies_no_follow): Likewise.
2468 (process_psymtab_comp_unit_reader): Likewise.
2469 (partial_die_parent_scope): Likewise.
2470 (peek_die_abbrev): Likewise.
2471 (process_queue): Likewise.
2472 (dwarf2_physname): Likewise.
2473 (read_namespace_alias): Likewise.
2474 (read_import_statement): Likewise.
2475 (create_dwo_cu_reader): Likewise.
2476 (create_cus_hash_table): Likewise.
2477 (lookup_dwo_cutu): Likewise.
2478 (inherit_abstract_dies): Likewise.
2479 (read_func_scope): Likewise.
2480 (read_call_site_scope): Likewise.
2481 (dwarf2_add_member_fn): Likewise.
2482 (read_common_block): Likewise.
2483 (read_module_type): Likewise.
2484 (read_typedef): Likewise.
2485 (read_subrange_type): Likewise.
2486 (load_partial_dies): Likewise.
2487 (read_partial_die): Likewise.
2488 (find_partial_die): Likewise.
2489 (read_str_index): Likewise.
2490 (dwarf2_string_attr): Likewise.
2491 (build_error_marker_type): Likewise.
2492 (lookup_die_type): Likewise.
2493 (dump_die_shallow): Likewise.
2494 (follow_die_ref): Likewise.
2495 (dwarf2_fetch_die_loc_sect_off): Likewise.
2496 (dwarf2_fetch_constant_bytes): Likewise.
2497 (follow_die_sig): Likewise.
2498 (get_signatured_type): Likewise.
2499 (get_DW_AT_signature_type): Likewise.
2500 (dwarf2_find_containing_comp_unit): Likewise.
2501 (set_die_type): Likewise.
2502
8ec57239
JB
25032018-02-21 John Baldwin <jhb@FreeBSD.org>
2504
2505 * arch/aarch64.c: Include "common-defs.h".
2506 * arch/amd64.c: Likewise.
2507 * arch/i386.c: Likewise.
2508
3eac2b65
TT
25092018-02-21 Tom Tromey <tom@tromey.com>
2510
2511 * value.h: (extract_field_op): Update.
2512 * eval.c (extract_field_op): Return a const char *.
2513 * expression.h (parse_expression_for_completion): Update.
2514 * completer.c (complete_expression): Update.
2515 (add_struct_fields): Make fieldname const.
2516 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
2517 (mark_completion_tag, parse_exp_in_context_1): Update.
2518 (parse_expression_for_completion): Change "name" to
2519 unique_xmalloc_ptr*.
2520
6ccb583f
TT
25212018-02-21 Tom Tromey <tom@tromey.com>
2522
2523 * infcall.c (call_function_by_hand_dummy): Use std::vector.
2524
c113ed0c
YQ
25252018-02-21 Yao Qi <yao.qi@linaro.org>
2526
2527 * avr-tdep.c (avr_read_pc): Change parameter type to
2528 readable_regcache.
2529 * gdbarch.sh (read_pc): Likewise.
2530 * gdbarch.c: Re-generated.
2531 * gdbarch.h: Re-generated.
2532 * hppa-tdep.c (hppa_read_pc): Change parameter type to
2533 readable_regcache.
2534 * ia64-tdep.c (ia64_read_pc): Likewise.
2535 * mips-tdep.c (mips_read_pc): Likewise.
2536 * spu-tdep.c (spu_read_pc): Likewise.
2537
4c74fe6b
YQ
25382018-02-21 Yao Qi <yao.qi@linaro.org>
2539
2540 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
2541 * regcache-dump.c: New file.
2542 * regcache.c: Move register_dump to regcache-dump.c.
2543 (maintenance_print_registers): Likewise.
2544 (maintenance_print_raw_registers): Likewise.
2545 (maintenance_print_cooked_registers): Likewise.
2546 (maintenance_print_register_groups): Likewise.
2547 (maintenance_print_remote_registers): Likewise.
2548 (_initialize_regcache): Likewise.
2549 * regcache.h (register_dump): Moved from regcache.c.
2550
796bb026
YQ
25512018-02-21 Yao Qi <yao.qi@linaro.org>
2552
2553 * regcache.c (regcache::regcache): Update.
2554 (regcache::invalidate): Move it to detached_regcache::invalidate.
2555 (get_thread_arch_aspace_regcache): Update.
2556 (regcache::raw_update): Update.
2557 (regcache::cooked_read): Remove some code.
2558 (regcache::cooked_read_value): Likewise.
2559 (regcache::raw_write): Remove assert on m_readonly_p.
2560 (regcache::raw_supply_integer): Move it to
2561 detached_regcache::raw_supply_integer.
2562 (regcache::raw_supply_zeroed): Likewise.
2563 * regcache.h (detached_regcache) <raw_supply_integer>: New
2564 declaration.
2565 <raw_supply_zeroed, invalidate>: Likewise.
2566 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
2567 <invalidate>: Likewise.
2568 <m_readonly_p>: Removed.
2569
215c69dc
YQ
25702018-02-21 Yao Qi <yao.qi@linaro.org>
2571
2572 * infcmd.c (get_return_value): Let stop_regs point to
2573 get_current_regcache.
2574 * regcache.c (regcache::regcache): Remove.
2575 (register_dump_reg_buffer): New class.
2576 (regcache_print): Adjust.
2577 * regcache.h (regcache): Remove constructors.
2578
f3384e66
YQ
25792018-02-21 Yao Qi <yao.qi@linaro.org>
2580
2581 * regcache.c (class register_dump): New class.
2582 (register_dump_regcache, register_dump_none): New class.
2583 (register_dump_remote, register_dump_groups): New class.
2584 (regcache_print): Update.
2585 * regcache.h (regcache_dump_what): Move it to regcache.c.
2586 (regcache) <dump>: Remove.
2587
c8ec2f33
YQ
25882018-02-21 Yao Qi <yao.qi@linaro.org>
2589
2590 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
2591 reg_buffer_rw *.
2592 (jit_unwind_reg_set_impl): Call raw_supply.
2593 (jit_frame_sniffer): Use reg_buffer_rw.
2594 * record-full.c (record_full_core_regbuf): Change its type.
2595 (record_full_core_open_1): Use reg_buffer_rw.
2596 (record_full_close): Likewise.
2597 (record_full_core_fetch_registers): Use regcache->raw_supply.
2598 (record_full_core_store_registers): Likewise.
2599 * regcache.c (regcache::get_register_status): Move it to
2600 reg_buffer.
2601 (regcache_raw_set_cached_value): Remove.
2602 (regcache::raw_set_cached_value): Remove.
2603 (regcache::raw_write): Call raw_supply.
2604 (regcache::raw_supply): Move it to reg_buffer_rw.
2605 * regcache.h (regcache_raw_set_cached_value): Remove.
2606 (reg_buffer_rw): New class.
2607
daf6667d
YQ
26082018-02-21 Yao Qi <yao.qi@linaro.org>
2609
2610 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
2611 readonly_detached_regcache.
2612 (dummy_frame_prev_register): Use regcache->cooked_read.
2613 * frame.c (frame_save_as_regcache): Change return type.
2614 (frame_pop): Update.
2615 * frame.h (frame_save_as_regcache): Update declaration.
2616 * inferior.h (get_infcall_suspend_state_regcache): Update
2617 declaration.
2618 * infrun.c (infcall_suspend_state) <registers>: use
2619 readonly_detached_regcache.
2620 (save_infcall_suspend_state): Don't use regcache_dup.
2621 (get_infcall_suspend_state_regcache): Change return type.
2622 * linux-fork.c (struct fork_info) <savedregs>: Change to
2623 readonly_detached_regcache.
2624 <pc>: New field.
2625 (fork_save_infrun_state): Don't use regcache_dup.
2626 (info_checkpoints_command): Adjust.
2627 * mi/mi-main.c (register_changed_p): Update declaration.
2628 (mi_cmd_data_list_changed_registers): Use
2629 readonly_detached_regcache.
2630 (register_changed_p): Change parameter type to
2631 readonly_detached_regcache.
2632 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
2633 readonly_detached_regcache.
2634 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
2635 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
2636 New.
2637 (regcache::save): Move it to reg_buffer.
2638 (regcache::restore): Change parameter type.
2639 (regcache_dup): Remove.
2640 * regcache.h (reg_buffer) <save>: New method.
2641 (readonly_detached_regcache): New class.
2642 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
2643 readonly_detached_regcache.
2644 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
2645
fc5b8736
YQ
26462018-02-21 Yao Qi <yao.qi@linaro.org>
2647
2648 * frame.c (frame_save_as_regcache): Use regcache method save.
2649 (frame_pop): Use regcache method restore.
2650 * infrun.c (restore_infcall_suspend_state): Likewise.
2651 * linux-fork.c (fork_load_infrun_state): Likewise.
2652 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
2653 save.
2654 * regcache.c (regcache_save): Remove.
2655 (regcache::restore): More asserts.
2656 (regcache_cpy): Remove.
2657 * regcache.h (regcache_save): Remove the declaration.
2658 (regcache::restore): Move from private to public.
2659 Remove the friend declaration of regcache_cpy.
2660 (regcache_cpy): Remove declaration.
2661
849d0ba8
YQ
26622018-02-21 Yao Qi <yao.qi@linaro.org>
2663
2664 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
2665 parameter type to 'readable_regcache *'.
2666 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
2667 * arm-tdep.c (arm_neon_quad_read): Likewise.
2668 (arm_pseudo_read): Likewise.
2669 * avr-tdep.c (avr_pseudo_register_read): Likewise.
2670 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
2671 * frv-tdep.c (frv_pseudo_register_read): Likewise.
2672 * gdbarch.c: Re-generated.
2673 * gdbarch.h: Re-generated.
2674 * gdbarch.sh (pseudo_register_read): Change parameter type to
2675 'readable_regcache *'.
2676 (pseudo_register_read_value): Likewise.
2677 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
2678 (h8300_pseudo_register_read): Likewise.
2679 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
2680 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2681 (i386_pseudo_register_read_into_value): Likewise.
2682 (i386_pseudo_register_read_value): Likewise.
2683 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
2684 declaration.
2685 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
2686 * m32c-tdep.c (m32c_raw_read): Likewise.
2687 (m32c_read_flg): Likewise.
2688 (m32c_banked_register): Likewise.
2689 (m32c_banked_read): Likewise.
2690 (m32c_sb_read): Likewise.
2691 (m32c_part_read): Likewise.
2692 (m32c_cat_read): Likewise.
2693 (m32c_r3r2r1r0_read): Likewise.
2694 (m32c_pseudo_register_read): Likewise.
2695 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
2696 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
2697 (mep_pseudo_cr64_read): Likewise.
2698 (mep_pseudo_register_read): Likewise.
2699 * mips-tdep.c (mips_pseudo_register_read): Likewise.
2700 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
2701 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
2702 * regcache.c (regcache::raw_read): Move it to readable_regcache.
2703 (regcache::cooked_read): Likewise.
2704 (regcache::cooked_read_value): Likewise.
2705 (regcache_cooked_read_signed):
2706 (regcache::cooked_read): Likewise.
2707 * regcache.h (readable_regcache): New class.
2708 (regcache): Inherit readable_regcache. Move some methods to
2709 readable_regcache.
2710 * rl78-tdep.c (rl78_pseudo_register_read): Change
2711 parameter type to 'readable_regcache *'.
2712 * rs6000-tdep.c (do_regcache_raw_read): Remove.
2713 (e500_pseudo_register_read): Change parameter type to
2714 'readable_regcache *'.
2715 (dfp_pseudo_register_read): Likewise.
2716 (vsx_pseudo_register_read): Likewise.
2717 (efpr_pseudo_register_read): Likewise.
2718 * s390-tdep.c (s390_pseudo_register_read): Likewise.
2719 * sh-tdep.c (sh_pseudo_register_read): Likewise.
2720 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
2721 (sh64_pseudo_register_read): Likewise.
2722 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
2723 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
2724 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
2725 (spu_pseudo_register_read): Likewise.
2726 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
2727 (xtensa_pseudo_register_read): Likewise.
2728
31716595
YQ
27292018-02-21 Yao Qi <yao.qi@linaro.org>
2730
2731 * regcache.c (regcache::regcache): Call reg_buffer ctor.
2732 (regcache::arch): Move it to reg_buffer::arch.
2733 (regcache::register_buffer): Likewise.
2734 (regcache::assert_regnum): Likewise.
2735 (regcache::num_raw_registers): Likewise.
2736 * regcache.h (reg_buffer): New class.
2737 (regcache): Inherit reg_buffer.
2738
7104e59b
SM
27392018-02-20 Simon Marchi <simon.marchi@ericsson.com>
2740
2741 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
2742 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
2743
2d8adcbd
MM
27442018-02-20 Markus Metzger <markus.t.metzger@intel.com>
2745
2746 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
2747
b5884fa7
AH
27482018-02-19 Alan Hayward <alan.hayward@arm.com>
2749
2750 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
2751 (SFILES): Remove common/*.c files.
2752 (COMMON_OBS): Remove some *.o files built from common/*.c files.
2753 * common/common.host: Add common reference.
2754 * configure.ac: Likewise.
2755 * configure: Regenerate.
2756
fd90ace4
YQ
27572018-02-16 Yao Qi <yao.qi@linaro.org>
2758
2759 * block.c (block_namespace_info): Inherit allocate_on_obstack.
2760 (block_initialize_namespace): Use new.
2761 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
2762 (dwarf2_free_objfile): Use delete.
2763 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
2764 (copy_type_recursive): Use new.
2765 * gdb_obstack.h (allocate_on_obstack): New.
2766
85046ae2
YQ
27672018-02-15 Yao Qi <yao.qi@linaro.org>
2768
2769 PR gdb/22849
2770 * inferior.c (exit_inferior_1): Reset inf->control.
2771
355c559b
JB
27722018-02-15 Joel Brobecker <brobecker@adacore.com>
2773
2774 * ada-lang.c (ada_to_fixed_value_create): Delete advance
2775 declaration.
2776
980548fd
PA
27772018-02-14 Pedro Alves <palves@redhat.com>
2778
2779 * frame-unwind.c (frame_unwind_try_unwinder): Always call
2780 frame_cleanup_after_sniffer on exception.
2781
692d6f97
TT
27822018-02-14 Tom Tromey <tom@tromey.com>
2783
2784 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
2785 const.
2786 (solib_bfd_open): Make pathname const.
2787 * solib.c (solib_bfd_open): Make pathname const.
2788 * solib-spu.c (spu_bfd_fopen): Make name const.
2789 (spu_bfd_open): Make pathname const.
2790 * solib-darwin.c (darwin_bfd_open): Make pathname const.
2791 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
2792
e0cc99a6
TT
27932018-02-14 Tom Tromey <tom@tromey.com>
2794
2795 * symfile.c (symfile_bfd_open): Update.
2796 * source.h (openp, source_full_path_of, find_and_open_source):
2797 Change argument type to unique_xmalloc_ptr.
2798 * source.c (openp): Take a unique_xmalloc_ptr.
2799 (source_full_path_of, find_and_open_source): Likewise.
2800 (open_source_file, symtab_to_fullname): Update.
2801 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
2802 unique_xmalloc_ptr.
2803 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
2804 (exec_file_find): Update.
2805 * psymtab.c (psymtab_to_fullname): Update.
2806 * nto-tdep.h (nto_find_and_open_solib): Update.
2807 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
2808 unique_xmalloc_ptr.
2809 * exec.c (exec_file_attach): Update.
2810 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
2811 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
2812
b46a8d7c
TT
28132018-02-14 Tom Tromey <tom@tromey.com>
2814
2815 * solib.c: Include source.h.
2816 * nto-tdep.c: Include source.h.
2817 * mi/mi-cmd-env.c: Include source.h.
2818 * infcmd.c: Include source.h.
2819 * exec.c: Include source.h.
2820 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
2821 (add_path, directory_switch, source_path, init_source_path): Move
2822 declarations...
2823 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
2824 (add_path, directory_switch, source_path, init_source_path):
2825 ...here.
2826
797bc1cb
TT
28272018-02-14 Tom Tromey <tom@tromey.com>
2828
2829 * solist.h (exec_file_find, solib_find): Return
2830 unique_xmalloc_ptr.
2831 (solib_bfd_fopen): Take a const char *.
2832 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
2833 (exec_file_find, solib_find): Likewise.
2834 (solib_bfd_fopen): Do not take ownership of "pathname".
2835 (solib_bfd_open): Use unique_xmalloc_ptr.
2836 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
2837 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
2838 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
2839 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
2840
f98b2e33
JB
28412018-02-14 Joel Brobecker <brobecker@adacore.com>
2842
2843 * ada-lang.c (name_match_type_from_name): Remove reference to
2844 ada_name_for_lookup in function's documentation.
2845 * ada-lang.h (ada_name_for_lookup): Delete declaration.
2846
24b9144d
SM
28472018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
2848
2849 * defs.h (enum openp_flags): New enum.
2850 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
2851 Move to enum openp_flags.
2852 (openp_flags): New enum flags.
2853 (openp): Change parameter type to openp_flags.
2854 * source.c (openp): Change parameter type to openp_flags.
2855 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
2856 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
2857
387cd15b
SM
28582018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
2859
2860 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
2861 per-command.
2862
b303c6f6
AB
28632018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
2864
2865 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
2866 into...
2867 (class dwarf2_queue_guard): ...the destructor of this new class.
2868 (dw2_do_instantiate_symtab): Create instance of the new class
2869 dwarf2_queue_guard, remove cleanup.
2870
9c3630e9
TT
28712018-02-09 Tom Tromey <tom@tromey.com>
2872
2873 * source.c (find_source_lines): Don't reference past the end of
2874 the vector.
2875
c4e12631
MM
28762018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2877
2878 * remote.c (remote_btrace_maybe_reopen): Change error message.
2879 * btrace.c (btrace_enable): Likewise.
2880 (parse_xml_btrace): Likewise.
2881 (parse_xml_btrace_conf): Likewise.
2882
88711fbf
MM
28832018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2884
2885 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
2886 (linux_enable_pt, linux_enable_bts): Call
2887 diagnose_perf_event_open_fail.
2888
17ad2a4f
MM
28892018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2890
2891 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
2892 Remove parameter and change return type. Update callers. Move it.
2893 (linux_enable_bts, linux_enable_pt): Improve error message.
2894 (linux_enable_pt): Remove zero buffer size check.
2895 (linux_enable_btrace): Improve error messages. Remove NULL return
2896 check.
2897
de6242d3
MM
28982018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2899
2900 * btrace.c (btrace_enable): Remove target_supports_btrace call.
2901 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
2902 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
2903 (linux_supports_pt, linux_supports_btrace): Remove.
2904 (linux_enable_bts): Call cpu_supports_bts.
2905 * nat/linux-btrace.h (linux_supports_btrace): Remove.
2906 * remote.c (remote_supports_btrace): Remove.
2907 (init_remote_ops): Remove remote_supports_btrace.
2908 * target-delegates.c: Regenerated.
2909 * target.c (target_supports_btrace): Remove.
2910 * target.h (target_ops) <to_supports_btrace>: Remove
2911 (target_supports_btrace): Remove.
2912 * x86-linux-nat.c (x86_linux_create_target): Remove
2913 linux_supports_btrace.
2914
9ee23a85
MM
29152018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2916
2917 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
2918 btrace failed.
2919 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
2920 exception and use message in own exception.
2921
5c3284c1
MM
29222018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2923
2924 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
2925 (perf_event_pt_event_type): Use gdb_file_up.
2926 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
2927 scoped_fd, and scoped_mmap.
2928
84696f37
MM
29292018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2930
2931 * common/scoped_mmap.h: New.
2932 * unittests/scoped_mmap-selftest.c: New.
2933 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2934 unittests/scoped_mmap-selftest.c.
2935
ea4a0888
MM
29362018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2937
2938 * common/scoped_fd.h: New.
2939 * unittests/scoped_fd-selftest.c: New.
2940 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2941 unittests/scoped_fd-selftest.c.
2942
869e8290
TT
29432018-02-09 Tom Tromey <tom@tromey.com>
2944
2945 * auto-load.c (auto_load_section_scripts): Use
2946 gdb::unique_xmalloc_ptr.
2947
a37a2ae7
TT
29482018-02-09 Tom Tromey <tom@tromey.com>
2949
2950 * auto-load.c (execute_script_contents): Use std::string.
2951
4e725347
JB
29522018-02-09 Joel Brobecker <brobecker@adacore.com>
2953
2954 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
2955 Python function, rather than a new command.
2956
9a897d43
TT
29572018-02-08 Tom Tromey <tom@tromey.com>
2958
2959 * solib.c (solib_find_1): Use std::string.
2960 (solib_bfd_fopen): Use unique_xmalloc_ptr.
2961
58ef3771
TT
29622018-02-08 Tom Tromey <tom@tromey.com>
2963
2964 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
2965
a9abc434
TT
29662018-02-08 Tom Tromey <tom@tromey.com>
2967
2968 * source.c (find_source_lines): Use gdb::def_vector.
2969
84f27c6f
TT
29702018-02-08 Tom Tromey <tom@tromey.com>
2971
2972 * macrocmd.c (struct temporary_macro_definition): New.
2973 (macro_define_command): Use temporary_macro_definition. Remove
2974 cleanups.
2975 (free_macro_definition_ptr): Remove.
2976
0354904b
TT
29772018-02-08 Tom Tromey <tom@tromey.com>
2978
2979 * macroexp.c (maybe_expand): Use std::string.
2980
1739cf24
TT
29812018-02-08 Tom Tromey <tom@tromey.com>
2982
2983 * macroexp.c (struct macro_buffer): Add initializers for some
2984 members.
2985 (init_buffer, init_shared_buffer, free_buffer)
2986 (free_buffer_return_text): Remove.
2987 (macro_buffer): New constructors.
2988 (~macro_buffer): New destructor.
2989 (macro_buffer::set_shared): New method.
2990 (macro_buffer::resize_buffer, macro_buffer::appendc)
2991 (macro_buffer::appendmem): Now methods, not free functions.
2992 (set_token, append_tokens_without_splicing, stringify)
2993 (macro_stringify): Update.
2994 (gather_arguments): Change return type. Remove argc_p argument,
2995 add args_ptr argument. Use std::vector.
2996 (substitute_args): Remove argc argument. Accept std::vector.
2997 (expand): Update. Use std::vector.
2998 (scan, macro_expand, macro_expand_next): Update.
2999
f6c2623e
TT
30002018-02-08 Tom Tromey <tom@tromey.com>
3001
3002 * symtab.c (default_collect_symbol_completion_matches_break_on):
3003 Use unique_xmalloc_ptr.
3004 * macroscope.h: (sal_macro_scope, user_macro_scope)
3005 (default_macro_scope): Return unique_xmalloc_ptr.
3006 * macroscope.c (sal_macro_scope, user_macro_scope)
3007 (default_macro_scope): Return unique_xmalloc_ptr.
3008 * macroexp.h (macro_expand, macro_expand_once): Return
3009 unique_xmalloc_ptr.
3010 * macroexp.c (macro_expand, macro_expand_once): Return
3011 unique_xmalloc_ptr.
3012 * macrocmd.c (macro_expand_command, macro_expand_once_command)
3013 (info_macro_command, info_macros_command): Use
3014 unique_xmalloc_ptr.
3015 * compile/compile-c-support.c (write_macro_definitions): Use
3016 unique_xmalloc_ptr.
3017 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
3018
c2e0e465
SM
30192018-02-07 Simon Marchi <simon.marchi@ericsson.com>
3020
3021 * value.c (value_static_field): Assign field type instead of
3022 containing type when returning an optimized out value.
3023
3f8c94b4
YQ
30242018-02-06 Yao Qi <yao.qi@linaro.org>
3025
3026 * ft32-tdep.c (ft32_read_pc): Remove.
3027 (ft32_write_pc): Remove.
3028 (ft32_gdbarch_init): Update.
3029 * m32r-tdep.c (m32r_read_pc): Remove.
3030 (m32r_gdbarch_init): Update.
3031 * mep-tdep.c (mep_read_pc): Remove.
3032 (mep_gdbarch_init): Update.
3033 * microblaze-tdep.c (microblaze_write_pc): Remove.
3034 (microblaze_gdbarch_init): Update.
3035 * mn10300-tdep.c (mn10300_read_pc): Remove.
3036 (mn10300_write_pc): Remove.
3037 (mn10300_gdbarch_init): Update.
3038 * moxie-tdep.c (moxie_read_pc): Remove.
3039 (moxie_write_pc): Remove.
3040 (moxie_gdbarch_init): Update.
3041
bca65a23
YQ
30422018-02-06 Yao Qi <yao.qi@linaro.org>
3043
3044 * expprint.c (print_subexp_standard): Handle
3045 OP_F77_UNDETERMINED_ARGLIST.
3046 (dump_subexp_body_standard): Likewise.
3047
583e3f90 30482018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 3049
583e3f90
YQ
3050 * target-descriptions.c (tdesc_element_visitor) Add empty
3051 implementations.
b8df6ca7
AH
3052 (tdesc_type): Move make_gdb_type from here.
3053 (tdesc_type_builtin): Likewise.
3054 (tdesc_type_vector): Likewise.
3055 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
3056 (make_gdb_type_struct): Move from tdesc_type_with_fields.
3057 (make_gdb_type_union): Likewise.
3058 (make_gdb_type_flags): Likewise.
3059 (make_gdb_type_enum): Likewise.
3060 (make_gdb_type): New function.
3061 (tdesc_register_type): Use static make_gdb_type.
3062
e813d34a
RK
30632018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
3064
3065 * infcmd.c (default_print_one_register_info): Align natural-format
3066 column values consistently one under another.
3067 (pad_to_column): New function.
3068
0eb876f5
JB
30692018-02-05 Joel Brobecker <brobecker@adacore.com>
3070
3071 * dwarf2read.c (dwarf2_physname): Move commment.
3072
0625771b
LS
30732018-02-01 Leszek Swirski <leszeks@google.com>
3074
3075 * varobj.c (varobj_formatted_print_options): Allow recursive
3076 pretty printing if pretty printing is enabled.
3077
59498c30
LS
30782018-02-01 Leszek Swirski <leszeks@google.com>
3079
3080 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
3081 names after a structop as a filename.
3082
2d9e6acb
YQ
30832018-02-01 Yao Qi <yao.qi@linaro.org>
3084
3085 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
3086 (arm_record_coproc_data_proc): Likewise.
3087
df95a9cf
YQ
30882018-02-01 Yao Qi <yao.qi@linaro.org>
3089
3090 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
3091
07e5f5cf
NP
30922018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
3093
3094 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
3095 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
3096
3045b475
PA
30972018-01-31 Pedro Alves <palves@redhat.com>
3098
3099 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
3100 * inflow.c (child_terminal_save_inferior): Wrap reference to
3101 tcgetpgrp in HAVE_TERMIOS_H.
3102 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
3103 _WIN32.
3104 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
3105 always iterate over all inferiors.
3106 (gdbsim_cntrl_c): Adjust.
3107 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
3108
929b5ad4
JB
31092018-01-31 Joel Brobecker <brobecker@adacore.com>
3110
3111 * gdbtypes.c (lookup_array_range_type): Make sure the array's
3112 index type is objfile-owned if the element type is as well.
3113
29236ca2
JB
31142018-01-31 Joel Brobecker <brobecker@adacore.com>
3115
3116 GDB 8.1 released.
3117
c81e8879
PR
31182018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
3119
3120 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
3121 "features/s390x-linux64.c".
3122 (_initialize_s390_linux_tdep): Remove initialization of tdescs
3123 s390_linux32 and s390x_linux64.
3124 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
3125 default tdesc.
3126 * s390-tdep.c: Include "features/s390-linux32.c" and
3127 "features/s390x-linux64.c".
3128 (s390_tdesc_valid): Add check for tdesc_has_registers.
3129 (s390_gdbarch_init): Make sure there is always a valid tdesc.
3130 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
3131 tdesc_s390x_linux64.
3132 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
3133 tdesc_s390x_linux64 to...
3134 * s390-tdep.h: ...here.
3135
e671cd59
PA
31362018-01-30 Pedro Alves <palves@redhat.com>
3137
3138 PR gdb/13211
3139 * config.in, configure: Regenerate.
3140 * configure.ac: Check for getpgid.
3141 * go32-nat.c (go32_pass_ctrlc): New.
3142 (go32_target): Install it.
3143 * inf-child.c (inf_child_target): Install
3144 child_terminal_save_inferior, child_pass_ctrlc and
3145 child_interrupt.
3146 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
3147 (inf_ptrace_target): No longer install it.
3148 * infcmd.c (interrupt_target_1): Adjust.
3149 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
3150 (child_interrupt): Declare.
3151 (inferior::terminal_state): New.
3152 * inflow.c (struct terminal_info): Update comments.
3153 (inferior_process_group): Delete.
3154 (terminal_is_ours): Delete.
3155 (gdb_tty_state): New.
3156 (child_terminal_init): Adjust.
3157 (is_gdb_terminal, sharing_input_terminal_1)
3158 (sharing_input_terminal): New functions.
3159 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
3160 Set the process's actual process group in the foreground if
3161 possible. Handle is_ours_for_output/is_ours distinction. Don't
3162 mark terminal as the inferior's if not sharing GDB's terminal.
3163 Don't check attach_flag.
3164 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
3165 pass down a target_terminal_state.
3166 (child_terminal_save_inferior): New, factored out from ...
3167 (child_terminal_ours_1): ... this. Handle
3168 target_terminal_state::is_ours_for_output.
3169 (child_interrupt, child_pass_ctrlc): New.
3170 (inflow_inferior_exit): Clear the inferior's terminal_state.
3171 (copy_terminal_info): Copy the inferior's terminal state.
3172 (_initialize_inflow): Remove reference to terminal_is_ours.
3173 * inflow.h (inferior_process_group): Delete.
3174 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
3175 * procfs.c (procfs_target): Don't install procfs_interrupt.
3176 (procfs_interrupt): Delete.
3177 * remote.c (remote_serial_quit_handler): Adjust.
3178 (remote_interrupt): Remove ptid parameter. Adjust.
3179 * target-delegates.c: Regenerate.
3180 * target.c: Include "terminal.h".
3181 (target_terminal::terminal_state): Rename to ...
3182 (target_terminal::m_terminal_state): ... this.
3183 (target_terminal::init): Adjust.
3184 (target_terminal::inferior): Adjust to per-inferior
3185 terminal_state.
3186 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
3187 (target_terminal::ours, target_terminal::ours_for_output): Use
3188 target_terminal_is_ours_kind.
3189 (target_interrupt): Remove ptid parameter. Adjust.
3190 (default_target_pass_ctrlc): Adjust.
3191 * target.h (target_ops::to_terminal_save_inferior): New field.
3192 (target_ops::to_interrupt): Remove ptid_t parameter.
3193 (target_interrupt): Remove ptid_t parameter. Update comment.
3194 (target_pass_ctrlc): Update comment.
3195 * target/target.h (target_terminal_state): New scoped enum,
3196 factored out of ...
3197 (target_terminal::terminal_state): ... here.
3198 (target_terminal::inferior): Update comments.
3199 (target_terminal::restore_inferior): New.
3200 (target_terminal::is_inferior, target_terminal::is_ours)
3201 (target_terminal::is_ours_for_output): Adjust.
3202 (target_terminal::scoped_restore_terminal_state): Adjust to
3203 rename, and call restore_inferior() instead of inferior().
3204 (target_terminal::scoped_restore_terminal_state::m_state): Change
3205 type.
3206 (target_terminal::terminal_state): Rename to ...
3207 (target_terminal::m_terminal_state): ... this and change type.
3208
9c3a5d93
PA
32092018-01-30 Pedro Alves <palves@redhat.com>
3210
3211 * linux-nat.c (wait_for_signal): New function.
3212 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
3213 directly.
3214 (async_terminal_is_ours)
3215 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
3216 (linux_nat_add_target): Don't override
3217 to_terminal_inferior/to_terminal_ours.
3218
69ab5edb
SDJ
32192018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
3220
3221 * remote.c (remote_follow_fork): Don't call "detach_inferior".
3222
fc8e7e75
SM
32232018-01-28 Simon Marchi <simon.marchi@ericsson.com>
3224
3225 * dwarf2read.c (free_dwo_files): Add forward-declaration.
3226 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
3227 dwarf2_per_objfile_free here.
3228 (dwarf2_per_objfile_free): Remove.
3229 (_initialize_dwarf2_read): Don't register
3230 dwarf2_per_objfile_free as a registry cleanup.
3231
b2a426e2
EZ
32322018-01-27 Eli Zaretskii <eliz@gnu.org>
3233
3234 Avoid compilation errors in MinGW native builds
3235
3236 The error is triggered by including python-internal.h, and the
3237 error message is:
3238
3239 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
3240 from build-gnulib/import/math.h:27,
3241 from d:/usr/Python26/include/pyport.h:235,
3242 from d:/usr/Python26/include/Python.h:58,
3243 from python/python-internal.h:94,
3244 from python/py-arch.c:24:
3245 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
3246 using ::hypot;
3247 ^~~~~
3248
3249 This happens because Python headers define 'hypot' to expand t
3250 '_hypot' in the Windows builds.
3251 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
3252 'hypoth'. This avoids a compilation error.
3253
0bdd8eac
AH
32542018-01-26 Alan Hayward <alan.hayward@arm.com>
3255
3256 * MAINTAINERS (Write After Approval): Fix ordering.
3257
56ae9dc3
AH
32582018-01-26 Alan Hayward <alan.hayward@arm.com>
3259
3260 * MAINTAINERS (Write After Approval): Add Alan Hayward.
3261
7433498b
AM
32622018-01-26 Alan Modra <amodra@gmail.com>
3263
3264 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
3265 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
3266 Remove nop. Make const. Comment.
3267 (powerpc32_plt_stub_so_2): New.
3268 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
3269 Correct count. Update uses.
3270 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
3271 Move common code reading PLT entry word. Correct
3272 powerpc32_plt_stub PLT address calculation.
3273 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
3274 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
3275 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
3276 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
3277 (ppc64_standard_linkage8): Likewise.
3278 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
3279 Correct insns description.
3280 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
3281
0f59d5fc
PA
32822018-01-24 Pedro Alves <palves@redhat.com>
3283
3284 GCC PR libstdc++/83906
3285 * gdbtypes.c (operator==(const dynamic_prop &,
3286 const dynamic_prop &)): New.
3287 (operator==(const range_bounds &, const range_bounds &)): New.
3288 (check_types_equal): Use them instead of memcmp.
3289 * gdbtypes.h (operator==(const dynamic_prop &,
3290 const dynamic_prop &)): Declare.
3291 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
3292 (operator==(const range_bounds &, const range_bounds &)): Declare.
3293 (operator!=(const range_bounds &, const range_bounds &)): Declare.
3294
ef8914a4
PR
32952018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3296
3297 * s390-linux-tdep.c (s390_record_address_mask)
3298 (s390_record_calc_disp_common, s390_record_calc_disp)
3299 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
3300 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
3301 (s390_process_record): Move to s390-tdep.c.
3302 (s390_linux_init_abi_any): Adjust.
3303 * s390-tdep.c (s390_record_address_mask)
3304 (s390_record_calc_disp_common, s390_record_calc_disp)
3305 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
3306 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
3307 (s390_process_record): Moved from s390-linux-tdep.c
3308 (s390_gdbarch_init): Adjust.
3309
d6e58945
PR
33102018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3311
3312 * s390-linux-nat.c (s390-tdep.h): New include.
3313 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
3314 (HFILES_NO_SRCDIR): Add s390-tdep.h.
3315 (ALLDEPFILES): Add s390-tdep.c.
3316 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
3317 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
3318 * s390-tdep.h: ...this. New file.
3319 * s390-linux-tdep.c (s390-tdep.h): New include.
3320 (_initialize_s390_tdep): Rename to...
3321 (_initialize_s390_linux_tdep): ...this and adjust.
3322 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
3323 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
3324 s390-tdep.h.
3325 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
3326 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
3327 (s390_is_partial_instruction, s390_software_single_step)
3328 (is_non_branch_ril, s390_displaced_step_copy_insn)
3329 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
3330 (s390_prologue_data, s390_addr, s390_store, s390_load)
3331 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
3332 (s390_register_call_saved, s390_guess_tracepoint_registers)
3333 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
3334 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
3335 (s390_pseudo_register_name, s390_pseudo_register_type)
3336 (s390_pseudo_register_read, s390_pseudo_register_write)
3337 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
3338 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
3339 (s390_addr_bits_remove, s390_address_class_type_flags)
3340 (s390_address_class_type_flags_to_name)
3341 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
3342 (s390_function_arg_float, s390_function_arg_vector)
3343 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
3344 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
3345 (s390_frame_align, s390_register_return_value, s390_return_value)
3346 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
3347 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
3348 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
3349 (s390_trad_frame_prev_register, s390_unwind_cache)
3350 (s390_prologue_frame_unwind_cache)
3351 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
3352 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
3353 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
3354 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
3355 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
3356 (s390_frame_base_address, s390_local_base_address)
3357 (s390_frame_base, s390_gcc_target_options)
3358 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
3359 (s390_validate_reg_range, s390_tdesc_valid)
3360 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
3361 * s390-tdep.c: ...this. New file.
3362
9c0b896e
PR
33632018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3364
3365 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
3366 (s390_process_record, s390_gdbarch_tdep_alloc)
3367 (s390_linux_init_abi_any): Use/set new hook.
3368
7042632b
PR
33692018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3370
3371 * s390-linux-tdep.c (osabi.h): New include.
3372 (s390_linux_init_abi_31, s390_linux_init_abi_64)
3373 (s390_linux_init_abi_any): New functions.
3374 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
3375
650f5e13
PR
33762018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3377
3378 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
3379 tdesc_has_registers check
3380
47c9317e
PR
33812018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3382
3383 * s390-linux-tdep.c (s390_tdesc_valid): New function.
3384 (s390_validate_reg_range): New macro.
3385 (s390_gdbarch_init): Adjust.
3386
095085d8
PR
33872018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3388
3389 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
3390 (s390_gdbarch_tdep_alloc): Adjust.
3391 (s390_gdbarch_init): Adjust.
3392
ab9bcc67
PR
33932018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3394
3395 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
3396 <have_tdb>: Change type to bool.
3397 (s390_gdbarch_tdep_alloc): Adjust.
3398 (s390_gdbarch_init): Adjust.
3399
21f6f5ff
PR
34002018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3401
3402 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
3403 (gdbarch_tdep) <have_upper, have_vx>: New fields.
3404 (s390_gdbarch_tdep_alloc): New function.
3405 (s390_gdbarch_init): Allocate tdep at start and use its fields
3406 instead of separate variables.
3407
0eb97953
PR
34082018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3409
3410 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
3411 when looking for cached gdbarch and add comment for remaining.
3412
5c319bb2
PA
34132018-01-22 Pedro Alves <palves@redhat.com>
3414 Sergio Durigan Junior <sergiodj@redhat.com>
3415
3416 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
3417 case.
3418
d65ce302
MR
34192018-01-22 Maciej W. Rozycki <macro@mips.com>
3420
3421 * MAINTAINERS: Update my company e-mail address.
3422
ec7a5fcb
YQ
34232018-01-22 Yao Qi <yao.qi@linaro.org>
3424
3425 * regcache.c (cooked_write_test): New function.
3426 (_initialize_regcache): Register the test.
3427
11f57cb6
YQ
34282018-01-22 Yao Qi <yao.qi@linaro.org>
3429
3430 * ia64-tdep.c (ia64_pseudo_register_read): Call
3431 regcache->cooked_read instead of regcache_cooked_read_unsigned.
3432 * m32c-tdep.c (m32c_cat_read): Likewise.
3433 (m32c_r3r2r1r0_read): Likewise.
3434 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
3435 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
3436
03f50fc8
YQ
34372018-01-22 Yao Qi <yao.qi@linaro.org>
3438
3439 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
3440 method raw_read instead of regcache_raw_read.
3441 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
3442 * arm-tdep.c (arm_neon_quad_read): Likewise.
3443 * avr-tdep.c (avr_pseudo_register_read): Likewise.
3444 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
3445 * frv-tdep.c (frv_pseudo_register_read): Likewise.
3446 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
3447 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3448 (i386_pseudo_register_read_into_value): Likewise.
3449 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
3450 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
3451 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
3452 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
3453 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
3454 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
3455 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
3456 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
3457 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
3458
dc711524
YQ
34592018-01-22 Yao Qi <yao.qi@linaro.org>
3460
3461 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
3462 * configure.tgt: Remove target mt.
3463 * mt-tdep.c: Remove.
3464 * regcache.c (cooked_read_test): Remove the check for mt.
3465
3f5a868b
YQ
34662018-01-22 Yao Qi <yao.qi@linaro.org>
3467
3468 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
3469 instead of gdbarch_pseudo_register_read_value.
3470
de4cb04a
JB
34712018-01-22 Joel Brobecker <brobecker@adacore.com>
3472
3473 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
3474 language is Ada.
3475
a9e40818
JB
34762018-01-22 Joel Brobecker <brobecker@adacore.com>
3477
3478 * linespec.c (create_sals_line_offset): Remove code that preserved
3479 the symtab_and_line's line number.
3480
e707fc44
AB
34812018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3482
3483 * varobj.c (varobj_create): Don't set valid_block when creating a
3484 floating varobj.
3485
03d0bf7b
AB
34862018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3487
3488 * varobj.c (varobj_create): Remove out of date comment.
3489
ae451627
AB
34902018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3491
3492 PR mi/20395
3493 * ada-exp.y (write_var_from_sym): Pass extra parameter when
3494 updating innermost block.
3495 * parse.c (innermost_block_tracker::update): Take extra type
3496 parameter, and check types match before updating innermost block.
3497 (write_dollar_variable): Update innermost block for registers.
3498 * parser-defs.h (enum innermost_block_tracker_type): New enum.
3499 (innermost_block_tracker::innermost_block_tracker): Initialise
3500 m_types member.
3501 (innermost_block_tracker::reset): Take type parameter.
3502 (innermost_block_tracker::update): Take type parameter, and pass
3503 type through as needed.
3504 (innermost_block_tracker::m_types): New member.
3505 * varobj.c (varobj_create): Pass type when reseting innermost
3506 block.
3507
aee1fcdf
AB
35082018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3509
3510 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
3511 * ada-lang.c (resolve_subexp): Likewise.
3512 * breakpoint.c (set_breakpoint_condition) Likewise.
3513 (watch_command_1) Likewise.
3514 * c-exp.y (variable): Likewise.
3515 * d-exp.y (PrimaryExpression): Likewise.
3516 * f-exp.y (variable): Likewise.
3517 * go-exp.y (variable): Likewise.
3518 * m2-exp.y (variable): Likewise.
3519 * objfiles.c (objfile::~objfile): Likewise.
3520 * p-exp.y (variable): Likewise.
3521 * parse.c (innermost_block): Change type.
3522 * parser-defs.h (class innermost_block_tracker): New.
3523 (innermost_block): Change to innermost_block_tracker.
3524 * printcmd.c (display_command): Switch to innermost_block API.
3525 (do_one_display): Likewise.
3526 * rust-exp.y (do_one_display): Likewise.
3527 * symfile.c (clear_symtab_users): Likewise.
3528 * varobj.c (varobj_create): Switch to innermost_block API, replace
3529 use of innermost_block with block stored on varobj object.
3530
396af9a1
AB
35312018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
3532
3533 * expression.h (innermost_block): Remove declaration.
3534 * varobj.c: Add 'parser-defs.h' include.
3535
fcfcc376
TT
35362018-01-19 Tom Tromey <tom@tromey.com>
3537
3538 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
3539 symbols in the static and global blocks.
3540
5a6c3296
JC
35412018-01-19 James Clarke <jrtc27@jrtc27.com>
3542
3543 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
3544 gdb_ptrace.h, and move including gdb_wait.h ...
3545 * nat/linux-ptrace.h: ... to here.
3546
bc09b0c1
SM
35472018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3548
3549 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
3550 inf_ptrace_detach_success.
3551 (inf_ptrace_detach_success): Add inferior parameter, use it
3552 instead of inferior_ptid, pass it to detach_inferior.
3553 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
3554 parameter.
3555 * inferior.c (detach_inferior): Add overload that takes an
3556 inferior object.
3557 * inferior.h (detach_inferior): Likewise.
3558 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
3559 use inferior_ptid, adjust call to inf_ptrace_detach_success.
3560 * linux-thread-db.c (thread_db_detach): Use inf parameter.
3561
6e1e1966
SM
35622018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3563
3564 * target.h (struct target_ops) <to_detach>: Add inferior
3565 parameter.
3566 (target_detach): Likewise.
3567 * target.c (dispose_inferior): Pass inferior down.
3568 (target_detach): Pass inferior down. Assert that it is equal to
3569 the current inferior.
3570 * aix-thread.c (aix_thread_detach): Pass inferior down.
3571 * corefile.c (core_file_command): Pass current_inferior() down.
3572 * corelow.c (core_detach): Add inferior parameter.
3573 * darwin-nat.c (darwin_detach): Likewise.
3574 * gnu-nat.c (gnu_detach): Likewise.
3575 * inf-ptrace.c (inf_ptrace_detach): Likewise.
3576 * infcmd.c (detach_command): Pass current_inferior() down to
3577 target_detach.
3578 * infrun.c (follow_fork_inferior): Pass parent_inf to
3579 target_detach.
3580 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
3581 target_detach.
3582 * linux-nat.c (linux_nat_detach): Add inferior parameter.
3583 * linux-thread-db.c (thread_db_detach): Likewise.
3584 * nto-procfs.c (procfs_detach): Likewise.
3585 * procfs.c (procfs_detach): Likewise.
3586 * record.c (record_detach): Likewise.
3587 * record.h (struct inferior): Forward-declare.
3588 (record_detach): Add inferior parameter.
3589 * remote-sim.c (gdbsim_detach): Likewise.
3590 * remote.c (remote_detach_1): Likewise.
3591 (remote_detach): Likewise.
3592 (extended_remote_detach): Likewise.
3593 * sol-thread.c (sol_thread_detach): Likewise.
3594 * target-debug.h (target_debug_print_inferior_p): New macro.
3595 * target-delegates.c: Re-generate.
3596 * top.c (kill_or_detach): Pass inferior down to target_detach.
3597 * windows-nat.c (windows_detach): Add inferior parameter.
3598
6bd6f3b6
SM
35992018-01-19 Simon Marchi <simon.marchi@ericsson.com>
3600
3601 * target.h (struct target_ops) <to_detach>: Remove args
3602 parameter.
3603 (target_detach): Likewise.
3604 * target.c (dispose_inferior): Adjust.
3605 (target_detach): Remove args parameter, adjust.
3606 * aix-thread.c (aix_thread_detach): Adjust.
3607 * corefile.c (core_file_command): Adjust.
3608 * corelow.c (core_detach): Adjust.
3609 * darwin-nat.c (darwin_detach): Adjust.
3610 * gnu-nat.c (gnu_detach): Adjust.
3611 * inf-ptrace.c (inf_ptrace_detach): Adjust.
3612 * infcmd.c (detach_command): Adjust
3613 * infrun.c (follow_fork_inferior): Adjust.
3614 (handle_vfork_child_exec_or_exit): Adjust.
3615 * linux-fork.c (linux_fork_detach): Remove args parameter.
3616 * linux-fork.h (linux_fork_detach): Likewise.
3617 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
3618 * linux-thread-db.c (thread_db_detach): Likewise.
3619 * nto-procfs.c (procfs_detach): Likewise.
3620 * procfs.c (procfs_detach): Likewise.
3621 (do_detach): Remove signo parameter.
3622 * record.c (record_detach): Remove args parameter.
3623 * record.h (record_detach): Likewise.
3624 * remote-sim.c (gdbsim_detach): Likewise.
3625 * remote.c (remote_detach_1): Likewise.
3626 (remote_detach): Likewise.
3627 (extended_remote_detach): Likewise.
3628 * sol-thread.c (sol_thread_detach): Likewise.
3629 * target-delegates.c: Re-generate.
3630 * top.c (struct qt_args) <args>: Remove field.
3631 (kill_or_detach): Don't pass args.
3632 (quit_force): Don't set args.
3633 * windows-nat.c (windows_detach): Remove args parameter.
3634
88af8ea8
YQ
36352018-01-19 Yao Qi <yao.qi@linaro.org>
3636
3637 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
3638 (arm_linux_init_abi): Install it.
3639
dea445b9
YQ
36402018-01-19 Yao Qi <yao.qi@linaro.org>
3641
3642 * osabi.c (gdb_osabi_names): Extend the regexp for
3643 arm-linux-gnueabihf.
3644
4a17f768
YQ
36452018-01-18 Yao Qi <yao.qi@linaro.org>
3646
3647 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
3648 m_abbrevs.
3649 (abbrev_table::add_abbrev): Update.
3650 (abbrev_table::lookup_abbrev): Update.
3651
d679c21a
YQ
36522018-01-18 Yao Qi <yao.qi@linaro.org>
3653
3654 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
3655
7d937cad
SDJ
36562018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
3657
3658 * compile/compile.c (compile_to_object): Convert "triplet_rx"
3659 to "std::string".
3660
9e14690d
TT
36612018-01-17 Tom Tromey <tom@tromey.com>
3662
3663 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
3664
50a82047
TT
36652018-01-17 Tom Tromey <tom@tromey.com>
3666
3667 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
3668 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
3669 (create_array_type_with_stride): Update.
3670 * dwarf2read.c (set_die_type): Update.
3671
c89b44cd
TT
36722018-01-17 Tom Tromey <tom@tromey.com>
3673
3674 * dwarf2read.c (delayed_method_info): Remove typedef.
3675 (dwarf2_cu::method_info): Now a std::vector.
3676 (add_to_method_list): Update.
3677 (free_delayed_list): Remove.
3678 (compute_delayed_physnames): Update.
3679 (process_full_comp_unit, process_full_type_unit): Clear the method
3680 list. Remove cleanups.
3681 (psymtab_include_file_name): Add name_holder parameter. Use
3682 unique_xmalloc_ptr.
3683 (dwarf_decode_lines): Update.
3684
fcd3b13d
SM
36852018-01-17 Tom Tromey <tom@tromey.com>
3686 Simon Marchi <simon.marchi@ericsson.com>
3687
3688 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
3689 (dwarf2_per_objfile::free_cached_comp_units)
3690 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3691 (init_cutu_and_read_dies_no_follow): Update.
3692 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
3693 (dwarf2_cu::~dwarf2_cu): New.
3694 (free_heap_comp_unit, free_stack_comp_unit): Remove.
3695 (age_cached_comp_units, free_one_cached_comp_unit): Update.
3696
685af9cd
TT
36972018-01-17 Tom Tromey <tom@tromey.com>
3698 Simon Marchi <simon.marchi@ericsson.com>
3699
3700 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
3701 (struct die_reader_specs) <abbrev_table>: New member.
3702 (struct abbrev_table): Add constructor.
3703 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
3704 <abbrev_obstack>: Now an auto_obstack.
3705 (abbrev_table_up): New typedef.
3706 (init_cu_die_reader): Add abbrev_table parameter.
3707 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
3708 Add result_dwo_abbrev_table.
3709 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
3710 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
3711 Update.
3712 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
3713 parameter.
3714 (skip_children): Update.
3715 (abbrev_table::alloc_abbrev): Rename from
3716 abbrev_table_alloc_abbrev.
3717 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
3718 (abbrev_table::lookup_abbrev): Rename from
3719 abbrev_table_lookup_abbrev.
3720 (abbrev_table_read_table): Return abbrev_table_up.
3721 (abbrev_table_free, abbrev_table_free_cleanup)
3722 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
3723 (load_partial_dies): Update.
3724
5e2db402
TT
37252018-01-17 Tom Tromey <tom@tromey.com>
3726
3727 * dwarf2read.c (dwarf2_compute_name): Update comment.
3728 (read_func_scope, read_variable): Update.
3729 (new_symbol): Remove.
3730 (new_symbol_full): Rename to new_symbol.
3731
ee7f689e 37322018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
3733
3734 PR gdb/16577
3735 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
3736 a warning instead of throwing an error, set section size to 0 and return
3737 NULL.
3738 * gdb_bfd.h (gdb_bfd_map_section): Update description.
3739
4d9b86e1
SM
37402018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3741
3742 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
3743 std::string.
3744 (linux_ptrace_attach_fail_reason_string): Likewise.
3745 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
3746 Likewise.
3747 (linux_ptrace_attach_fail_reason_string): Likewise.
3748 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
3749
a7b2d0fb
SM
37502018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3751
3752 * linux-nat.c (linux_nat_attach): Remove xstrdup.
3753
f517c180
EA
37542018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3755
3756 PR gdb/21559
3757 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3758 checking for fs_base/gs_base fields in struct user_regs_struct.
3759 * configure: Regenerate.
3760
7045b1ca
YQ
37612018-01-17 Yao Qi <yao.qi@linaro.org>
3762
3763 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
3764 function.
3765 (aarch64_linux_init_abi): Install it to gdbarch hook
3766 gcc_target_options.
3767
db422fb2
PA
37682018-01-15 Pedro Alves <palves@redhat.com>
3769
3770 * common/signals-state-save-restore.c
3771 (save_original_signals_state): Fix typos.
3772
ba643918
SDJ
37732017-01-12 Tom Tromey <tom@tromey.com>
3774 Sergio Durigan Junior <sergiodj@redhat.com>
3775
3776 * Makefile.in (install-only): Install gdb-add-index.
3777
906b4aac
JB
37782018-01-12 John Baldwin <jhb@FreeBSD.org>
3779
3780 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
3781
bdf2a94a
AA
37822018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3783
3784 * infrun.c (keep_going_pass_signal): Clear step-over info when
3785 insert_breakpoints fails.
3786
71d378ae
PA
37872018-01-11 Pedro Alves <palves@redhat.com>
3788
3789 PR gdb/22583
3790 * infrun.c (resume): Rename to ...
3791 (resume_1): ... this.
3792 (resume): Reimplement as wrapper around resume_1.
3793
3cada740
PA
37942018-01-11 Pedro Alves <palves@redhat.com>
3795
3796 PR remote/22597
3797 * remote.c (remote_parse_stop_reply): Default to the last-set
3798 general thread instead of to 'magic_null_ptid'.
3799
618daa93
PA
38002018-01-10 Pedro Alves <palves@redhat.com>
3801
3802 * language.h (language_get_symbol_name_matcher): Rename ...
3803 (get_symbol_name_matcher): ... this.
3804 * language.c (language_get_symbol_name_matcher): Ditto.
3805 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
3806 callers adjusted.
3807
c63d3e8d
PA
38082018-01-10 Pedro Alves <palves@redhat.com>
3809
3810 PR gdb/22670
3811 * dwarf2read.c
3812 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
3813 Adjust to use language_get_symbol_name_matcher instead of
3814 language_defn::la_get_symbol_name_matcher.
3815 * language.c (language_get_symbol_name_matcher): If in Ada mode
3816 and the lookup name is a verbatim match, return Ada's matcher.
3817 * language.h (language_get_symbol_name_matcher): Adjust comment.
3818 (ada_lookup_name_info::verbatim_p):: New method.
3819
d4c2a405
PA
38202018-01-10 Pedro Alves <palves@redhat.com>
3821
3822 PR gdb/22670
3823 * ada-lang.c (ada_collect_symbol_completion_matches): If the
3824 minsym's language is language_auto or language_cplus, pass down
3825 language_ada instead.
3826 * symtab.c (compare_symbol_name): Don't frob symbol language here.
3827
8825213e
PA
38282018-01-10 Pedro Alves <palves@redhat.com>
3829
3830 PR gdb/22670
3831 * minsyms.c (linkage_name_str): New function.
3832 (iterate_over_minimal_symbols): Use it.
3833
2d97a5d9
JB
38342018-01-09 John Baldwin <jhb@FreeBSD.org>
3835
3836 * NEWS: Document that 'info proc' now works on FreeBSD.
3837
92fce24d
JB
38382018-01-09 John Baldwin <jhb@FreeBSD.org>
3839
3840 * configure.ac: Check for kinfo_getfile in libutil.
3841 * configure: Regenerate.
3842 * config.in: Regenerate.
3843 * fbsd-nat.c: Include "fbsd-tdep.h".
3844 (fbsd_fetch_cmdline): New.
3845 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
3846 rather than calling error.
3847 (fbsd_info_proc): New.
3848 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
3849 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
3850 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
3851
262f62f5
JB
38522018-01-09 John Baldwin <jhb@FreeBSD.org>
3853
3854 * fbsd-nat.c (struct free_deleter): Remove.
3855 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
3856
b999e203
JB
38572018-01-09 John Baldwin <jhb@FreeBSD.org>
3858
3859 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
3860 NULL for an empty pathname.
3861
d2176225
JB
38622018-01-09 John Baldwin <jhb@FreeBSD.org>
3863
3864 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
3865 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
3866 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
3867 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
3868 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
3869 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
3870 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
3871 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
3872 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
3873 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
3874 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
3875 (fbsd_core_fetch_timeval, fbsd_print_sigset)
3876 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
3877 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
3878 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
3879
9c4ac400
ST
38802018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
3881
3882 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
3883 (gnu_xfer_auxv): New function.
3884 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
3885 TARGET_OBJECT_AUXV.
3886
1e5ded6c
YQ
38872018-01-08 Yao Qi <yao.qi@linaro.org>
3888 Simon Marchi <simon.marchi@ericsson.com>
3889
3890 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
3891 common/selftest.c.
3892 (COMMON_OBS): Remove selftest.o.
3893 * configure.ac: Append selftest-arch.c and common/selftest.c to
3894 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
3895 * configure: Re-generated.
3896 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
3897 GDB_SELF_TEST.
3898 (maintenance_info_selftests): Likewise.
3899
04bafb1e
XR
39002018-01-08 Xavier Roirand <roirand@adacore.com>
3901
3902 * ada-valprint.c (val_print_packed_array_elements): Use
3903 proper number of elements when printing an array indexed
3904 by an enumeration type.
3905
518817b3
SM
39062018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3907
3908 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
3909 (dw2_get_file_names_reader): Adjust.
3910 (lookup_dwo_signatured_type): Adjust.
3911 (lookup_dwp_signatured_type): Adjust.
3912 (lookup_signatured_type): Adjust.
3913 (create_type_unit_group): Adjust.
3914 (get_type_unit_group): Adjust.
3915 (process_psymtab_comp_unit_reader): Adjust.
3916 (build_type_psymtabs_reader): Adjust.
3917 (scan_partial_symbols): Adjust.
3918 (add_partial_symbol): Adjust.
3919 (add_partial_subprogram): Adjust.
3920 (peek_die_abbrev): Adjust.
3921 (fixup_go_packaging): Adjust.
3922 (process_imported_unit_die): Adjust.
3923 (dwarf2_compute_name): Adjust.
3924 (dwarf2_physname): Adjust.
3925 (read_import_statement): Adjust.
3926 (handle_DW_AT_stmt_list): Adjust.
3927 (read_file_scope): Adjust.
3928 (read_func_scope): Adjust.
3929 (read_lexical_block_scope): Adjust.
3930 (read_call_site_scope): Adjust.
3931 (read_variable): Adjust.
3932 (dwarf2_rnglists_process): Adjust.
3933 (dwarf2_ranges_process): Adjust.
3934 (dwarf2_ranges_read): Adjust.
3935 (dwarf2_get_pc_bounds): Adjust.
3936 (dwarf2_record_block_ranges): Adjust.
3937 (dwarf2_add_field): Adjust.
3938 (dwarf2_add_member_fn): Adjust.
3939 (read_structure_type): Adjust.
3940 (process_structure_scope): Adjust.
3941 (read_enumeration_type): Adjust.
3942 (read_array_type): Adjust.
3943 (mark_common_block_symbol_computed): Adjust.
3944 (read_common_block): Adjust.
3945 (read_namespace_type): Adjust.
3946 (read_namespace): Adjust.
3947 (read_module_type): Adjust.
3948 (read_tag_pointer_type): Adjust.
3949 (read_tag_ptr_to_member_type): Adjust.
3950 (read_tag_string_type): Adjust.
3951 (read_subroutine_type): Adjust.
3952 (read_typedef): Adjust.
3953 (read_base_type): Adjust.
3954 (attr_to_dynamic_prop): Adjust.
3955 (read_subrange_type): Adjust.
3956 (read_unspecified_type): Adjust.
3957 (dwarf2_read_abbrevs): Adjust.
3958 (load_partial_dies): Adjust.
3959 (read_partial_die): Adjust.
3960 (find_partial_die): Adjust.
3961 (guess_partial_die_structure_name): Adjust.
3962 (fixup_partial_die): Adjust.
3963 (read_attribute_value): Adjust.
3964 (read_addr_index): Adjust.
3965 (read_addr_index_from_leb128): Adjust.
3966 (read_str_index): Adjust.
3967 (dwarf2_string_attr): Adjust.
3968 (get_debug_line_section): Adjust.
3969 (dwarf_decode_line_header): Adjust.
3970 (lnp_state_machine::check_line_address): Adjust.
3971 (dwarf_decode_lines_1): Adjust.
3972 (dwarf_decode_lines): Adjust.
3973 (dwarf2_start_symtab): Adjust.
3974 (var_decode_location): Adjust.
3975 (new_symbol_full): Adjust.
3976 (dwarf2_const_value_data): Adjust.
3977 (dwarf2_const_value_attr): Adjust.
3978 (dwarf2_const_value): Adjust.
3979 (die_type): Adjust.
3980 (die_containing_type): Adjust.
3981 (build_error_marker_type): Adjust.
3982 (lookup_die_type): Adjust.
3983 (guess_full_die_structure_name): Adjust.
3984 (anonymous_struct_prefix): Adjust.
3985 (determine_prefix): Adjust.
3986 (dwarf2_name): Adjust.
3987 (follow_die_ref_or_sig): Adjust.
3988 (follow_die_offset): Adjust.
3989 (follow_die_ref): Adjust.
3990 (follow_die_sig_1): Adjust.
3991 (follow_die_sig): Adjust.
3992 (get_signatured_type): Adjust.
3993 (get_DW_AT_signature_type): Adjust.
3994 (decode_locdesc): Adjust.
3995 (dwarf_decode_macros): Adjust.
3996 (cu_debug_loc_section): Adjust.
3997 (fill_in_loclist_baton): Adjust.
3998 (dwarf2_symbol_mark_computed): Adjust.
3999 (init_one_comp_unit): Don't assign
4000 dwarf2_cu::dwarf2_per_objfile.
4001 (set_die_type): Adjust.
4002
ed2dc618
SM
40032018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4004
4005 * dwarf2read.c (struct mapped_debug_names): Add constructor.
4006 <dwarf2_per_objfile>: New field.
4007 (dwarf2_per_objfile): Remove global.
4008 (get_dwarf2_per_objfile): New function.
4009 (set_dwarf2_per_objfile): New function.
4010 (dwarf2_build_psymtabs_hard): Change objfile parameter to
4011 dwarf2_per_objfile.
4012 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
4013 (read_abbrev_offset): Likewise.
4014 (read_indirect_string): Likewise.
4015 (read_indirect_line_string): Likewise.
4016 (read_indirect_string_at_offset): Likewise.
4017 (read_indirect_string_from_dwz): Likewise.
4018 (dwarf2_find_containing_comp_unit): Change objfile parameter to
4019 dwarf2_per_objfile.
4020 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
4021 (create_all_comp_units): Change objfile parameter to
4022 dwarf2_per_objfile.
4023 (create_all_type_units): Likewise.
4024 (process_queue): Add dwarf2_per_objfile parameter.
4025 (read_and_check_comp_unit_head): Likewise.
4026 (lookup_dwo_unit_in_dwp): Likewise.
4027 (get_dwp_file): Likewise.
4028 (process_cu_includes): Likewise.
4029 (struct free_dwo_file_cleanup_data): New struct.
4030 (dwarf2_has_info): Use get_dwarf2_per_objfile and
4031 set_dwarf2_per_objfile.
4032 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
4033 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
4034 context, adjust calls.
4035 (dw2_instantiate_symtab): Likewise.
4036 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
4037 (dw2_get_cu): Likewise.
4038 (create_cu_from_index_list): Change objfile parameter to
4039 dwarf2_per_objfile.
4040 (create_cus_from_index_list): Get dwarf2_per_objfile from
4041 context, adjust calls.
4042 (create_cus_from_index): Likewise.
4043 (create_signatured_type_table_from_index): Change objfile
4044 parameter to dwarf2_per_objfile.
4045 (create_signatured_type_table_from_debug_names): Change objfile
4046 parameter to dwarf2_per_objfile.
4047 (create_addrmap_from_index): Likewise.
4048 (create_addrmap_from_aranges): Likewise.
4049 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
4050 (dw2_setup): Remove.
4051 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
4052 context.
4053 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
4054 get_dwarf2_per_objfile.
4055 (dw2_forget_cached_source_info): Likewise.
4056 (dw2_map_symtabs_matching_filename): Likewise.
4057 (struct dw2_symtab_iterator) <index>: Remove.
4058 <dwarf2_per_objfile>: New field.
4059 (dw2_symtab_iter_init): Replace index parameter with
4060 dwarf2_per_objfile.
4061 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
4062 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
4063 (dw2_print_stats): Likewise.
4064 (dw2_dump): Likewise.
4065 (dw2_expand_symtabs_for_function): Likewise.
4066 (dw2_expand_all_symtabs): Likewise.
4067 (dw2_expand_symtabs_with_fullname): Likewise.
4068 (dw2_expand_marked_cus): Replace index and objfile parameters
4069 with dwarf2_per_objfile.
4070 (dw_expand_symtabs_matching_file_matcher): Add
4071 dwarf2_per_objfile parameter and adjust calls.
4072 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
4073 adjust calls.
4074 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
4075 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
4076 adjust calls.
4077 (create_cus_from_debug_names_list): Replace objfile parameter
4078 with dwarf2_per_objfile and adjust calls.
4079 (create_cus_from_debug_names): Likewise.
4080 (dwarf2_read_debug_names): Likewise.
4081 (mapped_debug_names::namei_to_name): Adjust call.
4082 (dw2_debug_names_iterator::next): Likewise.
4083 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
4084 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
4085 (dw2_debug_names_dump): Likewise.
4086 (dw2_debug_names_expand_symtabs_for_function): Likewise.
4087 (dw2_debug_names_expand_symtabs_matching): Likewise.
4088 (dwarf2_initialize_objfile): Likewise.
4089 (dwarf2_build_psymtabs): Likewise.
4090 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
4091 this_cu.
4092 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
4093 (read_and_check_comp_unit_head): Likewise.
4094 (read_abbrev_offset): Likewise.
4095 (create_debug_type_hash_table): Likewise.
4096 (create_debug_types_hash_table): Likewise.
4097 (create_all_type_units): Replace objfile parameter with
4098 dwarf2_per_objfile.
4099 (add_type_unit): Add dwarf2_per_objfile parameter.
4100 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
4101 with dwarf2_per_objfile.
4102 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
4103 (lookup_dwp_signatured_type): Likewise.
4104 (lookup_signatured_type): Likewise.
4105 (read_cutu_die_from_dwo): Likewise.
4106 (init_tu_and_read_dwo_dies): Likewise.
4107 (init_cutu_and_read_dies): Likewise.
4108 (init_cutu_and_read_dies_no_follow): Likewise.
4109 (allocate_type_unit_groups_table): Add objfile parameter.
4110 (create_type_unit_group): Use dwarf2_per_objfile from cu.
4111 (get_type_unit_group): Likewise.
4112 (process_psymtab_comp_unit): Update call.
4113 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
4114 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
4115 (print_tu_stats): Likewise.
4116 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
4117 in void* parameter.
4118 (build_type_psymtabs): Change objfile parameter to
4119 dwarf2_per_objfile.
4120 (process_skeletonless_type_unit): Use dwarf2_per_objfile
4121 passed in void* parameter.
4122 (process_skeletonless_type_units): Change objfile parameter to
4123 dwarf2_per_objfile.
4124 (set_partial_user): Likewise.
4125 (dwarf2_build_psymtabs_hard): Likewise.
4126 (read_comp_units_from_section): Likewise.
4127 (create_all_comp_units): Likewise.
4128 (scan_partial_symbols): Update calls.
4129 (add_partial_symbol): Likewise.
4130 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
4131 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
4132 (process_queue): Add dwarf2_per_objfile parameter.
4133 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
4134 (compute_compunit_symtab_includes): Likewise.
4135 (process_cu_includes): Add dwarf2_per_objfile parameter.
4136 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
4137 (process_full_type_unit): Likewise.
4138 (process_imported_unit_die): Update call.
4139 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
4140 (read_file_scope): Likewise.
4141 (allocate_dwo_file_hash_table): Add objfile parameter.
4142 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
4143 (create_cus_hash_table): Likewise.
4144 (create_dwp_hash_table): Likewise.
4145 (create_dwo_unit_in_dwp_v1): Likewise.
4146 (create_dwp_v2_section): Likewise.
4147 (create_dwo_unit_in_dwp_v2): Likewise.
4148 (lookup_dwo_unit_in_dwp): Likewise.
4149 (try_open_dwop_file): Likewise.
4150 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
4151 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
4152 cleanup to include a reference to dwarf2_per_objfile.
4153 (open_dwp_file): Add dwarf2_per_objfile parameter.
4154 (open_and_init_dwp_file): Likewise.
4155 (get_dwp_file): Likewise.
4156 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
4157 (queue_and_load_all_dwo_tus): Update call.
4158 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
4159 data.
4160 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
4161 (dwarf2_ranges_process): Likewise.
4162 (dwarf2_get_pc_bounds): Likewise.
4163 (mark_common_block_symbol_computed): Likewise.
4164 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
4165 (dwarf2_read_abbrevs): Update call.
4166 (read_partial_die): Use dwarf2_per_objfile from cu.
4167 (find_partial_die): Likewise.
4168 (fixup_partial_die): Likewise.
4169 (read_attribute_value): Likewise.
4170 (read_indirect_string_at_offset_from): Add objfile parameter.
4171 (read_indirect_string_at_offset): Add dwarf2_per_objfile
4172 parameter.
4173 (read_indirect_string_from_dwz): Add objfile parameter.
4174 (read_indirect_string): Add objfile parameter.
4175 (read_addr_index_1): Add dwarf2_per_objfile parameter.
4176 (read_addr_index): Use dwarf2_per_objfile from cu.
4177 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
4178 call dw2_setup.
4179 (read_str_index): Use dwarf2_per_objfile from cu.
4180 (get_debug_line_section): Likewise.
4181 (read_formatted_entries): Add dwarf2_per_objfile parameter.
4182 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
4183 (new_symbol_full): Use dwarf2_per_objfile from cu.
4184 (build_error_marker_type): Likewise.
4185 (lookup_die_type): Likewise.
4186 (determine_prefix): Likewise.
4187 (follow_die_offset): Likewise.
4188 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
4189 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
4190 (dwarf2_fetch_die_type_sect_off): Likewise.
4191 (dwarf2_get_die_type): Likewise.
4192 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
4193 (get_signatured_type): Likewise.
4194 (get_DW_AT_signature_type): Likewise.
4195 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
4196 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
4197 (cu_debug_loc_section): Likewise.
4198 (fill_in_loclist_baton): Likewise.
4199 (dwarf2_symbol_mark_computed): Likewise.
4200 (dwarf2_find_containing_comp_unit): Change objfile parameter to
4201 dwarf2_per_objfile.
4202 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
4203 parameter.
4204 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
4205 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
4206 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
4207 (set_die_type): Use dwarf2_free_objfile from cu.
4208 (get_die_type_at_offset): Likewise.
4209 (dwarf2_per_objfile_free): Don't assign global variable.
4210 (debug_names) <constructor>: Add dwarf2_per_objfile
4211 parameter, update m_debugstrlookup construction.
4212 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
4213 parameter.
4214 <m_dwarf2_per_objfile>: New field.
4215 <lookup>: Use m_dwarf2_per_objfile.
4216 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
4217 (psyms_seen_size): Likewise.
4218 (write_gdbindex): Replace objfile parameter with
4219 dwarf2_per_objfile.
4220 (write_debug_names): Likewise.
4221 (write_psymtabs_to_index): Likewise.
4222 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
4223 calls.
4224
e3b94546
SM
42252018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4226
4227 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
4228 <dwarf2_per_objfile>: New field.
4229 (struct dwarf2_per_cu_data) <objfile>: Remove.
4230 <dwarf2_per_objfile>: New field.
4231 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
4232 of objfile.
4233 (create_signatured_type_table_from_index): Likewise.
4234 (create_debug_type_hash_table): Likewise.
4235 (fill_in_sig_entry_from_dwo_entry): Likewise.
4236 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
4237 (create_type_unit_group): Assign dwarf2_per_objfile instead of
4238 objfile.
4239 (create_partial_symtab): Access objfile through
4240 dwarf2_per_objfile.
4241 (process_psymtab_comp_unit_reader): Likewise.
4242 (read_comp_units_from_section): Likewise.
4243 (scan_partial_symbols): Likewise.
4244 (add_partial_symbol): Likewise.
4245 (add_partial_subprogram): Likewise.
4246 (peek_die_abbrev): Likewise.
4247 (fixup_go_packaging): Likewise.
4248 (process_full_comp_unit): Likewise.
4249 (process_full_type_unit): Likewise.
4250 (process_imported_unit_die): Likewise.
4251 (dwarf2_compute_name): Likewise.
4252 (dwarf2_physname): Likewise.
4253 (read_import_statement): Likewise.
4254 (create_cus_hash_table): Assign dwarf2_physname instead of
4255 objfile.
4256 (read_func_scope): Access objfile through dwarf2_per_objfile.
4257 (read_lexical_block_scope): Likewise.
4258 (read_call_site_scope): Likewise.
4259 (read_variable): Likewise.
4260 (dwarf2_rnglists_process): Likewise.
4261 (dwarf2_ranges_process): Likewise.
4262 (dwarf2_ranges_read): Likewise.
4263 (dwarf2_record_block_ranges): Likewise.
4264 (dwarf2_add_field): Likewise.
4265 (dwarf2_add_member_fn): Likewise.
4266 (read_structure_type): Likewise.
4267 (process_structure_scope): Likewise.
4268 (read_enumeration_type): Likewise.
4269 (read_array_type): Likewise.
4270 (read_common_block): Likewise.
4271 (read_namespace_type): Likewise.
4272 (read_namespace): Likewise.
4273 (read_module_type): Likewise.
4274 (read_tag_pointer_type): Likewise.
4275 (read_tag_ptr_to_member_type): Likewise.
4276 (read_tag_string_type): Likewise.
4277 (read_subroutine_type): Likewise.
4278 (read_typedef): Likewise.
4279 (read_base_type): Likewise.
4280 (attr_to_dynamic_prop): Likewise.
4281 (read_subrange_type): Likewise.
4282 (read_unspecified_type): Likewise.
4283 (load_partial_dies): Likewise.
4284 (read_partial_die): Likewise.
4285 (find_partial_die): Likewise.
4286 (guess_partial_die_structure_name): Likewise.
4287 (fixup_partial_die): Likewise.
4288 (read_attribute_value): Likewise.
4289 (read_addr_index_from_leb128): Likewise.
4290 (dwarf2_read_addr_index): Likewise.
4291 (dwarf2_string_attr): Likewise.
4292 (lnp_state_machine::check_line_address): Likewise.
4293 (dwarf_decode_lines_1): Likewise.
4294 (dwarf_decode_lines): Likewise.
4295 (dwarf2_start_symtab): Likewise.
4296 (var_decode_location): Likewise.
4297 (new_symbol_full): Likewise.
4298 (dwarf2_const_value_data): Likewise.
4299 (dwarf2_const_value_attr): Likewise.
4300 (dwarf2_const_value): Likewise.
4301 (die_type): Likewise.
4302 (die_containing_type): Likewise.
4303 (lookup_die_type): Likewise.
4304 (guess_full_die_structure_name): Likewise.
4305 (anonymous_struct_prefix): Likewise.
4306 (dwarf2_name): Likewise.
4307 (follow_die_ref_or_sig): Likewise.
4308 (follow_die_offset): Likewise.
4309 (follow_die_ref): Likewise.
4310 (dwarf2_fetch_die_loc_sect_off): Likewise.
4311 (dwarf2_fetch_constant_bytes): Likewise.
4312 (dwarf2_fetch_die_type_sect_off): Likewise.
4313 (dwarf2_get_die_type): Likewise.
4314 (follow_die_sig): Likewise.
4315 (decode_locdesc): Likewise.
4316 (dwarf2_per_cu_objfile): Likewise.
4317 (dwarf2_per_cu_text_offset): Likewise.
4318 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
4319 objfile.
4320 (set_die_type): Access objfile through
4321 dwarf2_per_objfile.
4322
b01ba14d
SM
43232018-01-07 Simon Marchi <simon.marchi@ericsson.com>
4324
4325 * valprint.c (converted_character_d): Remove typedef.
4326 (DEF_VEC_O (converted_character_d)): Remove.
4327 (count_next_character): Use std::vector.
4328 (print_converted_chars_to_obstack): Likewise.
4329 (generic_printstr): Likewise.
4330
4d0fdd9b
SM
43312018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4332
4333 * xml-support.h (struct gdb_xml_value): Add constructor.
4334 <value>: Change type to unique_xmalloc_ptr.
4335 (gdb_xml_value_s): Remove typedef.
4336 (DEF_VEC_O (gdb_xml_value_s)): Remove.
4337 (gdb_xml_element_start_handler): Change parameter type to
4338 std::vector.
4339 (xml_find_attribute): Likewise.
4340 * xml-support.c (xml_find_attribute): Change parameter type to
4341 std::vector and adjust.
4342 (gdb_xml_values_cleanup): Remove.
4343 (gdb_xml_parser::start_element): Adjust to std::vector.
4344 (xinclude_start_include): Change paraeter type to std::vector
4345 and adjust.
4346 * btrace.c (check_xml_btrace_version): Likewise.
4347 (parse_xml_btrace_block): Likewise.
4348 (parse_xml_btrace_pt_config_cpu): Likewise.
4349 (parse_xml_btrace_pt): Likewise.
4350 (parse_xml_btrace_conf_bts): Likewise.
4351 (parse_xml_btrace_conf_pt): Likewise.
4352 * memory-map.c (memory_map_start_memory): Likewise.
4353 (memory_map_start_property): Likewise.
4354 * osdata.c (osdata_start_osdata): Likewise.
4355 (osdata_start_item): Likewise.
4356 (osdata_start_column): Likewise.
4357 * remote.c (start_thread): Likewise.
4358 * solib-aix.c (library_list_start_library): Likewise.
4359 (library_list_start_list): Likewise.
4360 * solib-svr4.c (library_list_start_library): Likewise.
4361 (svr4_library_list_start_list): Likewise.
4362 * solib-target.c (library_list_start_segment): Likewise.
4363 (library_list_start_section): Likewise.
4364 (library_list_start_library): Likewise.
4365 (library_list_start_list): Likewise.
4366 * tracepoint.c (traceframe_info_start_memory): Likewise.
4367 (traceframe_info_start_tvar): Likewise.
4368 * xml-syscall.c (syscall_start_syscall): Likewise.
4369 * xml-tdesc.c (tdesc_start_target): Likewise.
4370 (tdesc_start_feature): Likewise.
4371 (tdesc_start_reg): Likewise.
4372 (tdesc_start_union): Likewise.
4373 (tdesc_start_struct): Likewise.
4374 (tdesc_start_flags): Likewise.
4375 (tdesc_start_enum): Likewise.
4376 (tdesc_start_field): Likewise.
4377 (tdesc_start_enum_value): Likewise.
4378 (tdesc_start_vector): Likewise.
4379
f979c73f
SM
43802018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4381
4382 * extension.h (struct xmethod_worker) <clone>: Remove.
4383 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
4384 Remove.
4385 (python_xmethod_worker::clone): Remove.
4386 * valops.c (find_overload_match): Use std::move instead of
4387 clone.
4388
ba18742c
SM
43892018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
4390
4391 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
4392 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
4393 <free_xmethod_worker_data>: Remove.
4394 <get_matching_xmethod_workers>: Chance VEC to std::vector.
4395 <get_xmethod_arg_types>: Remove.
4396 <get_xmethod_result_type>: Remove.
4397 <invoke_xmethod>: Remove.
4398 * extension.c (new_xmethod_worker): Remove.
4399 (clone_xmethod_worker): Remove.
4400 (get_matching_xmethod_workers): Return void, pass std::vector by
4401 pointer.
4402 (get_xmethod_arg_types): Rename to...
4403 (xmethod_worker::get_arg_types): ... this, and adjust.
4404 (get_xmethod_result_type): Rename to...
4405 (xmethod_worker::get_result_type): ... this, and adjust.
4406 (invoke_xmethod): Remove.
4407 (free_xmethod_worker): Remove.
4408 (free_xmethod_worker_vec): Remove.
4409 * extension.h (enum ext_lang_rc): Move here from
4410 extension-priv.h.
4411 (struct xmethod_worker): Add constructor and destructor.
4412 <data>: Remove.
4413 <value>: Remove.
4414 <invoke, clone, do_get_result_type, do_get_arg_types>: New
4415 virtual pure methods.
4416 <get_arg_types, get_result_type>: New methods.
4417 (xmethod_worker_ptr): Remove typedef.
4418 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
4419 (xmethod_worker_vec): Remove typedef.
4420 (xmethod_worker_up): New typedef.
4421 (invoke_xmethod): Remove.
4422 (clone_xmethod_worker): Remove.
4423 (free_xmethod_worker): Remove.
4424 (free_xmethod_worker_vec): Remove.
4425 (get_xmethod_arg_types): Remove.
4426 (get_xmethod_result_type): Remove.
4427 * valops.c (find_method_list): Use std::vector, don't use
4428 intermediate vector.
4429 (value_find_oload_method_list): Use std::vector.
4430 (find_overload_match): Use std::vector.
4431 (find_oload_champ): Use std::vector.
4432 * value.c (value_free): Use operator delete.
4433 (value_of_xmethod): Rename to...
4434 (value_from_xmethod): ... this. Don't assign
4435 xmethod_worker::value, take rvalue-reference.
4436 (result_type_of_xmethod): Adjust.
4437 (call_xmethod): Adjust.
4438 * value.h: Include extension.h.
4439 (struct xmethod_worker): Don't forward-declare.
4440 (value_of_xmethod): Rename to...
4441 (value_from_xmethod): ... this, take rvalue-reference.
4442 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
4443 (struct python_xmethod_worker): ... this, add constructor and
4444 destructor.
4445 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
4446 (gdbpy_free_xmethod_worker_data): Rename to...
4447 (python_xmethod_worker::~python_xmethod_worker): ... this and
4448 adjust.
4449 (gdbpy_clone_xmethod_worker_data): Rename to...
4450 (python_xmethod_worker::clone): ... this and adjust.
4451 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
4452 temporary vector.
4453 (gdbpy_get_xmethod_arg_types): Rename to...
4454 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
4455 (gdbpy_get_xmethod_result_type): Rename to...
4456 (python_xmethod_worker::do_get_result_type): ... this and
4457 adjust.
4458 (gdbpy_invoke_xmethod): Rename to...
4459 (python_xmethod_worker::invoke): ... this and adjust.
4460 (new_python_xmethod_worker): Rename to...
4461 (python_xmethod_worker::python_xmethod_worker): ... this and
4462 adjust.
4463 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
4464 Remove.
4465 (gdbpy_free_xmethod_worker_data): Remove.
4466 (gdbpy_get_matching_xmethod_workers): Use std::vector.
4467 (gdbpy_get_xmethod_arg_types): Remove.
4468 (gdbpy_get_xmethod_result_type): Remove.
4469 (gdbpy_invoke_xmethod): Remove.
4470 * python/python.c (python_extension_ops): Remove obsolete
4471 callbacks.
4472
e379cee6
PA
44732018-01-05 Pedro Alves <palves@redhat.com>
4474
4475 PR gdb/18653
4476 * common/signals-state-save-restore.c
4477 (save_original_signals_state): New parameter 'quiet'. Warn if we
4478 find a custom handler preinstalled, instead of internal erroring.
4479 But only warn if !quiet.
4480 * common/signals-state-save-restore.h
4481 (save_original_signals_state): New parameter 'quiet'.
4482 * main.c (captured_main_1): Move save_original_signals_state call
4483 after option handling, and pass QUIET.
4484
a655456c
PA
44852018-01-05 Pedro Alves <palves@redhat.com>
4486
4487 * spu-tdep.c (spu_catch_start): Pass
4488 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
4489
de63c46b
PA
44902018-01-05 Pedro Alves <palves@redhat.com>
4491
4492 PR gdb/22670
4493 * ada-lang.c (literal_symbol_name_matcher): New function.
4494 (ada_get_symbol_name_matcher): Use it for
4495 symbol_name_match_type::SEARCH_NAME.
4496 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
4497 it down instead of assuming symbol_name_match_type::FULL.
4498 * block.h (block_lookup_symbol): New parameter 'match_type'.
4499 * c-valprint.c (print_unpacked_pointer): Use
4500 lookup_symbol_search_name instead of lookup_symbol.
4501 * compile/compile-object-load.c (get_out_value_type): Pass down
4502 symbol_name_match_type::SEARCH_NAME.
4503 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
4504 symbol_name_match_type::FULL.
4505 * cp-support.c (cp_get_symbol_name_matcher): Handle
4506 symbol_name_match_type::SEARCH_NAME.
4507 * infrun.c (insert_exception_resume_breakpoint): Use
4508 lookup_symbol_search_name.
4509 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
4510 * psymtab.c (maintenance_check_psymtabs): Use
4511 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
4512 * stack.c (print_frame_args): Use lookup_symbol_search_name and
4513 SYMBOL_SEARCH_NAME.
4514 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
4515 if symbol_name_match_type::SEARCH_NAME.
4516 (lookup_symbol_in_language): Pass down
4517 symbol_name_match_type::FULL.
4518 (lookup_symbol_search_name): New.
4519 (lookup_language_this): Pass down
4520 symbol_name_match_type::SEARCH_NAME.
4521 (lookup_symbol_aux, lookup_local_symbol): New parameter
4522 'match_type'. Pass it down.
4523 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
4524 (lookup_symbol_search_name): New declaration.
4525 (lookup_symbol_in_block): New 'match_type' parameter.
4526
f98fc17b
PA
45272018-01-05 Pedro Alves <palves@redhat.com>
4528
4529 PR gdb/22670
4530 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
4531 ada_lookup_symbol.
4532 (ada_lookup_symbol): Reimplement in terms of
4533 ada_lookup_symbol_list, bits factored out from
4534 ada_lookup_encoded_symbol.
4535
342f8240
JB
45362018-01-05 Joel Brobecker <brobecker@adacore.com>
4537
4538 * ada-exp.y (write_object_renaming): When subscripting an array
4539 using a symbol as the index, pass the block in call to
4540 ada_lookup_encoded_symbol when looking that symbol up.
4541
7150d33c
JG
45422018-01-05 Jerome Guitton <guitton@adacore.com>
4543
4544 * ada-lang.c (ada_array_length): Use ada_index_type instead of
4545 TYPE_INDEX_TYPE.
4546
cc0e770c
JB
45472018-01-05 Joel Brobecker <brobecker@adacore.com>
4548
4549 * ada-lang.c (ada_to_fixed_value_create): Add handling of
4550 the case where VALUE_LVAL (val0) is not lval_memory.
4551
f79da888 45522018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
4553
4554 * ada-valprint.c (print_optional_low_bound): Handle
4555 character-indexed array printing like boolean-indexed array
4556 printing.
4557
cd385f94
JB
45582018-01-05 Joel Brobecker <brobecker@adacore.com>
4559
4560 * NEWS: Create a new section for the next release branch.
4561 Rename the section of the current branch, now that it has
4562 been cut.
4563
09aca949
JB
45642018-01-05 Joel Brobecker <brobecker@adacore.com>
4565
4566 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
4567 * version.in: Bump version to 8.1.50.DATE-git.
4568
9f757bf7
XR
45692018-01-03 Xavier Roirand <roirand@adacore.com>
4570
4571 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
4572 Add field.
4573 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
4574 Add field.
4575 (default_exception_support_info) <catch_handlers_sym>: Add field.
4576 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
4577 (ada_exception_name_addr_1): Add "catch handlers" handling.
4578 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
4579 Update all callers.
4580 (create_excep_cond_exprs) <ex>: Add parameter.
4581 (re_set_exception): Update create_excep_cond_exprs call.
4582 (print_it_exception, print_one_exception, print_mention_exception)
4583 (print_recreate_exception): Add "catch handler" handling.
4584 (allocate_location_catch_handlers, re_set_catch_handlers)
4585 (check_status_catch_handlers, print_it_catch_handlers)
4586 (print_one_catch_handlers, print_mention_catch_handlers)
4587 (print_recreate_catch_handlers): New function.
4588 (catch_handlers_breakpoint_ops): New variable.
4589 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
4590 Add parameter. Add "catch handler" handling.
4591 (ada_exception_sym_name, ada_exception_breakpoint_ops):
4592 Add "catch handler" handling.
4593 (ada_exception_catchpoint_cond_string): Add "catch handler"
4594 handling.
4595 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
4596 call.
4597 (catch_ada_handlers_command): New function.
4598 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
4599 operations structure.
4600 (_initialize_ada_language): Add "catch handlers" command entry.
4601 * NEWS: Document "catch handlers" feature.
4602
9fe561ab
JB
46032018-01-02 Joel Brobecker <brobecker@adacore.com>
4604
4605 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
4606 account when creating the array type of the slice.
4607 (ada_value_slice): Likewise.
4608
a405673c
JB
46092018-01-02 Joel Brobecker <brobecker@adacore.com>
4610
4611 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
4612 New enum value.
4613 (create_array_type_with_stride): Add byte_stride_prop parameter.
4614 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
4615 New parameter. Update all callers in this file.
4616 (array_type_has_dynamic_stride): New function.
4617 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
4618 of arrays with dynamic byte strides.
4619 * dwarf2read.c (read_array_type): Add support for dynamic
4620 DW_AT_byte_stride attributes.
4621
74a2f8ff
JB
46222018-01-02 Joel Brobecker <brobecker@adacore.com>
4623
4624 * dwarf2read.c (read_unspecified_type): Treat
4625 DW_TAG_enumeration_type DIEs from Ada units as stubs.
4626
e2882c85
JB
46272018-01-01 Joel Brobecker <brobecker@adacore.com>
4628
4629 Update copyright year range in all GDB files.
4630
1690bb24
JB
46312018-01-01 Joel Brobecker <brobecker@adacore.com>
4632
4633 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
4634 and gdb/testsuite/gdb.base/step-line.c.
4635
0f0c98a8
JB
46362018-01-01 Joel Brobecker <brobecker@adacore.com>
4637
4638 * copyright.py (main): Dump the contents of
4639 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
4640 even if BY_HAND is empty.
4641
82e1e79a
JB
46422018-01-01 Joel Brobecker <brobecker@adacore.com>
4643
4644 * top.c (print_gdb_version): Update Copyright year in version
4645 message.
4646
053f54e5 46472018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 4648
053f54e5 4649 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 4650
053f54e5 4651For older changes see ChangeLog-2017.
c906108c
SS
4652\f
4653Local Variables:
4654mode: change-log
4655left-margin: 8
4656fill-column: 74
4657version-control: never
57da7796 4658coding: utf-8
c906108c 4659End: