* ppc-linux-tdep.c: Include "solib.h", "solist.h", "exceptions.h",
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
cc5f0d61
UW
12009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * ppc-linux-tdep.c: Include "solib.h", "solist.h", "exceptions.h",
4 "arch-utils.h", and "spu-tdep.h".
5 (spu_context_objfile, spe_context_lm_addr, spe_context_offset):
6 New static variables.
7 (spe_context_cache_ptid, spe_context_cache_address): Likewise.
8 (ppc_linux_spe_context_lookup): New function.
9 (ppc_linux_spe_context_inferior_created): Likewise.
10 (ppc_linux_spe_context_solib_loaded): Likewise.
11 (ppc_linux_spe_context_solib_unloaded): Likewise.
12 (ppc_linux_spe_context): Likewise.
13 (struct ppu2spu_cache, struct ppu2spu_data): New data types.
14 (ppu2spu_prev_arch, ppu2spu_this_id, ppu2spu_prev_register,
15 ppu2spu_unwind_register, ppu2spu_sniffer,
16 ppu2spu_dealloc_cache): New functions.
17 (ppu2spu_unwind): New static variable.
18 (ppc_linux_init_abi): Install cross-architecture unwinder.
19 (_initialize_ppc_linux_tdep): Attach to observers.
20
21 * spu-tdep.c (struct spu2ppu_cache): New data type.
22 (spu2ppu_prev_arch, spu2ppu_this_id, spu2ppu_prev_register,
23 spu2ppu_sniffer, spu2ppu_dealloc_cache): New functions.
24 (spu2ppu_unwind): New static variable.
25 (spu_gdbarch_init): Install cross-architecture unwinder.
26
85e747d2
UW
272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
28
29 * target.h (enum strata): New value arch_stratum.
30 * target.c (target_require_runnable): Skip arch_stratum targets.
31
32 * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
33 solib-spu.o and spu-multiarch.o to gdb_target_obs.
34 * Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o.
35 (ALLDEPFILES): Add solib-spu.c and spu-multiarch.c.
36
37 * solib-spu.c: New file.
38 * solib-spu.h: New file.
39 * spu-multiarch.c: New file.
40
41 * spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros.
42
43 * spu-tdep.c (struct gdbarch_tdep): New member id.
44 (spu_gdbarch_id): New function.
45 (spu_lslr): New function.
46
47 (spu_address_to_pointer): New function.
48 (spu_pointer_to_address): Support SPU ID address encoding. Use
49 spu_gdbarch_id and spu_lslr.
50 (spu_integer_to_address): Likewise.
51 (spu_frame_unwind_cache): Update for encoded addresses.
52 (spu_unwind_pc, spu_unwind_sp): Likewise.
53 (spu_read_pc, spu_write_pc): Likewise.
54 (spu_push_dummy_call): Likewise.
55 (spu_software_single_step): Likewise.
56 (spu_get_longjmp_target): Likewise.
57 (spu_overlay_update_osect): Likewise.
58
59 (spu_dis_asm_print_address): New function.
60 (gdb_print_insn_spu): Likewise.
61
62 (spu_gdbarch_init): Store SPU ID in tdep structure.
63 Install spu_address_to_pointer and gdb_print_insn_spu.
64
65 * ppc-linux-tdep.c: Include "observer.h", "auxv.h", "elf/common.h"
66 and "solib-spu.h".
67 (ppc_linux_entry_point_addr): New static variable.
68 (ppc_linux_inferior_created): New function.
69 (ppc_linux_displaced_step_location): Likewise.
70 (ppc_linux_init_abi): Enable Cell/B.E. support if supported
71 by the target.
72 (_initialize_ppc_linux_tdep): Attach to inferior_created observer.
73
74 * NEWS: Mention multi-architecture and Cell/B.E. debugging
75 capabilities.
76
efcbbd14
UW
772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
78
79 * linux-nat.c: Include <sys/vfs.h>.
80 (SPUFS_MAGIC): Define.
81 (spu_enumerate_spu_ids): New function.
82 (linux_proc_xfer_spu): New function.
83 (linux_xfer_partial): Handle TARGET_OBJECT_SPU.
84
85 (iterate_over_spus): New function.
86 (struct linux_spu_corefile_data): New data type.
87 (linux_spu_corefile_callback): New function.
88 (linux_spu_make_corefile_notes): New function.
89 (linux_nat_make_corefile_notes): Call it.
90
91 * corelow.c (struct spuid_list): New data type.
92 (add_to_spuid_list): New function.
93 (core_xfer_partial): Handle TARGET_OBJECT_SPU.
94
f4d9bade
UW
952009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
96
97 * features/Makefile: Allow sub-platform specific expedite settings.
98 (WHICH): Add rs6000/powerpc-cell32l and rs6000/powerpc-cell64l.
99 (rs6000/powerpc-cell32l-expedite): Define.
100 (rs6000/powerpc-cell64l-expedite): Likewise.
101 * features/rs6000/powerpc-cell32l.xml: New file.
102 * features/rs6000/powerpc-cell64l.xml: New file.
103 * features/rs6000/powerpc-cell32l.c: New generated file.
104 * features/rs6000/powerpc-cell64l.c: New generated file.
105
106 * regformats/rs6000/powerpc-cell32l.dat: New generated file.
107 * regformats/rs6000/powerpc-cell64l.dat: New generated file.
108
109 * config/djgpp/fnchange.lst: Add mappings for new files.
110
111 * ppc-linux-tdep.h (tdesc_powerpc_cell32l): Add prototype.
112 (tdesc_powerpc_cell64l): Likewise.
113 * ppc-linux-tdep.c: Include "features/rs6000/powerpc-cell32l.c"
114 and "features/rs6000/powerpc-cell64l.c".
115 (_initialize_ppc_linux_tdep): Initialize target descriptions.
116 (ppc_linux_spu_section): New function.
117 (ppc_linux_core_read_description): Detect Cell/B.E. core files.
118 * ppc-linux-nat.c (PPC_FEATURE_CELL): Define.
119 (ppc_linux_read_description): Detect Cell/B.E. architecture.
120
121 * rs6000-tdep.c (rs6000_gdbarch_init): Do not trust BFD wordsize
122 if exec file is not PowerPC architecture.
123
e35359c5
UW
1242009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
125
126 * features/gdb-target.dtd (target): Accept optional
127 <compatible> elements.
128 (compatible): Define element.
129
130 * target-descriptions.h (tdesc_compatible_p): New.
131 (tdesc_add_compatible): New.
132 * target-descriptions.c (arch_p): New VEC_P type.
133 (struct target_desc): New member compatible.
134 (free_target_description): Handle it.
135 (maint_print_c_tdesc_cmd): Likewise.
136 (tdesc_compatible_p): New function.
137 (tdesc_add_compatible): New function.
138
139 * xml-tdesc.c (tdesc_end_compatible): New function.
140 (target_children): Handle <compatible> element.
141
142 * arch-utils.c (choose_architecture_for_target): Accept target
143 description instead of BFD architecture as input. Query target
144 description for compatible architectures.
145 (gdbarch_info_fill): Update call.
146
147 * NEWS: Mention <compatible> element of target descriptions.
148
3a1bae8e
UW
1492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
150
151 * breakpoint.c (remove_breakpoints): If removing one breakpoint
152 location fails, still continue to remove other locations.
153 (remove_hw_watchpoints): Likewise.
154 (detach_breakpoints): Likewise.
155
8bea4e01
UW
1562009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
157
158 * breakpoint.h (enum enable_state): Add bp_startup_disabled.
159 (disable_breakpoints_before_startup): Add prototype.
160 (enable_breakpoints_after_startup): Likewise.
161
162 * breakpoint.c (executing_startup): New static variable.
163 (describe_other_breakpoints): Handle bp_startup_disabled.
164 (check_duplicates_for): Likewise.
165 (disable_breakpoints_before_startup): New function.
166 (enable_breakpoints_after_startup): New function.
167 (create_breakpoint): Mark new breakpoints as bp_startup_disabled
168 if executing_startup flag is true.
169 (break_command_really): Likewise.
170 (breakpoint_re_set_one): Skip bp_startup_disabled breakpoints.
171
cca44b1b
JB
1722009-07-31 Julian Brown <julian@codesourcery.com>
173
174 * arm-linux-tdep.c (arch-utils.h, inferior.h, gdbthread.h, symfile.h):
175 Include files.
176 (arm_linux_cleanup_svc, arm_linux_copy_svc): New.
177 (cleanup_kernel_helper_return, arm_catch_kernel_helper_return): New.
178 (arm_linux_displaced_step_copy_insn): New.
179 (arm_linux_init_abi): Initialise displaced stepping callbacks.
180 * arm-tdep.c (DISPLACED_STEPPING_ARCH_VERSION): New macro.
181 (ARM_NOP): New.
182 (displaced_read_reg, displaced_in_arm_mode, branch_write_pc)
183 (bx_write_pc, load_write_pc, alu_write_pc, displaced_write_reg)
184 (insn_references_pc, copy_unmodified, cleanup_preload, copy_preload)
185 (copy_preload_reg, cleanup_copro_load_store, copy_copro_load_store)
186 (cleanup_branch, copy_b_bl_blx, copy_bx_blx_reg, cleanup_alu_imm)
187 (copy_alu_imm, cleanup_alu_reg, copy_alu_reg)
188 (cleanup_alu_shifted_reg, copy_alu_shifted_reg, cleanup_load)
189 (cleanup_store, copy_extra_ld_st, copy_ldr_str_ldrb_strb)
190 (cleanup_block_load_all, cleanup_block_store_pc)
191 (cleanup_block_load_pc, copy_block_xfer, cleanup_svc, copy_svc)
192 (copy_undef, copy_unpred): New.
193 (decode_misc_memhint_neon, decode_unconditional)
194 (decode_miscellaneous, decode_dp_misc, decode_ld_st_word_ubyte)
195 (decode_media, decode_b_bl_ldmstm, decode_ext_reg_ld_st)
196 (decode_svc_copro, arm_process_displaced_insn)
197 (arm_displaced_init_closure, arm_displaced_step_copy_insn)
198 (arm_displaced_step_fixup): New.
199 (arm_gdbarch_init): Initialise max insn length field.
200 * arm-tdep.h (DISPLACED_TEMPS, DISPLACED_MODIFIED_INSNS): New
201 macros.
202 (displaced_step_closure, pc_write_style): New.
203 (arm_displaced_init_closure, displaced_read_reg)
204 (arm_process_displaced_insn, arm_displaced_init_closure)
205 (displaced_read_reg, displaced_write_reg, arm_displaced_step_copy_insn)
206 (arm_displaced_step_fixup): Add prototypes.
207
929dfd4f
JB
2082009-07-31 Pedro Alves <pedro@codesourcery.com>
209 Julian Brown <julian@codesourcery.com>
210
211 * infrun.c (displaced_step_fixup): If this is a software
212 single-stepping arch, don't tell the target to single-step.
213 (maybe_software_singlestep): Return 0 if we're using displaced
214 stepping.
215 (resume): If this is a software single-stepping arch, and
216 displaced-stepping is enabled, use it for all single-step
217 requests.
218
1983cb9a
RW
2192009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
220
221 * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
222 (AUTOCONF, configure_deps, AUTOHEADER): New variables.
223 ($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
224 (am--refresh): New rules.
225 (stamp-h, config.status): List config.in and configure including
226 $(srcdir)/ prefix.
227 * aclocal.m4: Regenerate.
228 * configure: Regenerate.
229
fe79276f
TS
2302009-07-30 Thomas Schwinge <tschwinge@gnu.org>
231
232 * gnu-nat.c (add_task_commands) <stopped>: Register the correct
233 callback function.
234
2edfe795
L
2352009-07-30 H.J. Lu <hongjiu.lu@intel.com>
236
237 * ia64-tdep.c (ia64_access_reg): Correct paddress.
238
54333c3b
JK
2392009-07-30 Jan Kratochvil <jan.kratochvil@redhat.com>
240
241 Replace public function varobj_list by all_root_varobjs iterator.
242 * mi/mi-cmd-var.c (struct mi_cmd_var_update, mi_cmd_var_update_iter):
243 New.
244 (mi_cmd_var_update): Replace the varobj_list call by all_root_varobjs.
245 Remove the variables rootlist, cr. New variable data.
246 * varobj.c (rootcount, varobj_list): Remove.
247 (install_variable, uninstall_variable): Remove the rootcount updates.
248 (all_root_varobjs): New function.
249 (varobj_invalidate): Use the all_root_varobjs call. Move the code to...
250 (varobj_invalidate_iter): ... a new function.
251 * varobj.h (varobj_list): Remove the prototype.
252 (all_root_varobjs): New prototype.
253
60f25dfd
PP
2542009-07-29 Paul Pluzhnikov <ppluzhnikov@google.com>
255
256 PR gdb/6817
257 * dbxread.c (read_dbx_symtab): Reduce stack use.
258
e23cce45
JK
2592009-07-29 Jan Kratochvil <jan.kratochvil@redhat.com>
260
261 Fix gcc-4.5 HEAD warnings.
262 * cp-name-parser.y (%union <typed_val_int>, %token GLOBAL)
263 (GLOBAL_CONSTRUCTORS, GLOBAL_DESTRUCTORS, demangler_special <GLOBAL>):
264 Remove.
265 (yylex <"global constructors keyed to ">)
266 (yylex <"global destructors keyed to ">): Base it on DEMANGLER_SPECIAL.
267 (cp_comp_to_string): Remove variables str, prefix and buf. Remove the
268 GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS handling.
269 (cp_print): Remove the GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS
270 handling.
271
58d6951d
DJ
2722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
273
274 * NEWS: Mention ARM VFP support.
275 * target-descriptions.c (tdesc_register_type): Make public.
276 (tdesc_unnumbered_register): New function.
277 (tdesc_register_reggroup_p): Allow missing
278 pseudo_register_reggroup_p.
279 * target-descriptions.h (tdesc_register_type): Declare.
280 (tdesc_unnumbered_register): Declare.
281 * arm-tdep.c (arm_neon_quad_read, arm_neon_quad_write): New functions.
282 (arm_push_dummy_call): Use arm_neon_quad_write.
283 (arm_neon_double_type, arm_neon_quad_type): New functions.
284 (arm_register_type): Handle VFP and NEON registers. Override the
285 types of double-precision registers for NEON. Disable FPA registers
286 if they are not present.
287 (arm_dwarf_reg_to_regnum): Add current VFP and NEON register numbers.
288 (arm_return_value): Use arm_neon_quad_write and arm_neon_quad_read.
289 (arm_register_name): Handle VFP single and NEON quad registers.
290 (arm_pseudo_read, arm_pseudo_write): New functions.
291 (arm_gdbarch_init): Check for VFP and NEON in the target description.
292 Assign numbers to double-precision registers. Register VFP and NEON
293 pseudo registers. Remove a shadowed "i" variable.
294 * arm-tdep.h (enum gdb_regnum): Add ARM_D0_REGNUM and
295 ARM_D31_REGNUM.
296 (struct gdbarch_tdep): Add have_neon_pseudos, have_neon,
297 have_vfp_registers, have_vfp_pseudos, neon_double_type,
298 and neon_quad_type.
299
300 * features/Makefile: Make expedite settings only architecture
301 specific.
302 (WHICH): Add new ARM descriptions.
303 * features/arm-with-neon.xml, features/arm-with-vfpv2.c,
304 features/arm-with-vfpv3.c, features/arm-vfpv2.xml,
305 features/arm-vfpv3.xml, features/arm-with-vfpv2.xml,
306 features/arm-with-vfpv3.xml, features/arm-with-neon.c: New files.
307 * regformats/arm-with-neon.dat, regformats/arm-with-vfpv2.dat,
308 regformats/arm-with-vfpv3.dat: Generate.
309
79626f8a
DJ
3102009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
311
312 * infrun.c (handle_inferior_event): Clear trap_expected after
313 stepping past a single-step breakpoint.
314
90445bd3
DJ
3152009-07-28 Joseph Myers <joseph@codesourcery.com>
316
317 * arm-tdep.c (enum arm_vfp_cprc_base_type,
318 arm_vfp_cprc_unit_length, arm_vfp_cprc_reg_char,
319 arm_vfp_cprc_sub_candidate, arm_vfp_call_candidate,
320 arm_vfp_abi_for_function): New.
321 (arm_push_dummy_call): Handle VFP ABI.
322 (arm_extract_return_value, arm_store_return_value): Handle
323 ARM_FLOAT_VFP case.
324 (arm_return_value): Handle VFP ABI.
325 (arm_gdbarch_init): Default fp_model based on Tag_ABI_VFP_args for
326 EABI binaries.
327
3612b192
DJ
3282009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
329
330 * arch-utils.c (displaced_step_at_entry_point): Do not call
331 gdbarch_convert_from_func_ptr_addr.
332 * cris-tdep.c: Remove outdated comment.
333 * infcall.c (call_function_by_hand): Do not call
334 gdbarch_convert_from_func_ptr_addr after entry_point_address.
335 * objfiles.c (entry_point_address): Call both
336 gdbarch_convert_from_func_ptr_addr and
337 gdbarch_addr_bits_remove.
338
745a434e
AR
3392009-07-28 Aleksandar Ristovski <aristovski@qnx.com>
340
341 * nto-tdep.c (nto_thread_state_str): New array.
342 (nto_extra_thread_info): New function definition.
343 * nto-tdep.h (gdbthread.h): New include.
344 (private_thread_info): New struct.
345 (nto_extra_thread_info): New declaration.
346 * nto-procfs.c (procfs_thread_alive): Properly check if
347 thread is still alive.
348 (update_thread_private_data_name, update_thread_private_data): New
349 function definition.
350 (procfs_find_new_threads): Fetch thread private data.
351 (init_procfs_ops): Register to_extra_thread_info.
352
46106157
PA
3532009-07-25 Pedro Alves <pedro@codesourcery.com>
354
355 * stack.c (backtrace_command_1): Remove dead check of NULL current
356 frame.
357
e681b284
KS
3582009-07-23 Keith Seitz <keiths@redhat.com>
359
360 * source.c (forward_search_command): Don't fclose the stream,
361 just run the cleanups.
362 (reverse_search_command): Likewise.
363
89295b4d
PP
3642009-07-23 Paul Pluzhnikov <ppluzhnikov@google.com>
365
366 * symtab.c (search_symbols): Add QUIT.
367
8caee43b
PP
3682009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
369
370 * symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.
371
bb272892
PP
3722009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
373
374 * objfiles.h (objfiles_changed): New prototype.
375 * objfiles.c (objfiles_updated_p): Rename to objfiles_changed_p.
376 (allocate_objfile, free_objfile): Must rebuild section map.
377 (objfile_relocate): Likewise.
378 (update_section_map, find_pc_section): Adjust.
379 (set_objfiles_updated_on_exe_change): Remove.
380 (set_objfiles_updated_on_solib_activity): Remove.
381 (_initialize_objfiles): Remove.
382 (objfiles_changed): New function.
383 * symfile.c (reread_symbols): Call objfiles_changed.
384
9a9dc473
HZ
3852009-07-22 Hui Zhu <teawater@gmail.com>
386
387 * record.c (record_xfer_partial): Call error When nquery
388 return "n".
389
a845f5cb
PP
3902009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
391
392 * objfiles.c (objfiles_updated_p): New variable.
393 (qsort_cmp, bsearch_cmp, update_section_map): New function.
394 (find_pc_section): Use bsearch.
395 (set_objfiles_updated_on_exe_change): New function.
396 (set_objfiles_updated_on_solib_activity): New function.
397 (_initialize_objfiles): New function.
398
c761c4ee 3992009-07-21 Michael Eager <eager@eagercon.com>
4d09ffea
MS
400
401 * features/rs6000/powerpc-405.xml: New.
402 * rs6000-tdep.c: Add include & initialize for
403 powerpc-405.c, add 405 to variants.
404 * features/rs6000/powerpc-405.c: Generate.
405
26bb68be
PP
4062009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
407
25f77bfa 408 * utils.c (internal_vproblem): Always print failure message.
26bb68be 409
4ea48cc1
DJ
4102009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
411 Vladimir Prus <vladimir@codesourcery.com>
412
413 * valops.c (value_fetch_lazy): Handle bitfields explicitly.
414 (value_assign): Remove unnecessary FIXME. Honor the container
415 type of bitfields if possible.
416 * value.c (struct value): Add parent field.
417 (value_parent): New function.
418 (value_free): Free the parent also.
419 (value_copy): Copy the parent also.
420 (value_primitive_field): Do not read the contents of a lazy
421 value to create a child bitfield value. Set bitpos and offset
422 according to the container type if possible.
423 (unpack_bits_as_long): Rename from unpack_field_as_long. Take
424 field_type, bitpos, and bitsize instead of type and fieldno.
425 (unpack_field_as_long): Use unpack_bits_as_long.
426 * value.h (value_parent, unpack_bits_as_long): New prototypes.
427
828d3400
DJ
4282009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
429
430 * value.c (struct value): Add reference_count field.
431 (allocate_value_lazy): Initialize reference_count.
432 (value_incref): New function.
433 (value_free): Check the reference count.
434 * value.h (value_incref): New prototype.
435
7a01c6e0
MK
4362009-07-20 Marc Khouzam <marc.khouzam@ericsson.com>
437
438 * utils.c (defaulted_query): Update comment and remove dead code.
439
348e048f
DE
4402009-07-20 Doug Evans <dje@google.com>
441
442 Add support for "comdat types" from DWARF4.
443 * dwarf2read.c (dwarf2_per_objfile): New member types,
444 signatured_types.
445 (TYPES_SECTION): New macro.
446 (dwarf2_per_cu_data): Change size of length field from 30 bits
447 to 29 bits. New member from_debug_types.
448 (signatured_type): New struct.
449 (struct attribute): New union member signatured_type.
450 (DW_SIGNATURED_TYPE): New macro.
451 (dwarf2_attr_no_follow): New function.
452 (read_type_unit_scope): New function.
453 (follow_die_ref_or_sig, follow_die_sig): New functions.
454 (dwarf2_locate_sectoins): Handle .debug_types.
455 (dwarf2_build_psymtabs): Read .debug_types.
456 (read_type_comp_unit_head): New function.
457 (hash_type_signature, eq_type_signature): New functions.
458 (create_debug_types_hash_table): New function.
459 (lookup_signatured_type): New function.
460 (process_psymtab_comp_unit): Handle type units too.
461 (process_type_comp_unit, build_type_psymtabs): New functions.
462 (dwarf2_build_psymtabs_hard): Call build_type_psymtabs.
463 (load_partial_comp_unit): Assert not called for a type unit.
464 (skip_one_die): Handle DW_FORM_sig8.
465 (queue_comp_unit): Don't call load_full_comp_unit here, or
466 update read_in_chain.
467 (psymtab_to_symtab_1): Call read_signatured_type_at_offset for
468 type units, or load_full_comp_unit for comp units after
469 queue_comp_unit returns.
470 (load_full_comp_unit): Assert not called for type units.
471 (load_full_comp_unit): Update read_in_chain here.
472 (process_die): Handle DW_TAG_type_unit.
473 (read_structure_type): Look for signatured types.
474 (read_enumeration_type): Ditto.
475 (init_cu_die_reader): Handle .debug_types.
476 (read_comp_unit): Assert hash not computed yet.
477 (read_die_and_children): Expand debugging printf to handle .debug_types.
478 (read_partial_die): Handle DW_TAG_type_unit:
479 (find_patial_die): Handle .debug_types.
480 (read_attribute_value): Handle DW_FORM_sig8.
481 (die_type): Call follow_die_ref_or_sig instead of follow_die_ref.
482 (die_containing_type): Ditto.
483 (dwarf_tag_name): Handle DW_TAG_type_unit.
484 (dwarf_attr_name): Handle DW_AT_signature.
485 (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
486 DW_FORM_flag_present, DW_FORM_sig8.
487 (dump_die_shallow): Handlel DW_FORM_sig8.
488 (maybe_queue_comp_unit): Change return type to int from void.
489 All callers updated.
490 (follow_die_ref): Handle .debug_types.
491 (lookup_signatured_type_at_offset): New function.
492 (read_signatured_type_at_offset): New function.
493 (read_signatured_type): New function.
494
f4290e2a
UW
4952009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
496
497 * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT
498 if the macro is defined.
499
08d16641
PA
5002009-07-20 Pedro Alves <pedro@codesourcery.com>
501
502 * features/gdb-target.dtd (target): Accept an optional 'osabi'
503 element.
504 (osabi): Define element.
505 * features/mips-linux.xml (target): Add an osabi subelement set to
506 GNU/Linux.
507 * regformats/regdat.sh (xmlarch, xmlosabi): New variables. Don't
508 write the architecture into $xmltarget. Store it in $xmlarch.
509 Handle the 'osabi' type. Handle outputting the osabi element of
510 the target description.
511 * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
512 * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
513
514 * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
515 * target-descriptions.c (struct target_desc) <osabi>: New field.
516 (tdesc_osabi): New function.
517 (set_tdesc_osabi): New function.
518 * xml-tdesc.c: Include osabi.h.
519 (tdesc_end_osabi): New.
520 (target_children): Parse "osabi" elements.
521 * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
522 target description if the user didn't override it or it is not
523 extractable from the bfd. If that still fails, fallback to the
524 configured in default.
525 * osabi.h (osabi_from_tdesc_string): Declare.
526 * osabi.c (osabi_from_tdesc_string): New.
527 (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
528 GDB_OSABI_DEFAULT.
529
530 * NEWS: Mention that target descriptions can now describe the
531 target OS ABI.
532
a156a290
MF
5332009-07-20 Mike Frysinger <vapier@gentoo.org>
534
535 * configure.ac (AC_CHECK_FUNCS): Check for pipe.
536 * config.in, configure: Regenerate.
537 * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
538
b4d1e8c7
PA
5392009-07-20 Pedro Alves <pedro@codesourcery.com>
540
541 * gnu-nat.c: Include "inf-child.h".
542 (gnu_mourn_inferior): Use the passed in target_ops
543 instead of the gnu_ops global.
544 (gnu_create_inferior): Inline `attach_to_child', use the passed in
545 target_ops instead of the gnu_ops global.
546 (gnu_can_run): Delete.
547 (gnu_attach): Use the passed in target_ops instead of the gnu_ops
548 global.
549 (gnu_detach): Ditto.
550 (gnu_prepare_to_store, gnu_open): Delete.
551 (gnu_store_registers, gnu_fetch_registers): Delete declarations.
552 (gnu_ops): Delete.
553 (init_gnu_ops): Delete.
554 (gnu_target): New.
555 (_initialize_gnu_nat): Don't call init_gnu_ops or add_target here.
556 * gnu-nat.h (gnu_target): Declare.
557 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Make
558 static.
559 (_initialize_i386gnu_nat): New.
560
b5758fe4
UW
5612009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
562
563 * dwarf2loc.c (find_location_expression): Retrieve beginning and
564 ending address offsets in location list entries as integers,
565 not as addresses.
566
ec9499be
UW
5672009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
568
569 * infrun.c (wait_for_inferior): Invalidate registers and overlay
570 cache every time before calling target_wait.
571 (handle_inferior_event): Make static. Always reset waiton_ptid.
572 Never call registers_changed.
573 (prepare_to_wait): Do not invaliate registers or overlay cache
574 (moved to wait_for_inferior). Do not reset waiton_ptid (moved
575 to handle_inferior_event).
576 (fetch_inferior_event): Remove check for always-true condition.
577
85a772a5
TS
5782009-07-20 Thomas Schwinge <tschwinge@gnu.org>
579
580 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Adjust to
581 2009-02-23 target_ops changes.
582
fdd654f3
MS
5832009-07-18 Michael Snyder <msnyder@vmware.com>
584
585 * infrun.c (handle_inferior_event): Remove an execution_direction
586 check in the "check for subroutine calls" test, and add some
587 additional handling for reverse-stepping through shared libraries.
588
99f75275
AG
5892009-07-18 Anthony Green <green@moxielogic.com>
590
591 * moxie-tdep.c (moxie_analyze_prologue): Take gdbarch as last
592 parameter instead of frame_info.
593 (moxie_frame_cache): Call moxie_analyze_prologue with different
594 args.
595
831a0c44
UW
5962009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
597
598 * solib.c (solib_bfd_open): Do not call ops->bfd_open.
599 (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
600 * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
601 * solib-irix.c (_initialize_irix_solib): Likewise.
602 * solib-null.c (_initialize_null_solib): Likewise.
603 * solib-osf.c (_initialize_osf_solib): Likewise.
604 * solib-pa64.c (_initialize_pa64_solib): Likewise.
605 * solib-som.c (_initialize_som_solib): Likewise.
606 * solib-sunos.c (_initialize_sunos_solib): Likewise.
607 * solib-svr4.c (_initialize_svr4_solib): Likewise.
608 * solib-target.c (_initialize_solib_target): Likewise.
609
328d0145
UW
6102009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
611
612 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
613
099cb4fb
DE
6142009-07-16 Doug Evans <dje@google.com>
615
616 * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
617
456b0e24
PP
6182007-07-16 Paul Pluzhnikov <ppluzhnikov@google.com>
619
620 * linux-thread-db.c (thread_db_find_new_threads_silently):
621 New function.
622 (try_thread_db_load_1): Call it.
099cb4fb 623
93311388
DE
6242009-07-15 Doug Evans <dje@google.com>
625
626 Code reorg in preparation for adding comdat types support.
627 * dwarf2read.c (struct die_reader_specs): New struct.
628 (locate_pdi_sibling): New arg buffer. All callers updated.
629 (load_partial_dies, read_partial_die): Ditto.
630 (read_8_bytes): Change return type to ULONGEST.
631 (read_comp_unit): Delete arg abfd. All callers updated.
632 (read_die_and_children_1): Delete args abfd, cu. New arg reader.
633 All callers updated.
634 (read_die_and_children, read_die_and_siblings): Ditto.
635 (read_full_die): Ditto. Move closer to callers.
636 (skip_one_die): New arg buffer. All callers updated.
637 (load_full_comp_unit): Change return type to void. All callers
638 updated.
639 (partial_read_comp_unit_head): New args buffer, buffer_size.
640 All callers updated.
641 (process_psymtab_comp_unit): New function, split out from
642 dwarf2_build_psymtabs_hard.
643 (dwarf2_build_psymtabs_hard): Call it.
644 (load_partial_comp_unit): Renamed from load_comp_unit.
645 All callers updated.
646 (skip_children): New arg buffer. All callers updated.
647 (init_cu_die_reader): New function.
648 (is_ref_attr): New function.
649 (dwarf2_get_ref_die_offset): Call it.
650 (alloc_one_comp_unit): New function.
651
bf0d7e9c
SS
6522009-07-14 Stan Shebs <stan@codesourcery.com>
653
654 * MAINTAINERS (Global Maintainers): Add Doug Evans.
655
782b2b07
SS
6562009-07-14 Stan Shebs <stan@codesourcery.com>
657
658 Conditional tracepoints.
659 * ax-gdb.h (gen_eval_for_expr): Declare.
660 * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
661 and other comparisons.
662 (gen_eval_for_expr): New function.
663 (agent_eval_command): New maintenance command.
664 (_initialize_ax_gdb): Define the command.
665 * remote.c (struct remote_state): New field cond_tracepoints.
666 (PACKET_ConditionalTracepoints): New packet config type.
667 (remote_cond_tracepoint_feature): New function.
668 (remote_protocol_features): Add ConditionalTracepoints.
669 (remote_supports_cond_tracepoints): New function.
670 (_initialize_remote): Add ConditionalTracepoints.
671 * tracepoint.c (download_tracepoint): Add conditional.
672 * NEWS: Mention conditional tracepoints.
673
b101f7a1
UW
6742009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
675
676 * objfiles.c (objfile_relocate): Do not relocate the same
677 BLOCKVECTOR_MAP address map multiple times.
678
217f1f79
UW
6792009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
680
681 * remote.c (process_stop_reply): Access expedited target registers
682 in target_gdbarch.
683
8f313923
JK
6842009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
685
686 Fix memory access from signed 32bit inferior registers on 64bit GDB.
687 * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
688 addr_bit. Mask OFFSET by the ADDR_BIT width.
689
451fa05e
AG
6902009-07-13 Anthony Green <green@moxielogic.com>
691
692 * moxie-tdep.c (moxie_gdbarch_init): Call
693 set_gdbarch_process_record.
694 (moxie_process_record): New.
695 (moxie_process_readu): New.
696
06da04c6
MS
6972009-07-12 Michael Snyder <msnyder@vmware.com>
698
699 * i386-tdep.c: Add a frame unwinder for function epilogues.
700 (i386_in_function_epilogue_p): New function.
701 (i386_epilogue_frame_sniffer): New function.
702 (i386_epilogue_frame_cache): New function.
703 (i386_epilogue_frame_this_id): New function.
704 (i386_epilogue_frame_unwind): New struct frame_unwind.
705 (i386_gdbarch_init): Hook the new unwinder.
706
e6158f16
HZ
7072009-07-11 Hui Zhu <teawater@gmail.com>
708
709 * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
710 to "disassemble" command to print the raw instructions in hex as
711 well as in symbolic form.
712 (init_cli_cmds): Ditto.
713 (print_disassembly): Change "mixed" to "flags" to translate
714 the behavior of disassemble.
715 (disassemble_current_function): Ditto.
716 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
717 * stack.c (gdb_disassembly_stub): Ditto.
718 * disasm.c (do_mixed_source_and_assembly): Ditto.
719 (do_mixed_source_and_assembly): Ditto.
720 (do_assembly_only): Ditto.
721 (gdb_disassembly): Ditto.
722 (dump_insns): print the raw instructions in hex as well as in
723 symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
724 * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
725 assembly if it and flags is true.
726 (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
727 the assembly if it and flags is true.
728 (gdb_disassembly): Update extern.
729 * NEWS: Document disassemble/r support.
730
fa8f86ff
TT
7312009-07-10 Tom Tromey <tromey@redhat.com>
732
733 * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
734 * dwarf2expr.c: Likewise.
735 * dwarf2loc.c: Likewise.
736 * dwarf2read.c: Likewise.
737 * sh-tdep.c: Likewise.
738 * xtensa-tdep.c: Likewise.
739
6e9ef2a8
JK
7402009-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
741
742 Tidy up the code.
743 * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv. Move
744 variables var, rootlist and cr to their local sub-block. Move the
745 make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
746 and do_cleanups calls to the common base block. Remove the zero NV
747 check.
748
fbb8f299
PM
7492009-07-10 Phil Muldoon <pmuldoon@redhat.com>
750
751 * python/python-internal.h (apply_varobj_pretty_printer): Update
752 definition.
753 (python_string_to_target_python_string): Add definition.
754 * python/python-utils.c (unicode_to_encoded_python_string)
755 (unicode_to_target_python_string)
756 (python_string_to_target_python_string): New Functions.
757 * python/python-prettyprint.c (pretty_print_one_value): Likewise.
758 (print_string_repr): Refactor to logic to account for PyObject
759 returned strings.
760 (apply_varobj_pretty_printer): Likewise.
761 * python/python-value.c (valpy_string): Parse length keyword. Use
762 length keyword in LA_GET_STRING.
763 * varobj.c (value_get_print_value): Refactor logic to account for
764 PyObject returned strings.
765 * c-lang.c (c_get_string): If the length parameter is specified,
766 use that. Return value in characters. Update comments.
767 * language.h: Update c_get_string prototype comments.
768
b75f0b83
DE
7692009-07-09 Doug Evans <dje@google.com>
770
771 * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
772 to read_memory_unsigned_integer.
773
c0ac0ec7
JK
7742009-07-09 Jan Kratochvil <jan.kratochvil@redhat.com>
775
776 Report error on inaccessible memory.
777 * cli/cli-dump.c: Include gdbcore.h.
778 (dump_memory_to_file): Call read_memory instead of target_read_memory.
779
378d2b72
HZ
7802009-07-09 Hui Zhu <teawater@gmail.com>
781
782 * solib.c (solib_bfd_open): Output a warning if solib's
783 architecture is not compatible with inferior's architecture.
784
3a8f7b07
JK
7852009-07-09 Ulrich Weigand <uweigand@de.ibm.com>
786 Jan Kratochvil <jan.kratochvil@redhat.com>
787
788 * target.h (struct target_ops <to_thread_architecture>): Describe it.
789 (target_thread_architecture): Refer to to_thread_architecture.
790
a177aad3
PM
7912009-07-08 Pierre Muller <muller@ics.u-strasbg.fr>
792
793 * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
794
2d5f09f0
UW
7952009-07-07 Ulrich Weigand <uweigand@de.ibm.com>
796
797 * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
798
63c252f8
PM
7992009-07-07 Pierre Muller <muller@ics.u-strasbg.fr>
800
801 * breakpoint.c (set_raw_breakpoint): Remove static modifier.
802
30b66ecc
TT
8032009-07-07 Tom Tromey <tromey@redhat.com>
804
805 * c-lang.c (convert_octal): Only allow 3 octal digits.
806 (print_wchar): Prefer 3-digit octal form. Fall back to hex if
807 needed.
808 * c-exp.y (c_parse_escape): Only allow 3 octal digits.
809
06878dd2
PP
8102009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
811
812 * python/python-value.c (valpy_getitem): Remove incorrect assert.
813
570e2b1a
PP
8142009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
815
816 * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
817
8c902bb1
SW
8182009-07-07 Sami Wagiaalla <swagiaal@redhat.com>
819
820 * cp-support.h (struct using_direct): Rename members inner and
821 outer to import_src, and import_dest respectively.
822 * cp-namespace.c (cp_add_using_directive): Update.
823 (cp_add_using): Update.
824 (cp_copy_usings): Update.
825 (cp_lookup_symbol_namespace): Update.
826 (cp_scan_for_anonymous_namespaces): Update.
827 * cp-support.c (make_symbol_overload_list_using): Update.
828 * cp-support.h (cp_add_using_directive, cp_add_using): Rename
829 arguments from inner and outer to src and dest respectively.
830 * cp-namespace.c (cp_add_using_directive): Ditto.
831 (cp_add_using): Ditto.
832
fd115a4b
JK
8332009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
834
835 * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
836 * varobj.c (varobj_invalidate): Replace a while loop by for loop.
837
60d32970
VP
8382009-07-07 Vladimir Prus <vladimir@codesourcery.com>
839
840 Fix hang in floating varobjs.
841
c0ac0ec7 842 * varobj.c (varobj_invalidate): Advance to next
60d32970
VP
843 element when processing floating varobj.
844
9a139cba
VP
8452009-07-07 Vladimir Prus <vladimir@codesourcery.com>
846
847 * varobj.c: Remove unnecessary include.
848
02b96ddc
TG
8492009-07-07 Tristan Gingold <gingold@adacore.com>
850
851 * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
852 Remove excServer.c target. Remove _all target.
853 * darwin.defs: Removed.
854
7f86f499
AR
8552009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
856
857 * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
858
e2357892
JK
8592009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
860
861 * source.c (find_and_open_source): Remove the `objfile' parameter.
862 Update the function comment.
863 (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
864 find_and_open_source callers.
865
5e13bd89
PA
8662009-07-05 Pedro Alves <pedro@codesourcery.com>
867
868 * coff-pe-read.c (read_pe_exported_syms): Recognize
869 "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
870 targets.
871
d7117c03
PA
8722009-07-05 Pedro Alves <pedro@codesourcery.com>
873
874 * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
875 (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
876 callback.
877
5cd226f2
TG
8782009-06-29 Tristan Gingold <gingold@adacore.com>
879
880 * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
881 (amd64_darwin_thread_state_num_regs)
882 (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
883 amd64-darwin-tdep.c
884 (_initialize_i386_darwin_tdep): Remove 64 bits parts.
885 (darwin_dwarf_signal_frame_p): Make public.
886 * amd64-darwin-tdep.c: New file with most chunks from
887 i386-darwin-tdep.c
888 * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
889 (amd64_darwin_thread_state_reg_offset)
890 (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
891 * amd64-darwin-tdep.h: New file.
892 * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
893 if BFD64 is defined.
894 (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
895 64 bits parts.
896 (i386_darwin_store_inferior_registers): Ditto.
897 (darwin_set_sstep): Ditto.
898 (darwin_complete_target): Ditto.
899 (amd64_darwin_sstep_at_sigreturn): Ditto.
900 * configure.tgt: Create a separate entry for x86_64-*-darwin.
901 Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
902 * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
903 i386-darwin-tdep.c i386-darwin-nat.c
904 (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
905
3cb5bea9
PA
9062009-07-02 Pedro Alves <pedro@codesourcery.com>
907
908 * linux-fork.c (forks_exist_p): Drop unnecessary extern.
909 (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
910 (linux_fork_detach): Ditto.
911 (delete_fork_command): Rename to ...
912 (delete_checkpoint_command): ... this.
913 (detach_fork_command): Rename to ...
914 (detach_checkpoint_command): ... this.
915 (info_forks_command): Rename to ...
916 (info_checkpoints_command): ... this.
917 (_initialize_linux_fork): Remove stale comments. Adjust.
918
2277426b
PA
9192009-07-02 Pedro Alves <pedro@codesourcery.com>
920
921 * linux-nat.c (linux_child_follow_fork): If we're staying attached
922 to the child process, enable event reporting on it. Don't handle
923 checkpoints here. Instead, add the child fork to the lwp thread
924 and inferior lists without clobbering the previous inferior. Let
925 the thread_db layer learn about a new child process, even if
926 following the parent.
927 (linux_nat_switch_fork): Delete lwps of the current inferior only,
928 instead of clearing the whole list. Use thread_change_ptid to
929 give the core the illusion the new checkpoint is still the same
930 inferior. Clear the register cache.
931 (linux_handle_extended_wait): Handle checkpoints here.
932 (linux_multi_process): Turn on.
933 * linux-fork.c (struct fork_info) <pc>: Remove field.
934 (init_fork_list): Do not delete the checkpoint from the inferior
935 list (it is not there).
936 (fork_load_infrun_state): Don't switch inferior_ptid here. Pass
937 the new checkpoint's ptid to linux_nat_switch_fork.
938 (fork_save_infrun_state): Make static. Don't stop the pc field of
939 fork_info, it's gone.
940 (linux_fork_mourn_inferior): Don't delete the checkpoint from the
941 inferior list, it's not there.
942 (linux_fork_detach): Ditto.
943 (delete_fork_command): Replace mention of fork/checkpoint by
944 checkpoint only.
945 (detach_fork_command): Likewise. Don't delete the checkpoint from
946 the inferior list.
947 (info_forks_command): Adjust.
948 (restore_detach_fork): Delete.
949 (checkpointing_pid): New.
950 (linux_fork_checkpointing_p): New.
951 (save_detach_fork): Delete.
952 (checkpoint_command): Delete temp_detach_fork. Don't remove
953 breakpoints, that's a nop. Store the pid of the process we're
954 checkpointing, and use make_cleanup_restore_integer to restore it.
955 Don't reinsert breakpoints here.
956 (process_command, fork_command): Delete.
957 (restart_command): Update comments to only mention checkpoints,
958 not forks.
959 (_initialize_linux_fork): Delete "fork", "process", "info forks"
960 commands.
961 * linux-fork.h (fork_save_infrun_state, fork_list): Delete
962 declarations.
963 (linux_fork_checkpointing_p): Declare.
964 * cli/cli-cmds.c (killlist): New.
965 * cli/cli-cmds.h (killlist): Declare.
966 * gdbcmd.h (killlist): Declare.
967 * inferior.c: Include "gdbthread.h".
968 (detach_inferior_command, kill_inferior_command)
969 (inferior_command): New.
970 (info_inferiors_command): Allow specifying a specific inferior id.
971 (_initialize_inferiors): Register "inferior", "kill inferior" and
972 "detach inferior" commands.
973 * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
974 * gdbthread.h (any_thread_of_process): Declare.
975 * thread.c (any_thread_of_process): New.
976
977 * NEWS: Mention multi-inferior debugging. Mention 'info
978 inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
979 new commands.
980 (Removed commands): New section, mentioning that 'info forks',
981 'fork', 'process', 'delete fork' and 'detach fork' are now gone.
982
59837fe0
UW
9832009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
984
985 * gdbarch.sh (current_gdbarch): Remove global variable.
986 (find_arch_by_info): Remove, inline into ...
987 (gdbarch_find_by_info): ... this. Remove current_gdbarch swapping.
988 (deprecated_current_gdbarch_select_hack): Rename to ...
989 (deprecated_target_gdbarch_select_hack): ... this. Do not set
990 or access current_gdbarch.
991 * gdbarch.c, gdbarch.h: Regenerate.
992
993 * arch-utils.c (gdbarch_update_p): Update call.
994 (set_gdbarch_from_file): Likewise.
995
e17a4113
UW
9962009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
997
998 * defs.h (extract_signed_integer, extract_unsigned_integer,
999 extract_long_unsigned_integer, store_signed_integer,
1000 store_unsigned_integer): Add BYTE_ORDER parameter.
1001 * findvar.c (extract_signed_integer, extract_unsigned_integer,
1002 extract_long_unsigned_integer, store_signed_integer,
1003 store_unsigned_integer): Add BYTE_ORDER parameter. Use it
1004 instead of current_gdbarch.
1005
1006 * gdbcore.h (read_memory_integer, safe_read_memory_integer,
1007 read_memory_unsigned_integer, write_memory_signed_integer,
1008 write_memory_unsigned_integer): Add BYTE_ORDER parameter.
1009 * corefile.c (struct captured_read_memory_integer_arguments): Add
1010 BYTE_ORDER member.
1011 (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into
1012 struct captured_read_memory_integer_arguments.
1013 (do_captured_read_memory_integer): Pass it to read_memory_integer.
1014 (read_memory_integer): Add BYTE_ORDER parameter. Pass it to
1015 extract_signed_integer.
1016 (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to
1017 extract_unsigned_integer.
1018 (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it
1019 to store_signed_integer.
1020 (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it
1021 to store_unsigned_integer.
1022
1023 * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
1024 * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
1025 Pass it to extract_unsigned_integer.
1026
1027
1028 Update calls to extract_signed_integer, extract_unsigned_integer,
1029 extract_long_unsigned_integer, store_signed_integer,
1030 store_unsigned_integer, read_memory_integer,
1031 read_memory_unsigned_integer, safe_read_memory_integer,
1032 write_memory_signed_integer, write_memory_unsigned_integer, and
1033 get_target_memory_unsigned to pass byte order:
1034 * ada-lang.c (ada_value_binop): Update.
1035 * ada-valprint.c (char_at): Update.
1036 * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
1037 * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
1038 alpha_extract_return_value, alpha_read_insn,
1039 alpha_get_longjmp_target): Update.
1040 * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
1041 * amd64obsd-tdep.c (amd64obsd_supply_uthread,
1042 amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
1043 * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
1044 amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
1045 amd64_displaced_step_fixup): Update.
1046 * arm-linux-tdep.c (arm_linux_sigreturn_init,
1047 arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
1048 * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
1049 arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
1050 arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
1051 arm_return_value): Update.
1052 * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
1053 * auxv.c (default_auxv_parse): Update.
1054 * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
1055 avr_scan_prologue, avr_extract_return_value,
1056 avr_frame_prev_register, avr_push_dummy_call): Update.
1057 * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
1058 bsd_uthread_wait, bsd_uthread_thread_alive,
1059 bsd_uthread_extra_thread_info): Update.
1060 * c-lang.c (c_printstr, print_wchar): Update.
1061 * cp-valprint.c (cp_print_class_member): Update.
1062 * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
1063 cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
1064 cris_extract_return_value, find_step_target, dip_prefix,
1065 sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
1066 move_mem_to_reg_movem_op, get_data_from_address): Update.
1067 * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
1068 * dwarf2-frame.c (execute_cfa_program): Update.
1069 * dwarf2loc.c (find_location_expression): Update.
1070 * dwarf2read.c (dwarf2_const_value): Update.
1071 * expprint.c (print_subexp_standard): Update.
1072 * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
1073 unsigned_address_to_pointer, address_to_signed_pointer,
1074 read_var_value): Update.
1075 * frame.c (frame_unwind_register_signed,
1076 frame_unwind_register_unsigned, get_frame_memory_signed,
1077 get_frame_memory_unsigned): Update.
1078 * frame-unwind.c (frame_unwind_got_constant): Update.
1079 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
1080 frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
1081 Update.
1082 * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
1083 frv_extract_return_value, find_func_descr,
1084 frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
1085 * f-valprint.c (f_val_print): Update.
1086 * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
1087 Update.
1088 * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
1089 h8300_push_dummy_call, h8300_extract_return_value,
1090 h8300h_extract_return_value, h8300_store_return_value,
1091 h8300h_store_return_value): Update.
1092 * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
1093 * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
1094 Update.
1095 * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
1096 hppa64_hpux_in_solib_call_trampoline,
1097 hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
1098 hppa_hpux_sigtramp_frame_unwind_cache,
1099 hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
1100 hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
1101 hppa32_hpux_search_dummy_call_sequence,
1102 hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
1103 hppa_hpux_unwind_adjust_stub): Update.
1104 * hppa-linux-tdep.c (insns_match_pattern,
1105 hppa_linux_find_global_pointer): Update.
1106 * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
1107 hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
1108 skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
1109 hppa_pseudo_register_read, hppa_frame_prev_register_helper,
1110 hppa_match_insns): Update.
1111 * hpux-thread.c (hpux_thread_fetch_registers): Update.
1112 * i386-tdep.c (i386bsd_sigcontext_addr): Update.
1113 * i386-cygwin-tdep.c (core_process_module_section): Update.
1114 * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
1115 amd64_darwin_sstep_at_sigreturn): Update.
1116 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
1117 amd64_darwin_sigcontext_addr): Likewise.
1118 * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
1119 * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
1120 * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
1121 * i386obsd-nat.c (i386obsd_supply_pcb): Update.
1122 * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
1123 i386obsd_trapframe_cache): Update.
1124 * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
1125 i386_analyze_frame_setup, i386_analyze_prologue,
1126 i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
1127 i386_get_longjmp_target, i386_push_dummy_call,
1128 i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
1129 i386_fetch_pointer_argument): Update.
1130 * i387-tdep.c (i387_supply_fsave): Update.
1131 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
1132 * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
1133 examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
1134 ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
1135 ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
1136 ia64_libunwind_frame_prev_register,
1137 ia64_libunwind_sigtramp_frame_this_id,
1138 ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
1139 find_extant_func_descr, find_func_descr,
1140 ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
1141 ia64_unwind_pc): Update.
1142 * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
1143 iq2000_scan_prologue, iq2000_extract_return_value,
1144 iq2000_push_dummy_call): Update.
1145 * irix5nat.c (fill_gregset): Update.
1146 * jv-lang.c (evaluate_subexp_java): Update.
1147 * jv-valprint.c (java_value_print): Update.
1148 * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
1149 lm32_extract_return_value, lm32_store_return_value): Update.
1150 * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
1151 m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
1152 m32c_m16c_pointer_to_address): Update.
1153 * m32r-tdep.c (m32r_store_return_value, decode_prologue,
1154 m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
1155 Update.
1156 * m68hc11-tdep.c (m68hc11_pseudo_register_read,
1157 m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
1158 m68hc11_push_dummy_call): Update.
1159 * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
1160 m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
1161 Update.
1162 * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
1163 m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
1164 m68k_get_longjmp_target): Update.
1165 * m88k-tdep.c (m88k_fetch_instruction): Update.
1166 * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
1167 mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
1168 * mi/mi-main.c (mi_cmd_data_write_memory): Update.
1169 * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
1170 mips64_linux_get_longjmp_target, mips64_fill_gregset,
1171 mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
1172 * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
1173 * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
1174 mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
1175 mips_o32_push_dummy_call, mips_o64_push_dummy_call,
1176 mips_single_step_through_delay, mips_skip_pic_trampoline_code,
1177 mips_integer_to_address): Update.
1178 * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
1179 Update.
1180 * monitor.c (monitor_supply_register, monitor_write_memory,
1181 monitor_read_memory_single): Update.
1182 * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
1183 moxie_analyze_prologue): Update.
1184 * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
1185 mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
1186 mt_push_dummy_call): Update.
1187 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
1188 read_objc_methlist_method, read_objc_object, read_objc_super,
1189 read_objc_class, find_implementation_from_class): Update.
1190 * ppc64-linux-tdep.c (ppc64_desc_entry_point,
1191 ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
1192 Update.
1193 * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
1194 ppcobsd_sigtramp_frame_cache): Update.
1195 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
1196 do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
1197 ppc64_sysv_abi_return_value): Update.
1198 * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
1199 * procfs.c (procfs_auxv_parse): Update.
1200 * p-valprint.c (pascal_val_print): Update.
1201 * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
1202 regcache_raw_write_signed, regcache_raw_write_unsigned,
1203 regcache_cooked_read_signed, regcache_cooked_read_unsigned,
1204 regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
1205 * remote-m32r-sdi.c (m32r_fetch_register): Update.
1206 * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
1207 Update.
1208 * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
1209 rs6000_convert_from_func_ptr_addr, branch_dest,
1210 rs6000_software_single_step): Update.
1211 * rs6000-tdep.c (rs6000_in_function_epilogue_p,
1212 ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
1213 bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
1214 rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
1215 rs6000_frame_cache): Update.
1216 * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
1217 s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
1218 s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
1219 extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
1220 * scm-exp.c (scm_lreadr): Update.
1221 * scm-lang.c (scm_get_field, scm_unpack): Update.
1222 * scm-valprint.c (scm_val_print): Update.
1223 * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
1224 score_fetch_inst): Update.
1225 * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
1226 sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
1227 sh64_pseudo_register_read, sh64_pseudo_register_write,
1228 sh64_frame_prev_register): Update:
1229 * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
1230 sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
1231 sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
1232 * solib-darwin.c (darwin_load_image_infos): Update.
1233 * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
1234 find_canonical_descriptor_in_load_object): Update.
1235 * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
1236 irix_open_symbol_file_object): Update.
1237 * solib-som.c (som_solib_create_inferior_hook, link_map_start,
1238 som_current_sos, som_open_symbol_file_object): Update.
1239 * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
1240 Update.
1241 * solib-svr4.c (read_program_header, scan_dyntag_auxv,
1242 solib_svr4_r_ldsomap): Update.
1243 * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
1244 * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
1245 sparc64obsd_collect_uthread): Update.
1246 * sparc64-tdep.c (sparc64_pseudo_register_read,
1247 sparc64_pseudo_register_write, sparc64_supply_gregset,
1248 sparc64_collect_gregset): Update.
1249 * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
1250 * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
1251 sparc32obsd_collect_uthread): Update.
1252 * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
1253 sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
1254 sparc_collect_rwindow): Update.
1255 * spu-linux-nat.c (parse_spufs_run): Update.
1256 * spu-tdep.c (spu_pseudo_register_read_spu,
1257 spu_pseudo_register_write_spu, spu_pointer_to_address,
1258 spu_analyze_prologue, spu_in_function_epilogue_p,
1259 spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
1260 spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
1261 info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
1262 info_spu_dma_command, info_spu_proxydma_command): Update.
1263 * stack.c (print_frame_nameless_args, frame_info): Update.
1264 * symfile.c (read_target_long_array, simple_read_overlay_table,
1265 simple_read_overlay_region_table): Update.
1266 * target.c (debug_print_register): Update.
1267 * tramp-frame.c (tramp_frame_start): Update.
1268 * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
1269 v850_extract_return_value, v850_store_return_value,
1270 * valarith.c (value_binop, value_bit_index): Update.
1271 * valops.c (value_cast): Update.
1272 * valprint.c (val_print_type_code_int, val_print_string,
1273 read_string): Update.
1274 * value.c (unpack_long, unpack_double, unpack_field_as_long,
1275 modify_field, pack_long): Update.
1276 * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
1277 vax_skip_prologue): Update.
1278 * xstormy16-tdep.c (xstormy16_push_dummy_call,
1279 xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
1280 xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
1281 xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
1282 * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
1283 xtensa_pseudo_register_write, xtensa_frame_cache,
1284 xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
1285
1286
1287 * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
1288 decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
1289 BYTE_ORDER parameter.
1290 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
1291 parameters.
1292 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
1293 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
1294 * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it
1295 instead of current_gdbarch.
1296 (decimal_to_string, decimal_from_integral, decimal_from_floating,
1297 decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
1298 Pass it to match_endianness.
1299 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
1300 parameters. Pass them to match_endianness.
1301 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
1302 Pass them to match_endianness.
1303 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
1304 Pass them to match_endianness.
1305 * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
1306 BYTE_ORDER_Y output parameters.
1307 (value_binop): Update call to value_args_as_decimal.
1308
1309 Update calls to decimal_to_string, decimal_from_string,
1310 decimal_from_integral, decimal_from_floating, decimal_to_doublest,
1311 decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
1312 to pass/receive byte order:
1313 * c-exp.y (parse_number): Update.
1314 * printcmd.c (printf_command): Update.
1315 * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
1316 value_equal, value_less): Update.
1317 * valops.c (value_cast, value_one): Update.
1318 * valprint.c (print_decimal_floating): Update.
1319 * value.c (unpack_long, unpack_double): Update.
1320 * python/python-value.c (valpy_nonzero): Update.
1321
1322
1323 * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
1324 (printstr): Update calls to char_at.
1325 (ada_val_print_array): Likewise.
1326 * valprint.c (read_string): Add BYTE_ORDER parameter.
1327 (val_print_string): Update call to read_string.
1328 * c-lang.c (c_get_string): Likewise.
1329 * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
1330 * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
1331 Use it instead of current_gdbarch.
1332 * printcmd.c (printf_command): Update calls to target_wide_charset.
1333 * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
1334 Pass to target_wide_charset. Use it instead of current_gdbarch.
1335 (classify_type): Add BYTE_ORDER parameter. Pass to
1336 charset_for_string_type. Allow NULL encoding pointer.
1337 (print_wchar): Add BYTE_ORDER parameter.
1338 (c_emit_char): Update calls to classify_type and print_wchar.
1339 (c_printchar, c_printstr): Likewise.
1340
1341
1342 * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
1343 * gdbarch.c, gdbarch.h: Regenerate.
1344 * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
1345 parameter.
1346 * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
1347 * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
1348 * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
1349 (rs6000_skip_trampoline_code): Update call.
1350
1351 * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1352 dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
1353 (alpha_read_insn): Add GDBARCH parameter.
1354 * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
1355 (alpha_register_to_value): Pass architecture to alpha_sts.
1356 (alpha_extract_return_value): Likewise.
1357 (alpha_value_to_register): Pass architecture to alpha_lds.
1358 (alpha_store_return_value): Likewise.
1359 (alpha_read_insn): Add GDBARCH parameter.
1360 (alpha_skip_prologue): Pass architecture to alpha_read_insn.
1361 (alpha_heuristic_proc_start): Likewise.
1362 (alpha_heuristic_frame_unwind_cache): Likewise.
1363 (alpha_next_pc): Likewise.
1364 (alpha_sigtramp_frame_this_id): Pass architecture to
1365 tdep->dynamic_sigtramp_offset callback.
1366 (alpha_sigtramp_frame_sniffer): Pass architecture to
1367 tdep->pc_in_sigtramp callback.
1368 * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
1369 (alphafbsd_sigtramp_offset): Likewise.
1370 * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
1371 parameter. Pass to alpha_read_insn.
1372 (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to
1373 alpha_linux_sigtramp_offset_1.
1374 (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1375 alpha_linux_sigtramp_offset.
1376 (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
1377 and alpha_linux_sigtramp_offset.
1378 * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
1379 (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1380 alphanbsd_sigtramp_offset.
1381 * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
1382 (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1383 alpha_read_insn.
1384 (alphaobsd_sigcontext_addr): Pass architecture to
1385 alphaobsd_sigtramp_offset.
1386 * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
1387 parameter.
1388
1389 * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
1390 (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
1391 (amd64_frame_cache): Likewise.
1392
1393 * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
1394 (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
1395 thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
1396 * arm-wince-tdep.c: Include "frame.h".
1397
1398 * avr-tdep.c (EXTRACT_INSN): Remove.
1399 (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
1400 (avr_skip_prologue): Pass architecture to avr_scan_prologue.
1401 (avr_frame_unwind_cache): Likewise.
1402
1403 * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
1404 (find_step_target): Initialize it.
1405 (get_data_from_address): Add BYTE_ORDER parameter.
1406 (bdap_prefix): Pass byte order to get_data_from_address.
1407 (handle_prefix_assign_mode_for_aritm_op): Likewise.
1408 (three_operand_add_sub_cmp_and_or_op): Likewise.
1409 (handle_inc_and_index_mode_for_aritm_op): Likewise.
1410
1411 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
1412 (frv_linux_sigcontext_reg_addr): Pass architecture to
1413 frv_linux_pc_in_sigtramp.
1414 (frv_linux_sigtramp_frame_sniffer): Likewise.
1415
1416 * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
1417 (h8300_analyze_prologue): Add GDBARCH parameter. Pass to
1418 h8300_is_argument_spill.
1419 (h8300_frame_cache, h8300_skip_prologue): Pass architecture
1420 to h8300_analyze_prologue.
1421
1422 * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1423 in_solib_call_trampoline callback.
1424 (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
1425 * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
1426 parameter.
1427 (hppa64_push_dummy_call): Pass architecture to
1428 hppa64_convert_code_addr_to_fptr.
1429 (hppa_match_insns): Add GDBARCH parameter.
1430 (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to
1431 hppa_match_insns.
1432 (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
1433 (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to
1434 hppa_match_insns_relaxed.
1435 (hppa_stub_unwind_sniffer): Pass architecture to
1436 tdep->in_solib_call_trampoline callback.
1437 * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
1438 (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
1439 hppa_hpux_search_pattern.
1440 * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
1441 (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
1442 Pass to insns_match_pattern.
1443 (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
1444 hppa_linux_sigtramp_find_sigcontext.
1445 (hppa_linux_sigtramp_frame_sniffer): Likewise.
1446 (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
1447 (hppa64_hpux_in_solib_call_trampoline): Likewise.
1448
1449 * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
1450 (i386_analyze_frame_setup): Add GDBARCH parameter.
1451 (i386_analyze_prologue): Add GDBARCH parameter. Pass to
1452 i386_follow_jump and i386_analyze_frame_setup.
1453 (i386_skip_prologue): Pass architecture to i386_analyze_prologue
1454 and i386_follow_jump.
1455 (i386_frame_cache): Pass architecture to i386_analyze_prologue.
1456 (i386_pe_skip_trampoline_code): Add FRAME parameter.
1457 * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
1458 * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
1459 frame to i386_pe_skip_trampoline_code.
1460
1461 * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
1462 to sigcontext_register_address callback.
1463 * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
1464 (ia64_find_unwind_table): Pass architecture to
1465 ia64_find_global_pointer.
1466 (find_extant_func_descr): Add GDBARCH parameter.
1467 (find_func_descr): Pass architecture to find_extant_func_descr
1468 and ia64_find_global_pointer.
1469 (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
1470 tdep->sigcontext_register_address callback.
1471 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
1472 GDBARCH parameter.
1473
1474 * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
1475 (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
1476
1477 * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
1478 (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
1479 lm32_analyze_prologue.
1480
1481 * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
1482 (m32r_skip_prologue): Pass architecture to decode_prologue.
1483
1484 * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
1485 (m68hc11_scan_prologue): Pass architecture to
1486 m68hc11_analyze_instruction.
1487
1488 * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
1489 (m68k_analyze_prologue): Pass architecture to
1490 m68k_analyze_frame_setup.
1491
1492 * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
1493 (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order
1494 to m88k_fetch_instruction.
1495 (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
1496 (m88k_frame_cache): Likewise.
1497
1498 * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
1499 (mep_analyze_prologue): Pass architecture to mep_get_insn.
1500
1501 * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
1502 (mips32_next_pc): Pass architecture to mips_fetch_instruction.
1503 (deal_with_atomic_sequence): Likewise.
1504 (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
1505 (mips16_scan_prologue): Likewise.
1506 (mips32_scan_prologue): Likewise.
1507 (mips16_in_function_epilogue_p): Likewise.
1508 (mips32_in_function_epilogue_p): Likewise.
1509 (mips_about_to_return): Likewise.
1510 (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
1511 (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
1512 (mips_skip_prologue): Pass architecture to mips16_scan_prologue
1513 and mips32_scan_prologue.
1514 (mips_in_function_epilogue_p): Pass architecture to
1515 mips16_in_function_epilogue_p and
1516 mips32_in_function_epilogue_p.
1517 (heuristic_proc_start): Pass architecture to mips_fetch_instruction
1518 and mips_about_to_return.
1519 (mips_skip_mips16_trampoline_code): Pass architecture to
1520 mips_fetch_instruction.
1521 (fetch_mips_16): Add GDBARCH parameter.
1522 (mips16_next_pc): Pass architecture to fetch_mips_16.
1523 (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
1524 fetch_mips_16.
1525
1526 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
1527 read_objc_methlist_method, read_objc_object, read_objc_super,
1528 read_objc_class): Add GDBARCH parameter.
1529 (find_implementation_from_class): Add GDBARCH parameter, pass
1530 to read_objc_class, read_objc_methlist_nmethods, and
1531 read_objc_methlist_method.
1532 (find_implementation): Add GDBARCH parameter, pass to
1533 read_objc_object and find_implementation_from_class.
1534 (resolve_msgsend, resolve_msgsend_stret): Pass architecture
1535 to find_implementation.
1536 (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
1537 architecture to read_objc_super and find_implementation_from_class.
1538
1539 * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
1540 (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
1541 ppc64_standard_linkage3_target): Pass architecture to
1542 ppc64_desc_entry_point.
1543 * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
1544 (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
1545 (rs6000_fetch_instruction): Add GDBARCH parameter.
1546 (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
1547 rs6000_fetch_instruction.
1548 (skip_prologue): Pass architecture to rs6000_fetch_instruction.
1549
1550 * remote-mips.c (mips_store_word): Return old_contents as host
1551 integer value instead of target bytes.
1552
1553 * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
1554 (s390_analyze_prologue): Initialize it.
1555 (extend_simple_arg): Add GDBARCH parameter.
1556 (s390_push_dummy_call): Pass architecture to extend_simple_arg.
1557
1558 * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
1559 * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
1560 (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
1561 * scm-valprint.c (scm_scmval_print): Likewise.
1562 (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
1563 SCM_BYTE_ORDER.
1564
1565 * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
1566 (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
1567 look_for_args_moves.
1568 (sh64_skip_prologue): Pass architecture to
1569 sh64_skip_prologue_hard_way.
1570 * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
1571 (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
1572 (sh_frame_cache): Likewise.
1573
1574 * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
1575 (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
1576 Pass architecture to extract_mips_address.
1577
1578 * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
1579 * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
1580 (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
1581 to sparc_fetch_wcookie.
1582 (sparc32_frame_prev_register): Likewise.
1583 * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
1584 * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
1585 * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
1586
1587 * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
1588 (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
1589 (spu_virtual_frame_pointer): Likewise.
1590 (spu_frame_unwind_cache): Likewise.
1591 (info_spu_mailbox_list): Add BYTE_ORER parameter.
1592 (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
1593 (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
1594 (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
1595 to info_spu_dma_cmdlist.
1596
1597 * symfile.c (read_target_long_array): Add GDBARCH parameter.
1598 (simple_read_overlay_table, simple_read_overlay_region_table,
1599 simple_overlay_update_1): Pass architecture to read_target_long_array.
1600
1601 * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
1602 (v850_frame_cache): Pass architecture to v850_analyze_prologue.
1603
1604 * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
1605 parameter.
1606 (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
1607 to xstormy16_analyze_prologue.
1608 (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
1609 (xstormy16_find_jmp_table_entry): Likewise.
1610 (xstormy16_skip_trampoline_code): Pass architecture to
1611 xstormy16_resolve_jmp_table_entry.
1612 (xstormy16_pointer_to_address): Likewise.
1613 (xstormy16_address_to_pointer): Pass architecture to
1614 xstormy16_find_jmp_table_entry.
1615
1616 * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
1617 (call0_analyze_prologue): Add GDBARCH parameter, pass to
1618 call0_track_op.
1619 (call0_frame_cache): Pass architecture to call0_analyze_prologue.
1620 (xtensa_skip_prologue): Likewise.
1621
5af949e3
UW
16222009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1623
1624 * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
1625 (paddress): Add GDBARCH parameter.
1626 * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
1627 (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
1628 * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
1629 * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
1630 use it instead of current_gdbarch.
1631
1632 Update calls to ui_out_field_core_addr to pass architecture:
1633 * ada-lang.c (print_one_exception): Update.
1634 * breakpoint.c (print_one_breakpoint_location,
1635 print_one_exception_catchpoint): Update.
1636 * disasm.c (dump_insns): Update.
1637 * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
1638 * mi/mi-main.c (mi_cmd_data_read_memory): Update.
1639 * mi/mi-symbol-cmds.c: Include "objfiles.h".
1640 (mi_cmd_symbol_list_lines): Update.
1641 * stack.c (print_frame_info, print_frame): Update.
1642
1643 Update callers of paddress to pass architecture:
1644 * ada-tasks.c (info_task): Update.
1645 * ada-valprint.c (ada_val_print_1): Update.
1646 * annotate.c (annotate_source, annotate_frame_begin): Update.
1647 * breakpoint.c (insert_bp_location, describe_other_breakpoints,
1648 mention): Update.
1649 * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
1650 Update.
1651 * corefile.c (memory_error): Update.
1652 * c-valprint.c (print_function_pointer_address, c_val_print): Update.
1653 * disasm.c (dis_asm_print_address): Update.
1654 * exec.c (print_section_info): Update.
1655 * f-valprint.c (f_val_print): Update.
1656 * infcmd.c: Include "arch-utils.h".
1657 (jump_command, program_info): Update.
1658 * linux-fork.c: Include "arch-utils.h".
1659 (info_forks_command): Update.
1660 * m2-valprint.c (print_function_pointer_address,
1661 print_unpacked_pointer, print_variable_at_address,
1662 m2_val_print): Update.
1663 * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
1664 Update.
1665 * printcmd.c (print_address, print_address_demangle, address_info):
1666 Update.
1667 * p-valprint.c (pascal_val_print): Update.
1668 * source.c: Include "arch-utils.h".
1669 (line_info): Update.
1670 * stack.c (frame_info, print_block_frame_labels): Update.
1671 * symfile.c (add_symbol_file_command, list_overlays_command): Update.
1672 * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
1673 print_symbol, print_partial_symbols, maintenance_info_psymtabs,
1674 maintenance_check_symtabs): Update.
1675 * symtab.c (find_pc_sect_symtab): Update.
1676 * target.c (deprecated_debug_xfer_memory): Update.
1677 * tracepoint.c (scope_info): Update.
1678 * tui/tui-stack.c (tui_make_status_line): Update.
1679 * valprint.c (val_print_string): Update.
1680
1681 Update callers of paddr_nz to use paddress instead (keeping
1682 user-visible output identical):
1683 * alpha-tdep.c (alpha_heuristic_proc_start): Update.
1684 * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
1685 amd64_displaced_step_fixup): Update.
1686 * arch-utils.c (simple_displaced_step_copy_insn): Update.
1687 * auxv.c (fprint_target_auxv): Update.
1688 * breakpoint.c (insert_single_step_breakpoint): Update.
1689 * buildsym.c (finish_block): Update.
1690 * cli/cli-dump.c (restore_section_callback): Update.
1691 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1692 * frame.c (frame_unwind_register_value): Update.
1693 * gcore.c (gcore_create_callback): Update.
1694 * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
1695 * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
1696 i386_record_lea_modrm_addr, i386_record_lea_modrm,
1697 i386_process_record): Update.
1698 * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
1699 ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
1700 ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
1701 * infrun.c (displaced_step_prepare, displaced_step_fixup,
1702 handle_inferior_event, insert_step_resume_breakpoint_at_sal,
1703 insert_longjmp_resume_breakpoint): Update.
1704 * linux-nat.c (linux_nat_find_memory_regions): Update.
1705 * linux-record.c (record_linux_system_call): Update.
1706 * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
1707 mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
1708 mips_o64_push_dummy_call): Update.
1709 * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
1710 * record.c (record_arch_list_add_mem, record_wait,
1711 record_xfer_partial): Update.
1712 * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
1713 mips_common_breakpoint): Update.
1714 * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
1715 * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
1716 * solib-som.c (som_current_sos): Update.
1717 * symfile.c (load_progress, generic_load): Update.
1718 * symfile-mem.c (add_vsyscall_page): Update.
1719 * valops.c (value_fetch_lazy): Update.
1720 * windows-tdep.c (windows_xfer_shared_library): Update.
1721
1722 Update callers of paddr_nz to use paddress instead (changing
1723 user-visible output to make it more correct):
1724 * dwarf2loc.c (locexpr_describe_location): Update.
1725 * ia64-tdep.c (ia64_memory_insert_breakpoint,
1726 ia64_memory_remove_breakpoint): Update.
1727 * jv-valprint.c (java_value_print): Update.
1728 * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
1729 * monitor.c (monitor_read_memory): Update.
1730
1731 Update callers of paddr to use paddress instead (changing
1732 user-visible output to make it more correct):
1733 * arm-tdep.c (arm_push_dummy_call): Update.
1734 * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
1735 create_breakpoint): Update.
1736 * darwin-nat-info.c (darwin_debug_regions): Update.
1737 * dcache.c (dcache_info): Update.
1738 * dsrec.c (load_srec, make_srec): Update.
1739 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
1740 dwarf2_frame_cache): Update.
1741 * gcore.c (gcore_copy_callback): Update.
1742 * gnu-nat.c (gnu_xfer_memory): Update.
1743 * mips-linux-nat.c (mips_show_dr): Update.
1744 * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
1745 monitor_remove_breakpoint): Update.
1746 * remote.c (compare_sections_command): Update.
1747 * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
1748 m32r_remove_breakpoint, m32r_insert_watchpoint,
1749 m32r_remove_watchpoint): Update.
1750 * sol-thread.c (info_cb): Update.
1751 * symfile.c (load_progress): Update.
1752
1753 Update callers of paddress or paddr_nz to use hex_string instead
1754 (changes output of internal/error/debug messages only):
1755 * dwarf2read.c (dump_die_shallow): Update.
1756 * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
1757 get_frame_func, create_new_frame): Update.
1758 * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
1759 * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
1760 ia64_get_dyn_info_list): Update.
1761 * maint.c (maintenance_translate_address): Update.
1762 * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
1763 * target.c (target_flash_erase): Update.
1764
1765 Update callers of paddr/paddr_nz to use phex/phex_nz instead,
1766 using an appropriate address size. Remove use of strlen_paddr.
1767 * exec.c (exec_files_info): Update.
1768 * i386-nat.c (i386_show_dr): Update.
1769 * remote.c (remote_flash_erase): Update.
1770 * m32r-rom.c (m32r_load_section): Update.
1771 * monitor.c (monitor_vsprintf, monitor_store_register): Update.
1772 * remote.c (remote_check_symbols, remote_search_memory): Update.
1773 * remote-mips.c (mips_request, mips_common_breakpoint): Update.
1774 * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
1775 * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
1776 * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
1777 sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
1778 sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
1779 sh_dsp_show_regs): Update.
1780 * xcoffsolib.c (sharedlibrary_command): Update.
1781
1782
1783 * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
1784 Use hex_string_custom instead of paddr.
1785 (print_bfd_section_info): Pass address size.
1786 (print_objfile_section_info): Likewise.
1787
1788 * annotate.h (annotate_source): Add GDBARCH parameter.
1789 (annotate_frame_begin): Likewise.
1790 * annotate.c (annotate_source): Add GDBARCH parameter.
1791 (annotate_frame_begin): Likewise.
1792 * source.c (identify_source_line): Update call to annotate_source.
1793 * stack.c (print_frame_info, print_frame): Update call to
1794 annotate_frame_begin.
1795
1796 * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
1797 (create_breakpoint, create_ada_exception_breakpoint): Update call.
1798
1799 * stack.c (print_block_frame_labels): Add GDBARCH parameter.
1800 (print_frame_label_vars): Update call.
1801
1802 * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
1803 (dump_psymtab): Update call to print_partial_symbols.
1804 (struct print_symbol_args): Add GDBARCH member.
1805 (dump_symtab_1): Set print_symbol_args architecture member.
1806 (print_symbol): Use it.
1807
1808 * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
1809 parameter.
1810 * windows-tdep.c (windows_xfer_shared_library): Likewise.
1811 * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
1812 (core_process_module_section): Pass architecture from cpms_data to
1813 windows_xfer_shared_library.
1814 (windows_core_xfer_shared_libraries): Initialize cmps_data
1815 architecture member.
1816 * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
1817 to windows_xfer_shared_library.
1818
1819 * defs.h (print_address): Add GDBARCH parameter.
1820 * printcmd.c (print_address): Add GDBARCH parameter.
1821 (print_scalar_formatted, do_examine): Update call.
1822 * findcmd.c (find_command): Update call.
1823 * tracepoint.c: Include "arch-utils.h".
1824 (trace_find_line_command): Update call.
1825 * tui/tui-disasm.c (tui_disassemble): Update call.
1826
1827 * value.h (print_address_demangle): Add GDBARCH parameter.
1828 * printcmd.c (print_address_demangle): Add GDBARCH parameter.
1829 * c-valprint.c (print_function_pointer_address, c_val_print):
1830 Update call.
1831 * f-valprint.c (f_val_print): Update call.
1832 * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
1833 * jv-valprint.c (java_val_print): Update call.
1834 * m2-valprint.c (print_function_pointer_address, m2_val_print):
1835 Update call.
1836 * p-valprint.c (pascal_val_print): Update call.
1837
1838 * disasm.c (gdb_disassemble_info): Install architecture into
1839 di.application_data field.
1840
13274fc3
UW
18412009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1842
1843 * disasm.h (gdb_disassembly): Add GDBARCH parameter.
1844 (gdb_print_insn): Likewise.
1845 * disasm.c (dump_insns): Add GDBARCH parameter. Use it instead
1846 of current_gdbarch.
1847 (do_mixed_source_and_assembly): Add GDBARCH parameter. Pass to
1848 dump_insns.
1849 (do_assembly_only): Likewise.
1850 (gdb_disassembly): Add GDBARCH parameter. Use it instead of
1851 current_gdbarch. Pass to subroutines.
1852 (gdb_print_insn): Add GDBARCH parameter. Use it instead of
1853 current_gdbarch.
1854
1855 * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
1856 (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
1857 (do_gdb_disassembly): Add GDBARCH argument. Store into args.
1858 (print_frame_info): Pass architecture to do_gdb_disassembly.
1859
1860 * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
1861
1862 * mi/mi-cmd-disas.c: Include "arch-utils.h"
1863 (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
1864
1865 * cli/cli-cmds.c: Include "arch-utils.h".
1866 (print_disassembly): Add GDBARCH parameter. Pass to gdb_disassembly
1867 and tui_show_assembly.
1868 (disassemble_current_function): Pass architecture to
1869 tui_get_low_disassembly_address and print_disassembly.
1870 (disassemble_command): Pass architecture to
1871 tui_get_low_disassembly_address and print_disassembly.
1872
1873 * tui/tui.c (tui_show_assembly): Add GDBARCH parameter. Pass to
1874 tui_update_source_windows_with_addr.
1875
1876 * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
1877 (struct tui_source_info): Likewise.
1878 * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
1879
1880 * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
1881 Pass to gdb_print_insn.
1882 (tui_find_disassembly_address): Add GDBARCH parameter. Pass to
1883 tui_disassemble.
1884 (tui_set_disassem_content): Add GDBARCH parameter. Install into
1885 source_info.gdbarch. Pass to tui_disassemble.
1886 (tui_show_disassem): Add GDBARCH parameter. Pass to
1887 tui_update_source_window.
1888 (tui_show_disassem_and_update_source): Add GDBARCH parameter. Pass to
1889 tui_show_disassem and tui_update_source_window.
1890
1891 (tui_get_begin_asm_address): Return locator architecture in addition
1892 to locator PC value.
1893
1894 (tui_get_low_disassembly_address): Add GDBARCH parameter. Pass to
1895 tui_get_low_disassembly_address.
1896
1897 (tui_vertical_disassem_scroll): Pass architecture to subroutines.
1898
1899 * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
1900 (tui_show_disassem): Likewise.
1901 (tui_show_disassem_and_update_source): Likewise.
1902 (tui_get_begin_asm_address): Return architecture and PC value.
1903
1904 * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
1905 (tui_show_assembly): Add GDBARCH parameter.
1906
1907 * tui/tui-layout.c (extract_display_start_addr): Return current window
1908 architecture in addition to current PC value.
1909
1910 (tui_set_layout): Update calls to tui_get_low_disassembly_address and
1911 extract_display_start_addr. Pass architecture to
1912 tui_update_source_windows_with_addr.
1913
1914 * tui/tui-source.c: Include "objfiles.h".
1915 (tui_set_source_content): Initialize window architecture.
1916 (tui_show_symtab_source): Add GDBARCH parameter. Pass to
1917 tui_update_source_window_as_is
1918
1919 * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
1920
1921 * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
1922 Install locator architecture.
1923 (tui_set_locator_filename): Update call.
1924 (tui_show_frame_info): Pass architecture to tui_set_locator_info
1925 and subroutines.
1926
1927 * tui/tui-win.c (make_visible_with_new_height): Pass architecture
1928 to tui_update_source_window.
1929
1930 * tui/tui-winsource.c: Include "objfiles.h".
1931 (tui_display_main): Update call to tui_get_begin_asm_address.
1932 Pass architecture to tui_update_source_windows_with_addr.
1933 (tui_update_source_window): Add GDBARCH parameter. Pass to
1934 tui_update_source_window_as_is.
1935 (tui_update_source_window_as_is): Add GDBARCH parameter.
1936 Pass to tui_set_disassem_content.
1937 (tui_update_source_windows_with_addr): Add GDBARCH parameter.
1938 Pass to subroutines.
1939 (tui_update_source_windows_with_line): Pass objfile architecture
1940 to subroutines.
1941 (tui_horizontal_source_scroll): Pass architecture to
1942 tui_update_source_window_as_is.
1943
1944 * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
1945 parameter.
1946 (tui_update_source_window_as_is): Likewise.
1947 (tui_update_source_windows_with_addr): Likewise.
1948
a6d9a66e
UW
19492009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1950
1951 * breakpoint.h (struct breakpoint): New member GDBARCH.
1952 * breakpoint.c: Include "arch-utils.h".
1953 (set_raw_breakpoint_without_location): Add GDBARCH parameter.
1954 Use it to set breakpoint architecture.
1955 (set_raw_breakpoint): Add GDBARCH parameter.
1956 (create_internal_breakpoint): Likewise.
1957 (create_catchpoint): Likewise.
1958 (create_fork_vfork_event_catchpoint): Likewise.
1959 (create_breakpoint): Likewise.
1960 (create_breakpoints): Likewise.
1961 (break_command_really): Likewise.
1962 (create_ada_exception_breakpoint): Likewise.
1963 Update local callers to pass architecture:
1964 (create_internal_breakpoint): Update.
1965 (create_overlay_event_breakpoint): Update.
1966 (create_longjmp_master_breakpoint): Update.
1967 (create_thread_event_breakpoint): Update.
1968 (create_solib_event_breakpoint): Update.
1969 (create_catchpoint): Update.
1970 (create_fork_vfork_event_catchpoint): Update.
1971 (set_momentary_breakpoint): Update.
1972 (clone_momentary_breakpoint): Update.
1973 (create_breakpoint): Update.
1974 (create_breakpoints): Update.
1975 (break_command_really): Update.
1976 (break_command_1): Update.
1977 (set_breakpoint): Update.
1978 (watch_command_1): Update.
1979 (catch_fork_command_1): Update.
1980 (catch_exec_commnd_1): Update.
1981 (handle_gnu_v3_exceptions): Update.
1982 (create_ada_exception_breakpoint): Update.
1983 (catch_ada_exception_command): Update.
1984 (catch_assert_command): Update.
1985 (trace_command): Update.
1986
1987 * breakpoint.h (struct bp_location): New member GDBARCH.
1988 * breakpoint.c (get_sal_arch): New function.
1989 (set_raw_breakpoint): Set location architecture.
1990 (add_location_to_breakpoint): Likewise.
1991 (clone_momentary_breakpoint): Likewise.
1992 (watch_command_1): Likewise.
1993 (update_watchpoint): Likewise.
1994 (bp_loc_is_permanent): Use location architecture instead of
1995 current_gdbarch.
1996 (adjust_breakpoint_address): Add GDBARCH parameter; use it
1997 instead of current_gdbarch.
1998 Update callers of adjust_breakpoint_address to pass
1999 breakpoint location architecture:
2000 (set_raw_breakpoint): Update.
2001 (watch_command_1): Update.
2002
2003 * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
2004 of current_gdbarch.
2005 (add_local_symbols): Add GDBARCH parameter. Pass to collect_symbol.
2006 (encode_actions): Pass tracepoint architecture to add_local_symbols
2007 (encode_actions): Use tracepoint architecture instead of
2008 current_gdbarch. Pass it to add_local_symbols and collect_symbol.
2009
2010 * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
2011 of print_one callback with last_loc.
2012 * breakpoint.c (print_one_breakpoint_location): Replace last_addr
2013 parameter with last_loc.
2014 (print_one_breakpoint): Likewise.
2015 (do_captured_breakpoint_query): Update call.
2016 (breakpoint_1): Pass last_loc instead of last_addr to
2017 print_one_breakpoint. Pass last location architecture instead of
2018 current_gdbarch to set_next_address.
2019 Update all implementations of the print_one callback:
2020 * breakpoint.c (print_one_catch_fork): Update.
2021 (print_one_catch_vfork): Update.
2022 (print_one_catch_exec): Update.
2023 (print_one_exception_catchpoint): Update.
2024 * ada-lang.c (print_one_exception): Update.
2025 (print_one_catch_exception): Update.
2026 (print_one_catch_exception_unhandled): Update.
2027 (print_one_catch_assert): Update.
2028
2029 * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
2030 parameter. Use it instead of gdbarch_addr_bit (current_gdbarch).
2031 (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
2032 to print_one_breakpoint_location.
2033 (breakpoint_address_bits): New function.
2034 (do_captured_breakpoint_query): Compute number of address bits to print
2035 and pass it to print_one_breakpoint.
2036 (breakpoint_1): Likewise. Use it instead of current_gdbarch.
2037
2038 * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
2039 * breakpoint.c (create_thread_event_breakpoint): Likewise.
2040 Update callers to create_thread_event_breakpoint:
2041 * aix-thread.c (pd_enable): Update.
2042 * linux-thread-db.c (enable_thread_event): Update.
2043
2044 * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
2045 * breakpoint.c (create_solib_event_breakpoint): Likewise.
2046 Update callers to create_solib_event_breakpoint:
2047 * solib-frv.c (enable_break, enable_break2): Update.
2048 * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
2049 * solib-som.c (som_solib_create_inferior_hook): Update.
2050 * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
2051 * solib-svr4.c (enable_break): Update.
2052
2053 * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
2054 * breakpoint.c (insert_single_step_breakpoint): Likewise.
2055 Update callers to insert_single_step_breakpoint:
2056 * alpha-tdep.c (alpha_software_single_step): Update.
2057 * arm-linux-tdep.c (arm_linux_software_single_step): Update.
2058 * arm-tdep.c (arm_software_single_step): Update.
2059 * cris-tdep.c (cris_software_single_step): Update.
2060 * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
2061 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
2062 * sparc-tdep.c (sparc_software_single_step): Update.
2063 * spu-tdep.c (spu_software_single_step): Update.
2064 * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
2065 Pass it to insert_single_step_breakpoint.
2066 (mips_software_single_step): Pass architecture to
2067 deal_with_atomic_sequence and insert_single_step_breakpoint.
2068
2069 * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
2070 (deprecated_remove_raw_breakpoint): Likewise.
2071 * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
2072 (deprecated_remove_raw_breakpoint): Likewise.
2073 Update callers to deprecated_insert_raw_breakpoint and
2074 deprecated_remove_raw_breakpoint:
2075 * breakpoint.c (single_step_gdbarch): New static variable.
2076 (insert_single_step_breakpoint): Pass GDBARCH parameter to
2077 deprecated_insert_raw_breakpoint. Store it in single_step_gdbarch.
2078 (remove_single_step_breakpoints): Pass architecture stored in
2079 single_step_gdbarch to deprecated_remove_raw_breakpoint.
2080 * rs6000-nat.c (exec_one_dummy_insn): Update.
2081 * solib-irix.c (enable_break, disable_break): Update.
2082 * procfs.c (procfs_mourn_inferior): Update.
2083 (remove_dbx_link_breakpoint): Update.
2084
2085 * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
2086 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
2087 * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
2088 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
2089 Update callers to set_breakpoint, set_momentary_breakpoint and
2090 set_momentary_breakpoint_at_pc:
2091 * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
2092 (until_break_command): Update.
2093 * infcall.c (call_function_by_hand): Update.
2094 * infcmd.c (finish_backward, finish_forward): Update.
2095 * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
2096 parameter. Pass it to set_momentary_breakpoint.
2097 (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
2098 Pass it to set_momentary_breakpoint_at_pc.
2099 (handle_inferior_event): Update.
2100 (insert_step_resume_breakpoint_at_frame): Update.
2101 (insert_step_resume_breakpoint_at_caller): Update..
2102 * mi/mi-cmd-break.c: Include "arch-utils.h".
2103 (mi_cmd_break_insert): Update.
2104
2105 * target.h (struct target_ops): Add GDBARCH parameter to
2106 to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
2107 and to_remove_hw_breakpoint members.
2108 (target_insert_breakpoint, target_remove_breakpoint,
2109 target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
2110 parameter, pass to target routine.
2111 (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
2112 parameter.
2113 * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
2114 debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
2115 GDBARCH parameter, pass to target routine.
2116 (update_current_target): Update function signature.
2117 * breakpoint.c (insert_bp_location, remove_breakpoint,
2118 deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
2119 Pass architecture to target_ routines.
2120 Update all implementations of the target breakpoint routines to take
2121 GDBARCH parameter and use it instead of GDBARCH as appropriate:
2122 * corelow.c (ignore): Update.
2123 * exec.c (ignore): Update.
2124 * mem-break.c (memory_insert_breakpoint): Update.
2125 (memory_remove_breakpoint): Update.
2126 * monitor.c (monitor_insert_breakpoint): Update.
2127 (monitor_remove_breakpoint): Update.
2128 * record.c (record_insert_breakpoint): Update.
2129 (record_beneath_to_insert_breakpoint): Update.
2130 (record_remove_breakpoint): Update.
2131 (record_beneath_to_remove_breakpoint): Update.
2132 * remote.c (remote_insert_breakpoint): Update.
2133 (remote_remove_breakpoint): Update.
2134 (remote_insert_hw_breakpoint): Update.
2135 (remote_remove_hw_breakpoint): Update.
2136 * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
2137 (m32r_remove_breakpoint): Update.
2138 * remote-mips.c (mips_insert_breakpoint): Update.
2139 (mips_remove_breakpoint): Update.
2140 * i386-nat.c (i386_insert_hw_breakpoint): Update.
2141 (i386_remove_hw_breakpoint): Update.
2142 * nto-procfs.c (procfs_insert_breakpoint): Update.
2143 (procfs_remove_breakpoint): Update.
2144 (procfs_insert_hw_breakpoint): Update.
2145 (procfs_remove_hw_breakpoint): Update.
2146
36f15f55
UW
21472009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2148
2149 * frame.h (frame_unwind_arch): New.
2150 (frame_unwind_caller_arch): Likewise.
2151 * frame-unwind.h (frame_prev_arch_ftype): New type.
2152 (struct frame_unwind): New member prev_arch.
2153 * frame.c (struct frame_info): New member prev_arch.
2154 (frame_unwind_arch): New function.
2155 (frame_unwind_caller_arch): Likewise..
2156 (get_frame_arch): Reimplement in terms of frame_unwind_arch.
2157 * sentinel-frame.c (sentinel_frame_prev_arch): New function.
2158 (sentinel_frame_unwinder): Install it.
2159
2160 * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
2161 of get_frame_arch.
2162 (frame_unwind_register_value): Likewise.
2163 (frame_unwind_register_signed): Likewise.
2164 (frame_unwind_register_unsigned): Likewise.
2165 * frame-unwind.c (frame_unwind_got_optimized): Likewise.
2166 (frame_unwind_got_register): Likewise.
2167 (frame_unwind_got_constant): Likewise.
2168 (frame_unwind_got_bytes): Likewise.
2169 (frame_unwind_got_address): Likewise.
2170
2171 * frame.h (enum frame_type): New value ARCH_FRAME.
2172 * frame.c (fprint_frame_type): Handle ARCH_FRAME.
2173 * stack.c (print_frame_info): Likewise.
2174
c2250ad1
UW
21752009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2176
2177 * target.h (struct target_ops): New member to_thread_architecture.
2178 (target_thread_architecture): New macro.
2179 * target.c (update_current_target): Inherit to_thread_architecture.
2180 (default_thread_architecture): New function.
2181 (debug_to_thread_architecture): New function.
2182 (setup_target_debug): Handle to_thread_architecture.
2183
2184 * regcache.h (get_thread_arch_regcache): New.
2185 * regcache.c (struct regcache_list): New data type.
2186 (current_regcache): Hold regcache list instead of single regcache.
2187 (current_thread_ptid, current_thread_arch): New static variables.
2188 (get_thread_arch_regcache): New function.
2189 (get_thread_regcache): Use it. Call target_thread_architecture.
2190 (regcache_thread_ptid_changed): Update to current_regcache changes.
2191 (registers_changed): Likewise. Reset current_thread_arch and
2192 current_thread_ptid.
2193
2194 * remote.c (remote_wait): Access target registers in target_gdbarch.
2195 * linux-nat.c (linux_nat_do_thread_registers): Likewise.
2196 * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
2197 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
2198 * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
2199 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
2200 * solib-svr4.c (enable_break): Likewise.
2201 (svr4_relocate_main_executable): Likewise.
2202
d452c4bc
UW
22032009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2204
2205 * python/python-internal.h (struct language_defn): Declare.
2206 (python_gdbarch, python_language): Likewise.
2207 (ensure_python_env): Add prototype.
2208 (make_cleanup_py_restore_gil): Remove prototype.
2209
2210 * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
2211 (python_gdbarch, python_language): New global variables.
2212 (struct python_env): New data type.
2213 (ensure_python_env, restore_python_env): New functions.
2214 (eval_python_from_control_command): Call ensure_python_env to
2215 install current architecture and language.
2216 (python_command, gdbpy_new_objfile): Likewise.
2217 * python/python-cmd.c: Include "arch-utils.h" and "language.h".
2218 (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
2219 ensure_python_env.
2220 * python/python-type.c (clean_up_objfile_types): Likewise.
2221 * python/python-objfile.c: Include "language.h".
2222 (clean_up_objfile): Call ensure_python_env.
2223 * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
2224 (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
2225 * varobj.c (varobj_ensure_python_env): New helper function.
2226 (varobj_get_display_hint, update_dynamic_varobj_children,
2227 install_default_visualizer, varobj_set_visualizer, free_variable,
2228 value_get_print_value): Call it.
2229 (value_get_print_value): Add varobj argument instead of pretty
2230 printer argument. Update all callers.
2231
2232 * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
2233 Remove.
2234
2235 * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
2236 (call_internal_function): Likewise.
2237 * value.c (call_internal_function): Likewise. Pass to handler.
2238 * eval.c (evaluate_subexp_standard): Update call.
2239 * python/python-function.c: Include "language.h".
2240 (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
2241 make_cleanup_python_env.
2242
2243 * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
2244 builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
2245 valpy_str): Use python_gdbarch and python_language instead of
2246 current_gdbarch and current_language.
2247 * python/python-type.c (typy_lookup_typename): Likewise.
2248
e17c207e
UW
22492009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2250
2251 * arch-utils.c (selected_byte_order): Return target_byte_order_user.
2252 (show_endian): Use target_byte_order_user if specified; otherwise
2253 use get_current_arch () instead of current_gdbarch.
2254 (show_architecture): Use set_architecture_string if specified;
2255 otherwise use get_current_arch () instead of current_gdbarch.
2256 (get_current_arch): New function.
2257 * arch-utils.h (get_current_arch): Add prototype.
2258
2259 * osabi.c (show_osabi): Use get_current_arch () instead of
2260 current_gdbarch.
2261
2262 * findcmd.c: Include "arch-utils.h".
2263 (parse_find_args): Add BIG_P argument. Use it instead of byte order
2264 of current_gdbarch.
2265 (find_command): Use get_current_arch () instead of current_gdbarch.
2266 Pass byte order to parse_find_args.
2267
2268 * maint.c: Include "arch-utils.h".
2269 (maintenance_print_architecture): Use get_current_arch () instead
2270 of current_gdbarch.
2271
2272 * reggroups.c: Include "arch-utils.h".
2273 (maintenance_print_reggroups): Use get_current_arch () instead
2274 of current_gdbarch.
2275
2276 * symfile.c: Include "arch-utils.h".
2277 (overlay_load_command): Use get_current_arch () instead of
2278 current_gdbarch.
2279
2280 * value.c: Include "arch-utils.h".
2281 (show_convenience): Use get_current_arch () instead of
2282 current_gdbarch.
2283
2284 * tui/tui-regs.c: Include "arch-utils.h".
2285 (tui_reg_next_command): Use get_current_arch () instead of
2286 current_gdbarch.
2287
2288 * mi/mi-main.c: Include "arch-utils.h".
2289 (mi_cmd_data_read_memory): Use get_current_arch () instead of
2290 current_gdbarch.
2291
2292 * parse.c: Include "arch-utils.h".
2293 (parse_exp_in_context): Use get_current_arch () instead of
2294 current_gdbarch.
2295
50810684
UW
22962009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2297
2298 * gdbtypes.c (make_pointer_type, make_reference_type,
2299 smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
2300 Use type architecture instead of current_gdbarch.
2301
2302 * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
2303 Add GDBARCH paramter.
2304 * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
2305 Add GDBARCH parameter. Use it instead of current_gdbarch.
2306 * c-typeprint.c (c_type_print_modifier): Update call.
2307 * parse.c (push_type_address_space): Likewise.
2308
2309 * findvar.c (extract_typed_address, store_typed_address): Use type
2310 architecture instead of current_gdbarch.
2311
2312 * value.c (value_as_address, unpack_field_as_long): Use type architecture
2313 instead of current_gdbarch.
2314
2315 * doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
2316 instead of current_gdbarch.
2317 (floatformat_from_type): Pass type architecture.
2318
2319 * infcall.c (find_function_addr): Use type architecture instead
2320 of current_gdbarch.
2321
2322 * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
2323 value_bit_index): Use type architecture instead of current_gdbarch.
2324 * valops.c (value_cast, value_slice): Likewise.
2325
2326 * value.h (modify_field): Add TYPE argument.
2327 * value.c (modify_field): Add TYPE argument. Use type architecture
2328 instead of current_gdbarch.
2329 (set_internalvar_component): Likewise.
2330 * eval.c (evaluate_struct_tuple): Update call.
2331 * valops.c (value_assign): Likewise.
2332 * ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
2333 (make_array_descriptor): Update calls.
2334 (move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
2335 current_gdbarch.
2336 (ada_value_assign, value_assign_to_component): Update calls.
2337 (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
2338 value_assign_to_component): Use type arch instead of current_gdbarch.
2339
2340 * printcmd.c (float_type_from_length): Remove GDBARCH argument,
2341 use type architecture instead.
2342 (print_scalar_formatted, printf_command): Update calls. Use type
2343 architecture instead of current_gdbarch.
2344 * valprint.c (val_print_type_code_int): Use type architecture
2345 instead of current_gdbarch.
2346 * varobj.c (value_get_print_value): Likewise.
2347 * python/python-prettyprint.c (print_string_repr): Add GDBARCH
2348 argument. Use it instead of current_gdbarch.
2349 (apply_val_pretty_printer): Update call.
2350
2351 * ada-valprint.c (ada_val_print_1): Use type architecture instead
2352 of current_gdbarch.
2353 * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
2354 Use it instead of current_gdbarch.
2355 (c_val_print): Update calls passing type architecture.
2356 * f-valprint.c (f_val_print): Use type architecture instead of
2357 current_gdbarch.
2358 * jv-valprint (java_value_print): Likewise.
2359 * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
2360 Use it instead of current_gdbarch.
2361 (print_unpacked_pointer): Update calls passing type architecture.
2362 * scm-valprint.c (scm_scmval_print): Use type architecture instead of
2363 current_gdbarch.
2364
2365 * gnu-v3-abi.c (get_class_arch): Remove.
2366 (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
2367 special-case check for Java classes.
2368 (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
2369 gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
2370 Use get_type_arch instead of get_class_arch.
2371
e9bb382b
UW
23722009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2373
2374 * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
2375 (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
2376 (alloc_type_arch): Add prototype.
2377 (alloc_type_copy): Likewise.
2378 (get_type_arch): Likewise.
2379 (arch_type): Likewise.
2380 (arch_integer_type): Likewise.
2381 (arch_character_type): Likewise.
2382 (arch_boolean_type): Likewise.
2383 (init_float_type): Remove, replace by ...
2384 (arch_float_type): ... this.
2385 (init_complex_type): Remove, replace by ...
2386 (arch_complex_type): ... this.
2387 (init_flags_type): Remove, replace by ...
2388 (arch_flags_type): ... this.
2389 (init_composite_type): Remove, replace by ...
2390 (arch_composite_type): ... this.
2391
2392 * gdbtypes.c (alloc_type): No longer support NULL objfile.
2393 (init_type): Likewise.
2394 (alloc_type_arch): New function.
2395 (alloc_type_copy): New function.
2396 (get_type_arch): New function.
2397
2398 (smash_type): Preserve type ownership information.
2399 (make_pointer_type, make_reference_type, make_function_type,
2400 smash_to_memberptr_type, smash_to_method_type): No longer
2401 preserve OBJFILE across smash_type calls.
2402 (make_pointer_type, make_reference_type, make_function_type,
2403 lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
2404 create_range_type, create_array_type, create_set_type, copy_type):
2405 Use alloc_type_copy when allocating types.
2406 (check_typedef): Use alloc_type_arch.
2407 (copy_type_recursive): Likewise. Preserve type ownership data
2408 after copying type.
2409 (recursive_dump_type): Dump type ownership data.
2410 (alloc_type_instance): Update type ownership check.
2411 (copy_type, copy_type_recursive): Likewise.
2412
2413 (arch_type): New function.
2414 (arch_integer_type): Likewise.
2415 (arch_character_type): Likewise.
2416 (arch_boolean_type): Likewise.
2417 (init_float_type): Remove, replace by ...
2418 (arch_float_type): ... this.
2419 (init_complex_type): Remove, replace by ...
2420 (arch_complex_type): ... this.
2421 (init_flags_type): Remove, replace by ...
2422 (arch_flags_type): ... this.
2423 (append_flags_type_flag): Move down.
2424 (init_composite_type): Remove, replace by ...
2425 (arch_composite_type): ... this.
2426 (append_composite_type_field_aligned,
2427 append_composite_type_field): Move down.
2428
2429 * gdbarch.c (gdbtypes_post_init): Allocate all types
2430 using per-architecture routines.
2431 * ada-lang.c (ada_language_arch_info): Likewise.
2432 * f-lang.c (build_fortran_types): Likewise.
2433 * jv-lang.c (build_java_types): Likewise.
2434 * m2-lang.c (build_m2_types): Likewise.
2435 * scm-lang.c (build_scm_types): Likewise.
2436
2437 * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
2438 (packed_array_type): Likewise.
2439 (ada_template_to_fixed_record_type_1): Likewise.
2440 (template_to_static_fixed_type): Likewise.
2441 (to_record_with_fixed_variant_part): Likewise.
2442 (to_fixed_variant_branch_type): Likewise.
2443 (to_fixed_array_type): Likewise.
2444 (to_fixed_range_type): Likewise.
2445 (empty_record): Use type instead of objfile argument.
2446 Use alloc_type_copy.
2447 (to_fixed_variant_branch_type): Update call to empty_record.
2448 * jv-lang.c (type_from_class): Use alloc_type_arch.
2449
2450 * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
2451 * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
2452 i386_mmx_type, i386_sse_type): Likewise.
2453 * ia64-tdep.c (ia64_ext_type): Likewise.
2454 * m32c-tdep.c (make_types): Likewise.
2455 * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
2456 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2457 rs6000_builtin_type_vec128): Likewise.
2458 * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
2459 * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
2460 sparc64_fprs_type): Likewise.
2461 * spu-tdep.c (spu_builtin_type_vec128): Likewise.
2462 * xtensa-tdep.c (xtensa_register_type): Likewise.
2463 * linux-tdep.c (linux_get_siginfo_type): Likewise.
2464 * target-descriptions.c (tdesc_gdb_type): Likewise.
2465 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2466
209bd28e
UW
24672009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2468
2469 * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
2470 i386_mxcsr_type members.
2471 (i386_eflags_type): Make into function.
2472 (i386_mxcsr_type): Likewise.
2473 * i386-tdep.c (i386_eflags_type): Make into function.
2474 (i386_mxcsr_type): Likewise.
2475 (i386_register_type): Update uses.
2476 (i386_init_types): Remove.
2477 (_initialize_i386_tdep): Do not call it.
2478 * amd64-tdep.c (amd64_register_type): Update uses.
2479
2480 * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
2481 * m68k-tdep.c (m68k_ps_type): Make into function.
2482 (m68k_register_type): Update use.
2483 (m68k_init_types): Remove.
2484 (_initialize_m68k_tdep): Do not call it.
2485
2486 * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
2487 sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
2488 sparc64_fprs_type members.
2489 * sparc-tdep.c (sparc_psr_type): Make into function.
2490 (sparc_fsr_type): Likewise.
2491 (sparc32_register_type): Update uses.
2492 (sparc_init_types): Remove.
2493 (_initialize_sparc_tdep): Do not call it.
2494 * sparc64-tdep.c (sparc64_pstate_type): Make into function.
2495 (sparc64_fsr_type): Likewise.
2496 (sparc64_fprs_type): Likewise.
2497 (sparc64_register_type): Update uses.
2498 (sparc64_init_types): Remove.
2499 (_initialize_sparc64_tdep): Likewise.
2500
27067745
UW
25012009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2502
2503 * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
2504 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2505 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2506 (init_float_type, init_complex_type): Add prototypes.
2507 * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
2508 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2509 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2510 (_initialize_gdbtypes): Do not initialize them.
2511 (build_flt): Rename to ...
2512 (init_float_type): ... this. Make global.
2513 (build_complex): Rename to ...
2514 (init_complex_type): ... this. Make global. Remove BIT argument.
2515 (gdbtypes_post_init): Update calls.
2516
2517 * ada-lang.c (ada_language_arch_info): Use init_float_type.
2518 * jv-lang.c (build_java_types): Likewise.
2519 * m2-lang.c (build_m2_types): Likewise.
2520 * f-lang.c (build_fortran_types): Use init_float_type and
2521 init_complex_type.
2522
2523 * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
2524 of using builtin_type_ieee_single, builtin_type_ieee_double, or
2525 builtin_type_arm_ext.
2526
2527 * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
2528 * ia64-tdep.c (builtin_type_ia64_ext): Remove.
2529 (_initialize_ia64_tdep): Do not initialize it.
2530 (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
2531 Move up.
2532 (ia64_ext_type): New function.
2533 (ia64_register_reggroup_p, ia64_convert_register_p,
2534 ia64_register_to_value, ia64_value_to_register,
2535 ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
2536 instead of builtin_type_ia64_ext.
2537
2538 * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
2539 (i387_ext_type): Add prototype.
2540 * i386-tdep.c (i387_ext_type): New function.
2541 (i386_extract_return_value, i386_store_return_value,
2542 i386_register_type): Use it instead of builtin_type_i387_ext.
2543 * amd64-tdep.c (amd64_register_type): Likewise.
2544 * i387-tdep.c (print_i387_value, i387_register_to_value,
2545 i387_value_to_register): Likewise.
2546 (print_i387_value, print_i387_ext): Add GDBARCH argument.
2547 (print_i387_ext, i387_print_float_info): Pass to subroutines.
2548
2549 * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
2550 * m68k-tdep.c (m68881_ext_type): New function.
2551 (m68k_register_type, m68k_convert_register_p): Use it instead
2552 of builtin_type_m68881_ext.
2553
2554 * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
2555 * arm-tdep.c (arm_ext_type): New function.
2556 (arm_register_type): Use it instead of builtin_type_arm_ext.
2557
2558 * alpha-tdep.c (alpha_register_type): Use builtin types
2559 instead of builtin_type_ieee_double.
2560
2561 * mips-tdep.c (mips_float_register_type, mips_double_register_type):
2562 Remove.
2563 (mips_register_type): Use builtin types instead of
2564 builtin_type_ieee_single and builtin_type_ieee_double.
2565 (mips_print_fp_register): Use builtin types instead of
2566 mips_float_register_type and mips_double_register_type.
2567
2568 * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
2569 Use builtin types instead of builtin_type_ieee_single and
2570 builtin_type_ieee_double.
2571
df4df182
UW
25722009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2573
2574 * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2575 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2576 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2577 builtin_type_int128, builtin_type_uint128): Remove.
2578 (struct builtin_type): New members builtin_int0, builtin_int8,
2579 builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
2580 builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
2581 and builtin_uint128.
2582 * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2583 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2584 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2585 builtin_type_int128, builtin_type_uint128): Remove.
2586 (_initialize_gdbtypes): Do not initialize them.
2587 (gdbtypes_post_init): Initialize fixed-size integer types.
2588
2589 * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
2590 GDBARCH argument. Return platform-specific type.
2591 (dwarf2_read_address, execute_stack_op): Update calls.
2592
2593 * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
2594 instead of global builtin_int_... variables.
2595 * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
2596 * printcmd.c (do_examine): Likewise.
2597 * jv-exp.y (parse_number): Likewise.
2598
2599 * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
2600 alpha_store_return_value): Likewise.
2601 * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
2602 * amd64-tdep.c (amd64_register_type): Likewise.
2603 * arm-tdep.c (arm_register_type): Likewise.
2604 * avr-tdep.c (avr_register_type): Likewise.
2605 * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
2606 * frv-tdep.c (frv_register_type): Likewise.
2607 * h8300-tdep.c h8300_register_type): Likewise.
2608 * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
2609 hppa64_register_type): Likewise.
2610 * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
2611 * iq2000-tdep.c (iq2000_register_type): Likewise.
2612 * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
2613 * m32r-tdep.c (m32r_register_type): Likewise.
2614 * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
2615 m68hc11_pseudo_register_write): Likewise.
2616 * m68k-tdep.c (m68k_register_type): Likewise.
2617 * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
2618 * mep-tdep.c (mep_register_type): Likewise.
2619 * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
2620 mips_print_fp_register): Likewise.
2621 * moxie-tdep.c (moxie_register_type): Likewise.
2622 * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
2623 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2624 rs6000_builtin_type_vec128): Likewise.
2625 * score-tdep.c (score_register_type): Likewise.
2626 * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
2627 Likewise.
2628 * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
2629 Likewise.
2630 * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
2631 * v850-tdep.c (v850_register_type): Likewise.
2632 * xstormy16-tdep.c (xstormy16_register_type): Likewise.
2633 * xtensa-tdep.c (xtensa_register_type): Likewise.
2634
2635 * mt-tdep.c (struct gdbarch_tdep): New data structure.
2636 (mt_gdbarch_init): Alloc TDEP structures.
2637 (mt_register_type): Cache coprocessor type in TDEP instead of
2638 static global variable.
2639
2640 * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
2641 * xtensa-tdep.c (type_entries): Remove.
2642 (xtensa_register_type): Cache fixed-size types in TDEP instead
2643 of in global variable.
2644
69feb676
UW
26452009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2646
2647 * gdbtypes.h (builtin_type_true_char): Remove.
2648 (builtin_type_true_unsigned_char): Likewise.
2649 (struct builtin_type): Add builtin_true_char and
2650 builtin_true_unsigned_char members.
2651 * gdbtypes.c (builtin_type_true_char): Remove.
2652 (builtin_type_true_unsigned_char): Likewise.
2653 (_initialize_gdbtypes): Do not initialize them.
2654 (gdbtypes_post_init): Initialize builtin_true_char and
2655 builtin_true_unsigned_char members of builtin_type.
2656
2657 * printcmd.c (print_scalar_formatted): Use builtin_type
2658 members instead of builtin_type_true_char and
2659 builtin_type_true_unsigned_char.
2660 * ada-valprint.c (ada_val_print_1): Likewise.
2661
48319d1f
UW
26622009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2663
2664 * gdbtypes.h (builtin_type_void): Remove.
2665 * gdbtypes.c (builtin_type_void): Remove.
2666 (_initialize_gdbtypes): Do not initialize it.
2667
2668 (safe_parse_type): Add GDBARCH argument. Use it to construct
2669 void return type.
2670 (check_stub_method): Update call.
2671
2672 * infcall.c (call_function_by_hand): Use platform-specific type
2673 instead of builtin_type_void.
2674 * valops.c (value_cast): Use input void type instead of
2675 builtin_type_void.
2676
22601c15
UW
26772009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2678
2679 * ada-lang.c (assign_component): Use platform-specific integer type
2680 instead of builtin_type_int32 type.
2681 (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
2682
2683 * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
2684 instead of builtin_type_int8 type.
2685 * valarith.c (value_x_unop): Likewise.
2686 * python/python-value.c (valpy_absolute): Avoid reference to
2687 builtin_type_int8 type.
2688
2689 * eval.c (evaluate_subexp_standard): Use platform-specific integer
2690 type instead of builtin_type_int8 as EVAL_SKIP return value type.
2691 * ada-lang.c (ada_evaluate_subexp): Likewise.
2692 * jv-lang.c (evaluate_subexp_java): Likewise.
2693 * m2-lang.c (evaluate_subexp_modula2): Likewise.
2694 * scm-lang.c (evaluate_exp): Likewise.
2695
2696 * value.h (value_bitstring): Add INDEX_TYPE argument.
2697 * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
2698 of builtin_type_int32 as base range type.
2699 * eval.c (evaluate_subexp_standard): Update value_bitstring call.
2700
e3506a9f
UW
27012009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2702
2703 * gdbtypes.c (lookup_array_range_type): Add prototype.
2704 (lookup_string_range_type): Likewise.
2705 * gdbtypes.c (lookup_array_range_type): New function.
2706 (lookup_string_range_type): Likewise.
2707
2708 * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
2709 * parse.c (follow_types): Likewise.
2710 * jv-lang.c (java_array_type): Likewise.
2711 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2712 * mt-tdep.c (mt_register_type): Likewise.
2713 * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
2714 * sh64-tdep.c (sh64_build_float_register_type): Likewise.
2715 * value.c (allocate_repeat_value): Likewise.
2716 * valops.c (value_array, value_cstring): Likewise.
2717 * valops.c (value_string): Use lookup_string_range_type.
2718
d5c831bd
UW
27192009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2720
2721 * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
2722 redundant check for NULL TYPE_TARGET_TYPE.
2723 * m2-valprint.c (m2_print_long_set): Likewise.
2724 * p-valprint.c (pascal_type_print_base): Likewise.
2725
5d3729b5
UW
27262009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2727
2728 * printcmd.c (next_gdbarch): New static variable.
2729 (set_next_address, do_examine, x_command): Set it.
2730 (decode_format): Use 'a' size to indicate width of an address.
2731 (do_examine): Add GDBARCH argument. Handle 'a' size.
2732 (x_command): Pass architecture to do_examine.
2733 Error if called without argument the first time.
2734 (do_one_display): Pass architecture to do_examine.
2735
2736 (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
2737 examine_g_type): Remove.
2738 (_initialize_printcmd): Do not initialize them.
2739 (do_examine): Use builin_type_int... instead of examine_..._type.
2740
78267919
UW
27412009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2742
2743 * gdbtypes.h (struct builtin_type): Add internal_fn member.
2744 * gdbtypes.c (gdbtypes_post_init): Initialize it.
2745 * value.c (internal_fn_type): Remove.
2746 (_initialize_values): Do not initialize it.
2747
2748 * value.c (struct internalvar): Add enum internalvar_kind type and
2749 kind member. Restructure union internalvar_data type. Remove type,
2750 canonical, and make_value members.
2751 (init_if_undefined_command): Update for data structure changes.
2752 (create_internalvar): Likewise.
2753 (create_internalvar_type_lazy): Likewise.
2754 (get_internalvar_integer): Likewise.
2755 (get_internalvar_function): Likewise.
2756 (set_internalvar_component): Likewise.
2757 (set_internalvar): Likewise.
2758 (set_internalvar_integer): Likewise.
2759 (set_internalvar_function): Likewise.
2760 (clear_internalvar): Likewise.
2761 (add_internal_function): Likewise.
2762 (preserve_one_internalvar): New function.
2763 (preserve_values): Call it.
2764
2765 * value.h (value_of_internalvar): Add GDBARCH parameter.
2766 (internalvar_make_value): Likewise.
2767 * value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
2768 make_value callback. Use it to generate per-architecture result value
2769 types for internal variables with no pre-defined type. Update for data
2770 structure changes.
2771 (show_convenience): Pass architecture to value_of_internalvar.
2772 * eval.c (evaluate_subexp_standard): Likewise.
2773 * infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
2774 instead of current frame architecture. Return per-architecture type.
2775
2776 * value.h (set_internalvar_string): Add prototype.
2777 * value.c (set_internalvar_string): New function.
2778 * tracepoint.c (set_traceframe_context): Use it.
2779
0daa2b63
UW
27802009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2781
2782 * jv-lang.h (java_int_type, java_byte_type, java_short_type,
2783 java_long_type, java_boolean_type, java_char_type, java_float_type,
2784 java_double_type, java_void_type): Remove.
2785 (struct builtin_java_type): New data type.
2786 (builtin_java_type): Add prototype.
2787 (java_primitive_type): Add GDBARCH argument.
2788 (java_primitive_type_from_name): Likewise.
2789 (type_from_class): Likewise.
2790
2791 * jv-lang.c (java_int_type, java_byte_type, java_short_type,
2792 java_long_type, java_boolean_type, java_char_type, java_float_type,
2793 java_double_type, java_void_type): Remove.
2794
2795 (build_java_types, builtin_java_type): New functions.
2796 (java_type_data): New static variable.
2797 (_initialize_java_language): Initialize it. No longer initialize
2798 global types.
2799 (java_language_arch_info): Use per-architecture types.
2800
2801 (java_primitive_type): Add GDBARCH argument. Return per-architecture
2802 type instead of refering to global variable.
2803 (java_primitive_type_from_name): Add GDBARCH argument.
2804 (java_primitive_type_name): New function.
2805 (java_demangled_signature_length): Use it instead of
2806 java_primitive_type_from_name.
2807 (java_demangled_signature_copy): Likewise.
2808
2809 (type_from_class): Add GDBARCH argument. Pass to java_link_class_type,
2810 java_primitive_type, and recursive type_from_class call.
2811 (java_link_class_type): Add GDBARCH argument. Pass to type_from_class
2812 calls. Use per-architecture types instead of global types.
2813
2814 * jv-exp.y (parse_java_type): New define.
2815 Use per-architecture types instead of global types througout.
2816
2817 * jv-valprint.c (java_value_print): Pass architecture to
2818 type_from_class and java_primitive_type_from_name. Use per-
2819 architecture types instead of global types.
2820
d70e31dd
DE
28212009-07-01 Doug Evans <dje@google.com>
2822
2823 * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
2824 support for i386-linux, amd64-linux, and i386-win32 builds of
2825 gdbserver.
2826
b565e757 28272009-07-01 Nick Roberts <nickrob@snap.net.nz>
7371bfdc
NR
2828
2829 * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
2830
59dd3af6
JK
28312009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
2832
2833 * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
2834 (check//%): Construct FORCE_PARALLEL for the sub-make. Extend the
2835 comment for it.
2836
2fd481e1
PP
28372009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
2838
2839 gdb/10275
2840 * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
2841 cfa_how and cfa_exp into regs and adjust users.
2842
c38f313d
DJ
28432009-06-30 Daniel Jacobowitz <dan@codesourcery.com>
2844
2845 * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
2846
8b777f02
VP
28472009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2848
2849 * mi/mi-cmd-stack.c (parse_print_values): New.
2850 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
2851
1a4300e9
VP
28522009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2853
2854 * varobj.c (varobj_get_type): Use type_to_string.
2855
173853dc
PA
28562009-06-29 Pedro Alves <pedro@codesourcery.com>
2857
2858 * infrun.c (handle_inferior_event): Context switch to the new
2859 thread when resuming for a new_thread_event.
2860
4a399546
UW
28612009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2862
2863 * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
2864 * ada-lang.c (convert_actual): Remove stale prototype.
2865 (ensure_lval, make_array_descriptor, ada_convert_actual):
2866 Add GDBARCH argument and pass through to subroutine calls.
2867 (ensure_lval): Use GDBARCH instead of current_gdbarch.
2868 * infcall.c (value_arg_coerce): Update ada_convert_actual call.
2869
30b15541
UW
28702009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2871
2872 * ada-lang.c (resolve): Use per-architecture void type instead
2873 of platform-independent one.
2874 (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
2875 (ada_resolve_function): Reimplement fallback logic to avoid
2876 explicit reference to builtin_type_void.
2877
7c964f07
UW
28782009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2879
2880 * ada-valprint.c (ada_print_scalar): Accept NULL type argument
2881 to indicate scalar should be printed as default integer.
2882 (print_optional_low_bound): Pass NULL to ada_print_scalar to
2883 indicate default integer output.
2884 * ada-typeprint.c (print_range, print_range_bound): Likewise.
2885 (print_choices): Likewise. Thus, accept NULL as val_type.
2886 * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
2887 to look up controlling discriminant name.
2888
1ce677a4
UW
28892009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2890
2891 * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
2892 Fall back to orig_type as index type if symbol lookup fails.
2893 Allocate result types from ORIG_TYPE's objfile.
2894 (ada_array_bound_from_type, to_fixed_array_type,
2895 ada_evaluate_subexp): Pass original index type to
2896 to_fixed_range_type. Do not pass objfile.
2897
2898 * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
2899 Fall back to orig_type as index type if symbol lookup fails.
2900 (print_array_type, ada_print_type): Pass original index type
2901 to print_range_type_named.
2902
dd19d49e
UW
29032009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2904
2905 * ada-lang.c (ada_index_type): Update comment.
2906
1eea4ebd
UW
29072009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2908
2909 * ada-lang.c (ada_index_type): Make static. Add NAME argument.
2910 Throw error on invalid input arguments. Return NULL if unable
2911 to determine index type.
2912
2913 (ada_array_bound_from_type): Remove TYPEP argument.
2914 (ada_array_bound): Make static. Return LONGEST instead of value.
2915 Update for ada_array_bound_from_type change.
2916 (ada_array_length): Return LONGEST instead of value.
2917 Update for ada_array_bound_from_type change.
2918 (make_array_descriptor): Update for ada_array_bound change.
2919
2920 (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
2921 OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
2922 ada_array_bound, ada_array_length, ada_index_type changes.
2923 Always use ada_index_type to compute result type; fall back
2924 to architecture-specific integer type if ada_index_type fails.
2925
2926 * ada-lang.h (ada_index_type): Remove prototype.
2927 (ada_array_bound): Likewise.
2928
578933ab
PA
29292009-06-29 Pedro Alves <pedro@codesourcery.com>
2930
2931 * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
2932 a psymtab.
2933
6bc80edc
TT
29342009-06-29 Tom Tromey <tromey@redhat.com>
2935
2936 * README: Mention parallel check.
2937
794684b6
SW
29382009-06-29 Sami Wagiaalla <swagiaal@redhat.com>
2939
2940 * dwarf2read.c (read_import_statement): Properly set import location
2941 and destination.
2942 * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
2943 inner, char* outer arguments. Updated callers.
2944
2497b498
UW
29452009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2946
2947 * value.h (value_subscript, value_subscripted_rvalue,
2948 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2949 of value as type of the index argument.
2950 (value_ptrsub): Remove.
2951 * valarith.c (value_subscript, value_subscripted_rvalue,
2952 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2953 of value as type of the index argument.
2954 (value_ptrsub): Remove.
2955
2956 * wrapper.h (gdb_value_subscript): Use LONGEST instead of
2957 value as type of the index argument.
2958 * wrapper.c (gdb_value_subscript): Likewise.
2959
2960 Update calls to gdb_value_subscript, value_subscript,
2961 value_subscripted_rvalue, value_bitstring_subscript and
2962 value_ptradd to use LONGEST instead of value as index
2963 argument type. Use value_ptradd instead of value_ptrsub.
2964 * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
2965 ada_tag_name_2): Update.
2966 * ada-tasks.c (read_atcb): Update.
2967 * eval.c (evaluate_subexp_standard): Update.
2968 * valarith.c (value_subscript): Update.
2969 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
2970 * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
2971 gnuv3_method_ptr_to_value): Update.
2972 * jv-lang.c (evaluate_subexp_java): Update.
2973 * m2-lang.c (evaluate_subexp_modula2): Update.
2974 * python/python-value.c (valpy_getitem, valpy_binop): Update.
2975 * wrapper.c (gdb_value_subscript): Update.
2976 * varobj.c (c_describe_child): Update.
2977
0c8b41f1
UW
29782009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2979
2980 * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
2981 * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
2982 (lookup_function_type): Update call.
2983 * stabsread.c (read_type): Likewise.
2984 * dwarf2read.c (read_subroutine_type): Use lookup_function_type
2985 instead of make_function_type.
2986 * jv-lang.c (type_from_class): Likewise. Do not allocate types
2987 on the fake "dynamics" obstack.
2988
46bf5051
UW
29892009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2990
2991 * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
2992 nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
2993 and nodebug_tls_symbol members.
2994 (struct objfile_type): New data structure.
2995 (objfile_type): Add prototype.
2996 * gdbtypes.c (gdbtypes_post_init): Remove initialization code
2997 for types no longer in struct builtin_type.
2998 (objfile_type_data): New static variable.
2999 (_initialize_gdbtypes): Initialize it.
3000 (objfile_type): New function.
3001
3002 * gdbtypes.h (builtin_type_error): Remove.
3003 * gdbtypes.c (build_complex): Do not use builtin_type_error.
3004 * symtab.c (builtin_type_error): Remove.
3005 (_initialize_symtab): Remove initialization.
3006
3007 * stabsread.c (dbx_lookup_type, define_symbol, error_type,
3008 rs6000_builtin_type, read_range_type): Use per-objfile types
3009 instead of global or per-architecture builtin types.
3010 * coffread.c (decode_type): Likewise.
3011 * dwarf2read.c (read_array_type, read_tag_string_type,
3012 new_symbol, die_type): Likewise.
3013 * mdebugread.c (parse_symbol, basic_type, upgrade_type,
3014 parse_procedure, psymtab_to_symtab_1): Likewise.
3015 * xcoffread.c (process_xcoff_symbol): Likewise.
3016 * parse.c (write_exp_msymbol): Likewise.
3017
3018 * stabsread.c (rs6000_builtin_type_data): New static variable.
3019 (_initialize_stabsread): Initialize it.
3020 (rs6000_builtin_type): Add OBJFILE argument. Allocate builtin
3021 types per-objfile instead of globally.
3022
3023 * stabsread.c (dbx_lookup_type): Add OBJFILE argument. Use it
3024 instead of current_objfile; pass it to rs6000_builtin_type.
3025 (dbx_alloc_type, read_type, read_range_type): Update calls.
3026 (cleanup_undefined_types_noname): Add OBJFILE argument and
3027 pass it to dbx_lookup_type.
3028 (cleanup_undefined_types): Add OBJFILE argument and pass it
3029 to cleanup_undefined_types_noname.
3030 * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
3031 * buildsym.c (end_symtab): Update call.
3032
b08f1e8d
UW
30332009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
3034
3035 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3036 target_gdbarch instead of current_gdbarch.
3037
6d10c194
UW
30382009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
3039
3040 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
3041 (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
3042 solib-darwin.o.
3043
3044 * configure.tgt: Add comment.
3045
9901a55b
PP
30462009-06-28 Paul Pluzhnikov <ppluzhnikov@google.com>
3047
3048 * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
3049
edb3359d
DJ
30502009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3051 Jan Kratochvil <jan.kratochvil@redhat.com>
3052
3053 * NEWS: Document inlined function support.
3054 * Makefile.in (SFILES): Add inline-frame.c.
3055 (COMMON_OBS): Add inline-frame.o.
3056 * block.c (contained_in): Rewrite to use lexical nesting.
3057 (block_linkage_function): Skip inlined function blocks.
3058 (block_inlined_p): New.
3059 * block.h (struct block): Update comment.
3060 (block_inlined_p): New prototype.
3061 * blockframe.c (get_frame_block): Handle inlined functions.
3062 (get_frame_function): Do not use block_linkage_function.
3063 (block_innermost_frame): Use get_frame_block and contained_in.
3064 * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
3065 Skip over inlined functions. Simplify epilogue check.
3066 (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
3067 Update comments.
3068 (set_momentary_breakpoint): Only accept non-inlined frames.
3069 (watch_command_1): Use frame_unwind_caller_pc and
3070 frame_unwind_caller_id instead of get_prev_frame.
3071 (until_break_command): Likewise. Use get_stack_frame_id.
3072 * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
3073 * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
3074 * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
3075 (read_func_scope, new_symbol): Likewise. Handle arguments specially
3076 for inlined functions without call site information.
3077 (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
3078 (die_specification): Treat DW_AT_abstract_origin as a specification.
3079 (read_type_die): Handle DW_TAG_inlined_subroutine.
3080 * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
3081 * frame.c (fprint_frame_id): Print inline depth.
3082 (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
3083 (skip_inlined_frames, get_stack_frame_id): New.
3084 (frame_unwind_caller_id): Use skip_inlined_frames.
3085 (frame_id_inlined_p): New.
3086 (frame_id_eq): Make the logic match the comments. Add inline_depth
3087 check.
3088 (frame_id_inner): Handle inlined functions.
3089 (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
3090 (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
3091 (get_prev_frame_1): Check for inline frames. Split out frame
3092 allocation to get_prev_frame_raw.
3093 (get_prev_frame_raw): New function.
3094 (get_prev_frame): Handle inline frames.
3095 (get_frame_pc): Use frame_unwind_pc.
3096 (get_frame_address_in_block): Skip inlined frames on both sides.
3097 (pc_notcurrent): Delete.
3098 (find_frame_sal): Rewrite to handle inline call sites. Use
3099 get_frame_address_in_block.
3100 (deprecated_update_frame_pc_hack): Make static.
3101 * frame.h: Update comments.
3102 (struct frame_id): Add inline_depth.
3103 (enum frame_type): Add INLINE_FRAME.
3104 (frame_id_inlined_p, get_stack_frame_id): New prototypes.
3105 * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
3106 * infcmd.c (set_step_frame): New function.
3107 (step_once): Use set_step_frame. Handle inlined functions.
3108 (until_next_command): Use set_step_frame.
3109 (finish_backward), finish_forward): Use get_stack_frame_id.
3110 (finish_command): Support inlined functions.
3111 * inferior.h (set_step_info): New prototype.
3112 * infrun.c (RESUME_ALL): Use minus_one_ptid.
3113 (clear_proceed_status): Clear step_stack_frame_id.
3114 (init_wait_for_inferior): Call clear_inline_frame_state.
3115 (init_execution_control_state): Make static.
3116 (set_step_info): New function.
3117 (init_thread_stepping_state): Do not set the symtab or line here.
3118 (stepped_in_from): New function.
3119 (handle_inferior_event): Handle inlined functions. Use set_step_info.
3120 (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
3121 (struct inferior_status): Add step_stack_frame_id.
3122 (save_inferior_status, restore_inferior_status): Save and restore
3123 step_stack_frame_id.
3124 * inline-frame.c, inline-frame.h: New files.
3125 * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
3126 * regcache.c (regcache_write_pc): Call reinit_frame_cache.
3127 * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
3128 * stack.c (frame_show_address): New.
3129 (print_frame_info, print_frame): Use it.
3130 (find_frame_funname): Use get_frame_function. Handle inlined blocks.
3131 (frame_info): Mark inlined functions.
3132 (backtrace_command_1): Use get_current_user_frame.
3133 (print_frame_local_vars, print_frame_label_vars): Update comments.
3134 (return_command): Refuse inlined functions.
3135 * symtab.c (lookup_symbol_aux_local): Stop at inlined function
3136 boundaries.
3137 (find_function_start_sal): Avoid inlined functions.
3138 (completion_list_add_fields): New function.
3139 (default_make_symbol_completion_list): Use it. Use block_static_block
3140 and block_global_block. Check for inlined functions.
3141 (skip_prologue_using_sal): Avoid line number comparison across
3142 inlining.
3143 * symtab.h (struct symbol): Add is_inlined.
3144 (SYMBOL_INLINED): New.
3145 * target.c (target_resume): Call clear_inline_frame_state.
3146 * valops.c (value_of_variable): Check block_inlined_p.
3147
c7ce8faa
DJ
31482009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
3149
3150 * frame.c (frame_unwind_id): Renamed to ...
3151 (frame_unwind_caller_id): ... this. All callers updated.
3152 (frame_pc_unwind): Renamed to ...
3153 (frame_unwind_caller_pc): ... this. All callers updated.
3154 * frame.h: Document frame_unwind_caller_WHAT functions.
3155 (frame_unwind_id): Renamed to ...
3156 (frame_unwind_caller_id): ... this.
3157 (frame_pc_unwind): Renamed to ...
3158 (frame_unwind_caller_pc): ... this.
3159 * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
3160 * stack.c (parse_frame_specification_1): Do not rely on
3161 frame_unwind_id.
3162
388a8562
MS
31632009-06-27 Michael Snyder <msnyder@vmware.com>
3164
3165 * infrun.c (handle_inferior_event): Improve handling of
3166 reverse-stepping into and over shared library functions.
3167
f3a5f1de
KO
31682009-06-25 Karen Osmond <karen.osmond@gmail.com>
3169
3170 * linespec.c (find_method): Add new not_found_ptr parameter to
3171 bring in line with symtab_from_filename, decode_variable.
3172 (decode_compound): Likewise. Also propagate not_found_ptr to
3173 find_method.
3174 (decode_line_1): Propagate not_found_ptr to decode_compound.
3175 (cplusplus_error): Now throws NOT_FOUND_ERROR.
3176
123e3958
KO
31772009-06-25 Karen Osmond <karen.osmond@gmail.com>
3178
3179 * MAINTAINERS (Write After Approval): Add self.
3180
4e608b4f
UW
31812009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3182
3183 * valops.c (value_one): Reimplement broken decimal-float case.
3184
34e13b5b
UW
31852009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3186
3187 * eval.c (evaluate_subexp_standard): Use expression architecture
3188 instead of current_gdbarch.
3189
3190 * infrun.c (handle_inferior_event): Avoid unncessary reference
3191 to current_gdbarch and get_current_frame ().
3192
0fd8e87f
UW
31932009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3194
3195 * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
3196 (enum bptype): Add bp_longjmp_master.
3197
3198 * breakpoint.c (create_longjmp_master_breakpoint): New function.
3199 (update_breakpoints_after_exec): Handle bp_longjmp_master
3200 breakpoints. Call create_longjmp_master_breakpoint.
3201 (print_it_typical, bpstat_stop_status, bpstat_what,
3202 print_one_breakpoint_location, allocate_bp_location, mention,
3203 delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
3204 (breakpoint_re_set): Call create_longjmp_master_breakpoint.
3205 (create_longjmp_breakpoint): Delete.
3206 (set_longjmp_breakpoint): Add THREAD argument. Reimplement
3207 to install momentary clones of bp_longjmp_master breakpoints.
3208
3209 * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
3210
ca5f395d
CC
32112009-06-23 Cary Coutant <ccoutant@google.com>
3212
3213 * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
3214 Set basic_block to 0 after a special opcode.
3215
5b2ab461
JK
32162009-06-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3217
3218 Fix a regression by the mmap patch from 2009-06-16.
3219 * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
3220 calls before deleting the OBJFILE obstack. Extend the comment.
3221
45d5d5ca
UW
32222009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3223
3224 * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
3225 (get_java_object_header_size): Add GDBARCH parameter.
3226 * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
3227 Use it instead of current_gdbarch.
3228 (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
3229 get_java_object_header_size.
3230 * jv-valprint.c (java_value_print): Likewise.
3231
27aa8d6a
SW
32322009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
3233
01fc9d36
TG
3234 * dwarf2read.c (process_die): Handle import statements
3235 (DW_TAG_imported_declaration, case DW_TAG_imported_module)
3236 (read_import_statement): New.
3237 (read_func_scope): Update using_directives to point to current context
3238 (read_lexical_block_scope): Ditto.
3239 * cp-support.h: Added prototype for cp_add_using.
3240 * cp-namespace.c: Removed local context_stack.
3241 (cp_initialize_namespace): Deleted.
3242 (cp_finalize_namespace): Deleted.
3243 (cp_add_using_directive): Use using_directives instead of using_list.
3244 (cp_add_using): No longer static.
3245 * buildsym.h: Created global using_direct variable.
3246 Created using_direct variable in context_stack.
3247 * buildsym.c (finish_block): Set using directives for the block under
3248 construction.
3249 (start_symtab): Removed call to cp_initialize_namespace().
3250 (end_symtab): Removed call to cp_finalize_namespace().
3251 (push_context): Save and reset using_directives.
3252 * block.c (block_using): Return using directives for given
3253 block instead of static block.
27aa8d6a 3254
ad068eab
UW
32552009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3256
3257 * target-descriptions.h (struct type): Do not declare.
3258 (struct tdesc_type): Declare.
3259 (tdesc_named_type): Change return type to struct tdesc_type *.
3260 (tdesc_record_type): Remove.
3261 (tdesc_create_vector): Add prototype.
3262 (tdesc_create_union): Likewise.
3263 (tdesc_add_field): Likewise.
3264
3265 * target-descriptions.c (struct tdesc_reg): Replace gdb_type
3266 member by tdesc_type member.
3267 (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
3268 (struct tdesc_type, tdesc_type_p): Likewise.
3269 (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
3270 (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
3271 (struct tdesc_arch_data): Replace registers member by arch_regs.
3272
3273 (tdesc_predefined_types): Change to array of pre-defined
3274 struct tdesc_type structures. Add "code_ptr" and "data_ptr".
3275 (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
3276 (tdesc_gdb_type): New function.
3277
3278 (target_find_description): Update for data structure changes.
3279 (tdesc_data_cleanup): Likewise.
3280 (tdesc_numbered_register): Likewise.
3281 (tdesc_use_registers): Likewise.
3282 (tdesc_create_reg): Likewise.
3283
3284 (tdesc_find_arch_register): New function.
3285 (tdesc_find_register): Use it.
3286 (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
3287 tdesc_type on demand; cache generated types in tdesc_arch_reg.
3288
3289 (tdesc_free_type): New function.
3290 (tdesc_free_feature): Call it.
3291
3292 (tdesc_create_vector): New function.
3293 (tdesc_create_union): Likewise.
3294 (tdesc_add_field): Likewise.
3295 (tdesc_record_type): Remove.
3296
3297 (tdesc_type_id): Remove.
3298 (maint_print_c_tdesc_cmd): Update for data structure changes. Update
3299 generated code to create tdesc_type structures instead of GDB types.
3300
3301 * xml-tdesc.c: Do not include "gdbtypes.h".
3302 (struct tdesc_parsing_data): Change type of current_union to
3303 struct tdesc_type *.
3304 (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
3305 (tdesc_start_union): Call tdesc_create_union.
3306 (tdesc_start_field): Call tdesc_add_field.
3307 (tdesc_start_vector): Call tdesc_create_vector.
3308 (tdesc_end_union): Remove.
3309 (feature_children): Remove reference to tdesc_end_union.
3310
3311 * features/arm-with-iwmmxt.c: Regenerate.
3312 * features/mips-linux.c: Regenerate.
3313 * features/mips64-linux.c: Regenerate.
3314 * features/rs6000/powerpc-32.c: Regenerate.
3315 * features/rs6000/powerpc-32l.c: Regenerate.
3316 * features/rs6000/powerpc-403.c: Regenerate.
3317 * features/rs6000/powerpc-403gc.c: Regenerate.
3318 * features/rs6000/powerpc-505.c: Regenerate.
3319 * features/rs6000/powerpc-601.c: Regenerate.
3320 * features/rs6000/powerpc-602.c: Regenerate.
3321 * features/rs6000/powerpc-603.c: Regenerate.
3322 * features/rs6000/powerpc-604.c: Regenerate.
3323 * features/rs6000/powerpc-64.c: Regenerate.
3324 * features/rs6000/powerpc-64l.c: Regenerate.
3325 * features/rs6000/powerpc-7400.c: Regenerate.
3326 * features/rs6000/powerpc-750.c: Regenerate.
3327 * features/rs6000/powerpc-860.c: Regenerate.
3328 * features/rs6000/powerpc-altivec32.c: Regenerate.
3329 * features/rs6000/powerpc-altivec32l.c: Regenerate.
3330 * features/rs6000/powerpc-altivec64.c: Regenerate.
3331 * features/rs6000/powerpc-altivec64l.c: Regenerate.
3332 * features/rs6000/powerpc-e500.c: Regenerate.
3333 * features/rs6000/powerpc-e500l.c: Regenerate.
3334 * features/rs6000/powerpc-isa205-32l.c: Regenerate.
3335 * features/rs6000/powerpc-isa205-64l.c: Regenerate.
3336 * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
3337 * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
3338 * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
3339 * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
3340 * features/rs6000/powerpc-vsx32.c: Regenerate.
3341 * features/rs6000/powerpc-vsx32l.c: Regenerate.
3342 * features/rs6000/powerpc-vsx64.c: Regenerate.
3343 * features/rs6000/powerpc-vsx64l.c: Regenerate.
3344 * features/rs6000/rs6000.c: Regenerate.
3345
284614f0
JB
33462009-06-23 Joel Brobecker <brobecker@adacore.com>
3347
3348 * ada-lang.c (decode_packed_array): If the value is a pointer to
3349 an array, then use value_ind to dereference it, not ada_value_ind.
3350 (ada_template_to_fixed_record_type_1): Handle the case where a
3351 dynamic field is an aligner type.
3352 (to_fixed_array_type): Add handling for packed array types.
3353 (ada_get_base_type): Do not follow the XVS type if the type is
3354 an aligner type.
3355 (ada_evaluate_subexp): Split a few statements up for clarity
3356 and debuggability.
3357 <OP_FUNCALL>: Add handling of the case of a packed array that
3358 has already been fixed.
3359
4b27a620
JB
33602009-06-23 Joel Brobecker <brobecker@adacore.com>
3361
3362 * ada-lang.c (evaluate_subexp): Delete. Use the version from eval.c.
3363 (evaluate_subexp_type): Reimplement using evaluate_subexp.
3364 * value.h (evaluate_subexp): Add declaration.
3365 * eval.c (evaluate_subexp): Make non-static.
3366 * objc-lang.c (print_object_command): Use evaluate_subexp.
3367
69de3c6a
PP
33682009-06-23 Paul Pluzhnikov <ppluzhnikov@google.com>
3369
3370 Revert 2009-05-14 breakpoint commit (no longer needed).
3371 * breakpoint.h (breakpoint_re_set_objfile): Remove
3372 * breakpoint.c (breakpoint_re_set_objfile): Likewise
3373 (create_overlay_event_breakpoint): Remove objfile parameter,
3374 iterate over all objfiles.
3375 * objfiles.c (objfile_relocate): Update.
3376 * symfile.c (new_symfile_objfile): Likewise.
3377
85e306ed
TT
33782009-06-23 Tom Tromey <tromey@redhat.com>
3379
3380 PR gdb/10309:
3381 * c-lang.c (classify_type): Iterate over typedefs.
3382 * c-valprint.c (textual_element_type): Iterate over typedefs.
3383
7bd06e87
TG
33842009-06-22 Tristan Gingold <gingold@adacore.com>
3385
3386 * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
3387 instead of "%p".
3388
07e7f39f
JK
33892009-06-22 Jan Kratochvil <jan.kratochvil@redhat.com>
3390
3391 PR gdb/9988:
3392 * buildsym.c (block_compar): New function.
3393 (end_symtab): Replace the bubble sort by a qsort based code.
3394
33952009-06-22 Sami Wagiaalla <swagiaal@redhat.com>
f667014e
SW
3396
3397 * MAINTAINERS (Write After Approval): Add self.
3398
6e3f70d7
UW
33992009-06-22 Ulrich Weigand <uweigand@de.ibm.com>
3400
3401 * spu-tdep.c (spu_get_longjmp_target): New function.
3402 (spu_gdbarch_init): Install it.
3403
df4b58fe
L
34042009-06-22 H.J. Lu <hongjiu.lu@intel.com>
3405
3406 PR server/10306
3407 * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
3408
a49f981f
MS
34092009-06-21 Michael Snyder <msnyder@vmware.com>
3410
3411 * inferior.h: Update ancient comment.
3412
0763ab81
PA
34132009-06-20 Aleksandar Ristovski <aristovski@qnx.com>
3414 Pedro Alves <pedro@codesourcery.com>
3415
3416 * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
3417 NULL pointer.
3418 (scan_dyntag): Skip if input bfd isn't elf flavoured.
3419 (locate_base): Call elf_locate_base even without an exec_bfd.
3420
5d2c29b8
TT
34212009-06-19 Samuel Bronson <naesten@gmail.com>
3422
121e16b5 3423 PR cli/9903:
5d2c29b8
TT
3424 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
3425 for prefix commands to avoid duplicates in the output.
3426
4a98be19
TT
34272009-06-19 Samuel Bronson <naesten@gmail.com>
3428
121e16b5 3429 PR cli/9903:
4a98be19
TT
3430 * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
3431 printing.
3432
3daf8fe5
JG
34332009-06-19 Jerome Guitton <guitton@adacore.com>
3434
3435 * breakpoint.c (expand_line_sal_maybe): When explicit_line,
3436 skip prologue on each sals.
3437 (skip_prologue_sal): Return explicit_line and explicit_pc
3438 unmodified.
3439
bb00b29d
TG
34402009-06-19 Tristan Gingold <gingold@adacore.com>
3441
8e54f210
TG
3442 * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
3443 line.
3444
34452009-06-19 Tristan Gingold <gingold@adacore.com>
bb00b29d
TG
3446 * machoread.c (macho_symtab_read): Adjust for bfd changes.
3447 * darwin-nat.h (struct darwin_exception_msg): New type to describe
3448 a mach exception.
3449 (struct private_thread_info): New type to describe the state of the
3450 thread.
3451 (DEF_VEC_I thread_t): Removed, replaced by ...
3452 (DEF_VEC_O darwin_thread_t): ... this new type.
3453 (struct darwin_inferior): Renamed to ...
3454 (struct private_inferior): ... this type. Fields added.
3455 (darwin_not_port): Moved into the private inferior structure.
3456 * darwin-nat.c: Add includes, improve comments.
3457 Rewrite to handle multiple threads and processes.
3458 (darwin_resume_to): New function and protype.
3459 (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
3460 (darwin_kill_inferior): Add ops argument.
3461 (darwin_pid_to_str): New function.
3462 (darwin_thread_alive): Ditto.
3463 (darwin_inf, darwin_not_port): Removed.
3464 (darwin_inf_fake_stop): New variable.
3465 (msgin, msgout, msg_state, exc_msg): Removed.
3466 (mach_check_error): Use warning instead of error.
3467 (darwin_ptrace): Adjust debug level.
3468 (cmp_thread_t): Fix names (typo).
3469 (darwin_check_new_threads): Argument is now an inferior,
3470 adjust for new structures, add no change check, ignore dead ports,
3471 handle first thread case.
3472 (find_inferior_task_it): New function.
3473 (find_inferior_notify_it): Ditto.
3474 (darwin_find_inferior_by_task): Ditto.
3475 (darwin_find_inferior_by_notify): Ditto.
3476 (darwin_find_thread): Ditto.
3477 (darwin_suspend_inferior): Ditto.
3478 (darwin_resume_inferior): Ditto.
3479 (catch_exception_raise_state): Removed.
3480 (catch_exception_raise_state_identity): Removed.
3481 (darwin_suspend_inferior_it): New function.
3482 (darwin_resume_inferior_it): Ditto.
3483 (darwin_dump_message): New function, extracted from darwin_wait.
3484 (darwin_decode_exception_message): New function.
3485 (darwin_encode_reply): New function.
3486 (catch_exception_raise): Removed.
3487 (darwin_send_reply): New function, extracted from darwin_resume.
3488 (darwin_resume_thread): New function, extracted from darwin_resume.
3489 (struct resume_inferior_threads_param): New type.
3490 (darwin_resume_inferior_threads_it): New function.
3491 (darwin_resume_inferior_threads): New function.
3492 (darwin_suspend_inferior_threads): New function.
3493 (darwin_resume): Mostly rewritten to handle multiple threads and
3494 some corner cases.
3495 (darwin_decode_message): New function extracted from darwin_wait.
3496 (cancel_breakpoint): New function.
3497 (darwin_wait): Mostly rewritten. Handle multiple threads.
3498 (darwin_mourn_inferior): Adjust for per process structures.
3499 (darwin_reply_to_all_pending_messages): New function.
3500 (darwin_stop_inferior): Adjust for per inferior structures.
3501 (darwin_attach_pid): Ditto.
3502 (darwin_init_thread_list): Ditto.
3503 (darwin_attach): Ditto.
3504 (darwin_detach): Ditto.
3505 (darwin_files_info): Now empty.
3506 (darwin_pid_to_str): Adjust returns string to match one expected by
3507 the testsuite.
3508 (darwin_read_write_inferior): Rename err variable to match other uses.
3509 Adjust debug message. Handle submaps.
3510 (darwin_xfer_memory): Adjust for per inferior structures.
3511 (set_enable_mach_exceptions): Ditto.
3512 (darwin_pid_to_exec_file): New function.
3513 (darwin_get_ada_task_ptid): Ditto.
3514 (darwin_supports_multi_process): Ditto.
3515 (_initialize_darwin_inferior): Remove useless assertion, adjust for
3516 per inferior structures. Add new target operations.
3517
31410e84
MS
35182009-06-18 Hui Zhu <teawater@gmail.com>
3519 Michael Snyder <msnyder@vmware.com>
3520
3521 * infrun.c (handle_inferior_event): Improve reverse stepping
3522 through function epilogue.
3523
6373d119
MS
3524 * infrun.c (handle_inferior_event): Reverse-next through
3525 trampoline.
3526
c098b58b
PP
35272009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
3528
3529 * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
3530 dwarf_frame_size.
3531
affddf13
TT
35322009-06-17 Tom Tromey <tromey@redhat.com>
3533
3534 * dwarf2read.c (zlib_decompress_section): Use a cleanup.
3535
9898f801
UW
35362009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3537
3538 * gdbarch.sh (pointer_to_address): Change to type 'm'.
3539 (address_to_pointer): Likewise.
3540 * gdbarch.c, gdbarch.h: Regenerate.
3541
3542 * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
3543 (signed_pointer_to_address): Likewise.
3544 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3545 * findvar.c (unsigned_pointer_to_address): Likewise.
3546 (signed_pointer_to_address): Likewise.
3547 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3548
3549 * avr-tdep.c (avr_address_to_pointer): Likewise.
3550 (avr_pointer_to_address): Likewise.
3551 * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
3552 (iq2000_address_to_pointer): Likewise.
3553 * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
3554 (m32c_m16c_pointer_to_address): Likewise.
3555 * spu-tdep.c (spu_pointer_to_address): Likewise.
3556 * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
3557 (xstormy16_address_to_pointer): Likewise.
3558
1fac167a
UW
35592009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3560
3561 * printcmd.c (print_scalar_formatted): Always truncate
3562 unsigned data types.
3563
3564 * cli-dump.c (struct callback_data): Change type of load_offset
3565 to CORE_ADDR.
3566 (restore_binary_file): Update type casts.
3567 (restore_command): Parse load_offset as address, not long.
3568
3569 * utils.c (string_to_core_addr): Do not sign-extend value.
3570 * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
3571 before comparing against requested frame address.
3572
a78c2d62
UW
35732009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3574
3575 * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
3576 * gdbarch.h, gdbarch.c: Regenerate.
3577
3578 * gcore.c (default_gcore_target): Make return value const.
3579 Call gdbarch_gcore_bfd_target if present.
3580 (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
3581
3582 * corelow.c (core_read_description): Call gdbarch_core_read_description
3583 on core_gdbarch instead of current_gdbarch.
3584
3585 * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
3586
3b7538c0
UW
35872009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3588
3589 * gdbtypes.c (create_string_type): Receive character type as argument.
3590 * gdbtypes.h (create_string_type): Add character type argument.
3591 * dwarf2read.c (read_tag_string_type): Pass character type to
3592 create_string_type.
3593
3594 * value.h (value_string): Add character type argument.
3595 * valops.c (value_string): Add character type argument. Pass it to
3596 create_string_type. Do not allocate space in inferior.
3597 * valarith.c (value_concat): Pass character type to value_string.
3598
3599 * value.h (value_typed_string): Rename to ...
3600 (value_cstring): ... this.
3601 * valops.c (value_typed_string): Rename to ...
3602 (value_cstring): ... this.
3603 * c-lang.c (evaluate_subexp_c): Update.
3604
3605 * python/python-value.c (builtin_type_pychar): New define.
3606 (convert_value_from_python): Call value_cstring instead
3607 of value_from_string.
3608 * value.c (value_from_string): Remove.
3609 * value.h (value_from_string): Remove.
3610
3611 * eval.c (evaluate_subexp_standard): Pass character type to
3612 value_string. Pass expression architecture to value_nsstring
3613 and lookup_child_selector.
3614 * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
3615 (lookup_child_selector): Likewise.
3616 (value_nsstring): Likewise.
3617 * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
3618 Pass character type to value_string..
3619 (lookup_child_selector): Likewise.
3620 (value_nsstring): Add GDBARCH parameter, use it instead of
3621 objfile architecture. Pass architecture to lookup_objc_class
3622 and lookup_child_selector. Pass character type to value_string.
3623 (end_msglist): Pass architecture to lookup_objc_class.
3624 * objc-exp.y: Pass architecture to lookup_objc_class.
3625
e6c014f2
UW
36262009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3627
3628 * gdbtypes.h (struct language_defn): Add forward declaration.
3629 (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3630 (lookup_unsigned_typename): Likewise.
3631 (lookup_signed_typename): Likewise.
3632 * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3633 Use them instead of current_language and current_gdbarch.
3634 (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
3635 Pass them to lookup_typename.
3636 (lookup_signed_typename): Likewise.
3637
3638 * c-exp.y: Pass parse_language and parse_gdbarch to
3639 lookup_unsigned_typename and lookup_signed_typename.
3640 * objc-exp.y: Likewise.
3641 * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
3642
3643 * c-lang.c (evaluate_subexp_c): Pass expression language and
3644 gdbarch to lookup_typename.
3645 * printcmd.c (printf_command): Pass current language and
3646 gdbarch to lookup_typename.
3647 * python/python-type.c (typy_lookup_typename): Likewise.
3648 Include "language.h".
3649
ec22ec34
UW
36502009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3651
3652 * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
3653 Use it instead of current_gdbarch. Pass architecture to
3654 sparc32_gregset_supplies_p.
3655 (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
3656 of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
3657 * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
3658 sparc64nbsd_fpregset_supplies_p): Likewise.
3659 * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
3660 Add GDBARCH parameter.
3661 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3662 (sparc_fetch_inferior_registers): Pass regcache architecture to
3663 sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
3664 (sparc_store_inferior_registers): Likewise.
3665 * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
3666 Add GDBARCH parameter.
3667 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3668
a97b0ac8
UW
36692009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3670
3671 * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
3672 of current_gdbarch.
3673 * aix-thread.c (pd_enable): Likewise.
3674 * amd64-linux-nat.c (ps_get_thread_area): Likewise.
3675 * bsd-uthread.c (bsd_uthread_activate): Likewise.
3676 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
3677 * linux-thread-db.c (enable_thread_event): Likewise.
3678 * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
3679 * nto-procfs.c (procfs_open): Likewise.
3680 * procfs.c (invalidate_cache, procfs_insert_watchpoint,
3681 info_proc_mappings, info_mappings_callback): Likewise.
3682 * record.c (record_open): Likewise.
3683 * rs6000-nat.c (ARCH64): Likewise.
3684 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
3685 (darwin_bfd_open): Likewise.
3686 * memattr.c (mem_info_command): Likewise.
3687
3688 * windows-nat.c (win32_resume): Use current regcache architecture
3689 instead of current_gdbarch.
3690
3691 * dbug-rom.c (dbug_regname): Remove check against number of
3692 registers in current_gdbarch.
3693 * solib-pa64.c (read_dynamic_info): Remove unused variable.
3694
d80b854b
UW
36952009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3696
3697 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
3698 use it instead of current_gdbarch.
3699 * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
3700 * arm-tdep.c (arm_skip_prologue): Pass architecture to
3701 deprecated_pc_in_call_dummy.
3702
3703 * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
3704 Use it instead of current_gdbarch.
3705 * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
3706 * breakpoint.c (expand_line_sal_maybe): Pass architecture to
3707 skip_prologue_using_sal.
3708 * arm-tdep.c (skip_prologue_using_sal): Likewise.
3709 * lm32-tdep.c (lm32_skip_prologue): Likewise.
3710 * m32-tdep.c (m32c_skip_prologue): Likewise.
3711 * mips-tdep.c (mips_skip_prologue): Likewise.
3712 * moxie-tdep.c (moxie_skip_prologue): Likewise.
3713 * mt-tdep.c (mt_frame_unwind_cache): Likewise.
3714 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
3715 * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
3716 it to skip_prologue_using_sal. Update call sites ...
3717 (frv_skip_prologue, frv_frame_unwind_cache): ... here.
3718
3719 * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
3720 (check_for_saved): Use it instead of current_gdbarch.
3721 (mn10300_analyze_prologue): Set it.
3722
3723 * value.c (using_struct_return): Add GDBARCH parameter. Use it
3724 instead of current_gdbarch.
3725 * value.h (using_struct_return): Add GDBARCH parameter.
3726 * eval.c (evaluate_subexp_standard): Pass architecture to
3727 using_struct_return.
3728 * infcall.c (call_function_by_hand): Likewise.
3729 * stack.c (return_command): Likewise.
3730 * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
3731
3732 * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
3733 current_gdbarch.
3734 * symtab.h (in_prologue): Add GDBARCH parameter.
3735 * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
3736
3737 * eval.c (evaluate_subexp_standard): Use expression architecture
3738 instead of current_gdbarch.
3739
3740 * c-lang.c (evaluate_subexp_c): Use expression architecture and
3741 language instead of current_gdbarch and current_language.
3742
3743 * printcmd.c (do_one_display): Use expression architecture instead
3744 of current_gdbarch.
3745
3746 * infcmd.c (print_return_value): Use architecture of stop_regcache
3747 instead of current_gdbarch.
3748 (print_vector_info, print_float_info): Remove GDBARCH argument,
3749 use frame architecture instead.
3750 (vector_info, float_info): Update calls.
3751
3752 * objc-lang.c (objc_skip_trampoline): Use frame architecture
3753 instead of current_gdbarch.
3754
3755 * parse.c (write_dollar_variable): Use parse architecture instead
3756 of current_gdbarch.
3757
3758 * source.c (line_info): Use objfile architecture instead of
3759 current_gdbarch.
3760
3761 * symtab.c (find_function_start_sal): Use gdbarch instead of
3762 current_gdbarch.
3763 (print_msymbol_info): Use objfile architecture instead of
3764 current_gdbarch.
3765
3766 * valops.c (value_assign): Use frame architecture instead of
3767 current_gdbarch.
3768
fbf65064
UW
37692009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3770
3771 * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
3772
3773 * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
3774 calling record_line.
3775 (enter_linenos): Likewise.
3776 * dbxread.c (process_one_symbol): Likewise.
3777 * dwarf2read.c (dwarf_decode_lines): Likewise.
3778 * mdebugread.c (psymtab_to_symtab_1): Likewise.
3779 * xcoffread.c (enter_line_range): Likewise.
3780
505e835d
UW
37812009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3782
3783 * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
3784 architecture instead of current_gdbarch.
3785 (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
3786 (gen_expr): Pass expression to get_struct_ref.
3787
3788 * symtab.h (struct symbol_ops): Add GDBARCH parameter to
3789 tracepoint_var_ref callback.
3790 * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
3791 symbol operation callback.
3792 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
3793 Use it instead of current_gdbarch.
3794 (locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
3795 dwarf2_tracepoint_var_ref.
3796 (loclist_tracepoint_var_ref): Likewise.
3797
55f960e1
UW
37982009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3799
3800 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3801 Use it instead of address bits of current_gdbarch.
3802 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3803 * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
3804 make_pv_area.
3805 (arm_scan_prologue): Likewise.
3806 * m32c-tdep.c (m32c_analyze_prologue): Likewise.
3807 * mep-tdep.c (mep_analyze_prologue): Likewise.
3808 * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
3809 * s390-tdep.c (s390_analyze_prologue): Likewise.
3810
7ccb0be9
UW
38112009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3812
3813 * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
3814 frame architecture instead of current_gdbarch.
3815 (mi_cmd_data_list_changed_registers): Likewise.
3816 (mi_cmd_data_list_register_values): Likewise. Pass selected
3817 frame to get_register.
3818 (get_register): Add FRAME argument, use it as frame to retrieve
3819 registers from (instead of selected frame). Use frame architecture
3820 instead of current_gdbarch.
3821 (mi_cmd_data_write_register_values): Use current regcache
3822 architecture instead of current_gdbarch.
3823
5eccfcc2
UW
38242009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3825
3826 * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
3827 use frame architecture instead. Replace current_gdbarch uses.
3828 (tui_show_registers): Update call.
3829 (tui_get_register): Remove GDBARCH parameter; use frame architecture
3830 instead.
3831 (tui_show_register_group): Update call.
3832 (tui_check_register_values): Likewise.
3833 (tui_register_format): Remove GDBARCH parameter; use frame
3834 architecture instead. Replace current_gdbarch uses.
3835 (tui_get_register): Update call.
3836
bd57a748
UW
38372009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3838
3839 * gdbarch.sh (construct_inferior_arguments): Remove.
3840 * gdbarch.c, gdbarch.h: Regenerate.
3841 * infcmd.c (get_inferior_args): Call construct_inferior_arguments
3842 directly instead of gdbarch_construct_inferior_arguments.
3843 (construct_inferior_arguments): Remove GDBARCH argument.
3844 * inferior.h (construct_inferior_arguments): Likewise.
3845
9216df95
UW
38462009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3847
3848 * symfile.c (section_is_mapped): Use objfile architecture instead
3849 of current_gdbarch.
3850 (TARGET_LONG_BYTES): Remove.
3851 (read_target_long_array): Add SIZE argument. Use it instead of
3852 TARGET_LONG_BYTES.
3853 (simple_read_overlay_table): Retrieve long size from objfile
3854 architecture; pass it to read_target_long_array.
3855 (simple_read_overlay_region_table): Likewise.
3856 (simple_overlay_update_1): Likewise.
3857
9f5a595d
UW
38582009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3859
3860 * infrun.c (cleanup_displaced_step_closure): Remove.
3861 (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
3862 (displaced_step_prepare): Use displaced_step_clear_cleanup instead
3863 of cleanup_displaced_step_closure.
3864 (handle_inferior_event, keep_going): Use thread architecture instead
3865 of current_gdbarch.
3866
568d6575
UW
38672009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3868
3869 * infrun.c (handle_inferior_event): Use current frame architecture
3870 or thread architecture instead of current_gdbarch. Pass to
3871 handle_step_into_function and handle_step_into_function_backward.
3872 (handle_step_into_function): Add GDBARCH parameter. Use it instead
3873 of current_gdbarch.
3874 (handle_step_into_function_backward): Likewise.
3875 (insert_step_resume_breakpoint_at_frame): Use frame architecture
3876 instead of current_gdbarch.
3877 (insert_step_resume_breakpoint_at_caller): Likewise.
3878
ea5d7a99
PM
38792009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
3880 Pedro Alves <pedro@codesourcery.com>
3881
3882 * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
3883 is pushed for watchpoint promotion to hardware watchpoint.
3884
dce234bc
PP
38852009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3886
3887 * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
3888 (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
3889 (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
3890 (dwarf_ranges_section, dwarf_frame_section)
3891 (dwarf_eh_frame_section): Removed.
3892 (dwarf2_resize_section): Likewise.
3893 (dwarf2_read_section): Now static, use bfd_mmap() if possible.
3894 (dwarf2_get_section_info): New function.
3895 (munmap_section_buffer): Likewise.
3896 (dwarf2_per_objfile_cleanup): Likewise.
3897 (section_is_p): Signature change.
3898 * dwarf2-frame.c (dwarf2_build_frame_info): Use
3899 dwarf2_get_section_info instead of dwarf2_read_section.
3900
7eedccfa
PP
39012009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3902
3903 * solib.c (symbol_add_stub): New FLAGS parameter.
3904 (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
3905 directly.
3906 (solib_add): Defer breakpoint_re_set until after all solibs.
3907 * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
3908 * rs6000-nat.c (objfile_symbol_add): Adjust.
3909 * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
3910 (new_symfile_objfile): Likewise.
3911 (symbol_file_add_with_addrs_or_offsets): Likewise.
3912 (symbol_file_add_from_bfd): Likewise.
3913 (symbol_file_add): Likewise.
3914 * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
3915 * symfile-mem.c (symbol_file_add_from_memory): Adjust.
3916 * windows-nat.c (safe_symbol_file_add_stub): Adjust.
3917 * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
3918
19ef5c71
KS
39192009-06-16 Keith Seitz <keiths@redhat.com>
3920
3921 * linespec.c (collect_methods): Delete.
3922 (add_matching_methods): Reove destructor special case.
3923 (find_method): Call find_methods directly instead of
3924 collect_methods.
3925 * valops.c (value_struct_elt): Remove destructor
3926 special cases.
3927 (check_field): Likewise.
3928 (value_struct_elt_for_reference): Likewise.
3929 (destructor_name_p): Remove misleading comment about dtors
3930 being "special cases".
3931 * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
3932 * gdbtypes.c (get_destructor_fn_field): Likewise.
3933
a4261689
PA
39342009-06-16 Pedro Alves <pedro@codesourcery.com>
3935
3936 * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
3937 TARGET_OJECT_MEMORY reads to the topmost target, not to the
3938 flattened current_target.
3939
4e99ad69
TG
39402009-06-16 Tristan Gingold <gingold@adacore.com>
3941
3942 * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
3943 call_length field.
3944 (avr_register_name): Add const to register_names.
3945 (avr_scan_arg_moves): Move inside avr_scan_prologue.
3946 (avr_scan_prologue): Add pc_end argument.
3947 Only read prologue bytes that can be read.
3948 Limit the scan to the known prologue length.
3949 Makes pattern variables static and const.
3950 Fix indentation.
3951 (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
3952 Fix indentation.
3953 (avr_breakpoint_from_pc): Constify avr_break_insn.
3954 (avr_extract_return_value): Fix function comment.
3955 (avr_frame_unwind_cache): Fix GNU style violations.
3956 Pass current_pc argument to avr_scan_prologue to stop prologue
3957 analysis to the current pc. This fixes the bug with the 'next'
3958 command.
3959 Correctly set the SP register of the previous frame (use call_length).
3960 (avr_frame_prev_register): Fix indentation.
3961 Correctly read PC from the stack on avr6 architectures.
3962 (avr_push_dummy_call): Fix indentation.
3963 (avr_gdbarch_init): Set call_length according to the architecture.
3964
7cd1089b
PM
39652009-06-15 Phil Muldoon <pmuldoon@redhat.com>
3966
3967 * infcall.c (show_unwind_on_terminating_exception_p): New
3968 function.
3969 (call_function_by_hand): Create breakpoint and clean-up call for
3970 std::terminate.breakpoint. Add unwind_on_terminating_exception_p
3971 gate. Pop frame on breakpoint hit.
3972 (_initialize_infcall): Add add_setshow_boolean_cmd for
3973 unwind-on-terminating-exception.
3974
b2ab525c
KB
39752009-06-12 Kevin Buettner <kevinb@redhat.com>
3976
3977 * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
3978 `has_section_at_zero' flag from stripped objfile to separate,
3979 debug info only, objfile.
3980
4b477ade
PA
39812009-06-12 Pedro Alves <pedro@codesourcery.com>
3982
3983 * exec.h (section_table_xfer_memory_partial): Improve description,
3984 mention SECTION_NAME.
3985 * exec.c (section_table_xfer_memory_partial): Remove stale
3986 description.
3987
c59fcb4c
AR
39882009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3989
3990 * nto-tdep.h (nto_generic_supply_gpregset)
3991 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3992 * nto-tdep.c (nto_generic_supply_gpregset)
3993 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3994
19a934d8
AR
39952009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3996
3997 * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
3998 (i386nto_sigcontext_addr): Change the way context address is calculated.
3999 (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
4000 sc_sp_offset and set sc_reg_offset and sc_num_regs.
4001
80b1849c
AR
40022009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
4003
4004 * i386-nto-tdep.c (i386_nto_target): Remove definition.
4005 (init_i386nto_ops): Use macros to set fields to global
4006 current_nto_target directly.
4007 (i386nto_init_abi): Remove unused nto_set_target call.
4008 * nto-tdep.h (nto_set_target): Remove unused declaration.
4009 * nto-tdep.c (nto_set_target): Remove unused function.
4010
80c99de1
PA
40112009-06-11 Pedro Alves <pedro@codesourcery.com>
4012
4013 * breakpoint.c (break_command_really): Rename local variable
4014 breakpoint_chain to bkpt_chain.
4015
dbfb31a4
AR
40162009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
4017
4018 Add support for XMM registers.
4019 * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
4020 (i386nto_register_area): Correctly calculate offsets and sizes for
4021 all supported registers.
4022
17dd65ce
TT
40232009-06-11 Tom Tromey <tromey@redhat.com>
4024
4025 * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
4026 'static' from local variable definitions.
4027
828cd292
PA
40282009-06-11 Pedro Alves <pedro@codesourcery.com>
4029
4030 * symtab.c (append_expanded_sal): Remove unused local variables.
4031
d4db2f36
PA
40322009-06-11 Pedro Alves <pedro@codesourcery.com>
4033
4034 * infrun.c (sched_multi): New global.
4035 (resume): If sched_multi is set, resume only threads of the
4036 current inferior.
4037 (prepare_to_proceed): Don't switch over to wait_ptid if we're
4038 resuming a different inferior, and sched_multi is off.
4039 (show_schedule_multiple): New.
4040 (_initialize_infrun): Register new "set schedule-multiple" command.
4041 * inferior.h (sched_multi): Declare.
4042 * NEWS: Mention new "schedule-multiple" setting.
4043
e21458b2
PA
40442009-06-11 Pedro Alves <pedro@codesourcery.com>
4045
4046 * varobj.c (varobj_create): Properly restore the selected frame.
4047
8bb318c6
TT
40482009-06-05 Tom Tromey <tromey@redhat.com>
4049
4050 * inferior.c (print_inferior): Make a table, not a list. Emit
4051 table headers.
4052
bbb29520
PA
40532009-06-10 Jonas Maebe <jonas.maebe@elis.ugent.be>
4054
4055 * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
4056 darwin_wait (blocking wait).
4057 (darwin_kill_inferior): Likewise.
4058
66852e9c
PA
40592009-06-10 Pedro Alves <pedro@codesourcery.com>
4060
4061 * infrun.c (handle_inferior_event): Update comment around trying
4062 to revert back to a stepping thread that has exited.
4063
d0c6ba3d
CC
40642009-06-10 Cary Coutant <ccoutant@google.com>
4065
4066 * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
4067 DW_LNE_set_discriminator.
4068
059fb39f
PM
40692009-06-10 Pierre Muller <muller@ics.u-strasbg.fr>
4070
4071 * breakpoint.c: ARI fixes.
4072 (create_overlay_event_breakpoint): Avoid assignment inside if statement.
4073 (print_one_breakpoint_location): Likewise.
4074 (create_longjmp_breakpoint): Likewise.
4075 (tracepoint_save_command): Likewise
4076 (bpstat_find_step_resume_breakpoint): No operator at end of line.
4077 (bpstat_stop_status): Likewise.
4078 (describe_other_breakpoints): Likewise.
4079 (hw_watchpoint_used_count): Likewise.
4080 (expand_line_sal_maybe): Likewise.
4081 (break_command_really): Likewise.
4082 (delete_command): Likewise.
4083 (do_enable_breakpoint): Likewise.
4084 (delete_trace_command): Likewise.
4085 (catch_exception_command_1): Likewise and remove extra parentheses.
4086
7681d515
PM
40872009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
4088
4089 * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
4090 "ubreak" command that does not exist.
4091
300d0284
PM
40922009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
4093
4094 * cli/cli-decode.c (add_alias_cmd): Correct assertion.
4095
72753510
PA
40962009-06-07 Pedro Alves <pedro@codesourcery.com>
4097
4098 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
4099
d1a7880c
PA
41002009-06-07 Pedro Alves <pedro@codesourcery.com>
4101
4102 * procfs.h: New.
4103 * proc-utils.h (procfs_first_available): Don't declare here.
4104 * sol-thread.c: Include procfs.h instead of sys/procfs.h and
4105 proc-utils.h.
4106 * procfs.c: Include procfs.h.
4107 (procfs_target): Make it public. Don't register
4108 procfs_can_use_hw_breakpoint here.
4109 (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
4110 defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
4111 (procfs_can_use_hw_breakpoint): Remove check of
4112 TARGET_HAS_HARDWARE_WATCHPOINTS.
4113 (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
4114 here.
4115 (_initialize_procfs): Don't add the procfs target here.
4116
4117 * i386-sol2-nat.c: Include target.h and procfs.h.
4118 (_initialize_amd64_sol2_nat): Install the procfs target here,
4119 customized with watchpoints support.
4120 * irix5-nat.c: Include target.h.
4121 (_initialize_core_irix5): Rename to ...
4122 (_initialize_irix5_nat): ... this. Install the procfs target
4123 here, customized with watchpoints support.
4124 * alpha-nat.c: Include procfs.h.
4125 (_initialize_core_alpha): Rename to...
4126 (_initialize_alpha_nat): ... this. Install the procfs target
4127 here, customized with watchpoints support.
4128 * sparc-sol2-nat.c: Include target.h and procfs.h.
4129 (_initialize_sparc_sol2_nat): New.
4130
4131 * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
4132 * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
4133 * config/mips/irix5.mh (NAT_FILE): Delete.
4134 * config/mips/irix6.mh (NAT_FILE): Delete.
4135 * config/mips/nm-irix5.h: Delete.
4136
81b92222
PA
413720009-06-07 Pedro Alves <pedro@codesourcery.com>
4138
4139 * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
4140 to enum target_object. Cleanup comments.
4141 * auxv.h: Include "target.h". Cleanup comments to not mention
4142 NATIVE_XFER_AUXV anymore.
4143
cc35222d
PA
41442009-06-07 Pedro Alves <pedro@codesourcery.com>
4145
4146 * inferior.h (procfs_first_available): Move declaration to...
4147 * proc-utils.h: ... here.
4148 * sol-thread.c: Include procfs.h and proc-utils.h.
4149
09d3bde9
PA
41502009-06-07 Pedro Alves <pedro@codesourcery.com>
4151
4152 * inferior.h (proc_iterate_over_mappings): Delete declaration.
4153 * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
4154 * procfs.c (proc_iterate_over_mappings): Delete.
4155
c35b1492
PA
41562009-06-07 Pedro Alves <pedro@codesourcery.com>
4157
4158 * target.h (struct target_ops): Make to_has_all_memory,
4159 to_has_memory, to_has_stack, to_has_registers and to_has_execution
4160 methods instead of variables.
4161 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
4162 (target_has_registers_1, target_has_execution_1): Declare
4163 functions.
4164 (target_has_all_memory): Rewrite to call target_has_all_memory_1.
4165 (target_has_memory): Rewrite to call target_has_memory_1.
4166 (target_has_stack): Rewrite to call target_has_all_stack_1.
4167 (target_has_registers): Rewrite to call target_has_registers_1.
4168 (target_has_execution): Rewrite to call target_has_execution_1.
4169 (default_child_has_all_memory, default_child_has_memory)
4170 (default_child_has_stack, default_child_has_registers)
4171 (default_child_has_execution): Declare.
4172 (target_mark_running, target_mark_exited): Delete declarations.
4173 * target.c (default_child_has_all_memory,
4174 default_child_has_memory, default_child_has_stack,
4175 default_child_has_registers, default_child_has_execution): New.
4176 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
4177 target_has_registers_1, target_has_execution_1): New.
4178 (add_target): Default the to_has_all_memory, to_has_all_memory,
4179 to_has_memory, to_has_stack, to_has_registers and to_has_execution
4180 callbacks to return 0.
4181 (update_current_target): Do not inherit to_has_all_memory,
4182 to_has_memory, to_has_stack, to_has_registers or to_has_execution.
4183 (target_mark_running, target_mark_exited): Delete.
4184 (memory_xfer_partial): Adjust.
4185 (target_read_memory, target_write_memory, target_search_memory):
4186 Dispatch to the the top-most target, not the flattened
4187 current_target.
4188 (target_info): Adjust.
4189 (init_dummy_target): Install return_zero as callback for
4190 to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
4191 to_has_execution.
4192 (set_maintenance_target_async_permitted): Use have_live_inferiors
4193 instead of target_has_execution.
4194 * target-memory.c (target_write_memory_blocks): Dispatch memory
4195 writes to the the top-most target, not the flattened
4196 current_target.
4197
4198 * breakpoint.c (insert_breakpoints): Don't check for
4199 target_has_execution here.
4200 (update_global_location_list): Check if there are live inferiors
4201 to debug instead of target_has_execution.
4202 * infcmd.c (kill_command, detach_command): Check if there are
4203 inferiors instead of target_has_execution.
4204 * inferior.h (have_live_inferiors): Declare.
4205 * inferior.c (have_live_inferiors): New.
4206 * infrun.c (normal_stop): Don't check for target_has_execution to
4207 finish the thread states.
4208 * thread.c (is_thread_state, is_stopped, is_exited, is_running)
4209 (any_running, is_executing): Remove checks for
4210 target_has_execution.
4211 * top.c (kill_or_detach): Don't try to kill core inferiors.
4212 (quit_target): Don't check for target_has_execution.
4213
4214 * corelow.c (core_has_memory, core_has_stack, core_has_registers):
4215 New.
4216 (init_core_ops): Install core_has_memory, core_has_stack and
4217 core_has_registers.
4218 * exec.c (exec_has_memory): New.
4219 (init_exec_ops): Install exec_has_memory.
4220 * remote.c (remote_add_inferior): Don't call target_mark_running.
4221 (remote_start_remote): Don't call target_mark_exited or call
4222 target_mark_running.
4223 (remote_open_1): Use have_inferiors instead of
4224 target_has_execution. Don't use target_mark_exited.
4225 (init_remote_ops): Install deafult_child_has_all_memory,
4226 default_child_has_memory, default_child_has_stack,
4227 default_child_has_registers, default_child_has_execution.
4228 * bsd-kvm.c (bsd_kvm_return_one): New.
4229 (bsd_kvm_add_target): Register bsd_kvm_return_one as
4230 to_has_memory, to_has_stack and to_has_registers callbacks.
4231 * remote-m32r-sdi.c (m32r_return_one): New.
4232 (init_m32r_ops): Register it.
4233 * inf-child.c (inf_child_target): Adjust to register
4234 default_child_has_all_memory, default_child_has_memory,
4235 default_child_has_stack, default_child_has_registers,
4236 default_child_has_execution callbacks.
4237 * gnu-nat.c (init_gnu_ops): Likewise.
4238 * go32-nat.c (init_go32_ops): Likewise.
4239 * hpux-thread.c (init_hpux_thread_ops): Likewise.
4240 * monitor.c (init_base_monitor_ops): Likewise.
4241 * nto-procfs.c (init_procfs_ops): Likewise.
4242 * remote-mips.c (_initialize_remote_mips): Likewise.
4243 * windows-nat.c (init_windows_ops): Likewise.
4244 * remote-sim.c (gdbsim_create_inferior): Don't use
4245 target_mark_running or target_mark_exited.
4246 (gdbsim_mourn_inferior): Don't call target_mark_exited.
4247 (init_gdbsim_ops): Adjust to register
4248 default_child_has_all_memory, default_child_has_memory,
4249 default_child_has_stack, default_child_has_registers,
4250 default_child_has_execution callbacks.
4251
4252 * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
4253 there's no inferior selected, defer to a lower stratum.
4254
da1f2771
TT
42552009-06-05 Tom Tromey <tromey@redhat.com>
4256
4257 * varobj.c (update_dynamic_varobj_children): Wrap error text in
4258 _().
4259 (install_visualizer): Likewise.
4260 (varobj_set_visualizer): Likewise.
4261
68c9c314 42622009-06-05 Marc Khouzam <marc.khouzam@ericsson.com>
4b459977
VP
4263
4264 * mi/mi-main.c (mi_cmd_exec_continue)
4265 (mi_cmd_exec_interrupt): Adjust parsing of thread group
4266 ids to current reality, where they don't have any 'p' prefix.
4267
b3ed98d2
AR
42682009-06-05 Aleksandar Ristovski <aristovski@qnx.com>
4269
4270 * corelow.c (core_open): Check for core_gdbarch before calling
4271 gdbarch_target_signal_from_host.
4272
68c1b02d
TT
42732009-06-05 Tom Tromey <tromey@redhat.com>
4274
4275 * c-exp.y (parse_number): Don't use K&R definition.
4276 (yylex): Likewise.
4277 (yyerror): Likewise.
4278
0b4bc29a
JK
42792009-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4280
4281 * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
4282
768a979c
UW
42832009-06-04 Ulrich Weigand <uweigand@de.ibm.com>
4284
4285 * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
4286 * ax-gdb.c (gen_var_ref): Likewise.
4287 * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
4288 * printcmd.c (address_info): Likewise.
4289 * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
4290 * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
4291 * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
4292 * dwarf2loc.h: Likewise.
4293 * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
4294
4295 * symtab.h: (struct symbol_register_ops): New struct definition.
4296 (struct symbol): Make "ops" member a union of symbol_computed_ops and
4297 symbol_register_ops callback pointers.
4298 (SYMBOL_REGISTER_OPS): New macro.
4299 * tracepoint.c: Include "objfiles.h".
4300 (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
4301 callback to retrieve register numbers.
4302 * ax-gdb.c (gen_var_ref): Likewise.
4303 * findvar.c (read_var_value): Likewise.
4304 * printcmd.c (address_info): Likewise.
4305
4306 * coffread.c (coff_reg_to_regnum): New function.
4307 (coff_register_funcs): New static variable.
4308 (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
4309 Install SYMBOL_REGISTER_OPS callbacks.
4310 * mdebugread.c (mdebug_reg_to_regnum): New function.
4311 (mdebug_register_funcs): New static variable.
4312 (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
4313 Install SYMBOL_REGISTER_OPS callbacks.
4314 * stabsread.c (stab_reg_to_regnum): New function.
4315 (stab_register_funcs): New static variable.
4316 (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
4317 Install SYMBOL_REGISTER_OPS callbacks.
4318
930123b7
DE
43192009-06-03 Doug Evans <dje@google.com>
4320
4321 * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
4322 after discarding its contents.
4323
07b82ea5
PA
43242009-06-03 Pedro Alves <pedro@codesourcery.com>
4325
4326 * target.c: Include "exec.h".
4327 (update_current_target): Don't inherit to_sections or
4328 to_sections_end.
4329 (target_get_section_table): New.
4330 (target_section_by_addr): Fetch the section table from the passed
4331 in target.
4332 (memory_xfer_partial): Handle unmapped overlay sections before
4333 anything else. Get the overlay mapped address here. Adjust to
4334 use section_table_xfer_memory_partial.
4335 (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
4336 instead of TARGET_OBJECT_MEMORY.
4337 (target_resize_to_sections): Delete.
4338 (remove_target_sections): Adjust to remove target sections from
4339 `current_target_sections', and use resize_section_table.
4340 * target.h (struct target_ops) <to_sections, to_sections_end>:
4341 Remove fields.
4342 <to_get_section_table>: New method.
4343 (xfer_memory, print_section_info): Delete declarations.
4344 (struct target_section_table): New type.
4345 (target_get_section_table): Declare.
4346 (target_resize_to_sections): Delete declaration.
4347 (remove_target_sections): Delete declaration.
4348 * bfd-target.c (target_bfd_xfer_partial): Get the section table
4349 from to_data.
4350 (target_bfd_get_section_table): New.
4351 (target_bfd_xclose): Adjust.
4352 (target_bfd_reopen): Store the section table in the to_data field.
4353 * corelow.c (core_data): New.
4354 (core_close): Adjust to release core_data and its sections.
4355 (core_open): Allocate core_data, and build its target sections
4356 table.
4357 (deprecated_core_resize_section_table): New.
4358 (core_files_info): Pass core_data to print_section_info.
4359 (core_xfer_partial): Adjust to use
4360 section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
4361 (init_core_ops): Do not install a deprecated_xfer_memory callback
4362 anymore.
4363 * solib.c (update_solib_list): Add the shared library sections
4364 to the current target sections table.
4365 * exec.c (current_target_sections_1): New global.
4366 (current_target_sections): New global.
4367 (exec_close_1): New function, refactored from exec_close. Remove
4368 the exec_bfd's sections from the current target sections table.
4369 Adjust to not use to_sections.
4370 (exec_close): Remove all target sections. Call exec_close_1.
4371 (exec_file_clear): Use exec_close_1 instead of unpushing the
4372 target.
4373 (exec_file_attach): Likewise. Adjust to not use to_sections. Add
4374 exec_bfd's sections to the current target sections table. Don't
4375 push the exec_ops target here.
4376 (resize_section_table): New.
4377 (add_target_sections): New.
4378 (remove_target_sections): Moved here.
4379 (section_table_xfer_memory): Adjust to implement the xfer_partial
4380 interface, and rename to...
4381 (section_table_xfer_memory_partial): ... this, replacing the
4382 current function of that same name.
4383 (exec_get_section_table): New.
4384 (exec_xfer_partial): New.
4385 (xfer_memory): Delete.
4386 (print_section_info): Replace the target_ops parameter by a
4387 target_section_table parameter.
4388 (exec_files_info, set_section_command, exec_set_section_address):
4389 Adjust to use the current sections table.
4390 (init_exec_ops): Do not register a deprecated_xfer_memory
4391 callback. Register to_xfer_partial and to_get_section_table
4392 callbacks.
4393 * infrun.c (handle_inferior_event): Update comments around
4394 solib_add.
4395 * rs6000-nat.c (xcoff_relocate_core): Adjust to use
4396 deprecated_core_resize_section_table.
4397 * exec.h (resize_section_table): Declare.
4398 (section_table_xfer_memory_partial): Add const char * argument.
4399 (remove_target_sections): Declare here.
4400 (add_target_sections): Declare.
4401 (print_section_info): Declare here.
4402 * gdbcore.h (deprecated_core_resize_section_table): Declare.
4403
4fa62494
UW
44042009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4405
4406 * value.h (struct internalvar): Remove.
4407 (get_internalvar_integer): Add prototype.
4408 (set_internalvar_integer): Add prototype.
4409 (clear_internalvar): Add prototype.
4410
4411 * value.c (struct internalvar): Move here. Add type member. Remove
4412 endian member. Add union_internalvar member instead of value member.
4413 (init_if_undefined_command): Use intvar->type.
4414 (create_internalvar): Do not initialize value/endian, but type.
4415 (create_internalvar_type_lazy): Call create_internalvar.
4416 (value_of_internalvar): Handle host-side internalvar contents.
4417 (set_internalvar_component): Likewise.
4418 (set_internalvar): Likewise.
4419 (get_internalvar_integer): New function.
4420 (clear_internalvar): Likewise.
4421 (set_internalvar_integer): Likewise.
4422 (preserve_values): Handle host-side internalvar contents.
4423
4424 * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
4425 set_internalvar_integer instead of set_internalvar.
4426 * findcmd.c (find_command): Likewise.
4427 * infrun.c (handle_inferior_event): Likewise.
4428 * source.c (forward_search_command, reverse_search_command): Likewise.
4429 * tracepoint.c (set_traceframe_num, set_tracepoint_num,
4430 set_traceframe_context): Likewise.
4431
4432 * printcmd.c (x_command): Call clear_internalvar instead of
4433 set_internalvar.
4434 * tracepoint.c (set_traceframe_context): Likewise.
4435
4436 * breakpoint.c (get_number_trailer): Call get_internalvar_integer
4437 instead of value_of_internalvar.
4438 * linespec.c (decode_dollar): Likewise.
4439
4440 * expprint.c (dump_subexp_body_standard): Use internalvar_name
4441 instead of accessing internalvar private elements.
4442 * valops.c (value_assign): Copy from original source instead of
4443 accessing internalvar private elements.
4444
6ceaaae5
UW
44452009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4446
4447 * scm-lang.c (builtin_type_scm): Remove.
4448 (scm_lookup_name): Add GDBARCH parameter. Use it instead of
4449 objfile architecture. Use per-architecture builtin_scm_type instead
4450 of builtin_type_scm.
4451 (evaluate_exp): Pass expression architecture to scm_lookup_name.
4452
4453 (scm_get_field): Add SIZE parameter. Use it instead of
4454 TYPE_LENGTH (builtin_type_scm).
4455
4456 (build_scm_types): New function.
4457 (scm_type_data): New variable.
4458 (builtin_scm_type): New function.
4459 (_initialize_scheme_language): Do not initialize builtin_type_scm.
4460 Register build_scm_types as post-init function for scm_type_data.
4461
4462 * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
4463 instead of builtin_type_scm.
4464
4465 * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
4466 (scm_get_field): Add SIZE paramter.
4467 (scm_scmval_print): Remove prototype.
4468 (builtin_type_scm): Remove.
4469 (struct builtin_scm_type): Add structure definition.
4470 (builtin_scm_type): Add prototype.
4471
4472 * scm-valprint.c (scm_inferior_print): Add TYPE parameter. Use it
4473 instead of builtin_core_addr type; do not use objfile architecture.
4474 (scm_scmlist_print): Add TYPE parameter. Use it to define SCM_SIZE.
4475 Pass type to scm_scmval_print.
4476 (scm_ipruk): Add TYPE parameter. Use it to define SCM_SIZE.
4477 (scm_scmval_print): Make static. Add TYPE parameter. Use it to
4478 define SCM_SIZE. Pass type to scm_ipruk and scm_scmlist_print.
4479 (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
4480
0a9d309a
UW
44812009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4482
4483 * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
4484 mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
4485 mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
4486 mdebug_type_unsigned_char, mdebug_type_unsigned_short,
4487 mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
4488 mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
4489 mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
4490 mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
4491 mdebug_type_complex, mdebug_type_double_complex,
4492 mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
4493 Remove.
4494
4495 (basic_type_data): New global variable.
4496 (basic_type): New function.
4497 (parse_type): Remove static basic type map map_bt. Call basic_type
4498 to get basic types instead of using mdebug_type_ variables.
4499
4500 (parse_symbol): Use builtin types instead of mdebug_type_ variables.
4501 (upgrade_type): Likewise.
4502 (parse_procedure): Likewise.
4503 (psymtab_to_symtab_1): Likewise.
4504
4505 (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
4506 Initialize basic_type_data.
4507
289bd67a
UW
45082009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4509
4510 * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
4511 * dfp.c (promote_decimal): Remove.
4512 (decimal_binop): Convert LEN_RESULT to input parameter.
4513 Remove call to decimal_binop.
4514 (decimal_compare): Remove call to decimal_binop.
4515
4516 * valarith.c (value_binop): Pass desired result type length
4517 to decimal_binop.
4518
64c9be2e
TG
45192009-06-01 Tristan Gingold <gingold@adacore.com>
4520
4521 * configure.tgt (avr): Set gdb_sim to use the simulator.
4522
5a437975
DE
45232009-05-29 Doug Evans <dje@google.com>
4524
4525 * infrun.c (prepare_to_proceed): Document. Assert !non_stop.
4526 If scheduler-locking is enabled, we're not going to be singlestepping
4527 any other previously stopped thread.
4528
ab730e72
PA
45292009-05-29 Pedro Alves <pedro@codesourcery.com>
4530
4531 * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
4532
3d22076f
EZ
45332009-05-29 Eli Zaretskii <eliz@gnu.org>
4534
4535 * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
4536 for stabs and COFF debug info.
4537
b3444185
PA
45382009-05-28 Pedro Alves <pedro@codesourcery.com>
4539
4540 * infrun.c (handle_inferior_event): When thread hoping, switch
4541 inferior_ptid to the event thread before removing breakpoints from
4542 the target. If not stopping, also try to revert back to a thread
4543 that was doing a "next". Check if that thread still exists before
4544 resuming.
4545 (currently_stepping_thread): Delete and merge with ...
4546 (currently_stepping): ... this.
4547 (currently_stepping_callback): Rename to ...
4548 (currently_stepping_or_nexting_callback): ... this, and also
4549 return true if the thread was stepping over a call (has a
4550 step-resume breakpoint).
4551
8f500870
TT
45522009-05-28 Tom Tromey <tromey@redhat.com>
4553
4554 * python/python.c (gdbpy_parameter): Rename. Fix error message.
4555 (GdbMethods): Change "get_parameter" to "parameter".
4556
6bf0ce2b
PP
45572009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
4558 Paul Pluzhnikov <ppluzhnikov@google.com>
4559
4560 * configure.ac (!have_libpython): Add python-prettyprint source
4561 and object files.
4562 * configure: Regenerate.
4563 * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
4564 python headers.
4565
b6313243
TT
45662009-05-27 Vladimir Prus <vladimir@codesourcery.com>
4567 Tom Tromey <tromey@redhat.com>
4568 Thiago Jung Bauermann <bauerman@br.ibm.com>
4569
4570 * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
4571 * varobj.h (varobj_set_visualizer): Declare.
4572 (varobj_get_display_hint): Likewise.
4573 (varobj_update_result_t) <children_changed, value_installed>: New
4574 fields.
4575 * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
4576 * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
4577 mi_cmd_var_set_child_range): Declare.
4578 * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
4579 (mi_cmd_var_list_children): Emit display hint.
4580 (varobj_update_one): Emit display hint. Handle dynamic children.
4581 * python/python.c (GdbMethods): Add "default_visualizer".
4582 * python/python-internal.h (apply_varobj_pretty_printer,
4583 gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
4584 Declare.
4585 (gdbpy_default_visualizer): Likewise.
4586 * varobj.c: Include python.h, python-internal.h.
4587 (PyObject): New typedef.
4588 (struct varobj) <children_requested, pretty_printer>: New fields.
4589 (varobj_create): Call install_default_visualizer.
4590 (instantiate_pretty_printer): New function.
4591 (varobj_set_display_format): Update.
4592 (varobj_get_display_hint): New function.
4593 (update_dynamic_varobj_children): New function.
4594 (varobj_get_num_children): Handle dynamic children.
4595 (varobj_list_children): Likewise.
4596 (install_new_value): Likewise.
4597 (varobj_add_child): New function.
4598 (install_visualizer): Likewise.
4599 (install_default_visualizer): Likewise.
4600 (varobj_set_visualizer): Likewise.
4601 (varobj_update): Handle dynamic children.
4602 (create_child): Use create_child_with_value.
4603 (create_child_with_value): New function.
4604 (value_get_print_value): Call pretty printer. Add value_formatter
4605 argument.
4606 (c_value_of_variable): Update.
4607 (varobj_invalidate): Always free all_rootvarobj.
4608 * python/python-prettyprint.c (apply_varobj_pretty_printer): New
4609 function.
4610 (gdbpy_get_varobj_pretty_printer): Likewise.
4611 (gdbpy_default_visualizer): Likewise.
4612
a6bac58e
TT
46132009-05-27 Tom Tromey <tromey@redhat.com>
4614 Thiago Jung Bauermann <bauerman@br.ibm.com>
4615 Phil Muldoon <pmuldoon@redhat.com>
4616 Paul Pluzhnikov <ppluzhnikov@google.com>
4617 Vladimir Prus <vladimir@codesourcery.com>
4618
4619 * python/python-value.c (value_object_to_value): New function.
4620 * python/python-internal.h: Include frameobject.h.
4621 (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
4622 Declare.
4623 (value_object_to_value): Declare.
4624 * printcmd.c (struct format_data) <raw>: New field.
4625 (last_format): Default to 0.
4626 (decode_format): Initialize val.raw. Handle /r flag.
4627 (print_command_1): Initialize fmt.raw and opts.raw.
4628 (output_command): Likewise.
4629 (x_command): Fix initialization of fmt.format. Initialize
4630 fmt.raw.
4631 (display_command): Initialize fmt.raw.
4632 (do_one_display): Set opts.raw.
4633 * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
4634 gdbpy_display_hint_cst): New globals.
4635 (_initialize_python): Initialize them. Set gdb.pretty_printers.
4636 * cp-valprint.c: Include python.h.
4637 (cp_print_value): Call apply_val_pretty_printer.
4638 * python/python.h (apply_val_pretty_printer): Declare.
4639 * stack.c (print_this_frame_argument_p): Remove.
4640 (print_frame_args): Compute summary flag. Don't use
4641 print_this_frame_argument_p.
4642 * valprint.c: Include python.h.
4643 (user_print_options): Initialize new fields.
4644 (scalar_type_p): New function.
4645 (val_print): Handle 'raw' and 'summary' modes. Call
4646 apply_val_pretty_printer.
4647 (value_print): Handle 'raw' mode.
4648 * valprint.h (struct value_print_options) <raw, summary>: New
4649 fields.
4650 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
4651 (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
4652 (python-prettyprint.o): New target.
4653 * python/python-prettyprint.c: New file.
4654
42ae5230
TT
46552009-05-27 Tom Tromey <tromey@redhat.com>
4656 Paul Pluzhnikov <ppluzhnikov@google.com>
4657
4658 * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
4659 value_address.
4660 * cli/cli-dump.c (dump_value_to_file): Use value_address.
4661 * valprint.c (common_val_print): Likewise.
4662 * v850-tdep.c (v850_push_dummy_call): Use value_address.
4663 * tracepoint.c (encode_actions): Use value_address.
4664 * printcmd.c (print_formatted): Use value_address.
4665 (x_command): Likewise.
4666 * p-valprint.c (pascal_object_print_static_field): Use
4667 value_address.
4668 * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
4669 * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
4670 * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
4671 * jv-valprint.c (java_value_print): Use value_address.
4672 * infcall.c (find_function_addr): Use value_address.
4673 * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
4674 * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
4675 * frv-tdep.c (frv_push_dummy_call): Use value_address.
4676 * frame.c (frame_register_unwind): Use value_address.
4677 (frame_unwind_register_value): Likewise.
4678 * darwin-nat-info.c (info_mach_region_command): Use
4679 value_address.
4680 * cp-valprint.c (cp_print_static_field): Use value_address.
4681 * c-valprint.c (c_value_print): Use value_address.
4682 * breakpoint.c (update_watchpoint): Use value_address.
4683 (can_use_hardware_watchpoint): Likewise.
4684 * ada-valprint.c (ada_val_print_1): Use value_address.
4685 (ada_value_print): Likewise.
4686 * ada-tasks.c (read_fat_string_value): Use value_address.
4687 * jv-lang.c (java_link_class_type): Use set_value_address.
4688 (java_link_class_type): Likewise.
4689 (get_java_utf8_name): Use value_address.
4690 (type_from_class): Likewise.
4691 (java_link_class_type): Likewise.
4692 * findvar.c (value_of_register): Use set_value_address.
4693 (read_var_value): Likewise.
4694 (read_var_value): Likewise.
4695 * eval.c (evaluate_subexp_standard): Use set_value_address.
4696 (evaluate_subexp_standard): Use value_address.
4697 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
4698 * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
4699 (ada_value_primitive_packed_val): Likewise.
4700 (ensure_lval): Likewise.
4701 (thin_data_pntr): Use value_address.
4702 (desc_bounds): Likewise.
4703 (ada_value_primitive_packed_val): Likewise.
4704 (value_assign_to_component): Likewise.
4705 (ensure_lval): Likewise.
4706 (make_array_descriptor): Likewise.
4707 (ada_to_fixed_value): Likewise.
4708 (unwrap_value): Likewise.
4709 * value.c (deprecated_value_address_hack): Remove.
4710 (value_address): New function.
4711 (value_raw_address): Likewise.
4712 (set_value_address): Likewise.
4713 (value_fn_field): Use set_value_address.
4714 (value_from_contents_and_address): Likewise.
4715 (value_fn_field): Likewise.
4716 (allocate_value_lazy): Don't use VALUE_ADDRESS.
4717 (value_as_address): Use value_address.
4718 (value_static_field): Likewise.
4719 * valops.c (search_struct_field): Use set_value_address.
4720 (value_at): Likewise.
4721 (value_at_lazy): Likewise.
4722 (value_repeat): Likewise.
4723 (value_cast_structs): Use value_address.
4724 (value_cast): Likewise.
4725 (value_fetch_lazy): Likewise.
4726 (value_assign): Likewise.
4727 (value_repeat): Likewise.
4728 (address_of_variable): Likewise.
4729 (value_coerce_array): Likewise.
4730 (value_coerce_function): Likewise.
4731 (value_addr): Likewise.
4732 (search_struct_field): Likewise.
4733 (search_struct_method): Likewise.
4734 (find_method_list): Likewise.
4735 (value_struct_elt_for_reference): Likewise.
4736 (value_full_object): Likewise.
4737 * jv-valprint.c (java_value_print): Use set_value_address.
4738 * value.h (deprecated_value_address_hack): Remove.
4739 (VALUE_ADDRESS): Remove.
4740 (value_address): Declare.
4741 (value_raw_address): Declare.
4742 (set_value_address): Declare.
4743
2c74e833
TT
47442009-05-27 Tom Tromey <tromey@redhat.com>
4745 Thiago Jung Bauermann <bauerman@br.ibm.com>
4746 Phil Muldoon <pmuldoon@redhat.com>
4747 Paul Pluzhnikov <ppluzhnikov@google.com>
4748
4749 * python/python.c (_initialize_python): Call
4750 gdbpy_initialize_types.
4751 (GdbMethods): Add "lookup_type".
4752 * python/python-value.c (value_object) <type>: New field.
4753 (valpy_dealloc): Decref type.
4754 (valpy_new): Initialize type.
4755 (valpy_get_type): New function.
4756 (value_to_value_object): Initialize type.
4757 (valpy_cast): New function.
4758 (value_object_getset): Add "type".
4759 (value_object_methods): Add "cast".
4760 * python/python-internal.h (type_to_type_object): Declare.
4761 (type_object_to_type): Likewise.
4762 (gdbpy_initialize_types): Likewise.
4763 (gdbpy_lookup_type): Declare.
4764 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
4765 (SUBDIR_PYTHON_SRCS): Add python-type.c.
4766 (python-type.o): New target.
4767 * python/python-type.c: New file.
4768
89c73ade
TT
47692009-05-27 Tom Tromey <tromey@redhat.com>
4770 Thiago Jung Bauermann <bauerman@br.ibm.com>
4771 Phil Muldoon <pmuldoon@redhat.com>
4772
4773 * python/python.c: Include objfiles.h, observer.h.
4774 (gdbpy_auto_load): New global.
4775 (gdbpy_current_objfile): Likewise.
4776 (GDBPY_AUTO_FILENAME): New define.
4777 (gdbpy_new_objfile): New function.
4778 (gdbpy_get_current_objfile): Likewise.
4779 (gdbpy_objfiles): Likewise.
4780 (_initialize_python): Add "maint set auto-load". Call
4781 gdbpy_initialize_objfile. Attach objfile observer.
4782 (GdbMethods): New methods current_objfile, objfiles.
4783 * python/python-objfile.c: New file.
4784 * python/python-internal.h (objfile_to_objfile_object): Declare.
4785 (objfpy_get_printers): Likewise.
4786 (gdbpy_initialize_objfile): Likewise.
4787 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
4788 (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
4789 (python-objfile.o): New target.
4790
a75724bc
PA
47912009-05-27 Pedro Alves <pedro@codesourcery.com>
4792
4793 * infrun.c (follow_exec): Clear the stop_requested flag.
4794 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
4795 Add debug output.
4796
97c44116
AR
47972009-05-27 Aleksandar Ristovski <aristovski@qnx.com>
4798
4799 * nto-procfs.c (get_regset): Pass correct pointer.
4800
f504f079
DE
48012009-05-26 Doug Evans <dje@google.com>
4802
4803 * dwarf2read.c (follow_die_ref): Add comment.
4804 (dwarf2_mark_helper): Tweak comment.
4805 (dwarf2_mark): Move description to its proper place.
4806
4fcbb494
PM
48072009-05-25 Pierre Muller <muller@ics.u-strasbg.fr>
4808
4809 * procfs.c (procfs_wait): Add options parameter.
4810
4e3990f4
DE
48112009-05-24 Doug Evans <dje@google.com>
4812
e09875d4
DE
4813 Global renaming of find_thread_pid to find_thread_ptid.
4814 * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
4815 * thread.c (find_thread_ptid): Renamed from find_thread_pid.
4816 All callers updated.
4817
4e3990f4
DE
4818 * infrun.c (follow_fork): Initialize new step_* locals
4819 to avoid "may be used uninitialized" warnings.
4820
98b54c18
PA
48212009-05-24 Pedro Alves <pedro@codesourcery.com>
4822
4823 * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
4824
e58b0e63
PA
48252009-05-24 Pedro Alves <pedro@codesourcery.com>
4826
4827 * gdbthread.h (struct thread_info): New `pending_follow' field.
4828 * thread.c (new_thread): New function.
4829 (add_thread_silent): Use it.
4830 * breakpoint.c (internal_breakpoint_number): New global, moved
4831 from inside...
4832 (create_internal_breakpoint): ... this.
4833 (clone_momentary_breakpoint): New.
4834 * breakpoint.h (clone_momentary_breakpoint): Declare.
4835 * infrun.c (nullify_last_target_wait_ptid): Move declaration
4836 higher.
4837 (pending_follow): Delete.
4838 (follow_fork): Handle pending follow fork event here. Moved the
4839 preserving of thread stepping state here.
4840 (resume): Don't handle pending follow fork events here. Only
4841 install the inferior's terminal modes if we're about to resume it.
4842 (proceed): Handle possible pending follow fork events here.
4843 (init_wait_for_inferior): No need to clear pending_follow anymore,
4844 it's gone.
4845 (handle_inferior_event): Adjust to per-thread `pending_follow'.
4846 Call `follow_fork' to handle following the fork. If the
4847 follow-fork is cancelled, stop stepping.
4848 * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
4849 `pending_follow' events. Remove code that handled preserving the
4850 thread stepping state.
4851 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
4852 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
4853
ea26755d 48542009-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
70992597
PM
4855
4856 * symfile.c (add_shared_symbol_files_command): Remove
4857 prototype and function.
4858 (_initialize _symfile): Move "add-shared-symbol-files"
4859 command and "assf" alias.
4860 * windows-nat.c (_initialize_windows_nat): to here.
4861 Change "add-shared-symbol-files" to alias.
4862
4863 * config/i386/cygwin.mh: Remove NAT_FILE.
4864 * config/i386/mingw.mh: Remove NAT_FILE.
4865 * config/i386/mingw64.mh: Remove NAT_FILE.
4866 * config/i386/nm-cygwin.h: Remove file.
4867 * config/i386/nm-cygwin64.h: Remove file.
4868
5e31abdf
HZ
48692009-05-24 Hui Zhu <teawater@gmail.com>
4870
4871 * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
4872 I386_LINUX_RECORD_IOCTL_*,
4873 I386_LINUX_RECORD_FCNTL_*) Removed.
4874 (i386_linux_init_abi): Change size of record from macros to
4875 numbers.
4876
48772009-05-24 Hui Zhu <teawater@gmail.com>
4878
4879 * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
4880 * linux-record.c (record_linux_system_call): Ditto.
4881 * linux-record.h (linux_record_tdep): Ditto.
4882
1b36a34b
JK
48832009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4884
4885 Replace the savestring calls by xstrdup calls where possible.
4886 * breakpoint.c (condition_command, set_raw_breakpoint)
4887 (create_catchpoint, update_breakpoint_locations): Replace the
4888 savestring calls by xstrdup calls where possible.
4889 * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
4890 (record_producer): Likewise.
4891 * coffread.c (coff_start_symtab, complete_symtab): Likewise.
4892 * corefile.c (set_gnutarget): Likewise.
4893 * dbxread.c (add_new_header_file): Likewise.
4894 * demangle.c (set_demangling_command, set_demangling_style): Likewise.
4895 * event-top.c (push_prompt, pop_prompt, command_line_handler)
4896 (set_async_prompt): Likewise.
4897 * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
4898 Likewise.
4899 * language.c (set_language_command, _initialize_language): Likewise.
4900 * linespec.c (decode_line_2): Likewise.
4901 * rs6000-nat.c (add_vmap): Likewise.
4902 * top.c (set_prompt, init_history, init_main): Likewise.
4903 * tracepoint.c (stringify_collection_list): Likewise.
4904 * varobj.c (varobj_create): Remove variable expr_len. Replace the
4905 savestring calls by xstrdup calls where possible.
4906 (value_of_root, c_name_of_variable, c_describe_child): Replace the
4907 savestring calls by xstrdup calls where possible.
4908 * xcoffread.c (complete_symtab): Likewise.
4909 * cli/cli-script.c (build_command_line, define_command): Likewise.
4910 * cli/cli-setshow.c (do_setshow_command): Likewise.
4911
61d8f275
JK
49122009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4913
4914 Remove already unreachable code.
4915 * varobj.c (varobj_get_handle): Fix comment when error is called.
4916 All callers updated.
4917
969107c5
EZ
49182009-05-23 Eli Zaretskii <eliz@gnu.org>
4919
70926f63
EZ
4920 * README (`configure' options): Document GDB-specific options to
4921 `configure'.
4922
8c7a1ee8
EZ
4923 * symtab.c (skip_prologue_using_lineinfo): New function.
4924 (find_function_start_sal): Use it to get to the first line of
4925 function's body that has an entry in the lineinfo table.
4926
969107c5
EZ
4927 * symmisc.c (dump_symtab): Switch the current language to
4928 the language of the symtab we are dumping only if the symtab's
4929 language is neither language_auto nor language_unknown.
4930
4931 * coffread.c (coff_symtab_read): Set language_minimal as the
4932 language for the "_globals_" pseudo-file.
754dd031
EZ
4933 (process_coff_symbol): Set the symbol's language to the language
4934 of current_subfile.
969107c5 4935
0542c86d
PA
49362009-05-22 Pedro Alves <pedro@codesourcery.com>
4937
4938 * target.h (struct section_table): Rename to ...
4939 (struct target_section): ... this.
4940 * exec.c: Adjust all references.
4941 * exec.h: Adjust all references.
4942 * nto-tdep.c: Adjust all references.
4943 * nto-tdep.h: Adjust all references.
4944 * ppc-linux-tdep.c: Adjust all references.
4945 * rs6000-nat.c: Adjust all references.
4946 * s390-tdep.c: Adjust all references.
4947 * solib-darwin.c: Adjust all references.
4948 * solib-frv.c: Adjust all references.
4949 * solib-irix.c: Adjust all references.
4950 * solib-null.c: Adjust all references.
4951 * solib-osf.c: Adjust all references.
4952 * solib-pa64.c: Adjust all references.
4953 * solib-som.c: Adjust all references.
4954 * solib-sunos.c: Adjust all references.
4955 * solib-svr4.c: Adjust all references.
4956 * solib-target.c: Adjust all references.
4957 * solib.c: Adjust all references.
4958 * solist.h: Adjust all references.
4959 * symfile.c: Adjust all references.
4960 * symfile.h: Adjust all references.
4961 * target.c: Adjust all references.
4962
b34fab9a
HZ
49632009-05-22 Hui Zhu <teawater@gmail.com>
4964
4965 Add sys_fcntl argument interfaces to linux_record_tdep.
4966
4967 * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
4968 fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
4969 interfaces.
4970 * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
4971 I386_LINUX_RECORD_FCNTL_F_GETLK64,
4972 I386_LINUX_RECORD_FCNTL_F_SETLK64,
4973 I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
4974 of I386 Linux sys_fcntl arguments.
4975 (i386_linux_init_abi): Set macros values to linux_record_tdep.
4976 * linux-record.c (record_linux_system_call): Change to use
4977 the interface in linux_record_tdep in sys_fcntl and
4978 sys_fcntl64.
4979
4980 * linux-record.c (record_linux_system_call): Fix the process
4981 record build error about type in CYGWIN.
4982
88c0ab9d
PA
49832009-05-22 Pedro Alves <pedro@codesourcery.com>
4984
4985 * inflow.c (kill_command): Delete left over static declaration.
4986
348f8c02
PA
49872009-05-22 Pedro Alves <pedro@codesourcery.com>
4988
4989 * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
4990 Include exec.h.
4991 (struct section_closure): Delete.
4992 (add_to_section_table): Delete.
4993 (build_target_sections_from_bfd): Delete.
4994 (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
4995 (target_bfd_reopen): Use build_section_table.
4996 * exec.c (xfer_memory): Move most code except for overlay
4997 debugging support from here...
4998 (section_table_xfer_memory): ... to this new function.
4999 (section_table_xfer_memory_partial): New.
5000 * exec.h (section_table_xfer_memory_partial): Declare.
5001 * bfd-target.h (build_target_sections_from_bfd): Delete
5002 declaration.
5003
41575630
PA
50042009-05-22 Pedro Alves <pedro@codesourcery.com>
5005
5006 * remote.c (compare_sections_command): Don't declare exec_bfd.
5007 * tracepoint.c: Include "gdbcore.h".
5008 (remote_set_transparent_ranges): Don't declare exec_bfd.
5009
783425fc
PA
50102009-05-21 Pedro Alves <pedro@codesourcery.com>
5011
5012 * aix-thread.c (init_aix_thread_ops): Whitespace.
5013
61439e34
PA
50142009-05-21 Pedro Alves <pedro@codesourcery.com>
5015
5016 * dec-thread.c (dec_thread_wait): Add options parameter. Use it
5017 to call the to_wait method in the target beneath.
5018 * remote-m32r-sdi.c (m32r_wait): Add options parameter.
5019
8914d83b
JB
50202009-05-21 Joel Brobecker <brobecker@adacore.com>
5021
5022 * aix-thread.c (aix_thread_wait): Add options parameter. Use it
5023 to call the to_wait method in the target_beneath.
5024
d9d2d8b6
PA
50252009-05-21 Pedro Alves <pedro@codesourcery.com>
5026
5027 * linux-nat.c (linux_nat_terminal_inferior)
5028 (linux_nat_terminal_ours): Don't check sync_execution.
5029 * remote.c (remote_terminal_inferior, remote_terminal_ours):
5030 Don't check sync_execution. Update comments.
5031 * target.c (target_terminal_inferior): New.
5032 * target.h (target_terminal_inferior): Delete macro, and declare
5033 as function.
5034 * event-top.c (async_disable_stdin): Make idempotent. Don't give
5035 the target the terminal here.
5036 * inflow.c (terminal_ours_1): Don't return early without setting
5037 `terminal_is_ours'.
5038
47608cb1
PA
50392009-05-21 Pedro Alves <pedro@codesourcery.com>
5040
5041 * target.h (TARGET_WNOHANG): New.
5042 * target.c (target_wait): Add `options' argument. Adjust.
5043 (struct target_ops) <to_wait>: Add `options' argument.
5044 (target_wait): Add `options' argument.
5045 * infrun.c (wait_for_inferior): Pass 0 as options to
5046 target_wait (blocking wait).
5047 (fetch_inferior_event): Pass TARGET_WNOHANG as options to
5048 target_wait.
5049 * fork-child.c (startup_inferior): Pass 0 as options to
5050 target_wait (blocking wait).
5051 * linux-nat.c (linux_nat_create_inferior): Remove async masking.
5052 (linux_nat_wait_1): Add `target_options' argument. Use it instead
5053 of checking on target_can_async_p.
5054 (linux_nat_wait): Add `target_options' argument. Adjust.
5055 * remote.c (remote_wait_ns): Add `options' argument. Adjust to
5056 check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
5057 (remote_wait_as): Add `options' argument. Adjust to check on
5058 TARGET_WNOWAIT instead of checking on remote_is_async_p. If doing
5059 a blocking wait, keep waiting until an interesting event comes
5060 out.
5061 (remote_wait): Add `options' argument. Don't loop here if the
5062 target is in async mode, and a blocking wait has been requested.
5063
5064 * top.c (deprecated_target_wait_hook): Add `options' argument.
5065 * linux-thread-db.c (thread_db_wait): Add `options' argument, and
5066 pass it down to the layer beneath.
5067 * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
5068 * record.c (record_beneath_to_wait): Add `options' argument.
5069 (record_wait): Add `options' argument, and pass it down to the
5070 layer beneath.
5071 * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
5072 * darwin-nat.c (darwin_wait): Likewise.
5073 * defs.h (deprecated_target_wait_hook): Likewise.
5074 * gnu-nat.c (gnu_wait): Add `options' argument.
5075 * go32-nat.c (go32_wait): Likewise.
5076 * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
5077 pass it down to the layer beneath.
5078 * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
5079 * monitor.c (monitor_wait): Likewise.
5080 * nto-procfs.c (procfs_wait): Likewise.
5081 * remote-mips.c (mips_wait): Add `options' argument.
5082 * remote-sim.c (gdbsim_wait): Likewise.
5083 * rs6000-nat.c (rs6000_wait): Add `options' argument.
5084 * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
5085 it down to the layer beneath.
5086 * spu-linux-nat.c (spu_child_wait): Add `options' argument.
5087 * windows-nat.c (windows_wait): Likewise.
5088 * tui/tui-hooks.c (tui_target_wait_hook): Likewise. Adjust.
5089
9944e9c2
PA
50902009-05-21 Pedro Alves <pedro@codesourcery.com>
5091
5092 * mi/mi-interp.c (mi_on_resume): Account for whole process
5093 resumes.
5094
c244a140
JK
50952009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5096
5097 * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
5098
76bee0cc
JK
50992009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5100
5101 * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
5102
4ac36638
JK
51032009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
5104
5105 Fix parsing DW_AT_const_value using DW_FORM_string.
5106 * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
5107
77f0be4e
JB
51082009-05-20 Joel Brobecker <brobecker@adacore.com>
5109
5110 * aix-thread.c (giter_count): Do not count the main thread.
5111 (giter_accum): Do not include the main thread.
5112
fbdebf46
JK
51132009-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5114
5115 Remove the PROT parameter from openp.
5116 * source.c (openp): Remove the parameter PROT. Assertion check MODE.
5117 defs.h (openp): Update the prototype.
5118 Update all the openp callers.
5119
5fd62852
PA
51202009-05-19 Pedro Alves <pedro@codesourcery.com>
5121
5122 * inflow.c (kill_command): Moved to infcmd.c.
5123 (_initialize_inflow): Don't add the "kill" command or clear
5124 inferior_ptid here.
5125 * infcmd.c (kill_command): Moved here from inflow.c.
5126 (_initialize_infcmd): Add the "kill" command here.
5127
191c4426
PA
51282009-05-19 Pedro Alves <pedro@codesourcery.com>
5129
5130 * fork-child.c: Don't include frame.h. Include terminal.h.
5131 (fork_inferior): Call new_tty_postfork after forking adn adding
5132 the child to the inferior list.
5133 * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
5134 here.
5135 * inflow.c (struct terminal_info): Remove const qualifier from
5136 `run_terminal' field.
5137 (inferior_thisrun_terminal): Tweak comment.
5138 (inflow_inferior_exit): Release the `run_terminal' field.
5139 (copy_terminal_info): New function.
5140 (new_tty_postfork): New function.
5141 * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
5142 (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
5143 * inf-ptrace.c: Include terminal.h.
5144 (inf_ptrace_follow_fork): Copy the parent's terminal info to the
5145 child.
5146 * linux-nat.c: Include terminal.h.
5147 (linux_child_follow_fork): Copy the parent's terminal info to the
5148 child.
5149 * inf-ttrace.c: Include terminal.h.
5150 (inf_ttrace_follow_fork): Copy the parent's terminal info to the
5151 child.
5152
2ea7b647
PA
51532009-05-19 Pedro Alves <pedro@codesourcery.com>
5154
5155 * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
5156 (update_global_location_list): Use gdbarch_has_global_breakpoints
5157 instead of gdbarch_has_global_solist and
5158 target_supports_multi_process.
5159 * dicos-tdep.c (dicos_init_abi): Set
5160 gdbarch_has_global_breakpoints.
5161 * gdbarch.sh (has_global_solist): Update comment.
5162 (has_global_breakpoints): New.
5163 * remote.c (remote_start_remote): Use
5164 gdbarch_has_global_breakpoints instead of
5165 gdbarch_has_global_solist.
5166 * target.c (target_detach): Use gdbarch_has_global_breakpoints
5167 instead of gdbarch_has_global_solist.
5168 * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
5169 of target_supports_multi_process.
5170
6342b74a
PP
51712009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
5172
5173 * objc-lang.c (find_methods): Plug a small memory leak.
5174
1a816a87
PA
51752009-05-18 Pedro Alves <pedro@codesourcery.com>
5176
5177 * solib-svr4.c: Include observer.h.
5178 (debug_base, debug_loader_offset_p, debug_loader_offset)
5179 (debug_loader_name, main_lm_addr): Move these globals...
5180 (struct svr4_info): ... into this new structure.
5181 (svr4_info_p): New typedef.
5182 (svr4_info): New global.
5183 (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
5184 functions.
5185 (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
5186 (solib_svr4_r_ldsomap): Add svr4_info argument. Adjust to
5187 per-inferior svr4.
5188 (open_symbol_file_object): Adjust to per-inferior svr4.
5189 (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
5190 Ditto.
5191 (enable_break): Add svr4_info argument. Adjust to per-inferior
5192 svr4.
5193 (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
5194 Adjust to per-inferior svr4.
5195 (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
5196 observer.
5197
4d062f1a
PA
51982009-05-18 Pedro Alves <pedro@codesourcery.com>
5199
5200 * linux-nat.h (linux_proc_get_tgid): Declare.
5201 * linux-nat.c (linux_proc_get_tgid): New.
5202 * linux-thread-db.c (struct thread_db_info): New field
5203 `need_stale_parent_threads_check'.
5204 (add_thread_db_info): Set it.
5205 (find_new_threads_callback): Ignore stale fork parent threads.
5206 (thread_db_resume): New.
5207 (init_thread_db_ops): Install thread_db_resume.
5208
d90e17a7
PA
52092009-05-18 Pedro Alves <pedro@codesourcery.com>
5210
5211 * fork-child.c (fork_inferior): Only reset the thread list if this
5212 is the first inferior.
5213 (startup_inferior): If the target support multi-process, tell it
5214 to resume only the new process.
5215 * linux-nat.c (num_lwps): Delete global.
5216 (purge_lwp_list): New function.
5217 (num_lwps): New function.
5218 (add_lwp, delete_lwp): Adjust.
5219 (ptid_match): New.
5220 (iterate_over_lwps): Add filter argument. Handle it.
5221 (linux_nat_attach): Remove FIXME note.
5222 (linux_nat_detach): Adjust to iterate over threads of the inferior
5223 we're detaching from. Adjust to num_lwps being a function. Don't
5224 assume the head of the lwp list is the main thread of the process
5225 we're detaching from. Don't destroy the LWP list.
5226 (resume_callback): Add debug output.
5227 (linux_nat_resume): Handle resuming a single inferior. Allow a
5228 wildcard resume in non-stop mode.
5229 (linux_handle_extended_wait): Don't assume inferior_ptid is the
5230 correct inferior of the parent LWP.
5231 (status_callback): Also check lp->waitstatus.
5232 (select_event_lwp): Add new filter parameter. Handle it.
5233 (linux_nat_filter_event): Adjust to num_lwps being a function.
5234 (linux_nat_wait_1): When adding the first lwp of the inferior, use
5235 an is_lwp check instead of checking for the number of lwps.
5236 (linux_nat_wait_1): Handle waiting for a specific tgid. Handle
5237 pending process exit statuses.
5238 (linux_nat_mourn_inferior): Don't destroy all the LWP info.
5239 Instead delete LWPs of the inferior that we're mourning. Don't
5240 unregister from the event loop here.
5241 (linux_nat_pid_to_str): Use `num_lwps'.
5242 (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
5243 single inferior.
5244 (linux_nat_is_async_p): Check if async was masked out.
5245 (linux_multi_process): New global.
5246 (linux_nat_supports_multi_process): New.
5247 (linux_nat_stop_lwp): Remove LWP filtering. It is done by the
5248 caller.
5249 (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
5250 LWP filtering.
5251 (linux_nat_close): New.
5252 (linux_nat_add_target): Register linux_nat_close and
5253 linux_nat_supports_multi_process.
5254 * linux-nat.h (iterate_over_lwps): Add filter argument.
5255 * linux-thread-db.c (thread_db_handle): Delete.
5256 (proc_handle, thread_agent, td_init_p, td_ta_new_p)
5257 (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
5258 (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
5259 (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
5260 (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
5261 longer globals, moved to...
5262 (struct thread_db_info): ... this new structure.
5263 (thread_db_list): New.
5264 (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
5265 New.
5266 (have_threads_callback): Filter out threads of all inferiors but
5267 the one specified by the ARGS argument.
5268 (have_threads): Add ptid argument specifying the inferior we're
5269 interested in. Handle it.
5270 (struct thread_get_info_inout): New.
5271 (thread_get_info_callback, thread_from_lwp): Adjust to use it.
5272 (thread_db_attach_lwp): Check that inferior of the passed in
5273 thread is using thread-db. Adjust.
5274 (enable_thread_event): Remove thread_agent parameter. Instead,
5275 get it from the per-inferior thread-db info.
5276 (dladdr_to_soname): Move higher up.
5277 (enable_thread_event_reporting): Adjust to use per-inferior
5278 thread-db info.
5279 (try_thread_db_load_1): Replace `handle' parameter by a
5280 thread_db_info parameter. Adjust to use per-inferior thread-db
5281 info.
5282 (try_thread_db_load): Adjust to use per-inferior thread-db info.
5283 (thread_db_load, disable_thread_event_reporting): Ditto.
5284 (check_for_thread_db): Remove conditional reporting of which
5285 libthread_db is in use.
5286 (thread_db_new_objfile): Add comment about inferior_ptid.
5287 (attach_thread): Adjust to use per-inferior thread-db info.
5288 (thread_db_detach): Adjust to use per-inferior thread-db info.
5289 Remove thread event breakpoints of the current inferior. Only
5290 unpush the thread-db target if there are no more processes using
5291 it.
5292 (check_event): Adjust to use per-inferior thread-db info.
5293 (thread_db_wait): Adjust to use per-inferior thread-db info. Only
5294 unpush the thread-db target if there are no more processes using
5295 it.
5296 (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
5297 info. Mark breakpoints of the current inferior out before
5298 deleting them. Only unpush the thread-db target if there are no
5299 more processes using it.
5300 (find_new_threads_callback): Adjust to use per-inferior thread_db
5301 info.
5302 (thread_db_find_new_threads_1): Add new ptid argument. Adjust to
5303 use per-inferior thread-db info.
5304 (thread_db_find_new_threads): Adjust to use per-inferior thread-db
5305 info.
5306 (thread_db_get_thread_local_address): Adjust.
5307 (thread_db_get_ada_task_ptid): Adjust.
5308 * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
5309 if there no more processes left to debug.
5310 * thread.c (set_running, set_executing): Handle resuming all
5311 threads of a single inferior.
5312 * mi/mi-interp.c (mi_output_running_pid): New.
5313 (mi_inferior_count): New.
5314 (mi_on_resume): For backwards compatibility, if resuming all
5315 threads of an inferior, and there is only one inferior, output
5316 "all".
5317
dddfab26
UW
53182009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5319
5320 * ada-lang.c (ada_find_any_type): Move check for primitive types ...
5321 (to_fixed_range_type): ... to here.
5322
556bdfd4
UW
53232009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5324
5325 * ada-lang.c (desc_data_type): Remove, replace by ...
5326 (desc_data_target_type): ... this.
5327 (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
5328 (ada_is_array_descriptor_type): Likewise.
5329 (ada_type_of_array): Likewise.
5330 (ada_coerce_to_simple_array_type): Likewise.
5331 (ada_array_element_type): Likewise.
5332
aaa88a99
UW
53332009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5334
5335 * ada-valprint.c (ada_val_print_1): Use val_print_string to print
5336 result of ada_vax_float_print_function inferior call.
5337
17280b9f
UW
53382009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5339
5340 * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
5341 avoid creating a dummy value.
5342
830bb937
UW
53432009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5344
5345 * p-valprint.c (pascal_val_print): Use extract_typed_address
5346 to extract reference value.
5347
e035e373
UW
53482009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5349
5350 * doublest.c (NAN): Remove unused define.
5351 (extract_floating_by_length, deprecated_extract_floating): Remove.
5352 (store_floating_by_length, deprecated_store_floating): Remove.
5353 (extract_typed_floating): Do not call extract_floating_by_length.
5354 (store_typed_floating): Do not call store_floating_by_length.
5355 (convert_typed_floating): Remove redundant assertions.
5356 * doublest.h (deprecated_extract_floating): Remove.
5357 (deprecated_store_floating): Remove.
5358 * sh64-tdep.c (sh64_register_convert_to_raw): Call
5359 extract_typed_floating instead of deprecated_extract_floating.
5360
c28c63d8
JB
53612009-05-18 Jon Beniston <jon@beniston.com>
5362
5363 * MAINTAINERS: Add lm32 target.
5364 * Makefile.in: Add lm32 dependencies.
5365 * NEWS: Indicate lm32 is a new target.
5366 * configure.tgt: Add lm32 targets.
5367 * lm32-tdep.c: New file.
5368
739fc47a
PA
53692009-05-18 Pedro Alves <pedro@codesourcery.com>
5370
5371 * corelow.c (core_open): Flush the register cache before doing
5372 anything with registers.
5373
7e1789f5
PA
53742009-05-18 Pedro Alves <pedro@codesourcery.com>
5375
5376 * inflow.h (our_process_group): Remove declaration.
5377 (inferior_process_group): Delete global variable declaration.
5378 (inferior_process_group): New function declaration.
5379 * inflow.c: Include observer.h.
5380 (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
5381 Delete.
5382 (struct terminal_info): New struct.
5383 (our_terminal_info): New global.
5384 (inferior_process_group): New function.
5385 (inferior_thisrun_terminal): Extend description comment.
5386 (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
5387 instead of globals.
5388 (terminal_init_inferior_with_pgrp): Adjust to per-inferior
5389 terminal settings.
5390 (terminal_inferior): Ditto.
5391 (terminal_ours_1): Ditto.
5392 (inflow_new_inferior, inflow_inferior_exit): New functions.
5393 (child_terminal_info): Adjust to per-inferior terminal settings.
5394 (osig_set): New global.
5395 (set_sigint_trap): Adjust to per-inferior terminal settings. Set
5396 or clear `osig_set' accordingly.
5397 (clear_sigint_trap): Check `osig_set' to decide wheater to restore
5398 SIGINT handler, instead of checking the current inferior (which
5399 may be none).
5400 (_initialize_inflow): Attach inflow_new_inferior and
5401 inflow_inferior_exit to the "new_inferior" and "inferior_exit"
5402 notifications, respectively.
5403 * inferior.h (struct terminal_info): Forward declare.
5404 (struct inferior): Add `terminal_info' field.
5405 * inferior.c (delete_inferior_1): Notify the inferior_exit
5406 observers before removing the inferior from the lists and deleting
5407 it.
5408 * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
5409 a function instead of a variable. Adjust.
5410 * procfs.c (procfs_stop): Ditto.
5411
b242c3c2
PA
54122009-05-17 Pedro Alves <pedro@codesourcery.com>
5413
5414 * infrun.c (handle_inferior_event): When handling a
5415 TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
5416 immediatelly.
60a7d074 5417 * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
b242c3c2
PA
5418 from the child if vforking.
5419 * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
5420 breakpoints from the child here.
5421
71b43ef8
PA
54222009-05-17 Pedro Alves <pedro@codesourcery.com>
5423
5424 * infrun.c (pending_follow): Remove execd_pathname member.
5425 (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
5426 (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
5427 event, don't copy `execd_pathname' to pending_follow, use the
5428 event copy instead. Release `execd_pathname' once done with
5429 handling the event.
5430
235f2b04
PA
5431 * infrun.c (pending_follow): Remove mention of exec events.
5432
a6b808b4
HZ
54332009-05-17 Hui Zhu <teawater@gmail.com>
5434
5435 * i386-tdep.c (i386_process_record): Make it extern.
5436 (i386_gdbarch_init): Don't call set_gdbarch_process_record
5437 here.
d5f3b873 5438 * i386-tdep.h (i386_process_record): Declare.
a6b808b4
HZ
5439 * i386-linux-tdep.c (i386_linux_init_abi): Call
5440 set_gdbarch_process_record.
5441
ee342b23
VP
54422009-05-17 Vladimir Prus <vladimir@codesourcery.com>
5443
5444 Always report varobj as changed when in_scope attribute changes.
5445
5446 * varobj.c (install_new_value): If non-NULL-ness of value
5447 changed, return 1.
5448
17a37d48
PP
54492009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
5450
5451 * NEWS: Mention set/show libthread-db-search-path.
5452 * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
5453 (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
5454 * linux-thread-db.c (libthread_db_search_path): New setting.
5455 (thread_db_handle): New variable (replaces using_thread_db).
5456 (try_thread_db_load_1): New function.
5457 (try_thread_db_load, thread_db_load_search): Likewise.
5458 (dladdr_to_soname): Likewise.
5459 (thread_db_load): Iterate over possibly multiple libthread_db's.
5460 (check_for_thread_db): Attempt to load new libthread_db.
5461 (thread_db_detach, thread_db_wait): Unload libthread_db.
5462 (thread_db_mourn_inferior): Likewise.
5463 (_initialize_thread_db): Add new libthread-db-search-path option.
5464 Defer loading of libthread_db to check_for_thread_db.
5465 * solib.c (libpthread_name_p): New function.
5466 (libpthread_solib_p): Call it.
5467 * solib.h (libpthread_name_p): New prototype.
5468
0643c12e
PM
54692009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
5470
5471 * MAINTAINERS: Update my email address.
5472
e62c965a
PP
54732009-05-14 Paul Pluzhnikov <ppluzhnikov@google.com>
5474
5475 * breakpoint.h: Add breakpoint_re_set_objfile prototype.
5476 * breakpoint.c (create_overlay_event_breakpoint): Renamed
5477 from create_overlay_event_breakpoint_1, old
5478 create_overlay_event_breakpoint deleted.
5479 (breakpoint_re_set_objfile): Don't rescan all objfiles
5480 unnecessarily.
5481 (breakpoint_re_set): New function.
5482 * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
5483 instead of breakpoint_re_set.
5484 * objfiles.c (objfile_relocate): Likewise.
5485
9e2ace22
JB
54862009-05-14 Joel Brobecker <brobecker@adacore.com>
5487
5488 * gdbarch.sh: Add comment documenting the target_gdbarch global.
5489 gdbarch.h does NOT need to be regenerated as the corresponding
5490 change has already been made in a previous commit.
5491
39a90fca 54922009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
9bb9e8ad
PM
5493
5494 Remove all i386 debug register low level macros in config nm files.
5495 (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
5496 (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
5497 (I386_USE_GENERIC_WATCHPOIINTS): Remove.
5498
5499 * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
5500 (struct i386_dr_low_type): New type.
5501 (i386_dr_low): New global variable.
5502 * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
5503 (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
5504 i386_dr_low struct variable fields.
5505 (i386_remove_aligned_watchpoint): Likewise.
5506 (i386_stopped_data_address): Likewise.
5507 (i386_stopped_by_hwbp): Likewise.
5508 (show_debug_regs_command_added): New static variable.
5509 (add_show_debug_regs_command): New static function.
5510 (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
5511 (i386_set_debug_register_length): New function.
5512 (_initialize_i386_nat): Delete.
5513
5514 * amd64-linux-nat.c: Include "i386-nat.h".
5515 (amd64_linux_dr_set_control): Change to static.
5516 (amd64_linux_dr_get_status): Change to static.
5517 (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
5518 (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
5519
5520 * go32-nat.c: Include "i386-nat.h".
5521 (go32_set_addr): Change to static.
5522 (go32_set_dr7): Change to static. Change arg type to unisgned long.
5523 (go32_get_dr6): Change to static. Change return type to unisnged long.
5524 (init_go32_ops): Set i386_dr_low variable fields.
5525 * i386-linux-nat.c: Include "i386-nat.h".
5526 (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
5527 (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
5528 (_initialize_i386_linux_nat): Set i386_dr_low variable fields.
5529 * i386bsd-nat.h: Declare functions used for
5530 i386_dr_low fields in i386fbsd-nat.c.
5531 * i386fbsd-nat.c: Include "i386-nat.h".
5532 (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
5533 * windows-nat.c: Include "i386-nat.h".
5534 (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
5535 Change to static.
5536 (cygwin_get_dr6): Change return type to unisnged long.
5537 (cygwin_set_dr7): Change arg type to unisgned long.
5538 (init_windows_ops): Set i386_dr_low function fields.
5539
5540 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
5541 i386_set_debug_register_length.
5542 * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
5543
5544 * config/i386/nm-cygwin.h: Remove all I386_* macros.
5545 * config/i386/nm-cygwin64.h: Likewise.
5546 * config/i386/nm-fbsd.h: Likewise.
5547 * config/i386/nm-linux.h: Likewise.
5548 * config/i386/nm-i386.h: Remove completely.
5549 * config/i386/nm-go32.h: Remove completely.
5550 * config/i386/nm-linux64.h: Remove completely.
5551 * config/i386/go32.mh (NAT_FILE): Remove entry.
5552 * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
5553
7a893eb8
JB
55542009-05-14 Jon Beniston <jon@beniston.com>
5555
5556 * MAINTAINERS: Add Jon Beniston to write after approval list.
5557
57a9e6af
PP
55582009-05-13 Paul Pluzhnikov <ppluzhnikov@google.com>
5559
5560 * objc-lang.c (objc_objfile_data): New variable.
5561 (find_methods): Skip objfiles without Obj-C methods.
5562 (_initialize_objc_lang): New function.
5563
3f7f5fe4
JB
55642009-05-13 Joel Brobecker <brobecker@adacore.com>
5565
5566 * c-lang.c (print_wchar): Remove unnecessary cast.
5567
25ad2853
JB
55682009-05-12 Jim Blandy <jimb@red-bean.com>
5569
5570 * MAINTAINERS: Remove self as m32c target maintainer.
5571
cbe54154
PA
55722009-05-12 Pedro Alves <pedro@codesourcery.com>
5573
5574 * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
5575 * command.h (deprecated_add_set_cmd): Delete declaration.
5576 * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
5577 'set debug gnu-nat' and 'show debug gnu-nat'.
5578 * i386-nat.c (_initialize_i386_nat): Replace 'maint
5579 show-debug-registers' with 'maint set show-debug-registers' and
5580 'maint show show-debug-registers'.
5581 * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
5582 show-debug-registers' with 'maint set show-debug-registers' and
5583 'maint show show-debug-registers'.
5584
2d90c72a
JB
55852009-05-12 Joel Brobecker <brobecker@adacore.com>
5586
5587 * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
5588 pushing it on the output obstack.
5589
00903456
JK
55902009-05-11 Joel Brobecker <brobecker@adacore.com>
5591
5592 Fix internal error on breaking at a multi-locations caller source line.
5593 * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
5594 command with no parameters.
5595
7feb7d06
PA
55962009-05-11 Pedro Alves <pedro@codesourcery.com>
5597
5598 * linux-nat.c (enum sigchld_state): Delete.
5599 (linux_nat_async_events_state): Delete.
5600 (struct waitpid_result): Delete.
5601 (waitpid_queue): Delete.
5602 (queued_waitpid_1): Delete.
5603 (async_file_flush): New.
5604 (queued_waitpid, push_waitpid): Delete.
5605 (async_file_mark): New.
5606 (drain_queued_events): Delete.
5607 (my_waitpid): Remove locally queued events handling.
5608 (linux_test_for_tracefork): Upjust.
5609 (linux_child_follow_fork): Ditto.
5610 (sync_sigchld_action): Delete.
5611 (blocked_mask): Reinstate.
5612 (async_sigchld_action): Rename to...
5613 (sigchld_action): ... this.
5614 (block_child_signals): New.
5615 (restore_child_signals_mask): New.
5616 (lin_lwp_attach_lwp): Adjust.
5617 (linux_nat_create_inferior): Ditto.
5618 (linux_nat_attach): Also use lp->status in async mode.
5619 (get_pending_status): Don't use queued_waitpid.
5620 (linux_nat_detach): Don't drain locally queued events.
5621 (linux_nat_resume): Allow pending wait statuses stored lp->status
5622 in async mode. If returning early due to a pending event,
5623 re-register the event source.
5624 (stop_wait_callback): Allow pending wait statuses stored
5625 lp->status in async mode.
5626 (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
5627 (linux_nat_wait): Rename to ...
5628 (linux_nat_wait_1): ... this. Allow pending wait statuses stored
5629 lp->status in async mode. Always add WNOHANG to the waitpid
5630 options in async mode.
5631 (linux_nat_wait): New.
5632 (kill_callback): Don't drain locally queued events.
5633 (sigchld_handler): Rewrite.
5634 (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
5635 refer to "set target-async".
5636 (linux_nat_async_mask): If in non-stop, and re-enabling async
5637 mode, re-register the target event source in the event loop.
5638 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
5639 (get_pending_events, async_sigchld_handler)
5640 (linux_nat_async_events): Delete.
5641 (handle_target_event): New.
5642 (linux_nat_async_file_handler): Delete.
5643 (linux_async_pipe): New.
5644 (linux_nat_async): Only re-register in the event loop if not
5645 registered yet. Always notify the event-loop once if enabling the
5646 event source.
5647 (linux_nat_stop_lwp): Rewrite to handle pending events stored in
5648 lp->status, not in the locally queued event list.
5649 (linux_nat_stop): Don't mask out async event handling.
5650 (linux_nat_setup_async): Delete.
5651 (_initialize_linux_nat): Adjust.
5652 (lin_thread_get_thread_signals): blocked_mask is global again.
5653 Adjust.
5654
39a90fca 56552009-05-11 Pierre Muller <muller@ics.u-strasbg.fr>
d92524f1
PM
5656
5657 Unify target macros.
5658
5659 * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
5660 (target_stoppped_by_watchpoint): New macro.
5661 (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
5662 (target_have_steppable_watchpoint): New macro.
5663 (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
5664 (target_have_continuable_watchpoint): New macro.
5665 (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
5666 (target_can_use_hardware_watchpoint): New macro.
5667 (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
5668 (target_region_ok_for_hw_watchpoint): New macro.
5669
5670 * breakpoint.c (update_watchpoint): Use new macros.
5671 (bpstat_alloc): Likewise.
5672 (create_breakpoint): Likewise.
5673 (watch_command_1): Likewise.
5674 (can_use_hardware_watchpoint): Likewise.
5675 (do_enable_breakpoint): Likewise.
5676 * infrun.c (handle_inferior_event): Adapt to new macros.
5677 * mips-tdep.c (mips_gdbarch_init): Update comments.
5678 * procfs.c (procfs_set_watchpoint): Update comment.
5679 (procfs_insert_watchpoint): Adapt to new macros.
5680 * remote-m32r-sdi.c (m32r_stop):
5681 * remote-mips.c (mips_remove_breakpoint):
5682 * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
5683 (debug_to_stopped_by_watchpoint): Likewise.
5684
5685
39a90fca 56862009-05-10 Pierre Muller <muller@ics.u-strasbg.fr>
fe524716
PM
5687
5688 * src/gdb/target.h: Remove all tests for already defined
5689 macros. All macros defined here should not be set in config
5690 headers anymore.
5691
1dfe79e8
SDJ
56922009-05-08 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5693
5694 * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
5695 (have_ptrace_getsetfpregs): Likewise.
5696 fetch_all_gp_regs): New function.
5697 (fetch_gp_regs): New function.
5698 (fetch_all_fp_regs): Likewise.
5699 (fetch_fp_regs): New function.
5700 (fetch_ppc_registers): Using the new methods to fetch general-
5701 purpose and floating-pointer registers.
5702 (store_all_gp_regs): New function.
5703 (store_gp_regs): Likewise.
5704 (store_all_fp_regs): New function.
5705 (store_fp_regs): Likewise.
5706 (store_ppc_registers): Using the new methods to store general-
5707 purpose and floating-pointer registers.
5708
2cda8d2f
DE
57092009-05-08 Doug Evans <dje@google.com>
5710
5711 * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
5712
b0afac70
SDJ
57132009-05-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5714
5715 * MAINTAINERS (Write After Approval): Add self.
5716
6b614274
JB
57172009-05-07 Joel Brobecker <brobecker@adacore.com>
5718
5719 * gdbarch.h (target_gdbarch): Add comment documenting this global.
5720
57212009-05-06 Joel Brobecker <brobecker@adacore.com>
4edb1e84
JB
5722
5723 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
5724 system iconv.
5725 * configure: Regenerate.
5726
6b614274 57272009-05-06 Joel Brobecker <brobecker@adacore.com>
8626589c
JB
5728
5729 * utils.c: Add include of gdb_usleep.h.
5730 (defaulted_query): Detect false EOF conditions that happen
5731 on terminals opened with the O_NONBLOCK flag when there is
5732 nothing to read.
5733
a562dc8f
PA
57342009-05-06 Pedro Alves <pedro@codesourcery.com>
5735
5736 * inferior.c (add_inferior): Move observer_notify_new_inferior
5737 call to ...
5738 (add_inferior_silent): ... here.
5739
39a90fca 57402009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
25513619
PA
5741 Pedro Alves <pedro@codesourcery.com>
5742
5743 * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
5744 (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
5745 functions.
5746 (procfs_stopped_by_watchpoint): Made static, ptid argument
5747 removed.
5748 (_initialize_procfs): Register new watchpoint related target
5749 functions.
5750 * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
5751 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
5752 (HAVE_CONTINUABLE_WATCHPOINT): Delete.
5753 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5754 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5755 declarations.
5756 * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
5757 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
5758 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5759 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5760 declarations.
5761 * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
5762 (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
5763 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5764 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5765 declarations.
5766
51f4db83 57672009-05-06 Hui Zhu <teawater@gmail.com>
e7a8dbfb 5768
8408d274
HZ
5769 * i386-tdep.c (i386_process_record): Change bzero to memset.
5770
51f4db83 57712009-05-06 Hui Zhu <teawater@gmail.com>
8408d274
HZ
5772
5773 * NEWS: Add item for process record and replay.
e7a8dbfb 5774
f6402f18
MG
57752009-05-05 Maxim Grigoriev <maxim2405@gmail.com>
5776
5777 * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
5778
fb14de7b
UW
57792009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5780
5781 * inferior.h (read_pc, write_pc): Remove.
5782 * regcache.c (read_pc, write_pc): Remove.
5783
5784 * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
5785 of read_pc.
5786 (handle_inferior_event): Use regcache_read_pc instead of read_pc
5787 when determining value of stop_pc. Replace subsequent uses of
5788 read_pc by inspecting already-retrieved stop_pc value.
5789 (keep_going): Use regcache_read_pc instead of read_pc.
5790
5791 * breakpoint.c (watchpoint_check): Use current frame architecture
5792 and PC instead of current_gdbarch and read_pc ().
5793 * tracepoint.c (set_traceframe_context): Replace PC argument
5794 with FRAME argument.
5795 (trace_start_command, finish_tfind_command): Update calls.
5796 (finish_tfind_command): Compare frame IDs to identify transitions
5797 between frames.
5798 (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
5799 * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
5800 of gdbarch. Use regcache_read_pc and regcache_write_pc instead
5801 of read_pc and write_pc.
5802 (store_register): Make regcache argument non-const. Update call
5803 to exec_one_dummy_insn.
5804
5805 * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
5806 * infcmd.c (post_create_inferior): Likewise.
5807 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
5808 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
5809 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
5810 * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
5811 * linux-fork.c (fork_load_infrun_state): Likewise.
5812 * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
5813 * record.c (record_wait): Likewise.
5814 * procfs.c (procfs_wait): Likewise.
5815 * remote-mips.c (common_open, mips_wait): Likewise.
5816 * remote-m32r-sdi.c (m32r_resume): Likewise.
5817
5818 * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
5819 * monitor.c (monitor_create_inferior, monitor_load): Likewise.
5820 * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
5821 * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
5822 * remote-mips.c (mips_create_inferior, mips_load): Likewise.
5823
5824 * solib-darwin.c: Include "regcache.h".
5825 * solib-pa64.c: Include "regcache.h".
5826 * solib-svr4.c: Include "regcache.h.".
5827
5828 * symfile.c: Do not mention read_pc or write_pc in comments.
5829 * dink32-rom.c: Likewise.
5830 * m32r-rom.c: Likewise.
5831 * mips-tdep.c: Likewise.
5832
f698437e
UW
58332009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5834
5835 * fork-child.c (startup_inferior): Move setting stop_pc ...
5836 * infcmd.c (post_create_inferior): ... to here.
5837
64644d9b
MS
58382009-05-04 Michael Snyder <msnyder@vmware.com>
5839
5840 * NEWS: Add item for reverse debugging commands.
5841
67ce33d7
PA
58422009-05-04 Pedro Alves <pedro@codesourcery.com>
5843
5844 * go32-nat.c (go32_stop): Delete.
5845 (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
5846 (go32_create_inferior): Don't call go32_stop or
5847 go32_kill_inferior.
5848 (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
5849 here.
5850 (init_go32_ops): Don't register go32_stop.
5851
26a4ddaa
EZ
58522009-05-02 Eli Zaretskii <eliz@gnu.org>
5853
5854 * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
5855 sym_name.
5856
5857 * infcall.c (find_function_addr): Avoid compiler warnings for
5858 funaddr.
5859
a11a1416
JK
58602009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5861
5862 * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
5863 (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
5864
ee78f3e5
DE
58652009-05-01 Doug Evans <dje@google.com>
5866
5867 * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
5868 to thread_info.
5869
699275c9
EZ
58702009-05-01 Eli Zaretskii <eliz@gnu.org>
5871
299a410e
EZ
5872 * record.c (_initialize_record): Reformat and clarify doc strings
5873 for stop-at-limit and insn-number-max.
5874
699275c9
EZ
5875 * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
5876
323427d1
JK
58772009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5878
5879 Make specifiable the make_function_type type memory ownership.
5880 * gdbtypes.c (make_function_type): New parameter `objfile', use it
5881 explicitely instead of TYPE-initialized removed local variable
5882 `objfile'. Describe `objfile' it in the function comment.
5883 (lookup_function_type): Update make_function_type callers.
5884 * gdbtypes.h (make_function_type): Update the prototype.
5885 * jv-lang.c (java_link_class_type): Update make_function_type callers.
5886 * dwarf2read.c (read_subroutine_type): Likewise.
5887 * stabsread.c (read_type): Likewise.
5888
15430fc0
EZ
58892009-05-01 Eli Zaretskii <eliz@gnu.org>
5890
89c9c2ec
EZ
5891 * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
5892 printing a bogus "Thread <main>".
5893 (go32_thread_alive): Don't return 1 for null_ptid.
5894
15430fc0
EZ
5895 * i386-tdep.c (i386_go32_init_abi): Override the number of
5896 registers due to non-support of SSE.
5897
c7098c41
AG
58982009-04-30 Anthony Green <green@moxielogic.com>
5899
5900 * configure.tgt: Link the moxie simulator in with gdb.
5901
25c2f6ab
PP
59022009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
5903
5904 * elfread.c (elf_symtab_read): Don't assume .data and .rodata
5905 are present.
15430fc0 5906
77fcef51
HZ
59072009-04-30 Hui Zhu <teawater@gmail.com>
5908 Michael Snyder <msnyder@vmware.com>
5909
5910 I386 Linux process record and replay support.
5911
5912 * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
5913 This struct has the argument for the function
5914 "record_linux_system_call".
5915 (i386_linux_intx80_sysenter_record): New function. Parse the
5916 system call instruction and call function
5917 "record_linux_system_call" to record execute log.
5918 (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
5919 Set "i386_linux_intx80_sysenter_record" to
5920 "i386_intx80_record" and "i386_sysenter_record".
5921
7ad10968
HZ
59222009-04-30 Hui Zhu <teawater@gmail.com>
5923 Michael Snyder <msnyder@vmware.com>
5924
5925 I386 architecture process record and replay support.
5926
5927 * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
5928 PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
5929 instruction set.
5930 (aflag, dflag, override, modrm, mod, reg, rm, ot,
5931 i386_record_pc): New variables. Ditto.
5932 (i386_record_modrm, i386_record_lea_modrm_addr,
5933 i386_record_lea_modrm): New functions. Ditto.
5934 (i386_process_record): New function. Parse the instruction in
5935 address "addr" and record the values of registers and memory
5936 that will be changed by this instruction.
5937 (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
5938 "process_record" interface.
5939 * i386-tdep.h (gdbarch_tdep): New function pointers
5940 "i386_intx80_record" and "i386_sysenter_record" that point to
5941 the function that can record "intx80" and "sysenter" execute
5942 log.
5943
96429cc8
HZ
59442009-04-30 Hui Zhu <teawater@gmail.com>
5945 Michael Snyder <msnyder@vmware.com>
5946
5947 * infrun.c (use_displaced_stepping): Return false if process
5948 record and replay target is used.
5949 (proceed): Call function "record_not_record_set" if pocess
5950 record and replay target is used.
5951
b7f6bf22
HZ
59522009-04-30 Hui Zhu <teawater@gmail.com>
5953 Michael Snyder <msnyder@vmware.com>
5954
5955 Linux process record and replay support.
5956
5957 * Makefile.in (ALLDEPFILES): Add linux-record.c.
5958 (ALL_TARGET_OBS): Add linux-record.o.
5959 * configure.tgt (x86_64-*-linux*): Add linux-record.o.
5960 (i[34567]86-*-linux*): Add linux-record.o.
5961 * linux-record.c, linux-record.h: New file.
5962
69d05d38
HZ
59632009-04-30 Hui Zhu <teawater@gmail.com>
5964 Michael Snyder <msnyder@vmware.com>
5965
5966 Process record and replay target.
5967
5968 * Makefile.in (SFILES): Add record.c.
5969 (COMMON_OBS): Add record.o.
5970 * record.c, record.h: New file.
5971
81e64f55
HZ
59722009-04-30 Hui Zhu <teawater@gmail.com>
5973 Michael Snyder <msnyder@vmware.com>
5974
5975 * target.h (strata): New stratum "record_stratum".
5976
0407e712
HZ
59772009-04-30 Hui Zhu <teawater@gmail.com>
5978 Michael Snyder <msnyder@vmware.com>
5979
5980 GDBARCH interface for process record and replay.
5981
5982 * gdbarch.sh (process_record): This interface point to the
5983 function that records the inferior execute log.
5984
c5af0dad
DE
59852009-04-29 Doug Evans <dje@google.com>
5986
5987 * i386-nat.c (child_post_startup_inferior): Delete, unused.
5988
df2b6d2d
PA
59892009-04-29 Pedro Alves <pedro@codesourcery.com>
5990
5991 * breakpoint.c (print_exception_catchpoint): Access `b' directly
5992 instead of `b->loc->owner'.
5993 (print_mention_exception_catchpoint): Ditto.
5994
484086b7
JK
59952009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
5996
5997 * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
5998
379a77b5
TT
59992009-04-27 Tom Tromey <tromey@redhat.com>
6000
6001 * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
6002
aad80b26
JG
60032009-04-27 Jerome Guitton <guitton@adacore.com>
6004
6005 * symtab.c (append_exact_match_to_sals): New function, extracted
6006 from expand_line_sal.
6007 (expand_line_sal): Use append_exact_match_to_sals to append exact
6008 matches. If none found, append all best items.
6009
57a46001
JG
60102009-04-27 Jerome Guitton <guitton@adacore.com>
6011
6012 * main.c (captured_main): Move gdbinit lookups after gdb_init.
6013
d389af10
JK
60142009-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
6015
6016 PR gdb/9675:
6017 * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
6018 (read_func_scope): Call inherit_abstract_dies.
6019
90b9b517
EZ
60202009-04-25 Eli Zaretskii <eliz@gnu.org>
6021
6022 * Makefile.in (ALLDEPFILES): Remove duplicate entries for
6023 sparc-sol2-nat.c and sparc-sol2-tdep.c.
80a0ea0f
EZ
6024
6025 * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
6026
39a90fca 60272009-04-24 Pierre Muller <muller@ics.u-strasbg.fr>
5ac79d78
PM
6028
6029 ARI change: Use "/* ARI: rule */" pattern.
6030 * utils.c: Update ARI patterns.
6031 * gdb_dirent.h: Likewise.
6032
d7066cce
AG
60332009-04-23 Anthony Green <green@moxielogic.com>
6034
6035 * MAINTAINERS: Add moxie target.
6036 * configure.tgt: Add moxie-*-elf target.
6037 * moxie-tdep.c: New file.
6038 * moxie-tdep.h: New file.
6039
fc84d355 60402009-04-23 Joel Brobecker <brobecker@adacore.com>
72fcaa05
JB
6041
6042 * ada-lang.c: Remove an extra empty line. No code change.
6043
217dc9e2
JK
60442009-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
6045
6046 Fix double free on error inserting the breakpoint instruction.
6047 * breakpoint.c (create_breakpoints): Move the
6048 update_global_location_list call to ...
6049 (break_command_really): ... here together with the second local call
6050 both unified after all the cleanups.
6051
b14b1491
TT
60522009-04-23 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
6053 Tom Tromey <tromey@redhat.com>
6054
6055 * configure, config.in: Regenerate.
6056 * configure.ac: Support for relocatable GDB datadir. Use
6057 GDB_AC_WITH_DIR. Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
6058 * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
6059 * top.c (init_main): Add "set data-directory".
6060 * defs.h (gdb_datadir): Declare.
6061 * main.c (gdb_datadir): New global.
6062 (captured_main): Initialize gdb_datadir. Use relocate_directory.
6063 (relocate_path): New function.
6064 (relocate_directory): Likewise.
6065 (get_init_files): Use relocate_path.
6066 (README): Mention --with-gdb-datadir.
6067
5e7b5f74
JB
60682009-04-23 Joel Brobecker <brobecker@adacore.com>
6069
6070 * ada-tasks (task_command_1): Call target_find_new_threads.
6071
465f42bb
JB
60722009-04-23 Joel Brobecker <brobecker@adacore.com>
6073
6074 * stack.c (do_gdb_disassembly): Print the exception message if an
6075 error was thrown while trying to perform the disassembly.
6076
3038237c
JK
60772009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
6078
6079 * varobj.c (free_variable): Replace free_current_contents by xfree.
6080
17c12639
KH
60812009-04-22 Kazu Hirata <kazu@codesourcery.com>
6082
6083 * arm-linux-nat.c (fetch_register, store_register): Use
6084 ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
6085 * arm-linux-tdep.c (arm_linux_supply_gregset,
6086 arm_linux_collect_gregset): Likewise.
6087 * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
6088 * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
6089
a362e3d3
HZ
60902009-04-22 Hui Zhu <teawater@gmail.com>
6091
6092 * stack.c (_initialize_stack): Set the default of
6093 disassemble-next-line to off.
6094
d2596e2e
TT
60952009-04-21 Tom Tromey <tromey@redhat.com>
6096
6097 * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
6098 * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
6099
62e4f60c
AS
61002009-04-21 Andreas Schwab <schwab@linux-m68k.org>
6101
6102 * configure.ac: Add quotes to not lose brackets in help text.
6103 * configure: Rebuild.
6104
82cd387f 61052009-04-21 Andreas Schwab <schwab@linux-m68k.org>
cfd53605
AS
6106
6107 * configure.ac: Don't postprocess Makefile in config.status.
6108 Substitute GDB_NM_FILE. Don't substitute nm_h.
6109 * Makefile.in (GDB_NM_FILE): Substitute.
6110 (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
6111 * configure: Regenerate.
6112 * gnulib/Makefile.in: Regenerate.
6113
26e251b6
JM
61142009-04-21 Joseph Myers <joseph@codesourcery.com>
6115
6116 * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
6117 --with-htmldir): New.
6118 * configure: Regenerate.
6119
32c1c914
TT
61202009-04-21 Tom Tromey <tromey@redhat.com>
6121
6122 * configure: Rebuild.
6123 * configure.ac: Use lower case for start of help strings. Clean
6124 up --with-sysroot help.
6125
a1220294
TT
61262009-04-21 Tom Tromey <tromey@redhat.com>
6127
6128 * configure: Rebuild.
6129 * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
6130 * configure.ac: Use AC_HELP_STRING. Use upper case for variables
6131 in help.
6132
39a90fca 61332009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
dfc3cd0e
PM
6134
6135 ARI fix: remove "%p".
6136 * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
6137 (ia64_sigtramp_frame_this_id): Ditto.
6138 (ia64_libunwind_frame_this_id): Ditto.
6139 (ia64_libunwind_sigtramp_frame_this_id): Ditto.
6140 * symmisc.c (maintenance_info_psymtabs): Ditto.
6141
29b0e8a2
JM
61422009-04-21 Joseph Myers <joseph@codesourcery.com>
6143
6144 * configure.ac (--with-relocated-sources): New.
6145 * configure, config.in: Regenerate.
6146 * source.c (add_substitute_path_rule): Remove static.
6147 * source.h (add_substitute_path_rule): Declare.
6148 * main.c: Include "source.h".
6149 (captured_main): Add substitution rule if RELOC_SRCDIR.
6150
39a90fca 61512009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
ccabeb57
PM
6152
6153 * gnu-nat.h (proc_debug): Add missing continuation line in macro.
cfd53605 6154
b9412953
DD
61552009-04-20 David Daney <ddaney@caviumnetworks.com>
6156
6157 * NEWS: Mention MIPS/Linux hardware watchpoint support.
6158
61592009-04-20 David Daney <ddaney@caviumnetworks.com>
6160
6161 * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
6162 (maint_show_dr, super_close): New variables.
6163 (super_fetch_registers, super_store_registers): Make static.
6164 (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
6165 (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
6166 (pt_watch_style): Define new enum.
6167 (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
6168 Define new structs.
6169 (watch_readback_valid, watch_readback, current_watches, watch_mirror):
6170 New variables.
6171 (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
6172 (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
6173 (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
6174 (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
6175 (type_to_irw, fill_mask, try_one_watch)
6176 (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
6177 (mips_linux_new_thread, populate_regs_from_watches)
6178 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6179 (mips_linux_close): New functions.
6180 (_initialize_mips_linux_nat): Register watchpoint functions with
6181 the target_ops. Add show-debug-regs maintenance command.
6182
61832009-04-20 David Daney <ddaney@caviumnetworks.com>
6184
6185 * infrun.c (handle_inferior_event): Move gegisters_changed call down.
6186
6de3146c
PA
61872009-04-19 Pedro Alves <pedro@codesourcery.com>
6188
6189 * NEWS: Mention gdbserver support for x86 Windows CE.
6190
10085bb5
EZ
61912009-04-19 Eli Zaretskii <eliz@gnu.org>
6192
e424a02e
EZ
6193 * config/djgpp/fnchange.lst: Fix typos.
6194
10085bb5
EZ
6195 Set default host and target charsets in the DJGPP port.
6196
6197 * config/djgpp/config.sed (am_cv_langinfo_codeset)
6198 (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
6199 in all configure scripts that define ac_cv_env_CPP_value.
6200
6201 * go32-nat.c (dos_codepage, nl_langinfo): New functions.
6202 Include langinfo.h.
6203
6204 * config/djgpp/nl_types.h: New file.
6205
6206 * config/djgpp/langinfo.h: New file.
6207
6208 * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
6209
2b831889
JM
62102009-04-18 Carlos O'Donell <carlos@codesourcery.com>
6211
6212 * Makefile.in (MAKEHTML): Set to makeinfo --html.
6213 (MAKEHTMLFLAGS): Set to empty.
6214
d647eed6
EZ
62152009-04-18 Eli Zaretskii <eliz@gnu.org>
6216
d7713ae0
EZ
6217 * NEWS: Mention all new set/show commands added since GDB 6.8 was
6218 released.
6219
d647eed6
EZ
6220 * go32-nat.c (go32_sysinfo): Check if the call to
6221 __dpmi_get_capabilities fills the buffer with information, and
6222 don't use the buffer if not.
6223
58720494
TT
62242009-04-17 Tom Tromey <tromey@redhat.com>
6225
6226 * charset.c (_initialize_charset): Add special case for "646".
6227
89a34d1b
JM
62282009-04-17 Carlos O'Donell <carlos@codesourcery.com>
6229
6230 * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
6231 * configure: Regenerate.
6232 * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
6233 configure substitutions.
6234 (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
6235
39a90fca 62362009-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
a74ce742
PM
6237
6238 ARI fix: Do not use %p, replace by call to host_address_to_string
6239 for host pointers.
6240 * darwin-nat.c (darwin_xfer_partial): Apply change.
6241 * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
6242 * gnu-nat.h (proc_debug): Ditto.
6243 * symmisc.c (maintenance_info_symtabs): Ditto.
6244 (maintenance_info_psymtabs): Ditto.
6245 * windows-nat.c (handle_load_dll): Ditto.
6246 (handle_unload_dll, info_w32_command, handle_exception): Ditto.
6247 * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
6248
0ca8834f
JM
62492009-04-17 Joseph Myers <joseph@codesourcery.com>
6250
6251 * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
6252 --enable-64-bit-bfd.
6253 (sparc-*-linux*): Likewise.
6254
541f1105
EZ
62552009-04-17 Eli Zaretskii <eliz@gnu.org>
6256
6257 * go32-nat.c (go32_sysinfo): Update list of Windows versions of
6258 the NT family.
6259
1554e9be
PA
62602009-04-16 Pedro Alves <pedro@codesourcery.com>
6261
6262 * remote.c (remote_query_attached): Fix pasto in packet_ok result
6263 checking.
6264
bf75638e
JB
62652009-04-16 Joel Brobecker <brobecker@adacore.com>
6266
6267 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
6268 Revert the previous change. Might not be correct, actually.
6269
3705b1c5
JB
62702009-04-16 Joel Brobecker <brobecker@adacore.com>
6271
6272 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
6273 (ada_get_current_task, ada_print_exception_breakpoint_nontask)
6274 (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
6275 Remove declaration. These are non-existent functions.
6276
37da21bc
JB
62772009-04-16 Joel Brobecker <brobecker@adacore.com>
6278
6279 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
6280 Fix a compilation warning on mips-irix due to casting from
6281 a pointer of different size.
6282
6f38eac8
JB
62832009-04-16 Joel Brobecker <brobecker@adacore.com>
6284
6285 * ada-lang.c (symtab_for_sym): Delete.
6286 (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
6287
f9bc20b9
JB
62882009-04-16 Joel Brobecker <brobecker@adacore.com>
6289
6290 * ada-lang.c (extract_string): Delete.
6291 (ada_main_name): Reimplement using target_read_string instead of
6292 extract_string.
6293
335d71d6
AS
62942009-04-16 Andreas Schwab <schwab@linux-m68k.org>
6295
6296 * m68klinux-nat.c: Remove obsolete comment.
6297 (fetch_register, store_register): Don't call
6298 gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
6299 which are always nops here.
6300
732f6a93
TT
63012009-04-14 Tom Tromey <tromey@redhat.com>
6302
6303 * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
6304 (c_printstr): Likewise.
6305 * charset.c: Include gdb_wait.h.
6306 (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
6307 (find_charset_names): Use pexecute. Handle libiconv's output.
6308 Detect errors.
6309 (_initialize_charset): Use xstrdup.
6310 * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar
6311 cases.
6312 (INTERMEDIATE_ENCODING): New define.
6313 * configure, config.in: Rebuild.
6314 * configure.ac: Check for btowc.
6315
334cc82d
TT
63162009-04-15 Tom Tromey <tromey@redhat.com>
6317
6318 * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
6319
27e3013d
EZ
63202009-04-15 Eli Zaretskii <eliz@gnu.org>
6321
6322 * utils.c (parse_escape): Initialize target_char to pacify GCC.
6323
8ea5dfdf
JK
63242009-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
6325
6326 * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
6327
88c15c34
PM
63282009-04-14 Pierre Muller <muller@ics.u-strasbg.fr>
6329
6330 ARI fix: sprintf rule.
6331 * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
6332 * ada-lang.c (add_angle_brackets): Use xstrprintf.
6333 (ada_decode): Replace sprintf by xsnprintf.
6334 (find_old_style_renaming_symbol): Ditto.
6335 (ada_to_fixed_type_1, ada_enum_name): Ditto.
6336
6337
efbd6e75
JB
63382009-04-14 Joel Brobecker <brobecker@adacore.com>
6339
6340 * target.c (target_mourn_inferior): Call bfd_cache_close_all
6341 after having executed the target mourn_inferior routine.
6342
b46df7a1
EZ
63432009-04-14 Eli Zaretskii <eliz@gnu.org>
6344
6345 * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
6346 undefined.
6347
2facfe5c
DD
63482009-04-13 David Daney <ddaney@caviumnetworks.com>
6349
6350 * infrun.c (maybe_software_singlestep): New function.
6351 (resume): Call maybe_software_singlestep.
6352 (handle_inferior_event): Same.
6353
18e8c3bc
TT
63542009-04-13 Tom Tromey <tromey@redhat.com>
6355
6356 * python/python-frame.c (frapy_richcompare): Return
6357 Py_NotImplemented, not an error. Handle Py_NE as well.
6358
e726d784
EZ
63592009-04-13 Eli Zaretskii <eliz@gnu.org>
6360
6361 * charset.c (EILSEQ): Define if not defined by system headers.
6362
685af672
EZ
63632009-04-11 Eli Zaretskii <eliz@gnu.org>
6364
238f4807 6365 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
a2effb2e 6366 to be consistent with renaming config.intl.in into config_intl.in.
238f4807 6367
c03b3c32
EZ
6368 * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
6369 consistent with the change from 2008-11-09.
685af672 6370
c16abbde
JK
63712009-04-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6372
6373 * gdbtypes.c: Remove excessive parentheses at the return keywords.
2dbd25e5 6374 * varobj.c (varobj_invalidate): Fix indentation.
f4a34a08 6375 * varobj.c (varobj_invalidate): Fix formatting text width.
c16abbde 6376
143260c9
VP
63772009-04-08 Vladimir Prus <vladimir@codesourcery.com>
6378
6379 Implement -exec-jump.
6380
6381 * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
6382 * mi/mi-main.c (mi_cmd_exec_jump): New.
6383 * mi/mi-cmds.c (mi_cmds): Register exec-jump.
6384
d10c338d
DE
63852009-04-07 Doug Evans <dje@google.com>
6386
6387 * symfile.c (symbol_file_clear): Fix indentation.
6388
e5a6ba44
MK
63892009-04-06 Mark Kettenis <kettenis@gnu.org>
6390
6391 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
6392
409c383c
UW
63932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6394
6395 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
6396 (ppc_linux_auxv_parse): New function.
6397 (ppc_linux_read_description): Use ppc_linux_target_wordsize.
6398 (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
6399
64002009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9592c5d0
UW
6401
6402 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
6403 BFD to contents of SPU name note.
6404 (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
6405 with "from_tty" argument 1 instead of 0.
6406
de40b933
JK
64072009-04-02 Jan Kratochvil <jan.kratochvil@redhat.com>
6408
6409 * dwarf2read.c
6410 (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
6411 Create the symbol in local scope.
6412 * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
6413
6cbbcdfe
KS
64142009-04-02 Keith Seitz <keiths@redhat.com>
6415
6416 * stabsread.c (read_member_functions): GCC may emit an extra space
6417 at the end of the names "__base_ctor" and "__base_dtor"; so ignore
6418 whitespace when looking for these functions.
6419
476f7b68
JB
64202009-04-01 Joel Brobecker <brobecker@adacore.com>
6421
6422 Change the default value for "set print frame-arguments" to scalars.
6423
6424 * stack.c (print_frame_arguments): Set initial value to "scalars".
6425
865093a3
AR
64262009-04-01 Aleksandar Ristovski <aristovski@qnx.com>
6427
6428 * mips-tdep.c (mips_numeric_register_alieses): New definition.
cfd53605 6429 (mips_gdbarch_init): Add user registers from
865093a3
AR
6430 mips_numeric_register_aliases.
6431
5d3b6af6
JB
64322009-04-01 Joel Brobecker <brobecker@adacore.com>
6433
6434 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
6435
9db03742
JB
64362009-04-01 Joel Brobecker <brobecker@adacore.com>
6437
6438 * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
6439 this is the last one.
6440
0d8f58ca
PA
64412009-04-01 Pedro Alves <pedro@codesourcery.com>
6442
6443 * remote.c (append_resumption): New.
6444 (remote_vcont_resume): Use it.
6445
1e2f1c5c
JB
64462009-04-01 Joel Brobecker <brobecker@adacore.com>
6447
6448 * windows-nat.c (+windows_get_ada_task_ptid): New function.
6449 (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
6450
71c25dea
TT
64512009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
6452 Keith Seitz <keiths@redhat.com>
6453 Jan Kratochvil <jan.kratochvil@redhat.com>
6454
6455 PR gdb/6817
6456 * Makefile.in (dbxread.o): Update.
6457 * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
6458 * dwarf2read.c (GDB_FORM_cached_string): New.
6459 (read_partial_die): Use dwarf2_canonicalize_name.
6460 (dwarf2_linkage_name): Use dwarf2_name.
6461 (dwarf2_canonicalize_name): New.
6462 (dwarf2_name): Use dwarf2_canonicalize_name.
6463 (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
6464 * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
6465 * symtab.c (lookup_symbol_in_language): Canonicalize input before
6466 searching.
6467 * cp-name-parser.y: operator() requires two parameters,
6468 according to libiberty.
6469 * minsyms.c (lookup_minimal_symbol): Canonicalize input
6470 before searching.
6471 * NEWS: Update.
6472
4a306c9a
JB
64732009-03-31 Joel Brobecker <brobecker@adacore.com>
6474
6475 Provide support for (Ada) task-specific breakpoints.
6476
6477 * ada-lang.h (ada_get_task_number): Add declaration.
6478 (breakpoint_ada_task_match): Delete declaration.
6479 * ada-tasks.c (ada_get_task_number): Make non-static.
6480 * breakpoint.h (struct breakpoint): Add field "task".
6481 * breakpoint.c (print_one_breakpoint_location): Add handling of
6482 task-specific breakpoints.
6483 (create_breakpoint, create_breakpoints, find_condition_and_thread):
6484 New parameter "task".
6485 (break_command_really): Update calls to find_condition_and_thread
6486 and create_breakpoints.
6487 (breakpoint_re_set_one): Update call to find_condition_and_thread.
6488 Set b->task.
6489
4a5a9917
JB
64902009-03-31 Joel Brobecker <brobecker@adacore.com>
6491
6492 * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
6493
bad34192
PA
64942009-03-31 Pedro Alves <pedro@codesourcery.com>
6495
6496 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
6497 if the thread's ptid without a thread id field is in the list
6498 before calling thread_change_ptid.
6499 (extended_remote_attach_1): In non-stop mode, do not rely on
6500 querying the current thread, instead, query the thread list, and
6501 select the first thread of the process.
6502 * gdbthread.h (first_thread_of_process): Declare.
6503 * thread.c (first_thread_of_process): Define.
6504
1042e4c0
SS
65052009-03-30 Stan Shebs <stan@codesourcery.com>
6506
6507 Make tracepoints into a type of breakpoint.
6508 * breakpoint.h (enum bptype): Add bp_tracepoint.
6509 (struct breakpoint): Add fields step_count, pass_count, actions.
6510 (get_tracepoint, get_tracepoint_by_number): Declare.
6511 (all_tracepoints): Declare.
6512 * breakpoint.c: Include tracepoint.h, readline.h.
6513 (ALL_TRACEPOINTS): Move here from tracepoint.c.
6514 (tracepoint_count): Ditto.
6515 (should_be_inserted): GDB does not insert tracepoints itself.
6516 (print_it_typical): Add tracepoint case.
6517 (bpstat_what): Ditto.
6518 (print_one_breakpoint_location): Ditto, and add printing for
6519 pass count, step count, and action list.
6520 (user_settable_breakpoint): Add tracepoint case.
6521 (allocate_bp_location): Ditto.
6522 (set_breakpoint_location_function): Ditto.
6523 (disable_breakpoints_in_shlibs): Ditto.
6524 (mention): Ditto.
6525 (break_command_really): Add argument traceflag, use to choose
6526 basic breakpoint type.
6527 (break_command_1): Pass extra argument.
6528 (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
6529 (breakpoint_re_set_one): Add tracepoint case.
6530 (disable_command, enable_command): Ditto.
6531 (set_tracepoint_count): Move here from tracepoint.c.
6532 (trace_command): Move here from tracepoint.c and use
6533 break_command_really.
6534 (tracepoints_info): Move here from tracepoint.c and call
6535 breakpoints_info.
6536 (enable_trace_command): Move here from tracepoint.c and call
6537 enable_command.
6538 (disable_trace_command): Move here from tracepoint.c and call
6539 disable_command.
6540 (delete_trace_command): Move here from tracepoint.c and call
6541 delete_breakpoint.
6542 (trace_pass_command): Move here from tracepoint.c.
6543 (get_tracepoint_by_number): Ditto.
6544 (tracepoint_save_command): Ditto.
6545 (get_tracepoint): New function.
6546 (all_tracepoints): New function.
6547 (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
6548 deprecate "enable trace" and "disable trace" commands.
6549 * tracepoint.h (struct tracepoint): Remove.
6550 (tracepoint_chain): Remove decl.
6551 (deprecated_create_tracepoint_hook): Remove decl.
6552 (deprecated_delete_tracepoint_hook): Remove decl.
6553 (deprecated_modify_tracepoint_hook): Remove decl.
6554 (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
6555 (free_actions): Update signature.
6556 (validate_actionline): Update signature.
6557 (end_actions_pseudocommand): Declare.
6558 (while_stepping_pseudocommand): Declare.
6559 * tracepoint.c: Include breakpoint.h.
6560 (tracepoint_chain, tracepoint_count): Remove.
6561 (free_actions, make_cleanup_free_actions): Update signature.
6562 (trace_command, set_raw_tracepoint): Remove.
6563 (trace_mention): Remove.
6564 (tracepoints_info): Remove.
6565 (tracepoint_operation, map_args_over_tracepoints): Remove.
6566 (get_tracepoint_by_number): Remove.
6567 (enable_trace_command, disable_trace_command): Remove.
6568 (delete_trace_command, trace_pass_command): Remove.
6569 (trace_actions_command, read_actions): Update signature.
6570 (validate_actionline): Update signature, use bp loc.
6571 (encode_actions): Ditto.
6572 (download_tracepoint): New function, body of trace_start_command.
6573 (trace_start_command): Call it, use all_tracepoints.
6574 (tracepoint_save_command): Remove.
6575 (tracepoint_dump_command): Use get_tracepoint.
6576 (end_actions_pseudocommand): Make globally visible.
6577 (while_stepping_pseudocommand): Ditto.
6578 (_initialize_tracepoint): Move command definitions to breakpoint.c.
6579
f8f6f20b
TJB
65802009-03-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
6581
6582 Expose frames to Python.
6583 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
6584 (SUBDIR_PYTHON_SRCS): Add python-frame.c.
6585 (python-frame.o): New target.
6586 * python/python-frame.c: New file.
6587 * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
6588 gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
6589 gdbpy_initialize_frames): New prototypes.
6590 * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
6591 (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
6592 entries.
6593 * stack.c (find_frame_funname): New function, factored out of
6594 print_frame.
6595 (print_frame): Call find_frame_funname.
6596 * stack.h (find_frame_funname): Add prototype.
6597
77316f4c
TJB
65982009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6599
6600 Remove unused value_object attribute `owned_by_gdb'.
6601 * python/python-value.c (value_object): Remove owned_by_gdb
6602 attribute.
6603 (valpy_dealloc): Remove reference to self->owned_by_gdb.
6604 (valpy_new): Likewise.
6605 (value_to_value_object): Likewise.
6606
c0c6f777
TJB
66072009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6608
6609 Change gdb.Value.address from a method to an attribute.
6610 * python/python-value.c (value_object): Add `address' element.
6611 (valpy_dealloc): Decrement reference to self->address if set.
6612 (valpy_new): Initialize val_obj->address.
6613 (valpy_address): Rename to ...
6614 (valpy_get_address): ... this. Change signature from method to
6615 attribute. Update self->address if not set.
6616 (value_to_value_object): Initialize val_obj->address.
6617 (value_object_getset): Add `address' element.
6618 (value_object_methods): Remove `address' element.
6619
c2c8d75b
AS
66202009-03-29 Andreas Schwab <schwab@linux-m68k.org>
6621
6622 * observer.sh: Set LANG/LC_ALL to C, not c.
6623
1b31f75d
KB
66242009-03-28 Kevin Buettner <kevinb@redhat.com>
6625
6626 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
6627 `char' is unsigned.
6628
f91d3df5
PA
66292009-03-28 Pedro Alves <pedro@codesourcery.com>
6630
6631 * remote.c (remote_stop_ns): If multi-process extensions are off,
6632 and GDB is requesting the whole process to stop, sent "vCont;t",
6633 not "vCont;t:-1"
6634
7b0e8051
PA
66352009-03-28 Pedro Alves <pedro@codesourcery.com>
6636
6637 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
6638 null inferior_ptid.
6639
5362e076
EZ
66402009-03-27 Eli Zaretskii <eliz@gnu.org>
6641
6642 * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
6643
88fc996f
DE
66442009-03-26 Doug Evans <dje@google.com>
6645
6646 * thread.c (do_restore_current_thread_cleanup): Redo test for
6647 whether to restore old->inferior_ptid.
6648
56ef84b1
TT
66492009-03-26 Tom Tromey <tromey@redhat.com>
6650
6651 * breakpoint.c (resolve_sal_pc): Preserve original line number
6652 when skipping prologue.
6653
a5321aa4
DE
66542009-03-26 Doug Evans <dje@google.com>
6655
6656 * thread.c (inferior_thread) Remove "extern" in definition.
6657
def2b000
TJB
66582009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
6659
6660 Add gdb.Value.is_optimized_out attribute.
6661 * python/python-value.c (valpy_get_is_optimized_out): New
6662 function.
6663 (value_object_getset): New variable.
6664 (value_object_type): Initialize tp_getset element.
6665
442ddf59
JK
66662009-03-26 Joel Brobecker <brobecker@adacore.com>
6667
6668 Recognize missing DW_AT_location as <value optimized out>.
6669 * dwarf2read.c
6670 (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
6671 Call add_symbol_to_list.
6672
78485d59
TT
66732009-03-25 Tom Tromey <tromey@redhat.com>
6674
6675 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
6676 * stack.c (print_this_frame_argument_p): Use check_typedef.
6677
94ae1714
TT
66782009-03-25 Tom Tromey <tromey@redhat.com>
6679
6680 * configure: Rebuild.
6681 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
6682 Rearrange flags setting. Add comments.
6683
2bc57ae3
PM
66842009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6685
6686 * config/i386/nm-i386.h: Remove code within
6687 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
6688 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
6689 macro.
6690 * config/i386/nm-cygwin64.h: Ditto.
6691 * config/i386/nm-fbsd.h: Ditto.
6692 * config/i386/nm-go32.h: Ditto.
6693 * config/i386/nm-linux.h: Ditto.
6694 * config/i386/nm-linux64.h: Ditto.
6695
549ba0f8
PM
66962009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6697
6698 ARI fix: "xasprintf" rule.
6699 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
6700
68c97600
PA
67012009-03-25 Pedro Alves <pedro@codesourcery.com>
6702
6703 * remote.c (remote_start_remote): In non-stop mode, call
6704 init_wait_for_inferior before adding threads and inferiors.
6705
a6f1cd96
JB
67062009-03-25 Joel Brobecker <brobecker@adacore.com>
6707
6708 * breakpoint.c (breakpoint_thread_match): Split a large condition
6709 into several smaller conditions. No behavior change.
6710
dbfb4bc7 67112009-03-25 Pedro Alves <pedro@codesourcery.com>
a07daef3
PA
6712
6713 * infrun.c (infrun_thread_thread_exit): New.
6714 (_initialize_infrun): Attach it to the thread_exit observer.
6715 * thread.c (delete_thread_1): Always call the observer, passing it
6716 the silent flag.
6717 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
6718 SILENT, return immediately.
6719
d729566a
PA
67202009-03-25 Pedro Alves <pedro@codesourcery.com>
6721
6722 * infrun.c (normal_stop): Use has_stack_frames instead of
6723 target_has_stack.
6724 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
6725 when there is no thread selected.
6726 (mi_cmd_execute): Don't special case commands that can run without
6727 a valid selected thread.
6728 * top.c (execute_command): Don't special case commands that can
6729 run without a valid selected thread. Use has_stack_frames.
6730 * infcmd.c (ensure_valid_thread): New.
6731 (continue_1, step_1, jump_command, signal_command): Use it.
6732 (detach_command): Error out if there's no selected thread/inferior.
6733 * thread.c (print_thread_info): Allow having no thread selected.
6734 (switch_to_thread): Don't read the PC if there is no current thread.
6735 (do_restore_current_thread_cleanup): Don't record the current
6736 frame if there is no current thread.
6737 (make_cleanup_restore_current_thread): Don't read frame info if
6738 there is no selected thread.
6739 (_initialize_thread): Don't mark commands as
6740 "no_selected_thread_ok".
6741 * frame.c (get_current_frame): Error out if there is no valid
6742 selected thread.
6743 (has_stack_frames): Return false if there is no valid
6744 selected thread.
6745 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
6746 "no_selected_thread_ok".
6747 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
6748 (get_cmd_no_selected_thread_ok): Delete.
6749 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
6750 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
6751 Delete declaration.
6752 * stack.c (get_selected_block): Use has_stack_frames.
6753
f04c6d38
TJB
67542009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6755
6756 Fix size of FPSCR in Power 7 processors.
6757 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6758 (PPC_FEATURE_HAS_DFP): New #define.
6759 (ppc_linux_read_description): Check for DFP feature instead of
6760 ISA 2.05 to decide on size of the FPSCR.
6761
6c02c64c
KB
67622009-03-25 Kevin Buettner <kevinb@redhat.com>
6763
6764 * mn10300-tdep.c (trad-frame.h): Don't include.
6765 (prologue-value.h): Include.
6766 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
6767 (struct mn10300_prologue): Define.
6768 (push_reg, translate_rreg, check_for_saved): New functions.
6769 (mn10300_analyze_prologue): Rewrite, using prologue-value
6770 machinery. Handle more instructions than before. Permit
6771 instructions to occur in any order.
6772 (mn10300_skip_prologue): Find the extents of the function
6773 in question; mn10300_analyze_prologue no longer does this.
6774 (mn10300_analyze_frame_prologue): New function.
6775 (mn10300_frame_base): New function.
6776 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
6777 implementation.
6778 (mn10300_frame_prev_register): Likewise.
6779 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
6780 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
6781 `this_frame'.
6782 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
6783
67c296a2
PM
67842009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6785
6786 Fix completer problem for filename completion on the first try.
6787
6788 * gdb/completer.h (gdb_completion_word_break_characters): New function.
6789 * gdb/completer.c: Include gdb_assert.h.
6790 (complete_line_internal_reason): New enum.
6791 (complete_line_internal): Change last argument type to
6792 complete_line_internal_reason.
6793 Modify function to handle the different complete_line_internal_reason
6794 argument values.
6795 (complete_line): Adapt to change in complete_line_internal.
6796 (command_completer): Ditto.
6797 (gdb_completion_word_break_characters): Implement new function.
6798 * top.c (init_main): Set rl_completion_word_break_hook to
6799 gdb_completion_word_break_characters.
c2c8d75b 6800
67c296a2 6801
1a6d2f2f
PM
68022009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6803
6804 ARI fix: "strlen d_name" rule.
6805 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
6806
6807
fc3b640d
TT
68082009-03-24 Tom Tromey <tromey@redhat.com>
6809 Pedro Alves <pedro@codesourcery.com>
6810
6811 * configure, config.in: Rebuild.
6812 * configure.ac: Check for libiconvlist.
6813 * charset.c: Check HAVE_LIBICONVLIST.
6814 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
6815 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
6816 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
6817 Remove.
6818 (INTERNAL_CFLAGS_BASE): Update.
6819 (INTERNAL_LDFLAGS): Update.
6820 (CLIBS): Update.
6821
76a39ba7
JK
68222009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6823
6824 * configure.ac: Initialize the variable $PREFER_CURSES.
6825 * configure: Regenerated.
6826
bd8a8e1b
JK
68272009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6828
6829 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
6830 * configure: Regenerated.
6831
a3224241
PM
68322009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
6833
6834 ARI fix: "strerror" rule.
6835 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
6836 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
6837
6cdd57f4
JB
68382009-03-23 Joel Brobecker <brobecker@adacore.com>
6839
6840 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
6841 before looking up the fields inside our struct type.
6842
17466c1a
JB
68432009-03-23 Joel Brobecker <brobecker@adacore.com>
6844
6845 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
6846 trying to resolve the type qualification.
6847
8008e265
JB
68482009-03-23 Joel Brobecker <brobecker@adacore.com>
6849
6850 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
6851 we try to apply the attribute on the real type, rather than
6852 its associated typedef.
6853
31dedfee
JB
68542009-03-23 Joel Brobecker <brobecker@adacore.com>
6855
6856 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
6857 to make sure we try to get the modulus of the actual type, not the
6858 associated typedef.
6859
5bc23cb3
JB
68602009-03-23 Joel Brobecker <brobecker@adacore.com>
6861
6862 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
6863 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
6864 to get the real type, not the associated typedef.
6865
872c8b51
JB
68662009-03-23 Joel Brobecker <brobecker@adacore.com>
6867
6868 * ada-lang.c (ada_get_field_index): Add handling of the case
6869 when TYPE is a typedef of a struct.
6870
dcb626be
JB
68712009-03-23 Joel Brobecker <brobecker@adacore.com>
6872
e0cfd8e3 6873 Add gdb_usleep as a portable version of usleep based on gdb_select.
dcb626be
JB
6874 * gdb_usleep.h, gdb_usleep.c: New files.
6875 * Makefile.in (SFILES): Add gdb_usleep.c.
6876 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
6877 (COMMON_OBS): Add gdb_usleep.o.
6878 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
6879 by call to gdb_usleep.
6880
24be086d
JB
68812009-03-23 Joel Brobecker <brobecker@adacore.com>
6882
6883 * buildsym.c (end_symtab): If we ignore the subfiles, then
6884 unlink the associated symtabs if they were already allocated.
6885
cb01cfba
JB
68862009-03-23 Jerome Guitton <guitton@adacore.com>
6887
6888 Provide a way to force building of GDB with libcurses.
6889 * configure.ac: Add --with-curses.
6890 * configure: Regenerated.
6891
9c482037
TT
68922009-03-23 Tom Tromey <tromey@redhat.com>
6893
6894 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
6895 error message.
6896
e2dd7057
PP
68972009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
6898
6899 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
6900 solib_contains_address_p instead of searching.
c2c8d75b 6901
0dd7fb99
TT
69022009-03-23 Tom Tromey <tromey@redhat.com>
6903
6904 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
6905 (iconv): Make 'inbuf' argument const.
6906 (convert_between_encodings): Use ICONV_CONST.
6907 (wchar_iterate): Likewise.
6908
418c6cb3
CF
69092009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6910
6911 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
6912 dynamically loaded function.
6913 (LookupPrivilegeValueA): Ditto.
6914 (OpenProcessToken): Ditto.
6915 (AdjustTokenPrivileges): Rename and define placeholder for address of
c2c8d75b 6916 dynamically loaded function.
418c6cb3
CF
6917 (LookupPrivilegeValueA): Ditto.
6918 (OpenProcessToken): Ditto.
6919 (set_process_privilege): Remove check for loaded functions.
6920 (bad_OpenProcessToken): Define.
6921 (_initialize_loadable): Load token functions from advapi here, setting
6922 OpenProcessToken function to a dummy static function which always return
6923 error if OS doesn't support this functionality.
6924
695de547
CF
69252009-03-22 Nicolas Roche <roche@adacore.com>
6926 Christopher Faylor <me+cygwin@cgf.cx>
6927
6928 * win32-nat.c (ctrl_c_handler): New function.
6929 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
6930 is run in a separate console.
6931
2b008701
CF
69322009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6933
6934 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
6935 for dynamically loaded function.
6936 (DebugBreakProcess): Ditto.
6937 (DebugSetProcessKillOnExit): Ditto.
6938 (EnumProcessModules): Ditto.
6939 (GetModuleFileNameExA): Ditto.
6940 (GetModuleInformation): Ditto.
6941 (DebugActiveProcessStop): Rename and define placeholder for address of
418c6cb3 6942 dynamically loaded function.
2b008701
CF
6943 (DebugBreakProcess): Ditto.
6944 (DebugSetProcessKillOnExit): Ditto.
6945 (EnumProcessModules): Ditto.
6946 (GetModuleFileNameExA): Ditto.
6947 (GetModuleInformation): Ditto.
6948 (psapi_loaded): Delete.
6949 (get_module_name): Don't check psapi_loaded, just rely on the fact that
6950 dynamically loaded functions will return failure if they weren't
6951 previously found.
6952 (has_detach_ability): Delete.
6953 (windows_attach): Remove call to has_detach_ability (). Just rely on
6954 functions being callable.
6955 (bad_DebugActiveProcessStop): Define.
6956 (bad_DebugBreakProcess): Ditto.
6957 (bad_DebugSetProcessKillOnExit): Ditto.
6958 (bad_EnumProcessModules): Ditto.
6959 (bad_GetModuleFileNameExA): Ditto.
6960 (bad_GetModuleInformation): Ditto.
6961 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
6962 dynamic storage here, setting nonexistent functions to dummy static
6963 functions which always return error.
6964
f3b1572e
PA
69652009-03-22 Pedro Alves <pedro@codesourcery.com>
6966
6967 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
6968 to the about_to_proceed observer notification.
6969 (mi_about_to_proceed): New.
6970 (mi_on_resume): Only output ^running and the prompt here if the
6971 target was proceeded.
6972 * breakpoint.c (breakpoint_proceeded): New static.
6973 (breakpoint_about_to_proceed): New.
6974 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
6975 the about_to_proceed observer notification.
6976 * inferior.h (breakpoint_proceeded): Delete declaration.
6977 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
6978 Notify the about_to_proceed observers.
6979 (struct inferior_status): Delete breakpoint_proceeded member.
6980 (save_inferior_status): Don't save it.
6981 (restore_inferior_status): Don't restore it.
6982 * mi-main.h (mi_proceeded): Declare.
6983 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
6984 a command.
6985
c5a4d20b
PA
69862009-03-22 Pedro Alves <pedro@codesourcery.com>
6987
6988 * gdbthread.h (struct thread_info): Add in_infcall member.
6989 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
6990 Remove reverences to suppress_resume_observer. Refresh
6991 `call_thread' after returning from `proceed'.
6992 * infcmd.c (suppress_resume_observer): Delete.
6993 * inferior.h (suppress_resume_observer): Delete declaration.
6994 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
6995 inferior function.
6996 * thread.c (set_running): Remove references to
6997 suppress_resume_observer.
6998 * infrun.c (struct inferior_status): Add in_infcall member.
6999 (save_inferior_status): Save it.
7000 (restore_inferior_status): Restore it.
7001
41d2bdb4
PA
70022009-03-22 Pedro Alves <pedro@codesourcery.com>
7003
7004 * infcall.c (run_inferior_call): Remove references to
7005 suppress_stop_observer.
7006 * infcmd.c (suppress_stop_observer): Delete.
7007 (finish_command_continuation): Remove NOTE. Don't clear
7008 suppress_stop_observer anymore.
7009 (finish_command_continuation_free_arg): Likewise.
7010 (finish_forward): Remove references to suppress_stop_observer.
7011 Call normal_stop observer if we haven't already.
7012 * inferior.h (suppress_stop_observer): Delete.
7013 * infrun.c (normal_stop): When deciding to suppress the
7014 normal_stop observer, check for proceed_to_finish instead of
7015 suppress_stop_observer.
7016
065a2c74
PA
70172009-03-22 Pedro Alves <pedro@codesourcery.com>
7018
7019 * symfile.c (symfile_relocate_debug_section): Remove check for
7020 SEC_DEBUGGING.
7021
cc924cad
TJB
70222009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7023 Jim Blandy <jimb@red-bean.com>
7024 Thiago Jung Bauermann <bauerman@br.ibm.com>
7025 Tom Tromey <tromey@redhat.com>
7026
7027 Miscellaneous fixes to the Python code.
7028 * python/python-cmd.c (cmdpy_init): Accept keyword
7029 arguments.
7030 * python/python-value.c (valpy_string): Accept keyword
7031 arguments.
7032 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
7033 Do not call value_to_value_object on NULL RES_VAL.
7034 (value_object_methods): Change `string' entry to also accept
7035 keyword arguments.
7036 (convert_value_from_python): Return a copy of the value if obj is
7037 a gdb.Value object.
7038 (value_object_methods): Mark the `string' method as accepting
7039 keywords, and show method "prototype" in the doc string.
7040 * python/python.c (get_parameter): Don't return inside a
7041 TRY_CATCH.
7042
bc3b79fd
TJB
70432009-03-20 Tom Tromey <tromey@redhat.com>
7044
7045 Add support for convenience functions in Python.
7046 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
7047 (SUBDIR_PYTHON_SRCS): Add python-function.c.
7048 (python-function.o): New target.
7049 * eval.c: Include "python/python.h" and <ctype.h>.
7050 (evaluate_subexp_standard): Handle values of type
7051 TYPE_CODE_INTERNAL_FUNCTION.
7052 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
7053 * parse.c (write_exp_string): Remove duplicate word in comment.
7054 * python/python-function.c: New file.
7055 * python/python-internal.h (gdbpy_initialize_functions): Add
7056 prototype.
7057 * python/python.c (_initialize_python): Call
7058 gdbpy_initialize_functions.
7059 * valprint.c (value_check_printable): Handle values of type
7060 TYPE_CODE_INTERNAL_FUNCTION.
7061 * value.c: Include "cli/cli-decode.h".
7062 (internal_function): New struct.
7063 (functionlist, internal_fn_type): New static variables.
7064 (lookup_only_internalvar,
7065 lookup_internalvar): Add const qualifier to name argument.
7066 (create_internalvar): Likewise. Initialize new field.
7067 (set_internal_var): Fix typo in comment. Don't allow assignment
7068 to canonical variable.
7069 (value_create_internal_function, value_internal_function_name,
7070 call_internal_function, function_command, function_destroyer,
7071 add_internal_function): New functions.
7072 (_initialize_values): Create `function' placeholder command.
7073 Initialize internal_fn_type.
7074 * value.h (lookup_only_internalvar, create_internalvar,
7075 lookup_internalvar): Add const qualifier to name argument.
7076 (internal_function_fn, add_internal_function, call_internal_function,
7077 value_internal_function_name): Add prototypes.
7078 (struct internalvar) <canonical>: New field.
7079
546e879e
TT
70802009-03-20 Tom Tromey <tromey@redhat.com>
7081
7082 * c-lang.c (evaluate_subexp_c): Call check_typedef.
7083
6c7a06a3
TT
70842009-03-20 Tom Tromey <tromey@redhat.com>
7085 Julian Brown <julian@codesourcery.com>
7086
7087 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
7088 PR i18n/9401, PR exp/9613:
7089 * NEWS: Update
7090 * value.h (value_typed_string): Declare.
7091 (val_print_string): Update.
7092 * valprint.h (print_char_chars): Update.
7093 * valprint.c (print_char_chars): Add type argument. Update.
7094 (val_print_string): Likewise.
7095 * valops.c (value_typed_string): New function.
7096 * utils.c (host_char_to_target): New function.
7097 (parse_escape): Use host_char_to_target, host_hex_value. Update.
7098 Remove '^' case.
7099 (no_control_char_error): Remove.
7100 * typeprint.c (print_type_scalar): Update.
7101 * scm-valprint.c (scm_scmval_print): Update.
7102 * scm-lang.h (scm_printchar, scm_printstr): Update.
7103 * scm-lang.c (scm_printchar): Add type argument.
7104 (scm_printstr): Likewise.
7105 * printcmd.c (print_formatted): Update.
7106 (print_scalar_formatted): Update.
7107 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
7108 Handle '%lc' and '%ls'.
7109 * parser-defs.h (struct typed_stoken): New type.
7110 (struct stoken_vector): Likewise.
7111 (write_exp_string_vector): Declare.
7112 * parse.c (write_exp_string_vector): New function.
7113 * p-valprint.c (pascal_val_print): Update.
7114 * p-lang.h (is_pascal_string_type, pascal_printchar,
7115 pascal_printstr): Update.
7116 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
7117 Add 'char_type' argument.
7118 (pascal_emit_char): Add type argument.
7119 (pascal_printchar): Likewise.
7120 (pascal_printstr): Likewise.
7121 * objc-lang.c (objc_emit_char): Add type argument.
7122 (objc_printchar): Likewise.
7123 (objc_printstr): Likewise.
7124 * macroexp.c (get_character_constant): Handle unicode characters.
7125 Use c_parse_escape.
7126 (get_string_literal): Handle unicode strings. Use
7127 c_parse_escape.
7128 * m2-valprint.c (print_unpacked_pointer): Update.
7129 (m2_print_array_contents): Update.
7130 (m2_val_print): Update.
7131 * m2-lang.c (m2_emit_char): Add type argument.
7132 (m2_printchar): Likewise.
7133 (m2_printstr): Likewise.
7134 * language.h (struct language_defn) <la_printchar>: Add type
7135 argument.
7136 <la_printstr, la_emitchar>: Likewise.
7137 (LA_PRINT_CHAR): Likewise.
7138 (LA_PRINT_STRING): Likewise.
7139 (LA_EMIT_CHAR): Likewise.
7140 * language.c (unk_lang_emit_char): Add type argument.
7141 (unk_lang_printchar): Likewise.
7142 (unk_lang_printstr): Likewise.
7143 * jv-valprint.c (java_val_print): Update.
7144 * jv-lang.c (java_emit_char): Add type argument.
7145 * f-valprint.c (f_val_print): Update.
7146 * f-lang.c (f_emit_char): Add type argument.
7147 (f_printchar): Likewise.
7148 (f_printstr): Likewise.
7149 * expprint.c (print_subexp_standard): Update.
7150 * charset.h (target_wide_charset): Declare.
7151 (c_target_char_has_backslash_escape, c_parse_backslash,
7152 host_char_print_literally, host_char_to_target,
7153 target_char_to_host, target_char_to_control_char): Remove.
7154 (enum transliterations): New type.
7155 (convert_between_encodings): Declare.
7156 (HOST_ESCAPE_CHAR): New define.
7157 (host_letter_to_control_character, host_hex_value): Declare.
7158 (enum wchar_iterate_result): New enum.
7159 (struct wchar_iterator): Declare.
7160 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
7161 wchar_push_back): Declare.
7162 * charset-list.h: New file.
7163 * c-valprint.c (textual_name): New function.
7164 (textual_element_type): Handle wide character types.
7165 (c_val_print): Pass original type to textual_element_type. Handle
7166 wide character types.
7167 (c_value_print): Use textual_element_type. Pass original type of
7168 value to val_print.
7169 * c-lang.h (enum c_string_type): New type.
7170 (c_printchar, c_printstr): Update.
7171 * c-lang.c (classify_type): New function.
7172 (print_wchar): Likewise.
7173 (c_emit_char): Add type argument. Handle wide characters.
7174 (c_printchar): Likewise.
7175 (c_printstr): Add type argument. Handle wide and multibyte
7176 character sets.
7177 (convert_ucn): New function.
7178 (emit_numeric_character): Likewise.
7179 (convert_octal): Likewise.
7180 (convert_hex): Likewise.
7181 (ADVANCE): New macro.
7182 (convert_escape): New function.
7183 (parse_one_string): Likewise.
7184 (evaluate_subexp_c): Likewise.
7185 (exp_descriptor_c): New global.
7186 (c_language_defn): Use exp_descriptor_c.
7187 (cplus_language_defn): Likewise.
7188 (asm_language_defn): Likewise.
7189 (minimal_language_defn): Likewise.
7190 (charset_for_string_type): New function.
7191 * c-exp.y (%union): Add 'svec' and 'tsval'.
7192 (CHAR): New token.
7193 (exp): Add CHAR production.
7194 (string_exp): Rewrite.
7195 (exp) <string_exp>: Rewrite.
7196 (tempbuf): Now global.
7197 (tempbuf_init): New global.
7198 (parse_string_or_char): New function.
7199 (yylex) <tempbuf>: Now global.
7200 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
7201 Remove.
7202 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
7203 (c_parse_escape): New function.
7204 * auxv.c (fprint_target_auxv): Update.
7205 * ada-valprint.c (ada_emit_char): Add type argument.
7206 (ada_printchar): Likewise.
7207 (ada_print_scalar): Update.
7208 (printstr): Add type argument. Update calls to ada_emit_char.
7209 (ada_printstr): Add type argument.
7210 (ada_val_print_array): Update.
7211 (ada_val_print_1): Likewise.
7212 * ada-lang.c (emit_char): Add type argument.
7213 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
7214 type arguments.
7215 * gdb_locale.h: Include langinfo.h.
7216 * charset.c (_initialize_charset): Set default host charset from
7217 the locale. Don't register charsets. Add target-wide-charset
7218 commands. Call find_charset_names.
7219 (struct charset, struct translation): Remove.
7220 (GDB_DEFAULT_HOST_CHARSET): Remove.
7221 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
7222 (target_wide_charset_name): New global.
7223 (show_host_charset_name): Handle "auto".
7224 (show_target_wide_charset_name): New function.
7225 (host_charset_enum, target_charset_enum): Remove.
7226 (charset_enum): New global.
7227 (all_charsets, register_charset, lookup_charset, all_translations,
7228 register_translation, lookup_translation): Remove.
7229 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
7230 (iso_8859_print_literally, iso_8859_to_control,
7231 iso_8859_family_charset): Remove.
7232 (ebcdic_print_literally, ebcdic_to_control,
7233 ebcdic_family_charset): Remove.
7234 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
7235 register_iconv_charsets): Remove.
7236 (target_wide_charset_be_name, target_wide_charset_le_name): New
7237 globals.
7238 (identity_either_char_to_other): Remove.
7239 (set_be_le_names, validate): New functions.
7240 (backslashable, backslashed, represented): Remove.
7241 (default_c_target_char_has_backslash_escape): Remove.
7242 (default_c_parse_backslash, iconv_convert): Remove.
7243 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
7244 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
7245 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
7246 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
7247 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
7248 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
7249 (table_convert_char, table_translation, simple_table_translation):
7250 Remove.
7251 (current_host_charset, current_target_charset,
7252 c_target_char_has_backslash_escape_func,
7253 c_target_char_has_backslash_escape_baton): Remove.
7254 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
7255 (host_char_to_target_func, host_char_to_target_baton): Remove.
7256 (target_char_to_host_func, target_char_to_host_baton): Remove.
7257 (cached_iconv_host_to_target, cached_iconv_target_to_host):
7258 Remove.
7259 (lookup_charset_or_error, check_valid_host_charset): Remove.
7260 (set_host_and_target_charsets): Remove.
7261 (set_host_charset, set_target_charset): Remove.
7262 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
7263 (set_target_wide_charset_sfunc): New function.
7264 (show_charset): Print target wide character set.
7265 (host_charset, target_charset): Rewrite.
7266 (target_wide_charset): New function.
7267 (c_target_char_has_backslash_escape): Remove.
7268 (c_parse_backslash): Remove.
7269 (host_letter_to_control_character): New function.
7270 (host_char_print_literally): Remove.
7271 (host_hex_value): New function.
7272 (target_char_to_control_char): Remove.
7273 (cleanup_iconv): New function.
7274 (convert_between_encodings): New function.
7275 (target_char_to_host): Remove.
7276 (struct wchar_iterator): Define.
7277 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
7278 wchar_push_back): New functions.
7279 (do_cleanup_iterator): New function.
7280 (char_ptr): New typedef.
7281 (charsets): New global.
7282 (add_one, find_charset_names): New functions.
7283 (default_charset_names): New global.
7284 (auto_host_charset_name): Likewise.
7285 * aclocal.m4, config.in, configure: Rebuild.
7286 * configure.ac: Call AM_LANGINFO_CODESET.
7287 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
7288 (AM_ICONV): Invoke earlier.
7289 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
7290 LIBICONV_LIBDIR. Check for libiconv in build tree.
7291 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
7292 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
7293 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
7294 * gdb_obstack.h (obstack_grow_wstr): New define.
c2c8d75b
AS
7295 * gdb_wchar.h: New file.
7296 * defs.h: Include it.
6c7a06a3 7297
cb249c71
TT
72982009-03-20 Tom Tromey <tromey@redhat.com>
7299 Jan Kratochvil <jan.kratochvil@redhat.com>
7300
7301 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
7302 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
7303 typedef.
7304 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
7305 SYMBOL_TYPE result.
7306 * ada-typeprint.c (print_array_type): Do the NULL check
7307 unconditionally.
7308
16ad9370
TT
73092009-03-19 Tom Tromey <tromey@redhat.com>
7310
7311 * utils.c (do_obstack_free): New function.
7312 (make_cleanup_obstack_free): Likewise.
7313 * defs.h (make_cleanup_obstack_free): Declare.
7314
36dc683c
DE
73152009-03-18 Doug Evans <dje@google.com>
7316
89ecc4f5
DE
7317 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
7318 int, not a long long.
7319 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
7320
a411cd0e
DE
7321 * expprint.c (dump_raw_expression): Print note if non-NULL.
7322
36dc683c
DE
7323 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
7324 backwards.
7325
5b1ba0e5
NS
73262009-03-18 Nathan Sidwell <nathan@codesourcery.com>
7327
7328 * Makefile.in: Update license to GPLv3.
7329 * ada-exp.y: Update license to GPLv3.
7330 * ada-lex.l: Update license to GPLv3.
7331 * c-exp.y: Update license to GPLv3.
7332 * cp-name-parser.y: Update license to GPLv3.
7333 * darwin-nat-info.c: Update license to GPLv3.
7334 * f-exp.y: Update license to GPLv3.
7335 * gdb_thread_db.h: Update license to GPLv3.
7336 * hppanbsd-nat.c: Update license to GPLv3.
7337 * hppanbsd-tdep.c: Update license to GPLv3.
7338 * hppaobsd-tdep.c: Update license to GPLv3.
7339 * jv-exp.y: Update license to GPLv3.
7340 * m2-exp.y: Update license to GPLv3.
7341 * objc-exp.y: Update license to GPLv3.
7342 * p-exp.y: Update license to GPLv3.
7343 * reply_mig_hack.awk: Update license to GPLv3.
7344 * reverse.c: Update license to GPLv3.
7345 * xtensa-xtregs.c: Update license to GPLv3.
7346
8a2492ee
PA
73472009-03-18 Pedro Alves <pedro@codesourcery.com>
7348
7349 * remote.c (remote_close): Don't call generic_mourn_inferior.
7350 (remote_mourn_1): Call generic_mourn_inferior after closing the
7351 target.
7352
5338cef1
PA
73532009-03-18 Pedro Alves <pedro@codesourcery.com>
7354
7355 * remote.c (remote_start_remote): Add missing call to
7356 init_wait_for_inferior in non-stop mode.
7357
717a8278
PA
73582009-03-18 Pedro Alves <pedro@codesourcery.com>
7359
7360 * breakpoint.c (bpstat_should_step): Only consider software
7361 watchpoints that have a location.
7362
7d85a9c0
JB
73632009-03-17 Joel Brobecker <brobecker@adacore.com>
7364
7365 Add a target_ops parameter to the to_kill method in struct target_ops.
7366
7367 * target.h (struct target_ops): Add a "target_ops *" parameter to
7368 method to_kill.
7369 (target_kill): Remove macro. Add declaration.
7370 * target.c (debug_to_kill): Delete, no longer necessary.
7371 (target_kill): New function.
7372 (update_current_target): Stop inheriting the to_kill method.
7373 Do not de_fault it to no_process either.
7374 (setup_target_debug): Do not set current_target.to_kill.
7375 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
7376 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
7377 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
7378 accordingly.
7379
14064aa2
DE
73802009-03-17 Doug Evans <dje@google.com>
7381
7382 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
7383 glibc 2.3.2 and earlier.
7384
f06eadd9
JB
73852009-03-17 Joel Brobecker <brobecker@adacore.com>
7386
7387 * frame.c (get_prev_frame_1): Do not perform the inner_frame
7388 sanity check if this_frame is not NORMAL.
7389 (frame_id_inner): Update the description of this function.
7390
481df73e
HZ
73912009-03-17 Hui Zhu <teawater@gmail.com>
7392
7393 * stack.c: Change the introduce of "disassemble-next-line".
7394
6b251945
PA
73952009-03-17 Pedro Alves <pedro@codesourcery.com>
7396
7397 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
7398 declare as extern.
7399
30c33a9f
HZ
74002009-03-17 Hui Zhu <teawater@gmail.com>
7401
dafb3b41 7402 * stack.c: Include valprint.h.
30c33a9f
HZ
7403 (disassemble_next_line): New enum.
7404 (show_disassemble_next_line): New function. Show the current
7405 value of disassemble-next-line.
7406 (gdb_disassembly_stub_args): New struct for argument passing
7407 between function do_gdb_disassembly and function
7408 gdb_disassembly_stub.
7409 (gdb_disassembly_stub): New function. Helper for
7410 gdb_disassembly.
7411 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
7412 the exception from the gdb_disassembly because it will be
7413 broken by filter sometime.
7414 (print_frame_info): If disassemble-next-line is set to auto
7415 or on and doesn't have the line debug messages for $pc,
7416 output the next instruction.
7417 If disassemble-next-line is set to on and there is line debug
7418 messages, output assembly codes for next line.
7419 (_initialize_stack): Make the "set disassemble-next-line"
7420 command an auto-boolean command. Change its class to
7421 class_stack. Place it in the top level set list. Extend help
7422 to describe the auto mode.
7423
fee0be5d
PA
74242009-03-17 Pedro Alves <pedro@codesourcery.com>
7425
7426 * infrun.c (normal_stop): Don't overwrite old_chain.
7427
a624e111
JB
74282009-03-16 Joel Brobecker <brobecker@adacore.com>
7429
7430 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
7431 which is undefined, by call to regcache_invalidate, which should
7432 do what the original author wanted to do.
7433
383c0389
JB
74342009-03-16 Joel Brobecker <brobecker@adacore.com>
7435
7436 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
7437 (mips_create_inferior): Likewise.
7438
267fbcde
JB
74392009-03-16 Joel Brobecker <brobecker@adacore.com>
7440
7441 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
7442
da66f6a6
JB
74432009-03-16 Joel Brobecker <brobecker@adacore.com>
7444
7445 * darwin-nat.c (darwin_resume): Fix a compiler warning when
7446 building on x86_64-darwin.
7447
58529c02
JB
74482009-03-16 Tristan Gingold <gingold@adacore.com>
7449
7450 * configure.tgt: Add handling for x86_64-darwin.
7451
ba30a4e9
JK
74522009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
7453
7454 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
7455
7fc0c7b5
JB
74562009-03-15 Joel Brobecker <brobecker@adacore.com>
7457
7458 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
7459 Use the ops parameter to get to the target beneath, rather than
7460 using the current_target global. Using the current_target global
7461 was an unintended accident.
7462
1ba0a4ee
JB
74632009-03-15 Joel Brobecker <brobecker@adacore.com>
7464
7465 Fix an error happening while loading symbols from a core file
7466 (on AIX).
7467
7468 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
7469 to detect whether we're debugging a core file or not.
7470
d30acaa7
JB
74712009-03-15 Joel Brobecker <brobecker@adacore.com>
7472
7473 Modernize the aix-thread later by getting rid of the base_target
7474 global. This brings back to life the AIX port which was otherwise
7475 crashing all the time.
7476
7477 * aix-thread.c (base_target): Delete.
7478 (pd_enable): Do not set base_target.
7479 (aix_thread_attach): Use find_target_beneath instead of base_target.
7480 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7481 (aix_thread_fetch_registers, aix_thread_store_registers),
7482 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7483 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
7484 (aix_thread_kill): Delete. Does not seem necessary.
7485 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
7486
61ff14c6
JK
74872009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7488
7489 * stack.c (return_command <retval_exp>): New variables retval_expr
7490 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
7491 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
7492 if RETURN_TYPE is NULL.
7493
0b16c5cf
PA
74942009-03-14 Pedro Alves <pedro@codesourcery.com>
7495
7496 * remote.c (PACKET_qAttached): New.
7497 (remote_query_attached): New.
7498 (remote_add_inferior): Add new `attached' argument. Handle it.
7499 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
7500 -1 to remote_add_inferior in new parameter.
7501 (extended_remote_attach_1): Adjust to pass 1 to
7502 remote_add_inferior in the new parameter.
7503 (extended_remote_create_inferior_1): Adjust to pass 0 to
7504 remote_add_inferior in the new parameter.
7505 (_initialize_remote): Add "set/show remote query-attached-packet"
7506 commands.
7507
9ee6bb93
TT
75082009-03-13 Tom Tromey <tromey@redhat.com>
7509
7510 * symtab.c (lookup_symbol_in_language): Use a cleanup.
7511
787274f0
DE
75122009-03-13 Doug Evans <dje@google.com>
7513
7514 * exceptions.h: Clean up some comments on catch_exceptions usage.
7515 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
7516 catch_exceptions.
7517
24f81874
JB
75182009-02-17 Joel Brobecker <brobecker@adacore.com>
7519
7520 The following patch helps getting rid of a warning inside solib-som.c.
7521
7522 * source.c (source_full_path_of): Constify parameter filename.
7523 * defs.h (source_full_path_of): Update declaration accordingly.
7524
e1578042
JB
75252009-03-12 Joel Brobecker <brobecker@adacore.com>
7526
7527 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
7528 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
7529 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
7530
9c2be529
JB
75312009-03-12 Joel Brobecker <brobecker@adacore.com>
7532
7533 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
7534 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
7535
2360f94a 75362009-03-12 Joel Brobecker <brobecker@adacore.com>
e22dccb5
JB
7537
7538 * ada-tasks.c (ada_task_is_alive): Move up and make static.
7539 * ada-lang.h (ada_task_is_alive): Remove declaration.
7540
facc390f
JB
75412009-03-12 Jerome Guitton <guitton@adacore.com>
7542
7543 * ada-lang.c (ada_delta): Change the type of numerators and
7544 denominators to DOUBLEST, as they may not fit into a long.
7545 (scaling_factor): Ditto.
7546
47e729a8
JB
75472009-03-12 Jerome Guitton <guitton@adacore.com>
7548
5c20fa2a 7549 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
47e729a8 7550
b79819ba
JB
75512009-03-12 Joel Brobecker <brobecker@adacore.com>
7552
7553 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
7554 types, if we are unable to determine the actual symbol type
7555 from its tag, then use the static approximation instead.
7556
0056e4d5
JB
75572009-03-12 Joel Brobecker <brobecker@adacore.com>
7558
7559 Fix crash printing packed record with packed array.
7560
7561 * ada-lang.c (ada_modulus_from_name): New function.
7562 (ada_modulus): In the case where the type length is bigger than
7563 the size of the type used to hold the bounds, try determining
7564 the modulus from the type name.
7565 (ada_value_primitive_packed_val): Fix bug in the computation of
7566 ntarg causing an out-of-buffer invalid access.
7567
3c513ee6
JB
75682009-03-12 Joel Brobecker <brobecker@adacore.com>
7569
7570 Fix segfault when printing short_integer'last.
7571
7572 * ada-lang.c (ada_find_any_type): Search in the primitive types
7573 if a symbol could not be found.
7574
680f3fad
JB
75752009-03-12 Joel Brobecker <brobecker@adacore.com>
7576
7577 * ada-tasks.c (task_states,long_task_states): Add new states
7578 Activating and Acceptor_Delay_Sleep. Update the description
7579 of state Acceptor_Sleep.
7580
2ab1c2d9
JB
75812009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
7582
7583 Fix a build failure on Darwin following some changes in
7584 the profile of some target_ops methods.
7585
7586 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
7587 where missing.
7588 (darwin_stop_inferior, darwin_detach): Likewise.
7589
1f31650a
VP
75902009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7591
7592 Include token in ^running notification for CLI commands.
7593
c2c8d75b
AS
7594 * mi/mi-main.c (mi_execute_command): Set current_token here.
7595 (mi_cmd_execute): Do not set current_token here.
1f31650a 7596
4333ada3
VP
75972009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7598
7599 Fix MI timings.
7600
c2c8d75b
AS
7601 * mi/mi-main.c (mi_print_timing_maybe): New.
7602 (captured_mi_execute_command): Simplify. Output timings to
7603 CLI commands, too.
7604 (mi_execute_async_cli_command): Do not print timings.
7605 * mi/mi-main.h (mi_print_timing_maybe): Declare.
7606 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
4333ada3 7607
c5933f6d
JB
76082009-03-12 Jerome Guitton <guitton@adacore.com>
7609
7610 * xcoffread.c (process_linenos): Check if the line in the
7611 include table refers to the main source file and, if so,
7612 add them to the main subfile.
7613
c7660128
JB
76142009-03-12 Joel Brobecker <brobecker@adacore.com>
7615
7616 Fix a build failure on AIX introduced after a change in the profile
7617 of some of the "methods" in the target_ops structure.
7618 * aix-thread.c: Add missing target_ops parameter throughout.
7619
7620 Implement Ada task switching on AIX.
7621 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
7622 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
7623
c5bc3a77
DJ
76242009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
7625
7626 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
7627 value_mark and value_free_to_mark.
7628 * objfiles.c (free_objfile): Call objfile_free_data before
7629 freeing the BFD.
7630
55518360
HZ
76312009-03-10 Hui Zhu <teawater@gmail.com>
7632
7633 * disasm.c (gdb_disassembly): Remove unused argument
7634 "line_num".
7635 * disasm.h (gdb_disassembly): Ditto.
7636 * cli/cli-cmds.c (print_disassembly): Ditto.
7637 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
7638
5fd1a349
PP
76392009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
7640
7641 * solib.c (solib_contains_address_p): New function.
7642 (solib_name_from_address): Use it.
7643 * printcmd.c (display_uses_solib_p): Use it.
c2c8d75b
AS
7644 * solib.h (solib_contains_address_p): Declare it.
7645
36746093
JK
76462009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7647
7648 * varobj.c (free_variable): Call value_free.
7649
757a13d0
JK
76502009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7651
7652 PR gdb/9873:
7653 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
7654 Move the variable `macinfo_type' out of the loop. Create a new
7655 processing pass before the current one to pre-create `current_file'.
7656 New complaint on misplaced zero/non-zero definitions/includes.
7657 Skip first DW_MACINFO_start_file with `at_commandline' set.
7658
c8fa6cdd
VP
76592008-03-09 Vladimir Prus <vladimir@codesourcery.com>
7660
7661 * solib.c (reload_shared_libraries): Give
7662 inferior a chance to reset solib breakpoint.
7663 Reinit frame cache.
7664
41b4aadc
CF
76652009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
7666
7667 * windows-nat.c (dr): Redefine to use largest possible integer which
7668 holds a pointer.
7669 (cygwin_set_dr): Avoid coercion.
7670
76712009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
7672
14b69f28 7673 * windows-nat.c (windows_create_inferior): Implement --tty handling on
41b4aadc
CF
7674 non-cygwin.
7675
f5c9a895
PP
76762009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
7677
7678 Rename solib_address to solib_name_from_address.
7679 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
7680 (disable_breakpoints_in_unloaded_shlib): Update.
7681 * printcmd.c (display_uses_solib_p): Likewise.
7682 * stack.c (print_frame): Likewise.
7683 * solib.c: Rename.
7684 * solib.h: Rename.
c2c8d75b 7685
a3247a22
PP
76862009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
7687
7688 * printcmd.c (do_one_display): Reparse exp_string.
7689 (display_uses_solib_p): New function.
7690 (clear_dangling_display_expressions): New function.
7691 (_initialize_printcmd): Add observer.
7692 * solib.c (no_shared_libraries): Swap order of calls to
7693 clear_solib and objfile_purge_solibs.
c2c8d75b 7694
d36df9c5
JB
76952009-03-05 Joel Brobecker <brobecker@adacore.com>
7696
7697 Implement the target-specific part of Ada tasking support
7698 on Tru64.
7699
7700 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
7701 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
7702
b254c0b2
JB
77032009-03-05 Joel Brobecker <brobecker@adacore.com>
7704
7705 Get rid of the global "base_target" and use "find_target_beneath"
7706 to find the underlying target.
7707 * dec-thread.c (base_target): Delete.
7708 (enable_dec_thread): Remove assignement to base_target.
7709 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
7710 (dec_thread_fetch_registers, dec_thread_store_registers)
7711 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
7712 Update the function profile if necessary.
7713 Use find_target_beneath to call the same method but from
7714 the underlying target, removing the need for "base_target".
7715
7716 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
7717 Fix a copy/paste error in a few debug traces...
7718
7719 * solib-osf.c (init_so): Use a simpler method for computing
7720 the size of lm_info structure. This also gets rid of warning
7721 emitted by the compiler.
7722
aae64587
PA
77232009-03-05 Pedro Alves <pedro@codesourcery.com>
7724
7725 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
7726 duplicates of permanent breakpoints.
7727
1941c569
PA
77282009-03-04 Pedro Alves <pedro@codesourcery.com>
7729
7730 * inferior.h (notice_new_inferior): Declare.
7731 * infcmd.c (notice_new_inferior): New.
7732 * remote.c (remote_add_inferior, remote_add_thread): New.
7733 (notice_new_inferiors): Rename to...
7734 (remote_notice_new_inferior): ... this. Add RUNNING argument.
7735 Use remote_add_thread instead of add_thread, passing it the
7736 RUNNING argument. Add an inferior with remote_add_inferior. If
7737 we just learned about an inferior, call notice_new_inferior.
7738 (record_currthread): Adjust.
7739 (remote_threads_info): Adjust to use remote_notice_new_inferior.
237d4315
PA
7740 (remote_start_remote, extended_remote_attach_1): Use
7741 remote_add_inferior.
1941c569
PA
7742 (process_stop_reply): Adjust. Call remote_notice_new_inferior
7743 after handling expedited registers and watchpoint state.
7744 (extended_remote_create_inferior_1): Use remote_add_inferior.
7745
9bde0732
AR
77462009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
7747
7748 * infcmd.c (registers_info): Remove register number case.
7749
6aa8e5c2
PA
77502009-03-03 Pedro Alves <pedro@codesourcery.com>
7751
7752 * top.c (quit_target): Check for target_has_execution before
7753 killing or detaching from inferiors.
7754
1d59cee5
JB
77552009-03-02 Joel Brobecker <brobecker@adacore.com>
7756
7757 Remove some unused routines.
7758
7759 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
7760 Delete.
7761 * ada-lang.c (ada_task_list_iterator_ftype)
7762 (iterate_over_live_ada_tasks): Delete.
7763 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
7764 Delete.
7765
223698f8
DE
77662009-03-01 Doug Evans <dje@google.com>
7767
9af17804
DE
7768 * symtab.c: Remove trailing whitespace throughout the file.
7769 (expand_line_sal): Fix some typos and whitespace.
7770
3c54f140
DE
7771 * Makefile.in (clean): rm -f $(DEPDIR)/*.
7772
2aecd87f
DE
7773 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
7774 (init.c): signals/ -> common/.
7775 (signals.o): Update.
7776 * target.h (target_signal_to_string,target_signal_to_string)
7777 (target_signal_from_name,target_signal_to_host_p)
7778 (target_signal_from_host,target_signal_to_host): Move to ...
7779 * common/gdb_signals.h: ... here. New file.
7780 * common/signals.c: Moved here from signals/signals.c.
7781 #include gdb_signals.h, remove #include of target.h in gdb case.
7782 (target_signal_from_command,default_target_signal_to_host)
7783 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
7784
223698f8
DE
7785 Include thread ID in target_wait debugging output.
7786 * infrun.c (print_target_wait_results): New function.
7787 (wait_for_inferior,fetch_inferior_event): Call it.
7788
93a91755
PA
77892009-02-27 Pedro Alves <pedro@codesourcery.com>
7790
7791 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
7792 with a ptid_t field.
7793 * linux-thread-db.c (thread_get_info_callback): Build the ptid
7794 using the pid stored in proc_handle.ptid.
7795 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
7796 (check_for_thread_db, thread_db_detach, check_event)
7797 (thread_db_mourn_inferior, find_new_threads_callback)
7798 (thread_db_find_new_threads_1): Adjust.
7799 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
7800 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
7801
b5096abe
PM
78022009-02-27 Phil Muldoon <pmuldoon@redhat.com>
7803
7804 * valprint.c (read_string): Rework clean-up logic. Use
7805 free_current_contents to clean-up buffer.
7806
a2f63f5e
AS
78072009-02-27 Andreas Schwab <schwab@linux-m68k.org>
7808
7809 * MAINTAINERS: Update e-mail address.
7810
83390453
PM
78112009-02-26 Phil Muldoon <pmuldoon@redhat.com>
7812
7813 * python/python-utils.c (python_string_to_unicode): Always return
7814 a new reference.
7815 (python_string_to_target_string): Decrement transient python
7816 instance.
7817 (python_string_to_host_string): Likewise.
7818
78192007-02-26 Pedro Alves <pedro@codesourcery.com>
a0740d21
PA
7820
7821 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
7822 call to super_fetch_registers.
7823 (mips64_linux_store_registers): Pass `ops' to call to
7824 super_store_registers.
7825
89c83b10
DE
78262009-02-25 Doug Evans <dje@google.com>
7827
99361f52
DE
7828 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
7829 error message.
7830
1c2af6c4
DE
7831 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
7832 disabled_shlib_breaks, unused.
7833
89c83b10
DE
7834 * printcmd.c (build_address_symbolic): Fix comment.
7835
9e2f0ad4
HZ
78362009-02-25 Hui Zhu <teawater@gmail.com>
7837
7838 * cli/cli-script.c (define_command): Add _() to query.
7839 * gnu-nat.c (inf_validate_task_sc): Ditto.
7840 * infcmd.c (kill_if_already_running): Ditto.
7841 (jump_command): Ditto.
7842 (attach_command): Ditto.
7843 * inflow.c (kill_command): Ditto.
7844 * infrun.c (handle_command): Ditto.
7845 * maint.c (maintenance_dump_me): Ditto.
7846 * memattr.c (mem_delete_command): Ditto.
7847 * monitor.c (monitor_interrupt_query): Ditto.
7848 * nto-procfs.c (interrupt_query): Ditto.
7849 * printcmd.c (undisplay_command): Ditto.
7850 * remote-mips.c (mips_kill): Ditto.
7851 * remote.c (interrupt_query): Ditto.
7852 * solib-irix.c (irix_open_symbol_file_object): Ditto.
7853 * solib-osf.c (osf_open_symbol_file_object): Ditto.
7854 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
7855 * solib-som.c (som_open_symbol_file_object): Ditto.
7856 * solib-svr4.c (open_symbol_file_object): Ditto.
7857 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
7858 * target.c (kill_or_be_killed): Ditto.
7859 * tracepoint.c (delete_trace_command): Ditto.
7860 * top.c (quit_confirm): Add _() to s that will be used
7861 in query.
7862
02529b48
PM
78632009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
7864
7865 Fix windows-nat.c compilation failure.
7866
7867 * windows-nat.c (windows_thread_alive): Fix forward declaration.
7868 (get_windows_debug_event): Add ops parameter to call to windows_resume.
7869
2fb89e62
PA
78702009-02-23 Pedro Alves <pedro@codesourcery.com>
7871
7872 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
7873
6f43c46f
JB
78742009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
7875
7876 * symtab.c (find_line_symtab): Initialize exact to avoid
7877 a compiler warning.
7878
84e473c8
PA
78792009-02-23 Pedro Alves <pedro@codesourcery.com>
7880
7881 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
7882 `ops' to recursive call.
7883
28439f5e
PA
78842009-02-23 Pedro Alves <pedro@codesourcery.com>
7885
7886 * corelow.c (get_core_registers): Adjust.
7887 (core_file_thread_alive): Rename to...
7888 (core_thread_alive): ... this.
7889 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
7890 (init_core_ops): Adjust.
7891 (coreops_suppress_target): Delete.
7892 (_initialize_corelow): Unconditionally add core_ops.
7893 * procfs.c: Include "inf-child.h".
7894 (procfs_ops): Delete.
7895 (init_procfs_ops): Delete. Reimplement as...
7896 (procfs_target): ... this, inheriting from inf-child.
7897 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
7898 (procfs_prepare_to_store): Delete.
7899 (procfs_store_registers, procfs_resume): Adjust.
7900 (procfs_open): Delete.
7901 (procfs_suppress_run): Delete.
7902 (procfs_can_run): Delete.
7903 (procfs_mourn_inferior): Adjust.
7904 (procfs_init_inferior): Add target_ops parameter. Adjust.
7905 (procfs_create_inferior): Don't pass procfs_init_inferior to
7906 fork_inferior. Instead call it after fork_inferior returns.
7907 (procfs_find_new_threads): Adjust.
7908 (_initialize_procfs): Adjust to use procfs_target instead of
7909 init_procfs_ops.
7910 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
7911 (lwp_to_thread): Use target_thread_alive.
7912 (sol_thread_open): Delete.
7913 (sol_thread_attach): Delete.
7914 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7915 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
7916 to use find_target_beneath.
7917 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
7918 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
7919 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
7920 (check_for_thread_db): New.
7921 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
7922 (sol_thread_new_objfile): Call check_for_thread_db.
7923 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
7924 (sol_thread_can_run): Delete.
7925 (sol_thread_alive): Adjust to use find_target_beneath.
7926 (sol_thread_stop): Delete.
7927 (rw_common): Use target_write_memory or target_read_memory.
7928 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
7929 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
7930 (solaris_pid_to_str): Remove check for libthread_db initialization
7931 failing.
7932 (sol_find_new_threads): Remove check for libthread_db
7933 initialization failing, or for an invalid inferior_ptid. Adjust
7934 to use find_target_beneath.
7935 (sol_core_open, sol_core_close, sol_core_detach,
7936 sol_core_files_info, sol_find_memory_regions,
7937 sol_make_note_section, ignore): Delete.
7938 (init_sol_thread_ops): Make it a thread_stratum target. Remove
7939 unneeded callback settings.
7940 (init_sol_core_ops): Delete.
7941 (_initialize_sol_thread): No longer call init_sol_core_ops, set
7942 procfs_suppress_run, or hack with core_ops.
7943
7944 * target.h (struct target_ops): Add a target_ops * parameter to
7945 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
7946 and to_find_new_threads.
7947 (target_fetch_registers, target_store_registers)
7948 (target_thread_alive, target_find_new_threads): Redeclare as
7949 function.
a2f63f5e 7950
28439f5e
PA
7951 * target.c (update_current_target): Do not inherit or de_fault
7952 to_resume, to_fetch_registers, to_store_registers,
7953 to_thread_alive, to_find_new_threads.
7954 (target_resume): Adjust.
7955 (target_thread_alive, target_find_new_threads): New.
7956 (debug_to_resume, debug_to_fetch_registers): Delete.
7957 (target_fetch_registers): New.
7958 (debug_to_store_registers): Delete.
7959 (target_store_registers): New.
7960 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
7961 (setup_target_debug): Adjust.
a2f63f5e 7962
28439f5e 7963 * gdbcore.h (core_ops): Delete declaration.
a2f63f5e 7964
28439f5e
PA
7965 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
7966 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
7967 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
7968 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
7969 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
7970 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
7971 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
7972 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
7973 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
7974 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
7975 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
7976 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
7977 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
7978 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
7979
7980 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
7981 * gdbarch.h, gdbarch.c: Regenerate.
7982
7983 * sol2-tdep.c: Include "inferior.h".
7984 (sol2_core_pid_to_str): New.
7985 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
7986
7987 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
7988 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
7989 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
7990 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
7991
907083d1
DE
79922009-02-22 Doug Evans <dje@google.com>
7993
7994 * exec.c (exec_file_attach): Fix comment.
7995
63807e1d
PA
79962009-02-22 Pedro Alves <pedro@codesourcery.com>
7997
7998 Silence a few -Wmissing-prototypes warnings.
7999
8000 PR build/9877:
a2f63f5e 8001 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
63807e1d 8002 it static.
a2f63f5e
AS
8003 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
8004 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
8005 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
63807e1d
PA
8006 (_initialize_amd64nbsd_tdep): ... this.
8007 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
8008 (_initialize_arm_linux_tdep): Declare.
8009 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
8010 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
8011 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
8012 * avr-tdep.c (avr_return_value): Make it static.
8013 (avr_frame_unwind_cache): Ditto.
8014 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
8015 (bsd_uthread_solib_loaded): Ditto.
8016 (bsd_uthread_solib_unloaded): Ditto.
8017 (bsd_uthread_target): Ditto.
8018 (_initialize_bsd_uthread): Declare.
8019 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
8020 (cris_frame_unwind_cache): Ditto.
8021 * frv-tdep.c (frv_return_value): Ditto.
8022 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
8023 (h8300h_use_struct_convention): Ditto.
8024 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
8025 Ditto.
8026 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
8027 declarations.
8028 * hppabsd-tdep.c: Include hppabsd-tdep.h.
8029 (hppabsd_find_global_pointer): Make it static.
8030 * hppabsd-tdep.h: New.
8031 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
8032 (hppabsd_init_abi): Remove declaration.
8033 (_initialize_hppabsd_tdep): Remove declaration.
8034 (_initialize_hppanbsd_tdep): Declare.
8035 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
8036 (hppabsd_init_abi): Delete declaration.
8037 (hppaobsd_init_abi): Make it static.
8038 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
8039 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
8040 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
8041 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
8042 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
8043 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
8044 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
8045 (_initialize_m32c_tdep): Declare.
8046 * m32r-rom.c (_initialize_m32r_rom): Declare.
8047 * m32r-tdep.c (m32r_skip_prologue): Make it static.
8048 (m32r_return_value): Ditto.
8049 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
8050 (m68hc11_return_value): Ditto.
8051 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
8052 * m88k-tdep.c (m88k_frame_cache): Make it static.
8053 * mep-tdep.c (mep_gdb_print_insn): Ditto.
8054 (mep_return_value): Ditto.
8055 (_initialize_mep_tdep): Declare.
8056 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
8057 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
8058 (mips_linux_syscall_next_pc): Ditto.
8059 (_initialize_mips_linux_tdep): Declare.
8060 * mips-tdep.c (mips_single_step_through_delay): Make it static.
8061 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
8062 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
8063 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
8064 * mt-tdep.c (_initialize_mt_tdep): Declare.
8065 * nbsd-tdep.c: Include nbsd-tdep.h.
8066 * nto-tdep.c (find_load_phdr): Make it static.
8067 (_initialize_nto_tdep): Declare.
8068 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
8069 static.
8070 (_initialize_ppc_linux_tdep): Declare.
8071 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
8072 (m32r_insert_watchpoint, m32r_remove_watchpoint)
8073 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
8074 static.
8075 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
8076 * rs6000-nat.c: Include xcoffread.h.
8077 (find_toc_address): Don't extern declare get_toc_offset. Adjust
8078 to call xcoff_get_to_offset.
8079 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
8080 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
8081 (rs6000_skip_trampoline_code): Make static.
8082 * s390-tdep.c (s390_regset_from_core_section): Ditto.
8083 * sh-tdep.c (sh_register_reggroup_p): Ditto.
8084 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
8085 (_initialize_shnbsd_tdep): Declare.
8086 * solib-frv.c (displacement_from_map): Make static.
8087 (_initialize_frv_solib): Declare.
8088 * solib-irix.c (fetch_lm_info): Make static.
8089 (_initialize_irix_solib): Declare.
8090 * solib-som.c: Include solib-som.h.
8091 (som_solib_select): Line break.
8092 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
8093 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
8094 (_initialize_sparcnbsd_tdep): ... this.
8095 * spu-tdep.c (spu_software_single_step): Make it static.
8096 (_initialize_spu_tdep): Declare.
8097 * vax-tdep.c (vax_frame_cache): Make it static.
8098 * xcoffread.c: Include xcoffread.h.
8099 (get_toc_offset): Rename to ...
8100 (xcoff_get_toc_offset): ... this.
8101 (_initialize_xcoffread): Declare.
8102 * xcoffread.h: New.
8103 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
8104 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
8105 static.
8106 (_initialize_xtensa_tdep): Declare.
8107
2c0b251b
PA
81082008-02-21 Pedro Alves <pedro@codesorcery.com>
8109
8110 Silence a few -Wmissing-prototypes warnings.
8111
8112 PR build/9877:
8113 * amd64-nat.c: Include "amd64-nat.h".
8114 * fork-child.c (_initialize_fork_child): Ditto.
8115 * gcore.c (_initialize_gcore): Ditto.
8116 * inf-ptrace.c: Include "inf-ptrace.h".
8117 (inf_ptrace_store_registers): Make it static.
8118 * linux-nat.c (linux_nat_terminal_ours): Make it static.
8119 (_initialize_linux_nat): Declare before definition.
8120 * linux-tdep.c: Include "linux-tdep.h".
8121 * linux-thread-db.c (_initialize_thread_db): Declare before
8122 definition.
8123 * proc-service.c (_initialize_proc_service): Ditto.
8124 * remote.c (remote_send_printf): Make it static.
8125 * solib.c: Include "solib.h".
8126 * symfile-mem.c (_initialize_symfile_mem): Declare before
8127 definition.
8128 * ada-lang.c (ada_la_decode, ada_match_name)
8129 (ada_suppress_symbol_printing, ada_is_array_type)
8130 (ada_value_ptr_subscript, ada_array_length)
8131 (ada_to_static_fixed_value): Make them static.
8132 (_initialize_ada_language): Declare before definition.
8133 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
8134 (ada_task_list_changed, ada_new_objfile_observer): Make them
8135 static.
8136 (_initialize_tasks): Declare before definition.
8137 * addrmap.c (_initialize_addrmap): Declare before definition.
8138 * auxv.c (default_auxv_parse): Make it static.
8139 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
8140 them static.
8141 * breakpoint.c (remove_sal): Add line break.
8142 (expand_line_sal_maybe): Make it static.
8143 * cp-name-parser.y: Include "cp-support.h".
8144 * cp-valprint.c (cp_find_class_member): Make it static.
8145 * eval.c (value_f90_subarray): Ditto.
8146 * exceptions.c (print_any_exception): Ditto.
8147 * findcmd.c (_initialize_mem_search): Declare before definition.
8148 * frame.c (frame_observer_target_changed): Make it static.
8149 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
8150 * inf-child.c: Include "inf-child.h".
8151 * inferior.h (valid_inferior_id): Rename to ...
8152 (valid_gdb_inferior_id): ... this.
8153 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
8154 Make them static.
8155 * jv-lang.c (java_language_arch_info): Make it static.
8156 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
8157 * osdata.c (info_osdata_command): Make it static.
8158 * regcache.c (regcache_observer_target_changed): Make it static.
8159 * reverse.c (_initialize_reverse): Declare before definition.
8160 * stabsread.c (cleanup_undefined_types_noname)
8161 (cleanup_undefined_types_1): Make them static.
8162 * symfile.c (place_section): Make it static.
8163 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
8164 * target-descriptions.c (_initialize_target_descriptions): Declare
8165 before definition.
8166 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
8167 (find_default_is_async_p, find_default_supports_non_stop): Make
8168 them static.
8169 (target_supports_non_stop): Add prototype.
8170 (dummy_pid_to_str): Make it static.
8171 * utils.c (_initialize_utils): Declare before definition.
8172 * ada-exp.y (_initialize_ada_exp): Declare before definition.
8173 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
8174 * target.h (struct target_ops): Add a prototype to the
8175 to_can_execute_reverse callback.
a2f63f5e
AS
8176 * macroscope.c (_initialize_macroscope): Declare before definition.
8177 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
2c0b251b
PA
8178 * python/python.c (_initialize_python): Declare before definition.
8179 * tui/tui-command.c: Include "tui/tui-command.h".
8180 * tui/tui-data.c (init_content_element, init_win_info): Make them
8181 static.
8182 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
8183 * tui/tui-interp.c (_initialize_tui_interp): Declare before
8184 definition.
8185 * tui/tui-layout.c: Include "tui/tui-layout.h".
8186 (_initialize_tui_layout): Declare before definition.
8187 * tui/tui-regs.c: Include "tui/tui-regs.h".
8188 (tui_display_reg_element_at_line): Make it static.
8189 (_initialize_tui_regs): Declare before definition.
8190 * tui/tui-stack.c (_initialize_tui_stack): Declare before
8191 definition.
8192 * tui/tui-win.c: Include "tui/tui-win.h".
8193 (_initialize_tui_win): Declare before definition.
8194 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
8195 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
8196 (tui_get_cmd_list): Add a prototype.
8197 * tui/tui-windata.c: Include tui-windata.h.
8198 * tui/tui-wingeneral.c (box_win): Make it static.
8199 * cli/cli-logging.c (show_logging_command): Make it static.
8200 (_initialize_cli_logging): Declare before definition.
8201 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
8202 definition.
8203
5aca5a82
PM
82042009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
8205
08c1f091 8206 Extend use of i386_use_watchpoints to all i386 native files
5aca5a82 8207 using hardware watchpoints.
08c1f091
DE
8208 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
8209 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
8210 * windows-nat.c (init_windows_ops): Ditto.
8211 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
8212 * config/i386/nm-cygwin64.h: Ditto.
8213 * config/i386/nm-fbsd.h: Ditto.
8214 * config/i386/nm-go32.h: Ditto.
5aca5a82 8215
1db300f1
JB
82162009-02-19 Joel Brobecker <brobecker@adacore.com>
8217
8218 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
8219
c86cf029
VP
82202009-02-18 Vladimir Prus <vladimir@codesourcery.com>
8221
8222 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
8223 (mi_interpreter_init): Register the above.
8224 * solib.c (clear_solib): Notify solib unload.
8225 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
8226 disable breakpoints on a.out targets.
8227
3ea85240
VP
82282009-02-17 Vladimir Prus <vladimir@codesourcery.com>
8229
8230 * observer.c (observer_test_first_notification_function)
8231 (observer_test_second_notification_function)
8232 (observer_test_third_notification_function): Adjust prototype.
8233
4c1d2973
PA
82342009-02-17 Pedro Alves <pedro@codesourcery.com>
8235
8236 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
8237 (ALL_TARGET_OBS): Add dicos-tdep.o.
8238 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
8239 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
8240 gdb_target_obs.
8241 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
8242 gdb_target_obs.
8243 * dicos-tdep.h, dicos-tdep.c: New.
8244 * amd64-dicos-tdep.c: New.
8245 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
8246 inferior.h. Include dicos-tdep.h.
8247 (i386_dicos_init_abi): Call dicos_init_abi.
8248 (i386_dicos_bfd_has_symbol_p): Delete.
8249 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
8250
8251 * NEWS: Mention x86-64 DICOS target support.
8252
1903f0e6
DE
82532009-02-16 Doug Evans <dje@google.com>
8254
8255 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
8256 All callers updated.
8257 (amd64_get_insn_details): Handle more 3-byte opcode insns.
8258 (amd64_breakpoint_p): Delete.
8259 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
8260 don't back up pc to the start of the int3.
8261 * i386-tdep.c: #include opcode/i386.h.
8262 (i386_skip_prefixes): New function.
8263 (i386_absolute_jmp_p): Constify argument.
8264 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
8265 (i386_breakpoint_p): Delete.
8266 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
8267 When fixing up after stepping an int3, don't back up pc to the start
8268 of the int3.
8269
959b8724
PA
82702009-02-16 Pedro Alves <pedro@codesourcery.com>
8271
8272 * corelow.c (core_close): Don't hardcode the core's pid.
8273 (core_open): Find core threads before calling
8274 post_create_inferior.
8275 (add_to_thread_list, get_core_register_section): Take into account
8276 systems where the regset section names encode the pid of the
8277 inferior.
8278
8279 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
8280 * gdbarch.h, gdbarch.c: Regenerate.
8281
8282 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
8283 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
8284 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
8285 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
8286
1d33d6ba
VP
82872009-02-14 Vladimir Prus <vladimir@codesourcery.com>
8288
8289 Include frame information for *stopped due to CLI commands.
8290
a2f63f5e
AS
8291 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
8292 * infcmd.c (finish_command_continuation): Pass '1' for
8293 'print_frame' parameter to the observer.
8294 * infrun.c (normal_stop): Don't print mi-specific information
8295 here. Pass 'stop_print_frame' to the 'print_frame' parameter
8296 of the observer.
8297 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
8298 If we need to print frame, and current uiout is not the MI one,
8299 print frame again.
1d33d6ba 8300
2ff5e605
PM
83012009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
8302
8303 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
8304 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
8305
5d7cb8df
JK
83062009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8307
8308 PR fortran/9806
8309 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
8310 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
8311
868a0084
PM
83122009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
8313
8314 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
5d7cb8df 8315 for DW_ATE_signed_char and DW_ATE_unsigned_char
868a0084
PM
8316 for pascal language.
8317
42e2132c
JK
83182009-02-11 Jim Meyering <meyering@redhat.com>
8319 Jan Kratochvil <jan.kratochvil@redhat.com>
8320
8321 Avoid NULL dereference.
8322 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
8323 New variable func_type.
8324
315aef0a
PA
83252009-02-11 Pedro Alves <pedro@codesourcery.com>
8326
8327 * gdbarch.c: Regenerate.
8328
58159490
PM
83292009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
8330
8331 * p-lang.c (is_pascal_string_type): Fix comment.
8332 Determine exact size of char elements for GPC
8333 strings.
8334 (pascal_printstr): Handle char width of 2 or 4.
8335 * p-valprint.c (pascal_val_print): Handle char
8336 of width 2 or 4.
a2f63f5e 8337
d3f36a39
DJ
83382009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
8339
8340 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
8341 inside the loop. Only call addrmap_set_empty if the compilation unit
8342 had DW_AT_high_pc and DW_AT_low_pc. Update call to
8343 scan_partial_symbols.
8344 (scan_partial_symbols): Take NEED_PC argument and pass it along with
8345 LOWPC and HIGHPC.
8346 (add_partial_namespace): Take NEED_PC argument and pass it through.
8347 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
8348 if necessary.
8349
47a3467a
PA
83502009-02-07 Pedro Alves <pedro@codesourcery.com>
8351
8352 * NEWS: Mention inspecting extra signal information, $_siginfo,
8353 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
8354
1ef18d08
PA
83552009-02-07 Pedro Alves <pedro@codesourcery.com>
8356
8357 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
8358 isn't defined.
8359
5b009018
PA
83602009-02-06 Pedro Alves <pedro@codesourcery.com>
8361
8362 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
8363 (compat_timer_t, compat_clock_t, struct compat_timeval)
8364 (compat_sigval_t, compat_siginfo_t): New types.
8365 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
8366 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
8367 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
8368 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8369 (amd64_linux_siginfo_fixup): New.
8370 * linux-nat.c (linux_nat_siginfo_fixup): New.
8371 (siginfo_fixup): New.
8372 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
8373 siginfo layout expected by ptrace and the siginfo layout of the
8374 inferior.
8375 (linux_nat_set_siginfo_fixup): New.
8376 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
8377
4aa995e1
PA
83782009-02-06 Pedro Alves <pedro@codesourcery.com>
8379
8380 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
8381 * infrun.c (siginfo_value_read, siginfo_value_write): New.
8382 (siginfo_value_funcs): New.
8383 (siginfo_make_value): New.
8384 (_initialize_infrun): Create the $_siginfo convenience variable.
8385 * gdbtypes.h (append_composite_type_field_aligned): Declare.
8386 * gdbtypes.c (append_composite_type_field): Rename to...
8387 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
8388 argument. Handle it.
8389 (append_composite_type_field): Rewrite on top of
8390 append_composite_type_field_aligned.
8391 * value.h (internalvar_make_value): New typedef.
8392 (struct internalvar) <make_value>: New field.
8393 (create_internalvar_type_lazy): Declare.
8394 * value.c (create_internalvar): Clear make_value.
8395 (create_internalvar_type_lazy): New.
8396 (value_of_internalvar): If make_value is set use it.
8397 (preserve_values): Skip internal variables that don't have a
8398 value.
8399 * gdbarch.sh (get_siginfo_type): New.
8400 * gdbarch.h, gdbarch.c: Regenerate.
8401
8402 * linux-tdep.h, linux-tdep.c: New.
8403 * amd64-linux-tdep.c: Include "linux-tdep.h".
8404 (amd64_linux_init_abi): Register linux_get_siginfo_type and
8405 linux_get_siginfo_mapper.
8406 * i386-linux-tdep.c: Include "linux-tdep.h".
8407 (i386_linux_init_abi): Register linux_get_siginfo_type and
8408 linux_get_siginfo_mapper.
8409 * arm-linux-tdep.c: Include "linux-tdep.h".
8410 (i386_linux_init_abi): Register linux_get_siginfo_type and
8411 linux_get_siginfo_mapper.
8412
8413 * linux-nat.c (linux_xfer_siginfo): New.
8414 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8415 * remote.c (PACKET_qXfer_siginfo_read)
8416 (PACKET_qXfer_siginfo_write): New.
8417 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
8418 "qXfer:siginfo:write" features.
8419 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8420 (_initialize_remote): Add "set/show remote read-siginfo-object"
8421 and "set/show remote write-siginfo-object" commands.
8422
8423 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
8424 (HFILES_NO_SRCDIR): Add linux-tdep.h.
8425 (ALLDEPFILES): Add linux-tdep.c.
a2f63f5e 8426
4aa995e1
PA
8427 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
8428 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
8429 gdb_target_obs.
8430
5f5233d4
PA
84312009-02-06 Jim Blandy <jimb@codesourcery.com>
8432 Daniel Jacobowitz <dan@codesourcery.com>
8433 Vladimir Prus <vladimir@codesourcery.com>
8434 Pedro Alves <pedro@codesourcery.com>
8435
8436 * defs.h (enum lval_type): New value: lval_computed.
8437 * value.h (struct lval_funcs): New type.
8438 (allocate_computed_value, value_computed_funcs)
8439 (value_computed_closure): New declarations.
8440 * value.c (struct value): Add a structure to the location union
8441 for computed lvalues, containing 'funcs' and 'closure' members.
8442 (allocate_computed_value, value_computed_funcs)
8443 (value_computed_closure): New functions.
8444 (value_free): For computed lvalues, call the closure's
8445 'free_closure' function before freeing the value itself.
8446 (value_copy): If we're copying an lval_computed value, call the
8447 closure's 'copy_closure' function.
8448 (set_value_component_location): If the original value is a
8449 computed lvalue, then call the closure's 'copy_closure' function.
8450 (value_of_internalvar): If an internal variable's value is a
8451 computed lvalue, make retrieving its value produce an equivalent
8452 computed lvalue.
8453 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
8454 their read function.
8455 (value_assign): Assign to computed lvalues by calling their write
8456 function.
8457
117de6a9
PA
84582009-02-06 Pedro Alves <pedro@codesourcery.com>
8459
8460 * linux-nat.c (linux_nat_wait): Adjust.
8461 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
8462 * linux-nat.h (thread_db_init): Delete declaration.
8463 * linux-thread-db.c (target_beneath): Delete.
8464 (thread_db_init): Delete.
8465 (thread_db_detach): Use find_target_beneath.
8466 (thread_db_wait): Adjust interface. Use find_target_beneath.
8467 (thread_db_mourn_inferior): Use find_target_beneath.
8468 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
8469 (thread_db_async_mask): Delete.
8470 (thread_db_pid_to_str): Adjust interface. Use
8471 find_target_beneath.
8472 (thread_db_get_thread_local_address): Adjust interface. Use
8473 find_target_beneath.
8474 (init_thread_db_ops): Delete references to delete functions.
8475 * target.c (update_current_target): Don't inherit or default
8476 to_wait. Don't inherit to_pid_to_str and
8477 to_get_thread_local_address.
8478 (target_translate_tls_address): Look for a pushed target that
8479 implements to_get_thread_local_address, and use it instead of
8480 checking for target_get_thread_local_address_p.
8481 (target_wait, target_pid_to_str): Reimplement as functions.
8482 (dummy_pid_to_str): New.
8483 (init_dummy_target): Register it.
8484 (debug_to_wait): Delete.
8485 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
8486 to_get_thread_local_address accept a pointer to struct target_ops.
8487 (target_wait): Delete macro, and declare as function.
8488 (target_pid_to_str): Likewise.
8489 (target_get_thread_local_address)
8490 (target_get_thread_local_address_p): Delete.
8491 (noprocess): Add NORETURN and ATTR_NORETURN tags.
8492 * inf-ptrace.c (inf_ptrace_wait): Adjust.
8493 (inf_ptrace_pid_to_str): New.
8494 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
8495 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
8496 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
8497 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
8498 Adjust.
8499 * corelow.c (core_pid_to_str): Adjust.
8500 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
8501 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
8502 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
8503 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
8504 * hpux-thread.c (hpux_thread_wait): Adjust.
8505 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
8506 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
8507 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
8508 * procfs.c (procfs_pid_to_str): Adjust.
8509 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
8510 * remote-mips.c (mips_wait): Adjust.
8511 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
8512 * remote.c (remote_wait, remote_pid_to_str)
8513 (remote_get_thread_local_address): Adjust.
8514 * rs6000-nat.c (rs6000_wait): Adjust.
8515 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
8516 (sol_thread_wait, solaris_pid_to_str): Adjust.
8517 * spu-linux-nat.c (spu_child_wait): Adjust.
8518 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
8519
d8906c6f
TJB
85202009-02-06 Tom Tromey <tromey@redhat.com>
8521
8522 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
8523 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
8524 (python-cmd.o): New target.
8525 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
8526 completer prototype.
8527 (add_cmd): Initialize destroyer member of cmd_list_element. Use
8528 make_symbol_completion_list_fn as completer.
8529 (delete_cmd): Call destroyer if one is set.
8530 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
8531 completer member. Add destroyer member.
8532 (set_cmd_completer): Add self parameter to
8533 completer prototype.
8534 * command.h (set_cmd_completer): Add cmd parameter to
8535 completer prototype.
8536 * completer.c (noop_completer, filename_completer,
8537 location_completer, expression_completer, command_completer): Adapt
8538 to new completer prototype.
8539 (complete_line_internal): Pass new parameter to completer function.
8540 * completer.h (noop_completer, filename_completer,
8541 location_completer, expression_completer, command_completer): Adapt
8542 prototypes to new completer prototype.
8543 * interps.c (interpreter_completer): Adapt to new completer
8544 prototype.
8545 * python/python-cmd.c: New file.
8546 * python/python-internal.h (gdbpy_initialize_commands): Add
8547 prototype.
8548 (gdbpy_doc_cst): Add forward declaration.
8549 * python/python.c (gdbpy_doc_cst): Declare.
8550 (_initialize_python): Call gdbpy_initialize_commands. Initialize
8551 gdbpy_doc_cst.
8552 * symtab.c (make_symbol_completion_list_fn): New function.
8553 * symtab.h (make_symbol_completion_list_fn): Add prototype.
8554
739ef7fb
PA
85552009-02-06 Pedro Alves <pedro@codesourcery.com>
8556
8557 * target.c (target_get_osdata): Check for equal or higher than
8558 process_stratum, not dummy_stratum.
8559
6d097e65
PA
85602009-02-06 Pedro Alves <pedro@codesourcery.com>
8561
8562 * remote.c (extended_remote_can_run): Delete.
8563 (init_remote_ops): Don't register it.
8564 * target.c (target_get_osdata): Don't check for target_can_run.
8565 Instead any target that has already been pushed, otherwise
739ef7fb 8566 fallback to the default run target.
6d097e65 8567
947b8855
PA
85682009-02-06 Pedro Alves <pedro@codesourcery.com>
8569
8570 * target.c (target_create_inferior, target_detach)
8571 (target_mourn_inferior, target_attach, target_close): Do target
8572 debug output.
8573 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
8574 (debug_to_mourn_inferior, debug_to_close): Delete.
8575 (setup_target_debug): Adjust.
8576
611041af
PA
85772009-02-05 Pedro Alves <pedro@codesourcery.com>
8578
8579 * target.h (target_stopped_data_address_p): Delete declaration,
8580 and don't define as macro.
8581 * target.c (target_stopped_data_address_p): Delete.
8582
b6cb8e7d
TJB
85832009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8584 Tom Tromey <tromey@redhat.com>
8585
8586 * python/python-utils.c (target_string_to_unicode): New function.
8587 * python/python-internal.h (target_string_to_unicode): New prototype.
8588 * python/python-value.c (valpy_string): New function.
8589 (value_object_methods): Add `string' entry.
8590
54ba13f7
PA
85912009-02-05 Pedro Alves <pedro@codesourcery.com>
8592
8593 * target.h (target_tid_to_str): Delete.
8594 * thread.c (print_thread_info, thread_apply_all_command)
8595 (thread_apply_command, thread_command, do_captured_thread_select):
8596 Use target_pid_to_str instead of target_tid_to_str.
8597 * linux-fork.c (delete_fork_command): Likewise.
8598
9d49bdc2
PA
85992009-02-05 Pedro Alves <pedro@codesourcery.com>
8600
8601 * frame.c (has_stack_frames): Make public.
8602 (get_prev_frame): Don't allow a NULL this_frame anymore.
8603 * frame.h (has_stack_frames): Declare.
8604 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
8605 to get_prev_frame, instead start at get_current_frame.
8606 (varobj_create): Check has_stack_frames before getting any frame;
8607 eliminate one usage of deprecated_safe_get_selected_frame.
8608
12453b93
TJB
86092009-02-05 Tom Tromey <tromey@redhat.com>
8610 Thiago Jung Bauermann <bauerman@br.ibm.com>
8611
8612 * python/python.c (GdbMethods): Move to bottom of file.
8613 (get_parameter, execute_gdb_command, gdbpy_write,
8614 gdbpy_flush): Remove forward declarations.
8615 (eval_python_from_control_command): Fix error checking of function
8616 PyRun_SimpleString. Fix error string.
8617 (python_command): Likewise.
8618 (execute_gdb_command): Added from_tty argument.
8619
ae6a3a4c
TJB
86202009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8621
8622 * language.h (language_dfn): Add la_get_string member.
8623 (LA_GET_STRING): New macro.
8624 (default_get_string): New prototype.
8625 * language.c (default_get_string): New function.
8626 (unknown_language_defn, auto_language_defn, local_language_defn): Use
8627 default_get_string for la_get_string.
8628 * c-lang.c (c_get_string): New function.
8629 (c_language_defn, cplus_language_defn, asm_language_defn): Use
8630 c_get_string for la_get_string.
8631 (minimal_language_defn): Likewise
8632 * ada-lang.c (ada_language_defn): Likewise.
8633 * f-lang.c (f_language_defn): Use default_get_string for
8634 la_get_string.
8635 * jv-lang.c (java_language_defn): Likewise.
8636 * m2-lang.c (m2_language_defn): Likewise.
8637 * objc-lang.c (objc_language_defn): Likewise.
8638 * p-lang.c (p_language_defn): Likewise.
8639 * scm-lang.c (scm_language_defn): Likewise.
8640 * typeprint.c (type_to_string): New function.
8641 * value.h (type_to_string): New prototype.
8642 * valprint.c (val_print_string): Factor out code for reading string
8643 from the inferior into its own function. Put 2 spaces after period
8644 in comments.
8645 (read_string): New function.
8646 * valprint.h (read_string): New prototype.
8647
fa8a61dc
TT
86482009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
8649 Tom Tromey <tromey@redhat.com>
8650
8651 PR breakpoints/8079:
8652 * breakpoint.c (print_one_breakpoint): Use exp_string field
8653 to display expression of watchpoints.
8654 (mention): Likewise.
8655 (watch_command_1): Remove trailing whitespace from expression.
8656 * printcmd.c (struct display) <exp_string>: New field.
8657 (display_command): Set exp_string.
8658 (free_display): Free exp_string.
8659 (clear_displays): Use free_display.
8660 (do_one_display): Print exp_string.
8661 (display_info): Likewise.
8662
08c637de
TJB
86632009-02-04 Tom Tromey <tromey@redhat.com>
8664 Thiago Jung Bauermann <bauerman@br.ibm.com>
8665 Phil Muldoon <pmuldoon@redhat.com>
8666
8667 * python/python-internal.h (gdbpy_get_value_from_history): Rename
8668 prototype to gdbpy_history.
8669 (gdbpy_is_string): Declare.
8670 (python_string_to_host_string): Declare.
8671 * python/python-utils.c (gdbpy_is_string): New function.
8672 (unicode_to_encoded_string): New function.
8673 (unicode_to_target_string): Use it.
8674 (python_string_to_host_string): New function.
8675 * python/python-value.c (valpy_address): New function.
8676 (convert_value_from_python): Use gdbpy_is_string. Change to throw
8677 Python exception instead of a GDB exception on error. Properly check
8678 Python booleans.
8679 (valpy_getitem): Convert field name to host string. Handle array
8680 accesses. Adapt to new behaviour of convert_value_from_python.
8681 (valpy_new): Adapt to new behaviour of convert_value_from_python.
8682 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
8683 VALPY_BITXOR, VALPY_BITOR>: New constants.
8684 (valpy_binop): Update. Adapt to new behaviour of
8685 convert_value_from_python.
8686 (valpy_invert): New function.
8687 (valpy_lsh): Likewise.
8688 (valpy_rsh): Likewise.
8689 (valpy_and): Likewise.
8690 (valpy_or): Likewise.
8691 (valpy_xor): Likewise.
8692 (valpy_richcompare): Call convert_value_from_python instead of doing
8693 conversions itself.
8694 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
8695 (gdbpy_get_value_from_history): Rename
8696 function to gdbpy_history.
8697 (gdbpy_initialize_values): Don't set tp_new.
8698 (value_object_type): Add valpy_new.
8699 (value_object_methods): Add `address' entry.
8700 (value_object_as_number): Update for new methods.
8701 * python/python.c (GdbMethods): Rename entry from
8702 `get_value_from_history' to `history'.
8703
538e13a6 87042009-02-04 Jerome Guitton <guitton@adacore.com>
b5304971
JG
8705
8706 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
8707 of type to guard against a crash.
8708
33d502b4
JG
87092009-02-04 Jerome Guitton <guitton@adacore.com>
8710
8711 * value.c (value_from_contents_and_address): Always return
8712 a lval_memory value, even if address is null.
8713
9f08ae4f
TG
87142009-02-04 Tristan Gingold <gingold@adacore.com>
8715
8716 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
8717 (amd64_darwin_sigcontext_addr): Ditto.
8718 (darwin_dwarf_signal_frame_p): Ditto.
8719 (i386_darwin_init_abi): Handle signal frames, use the const for
8720 sc_num_regs.
8721 (x86_darwin_init_abi_64): Ditto.
8722
4bd207ef
TG
87232009-02-04 Tristan Gingold <gingold@adacore.com>
8724
8725 * i386-tdep.c (i386_sigtramp_p): Make it public.
8726 * i386-tdep.h (i386_sigtramp_p): Declare.
8727
4aa99a88
TG
87282009-02-04 Tristan Gingold <gingold@adacore.com>
8729
8730 * machoread.c (macho_symfile_read): Read minsymtab also from
8731 shared libraries.
8732 (macho_symfile_read): Try to read dwarf2 frame info from main
8733 object file, but not from OSO files.
8734 (macho_symfile_offsets): Update section names for latest BFD
8735 changes.
8736 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
8737 (x86_darwin_init_abi_64): Ditto.
8738 * solib-darwin.c: New file.
8739 * solib-darwin.h: New file.
8740 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
8741
7a848be1
TG
87422009-02-04 Tristan Gingold <gingold@adacore.com>
8743
8744 * solist.h (struct target_so_ops): Comment fallback behavior for
8745 operation same.
8746
b32d97f3
TT
87472009-02-03 Tom Tromey <tromey@redhat.com>
8748
8749 * completer.c (add_struct_fields): Check type_name against NULL
8750 before use.
8751
692263b8
JB
87522009-02-03 Joel Brobecker <brobecker@adacore.com>
8753
8754 * MAINTAINERS: Update Elena's email address.
8755
bfa149ac
JB
87562009-02-02 Joel Brobecker <brobecker@adacore.com>
8757
8758 * breakpoint (update_watchpoint): Minor comment adjustment.
8759
1c71341a
TT
87602009-02-02 Tom Tromey <tromey@redhat.com>
8761
52e44b43 8762 PR gdb/9594:
1c71341a
TT
8763 * completer.c (count_struct_fields): Count method names.
8764 (add_struct_fields): Add matching method names.
8765
85541719
DE
87662009-02-02 Doug Evans <dje@google.com>
8767
8768 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
8769 doing any further tcl/tk configury. Don't configure gdbtk if
8770 tcl or tk check fails.
8771 * aclocal.m4: Regenerate.
8772 * configure: Regenerate.
8773
a4295225
TT
87742009-02-02 Tom Tromey <tromey@redhat.com>
8775
8776 PR exp/9059:
8777 * valops.c (find_overload_match): Follow typedefs before taking
8778 address of object argument.
8779
f00150c9
DE
87802009-02-01 Doug Evans <dje@google.com>
8781
8782 * target.h (target_waitstatus_to_string): Declare.
8783 * target.c (target_waitstatus_to_string): New function. Copied from
8784 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
8785 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
8786 TARGET_WAITKIND_NO_HISTORY.
8787 (debug_to_wait): Call it.
8788 * infrun.c (wait_for_inferior): If debug_infrun, print result of
8789 target_wait.
8790 (fetch_inferior_event): Ditto.
8791
5abdf4bd
TT
87922009-01-30 Tom Tromey <tromey@redhat.com>
8793
8794 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
8795
592375cd
VP
87962009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8797
8798 PR 8145.
8799 * thread.c (do_captured_list_thread_ids): Report the current
8800 thread id.
8801
41447f92
VP
88022009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8803
8804 * breakpoint.c (create_breakpoint, create_breakpoints)
8805 (break_command_really, set_breakpoint): New parameter enabled.
8806 (create_breakpoint, break_command_really): Make breakpoint
8807 disabled if so requested.
8808 * breakpoint.h (set_breakpoint): New parameter enabled.
8809 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
8810
35669430
DE
88112009-01-28 Doug Evans <dje@google.com>
8812
8813 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
8814 (amd64_displaced_step_fixup): Declare.
8815 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
8816 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
8817 and make static global.
8818 (amd64_arch_regmap_len): New static global.
8819 (amd64_arch_reg_to_regnum): New function.
8820 (struct amd64_insn): New struct.
8821 (struct displaced_step_closure): New struct.
8822 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
8823 (rex_prefix_p,skip_prefixes)
8824 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
8825 (amd64_insn_length,amd64_get_unused_input_int_reg)
8826 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
8827 (amd64_displaced_step_copy_insn)
8828 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
8829 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
8830 (amd64_displaced_step_fixup): New functions.
8831 * amd64-linux-tdep.c: #include arch-utils.h.
8832 (amd64_linux_init_abi): Install displaced stepping support.
8833
4eb7c016
JG
88342009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
8835 Jerome Guitton <guitton@adacore.com>
8836
8837 * configure, config.in: Regenerated.
8838 * configure.ac: Add --with-system-gdbinit.
8839 * main.c (get_init_files): New.
8840 (captured_main): Use get_init_files. Load system gdbinit before
8841 $HOME/.gdbinit.
8842 (print_gdb_help): Print location of init files.
8843
7df3ce47
PA
88442009-01-28 Pedro Alves <pedro@codesourcery.com>
8845
8846 * corefile.c (generic_search): Delete disabled code.
8847 * gdbcore.h (generic_search): Delete declaration.
8848
77435e4c
PA
88492009-01-26 Pedro Alves <pedro@codesourcery.com>
8850
8851 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
8852 parent to the child.
8853 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
8854 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
8855 remove_breakpoints to remove breakpoints from the parent.
8856
1e275f79
PA
88572009-01-26 Pedro Alves <pedro@codesourcery.com>
8858
7488432f 8859 PR backtrace/9458, PR backtrace/8864:
1e275f79
PA
8860 * frame.c (create_new_frame): Update the frame's cached PC before
8861 finding its unwinder. Use frame_id_build to build the new frame's
8862 id.
8863 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
8864 array values from the ``args'' array values.
8865
1deafd4e
PA
88662009-01-26 Pedro Alves <pedro@codesourcery.com>
8867
8868 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
8869 (create_array_type, create_set_type, init_flags_type)
8870 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
8871 with a call to XZALLOC or XCALLOC, and pairs of calls to
8872 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
8873
3c16cced
PA
88742009-01-26 Pedro Alves <pedro@codesourcery.com>
8875
8876 Add "maint set|show internal-error|internal-warning quit|corefile
8877 ask|yes|no" commands.
8878
8879 PR gdb/7580:
8880 * utils.c (internal_problem_ask, internal_problem_yes)
8881 (internal_problem_no, internal_problem_modes): New.
8882 (struct internal_problem): Remove FIXME. Make should_quit and
8883 should_dump_core types to char *.
8884 (internal_vproblem, internal_error_problem)
8885 (internal_warning_problem): Adjust.
8886 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
8887 functions.
8888 (add_internal_problem_command): New.
8889 (_initialize_utils): New.
8890
616d7dd2
PA
88912009-01-25 Pedro Alves <pedro@codesourcery.com>
8892
8893 * infcmd.c (program_info): Use paddress instead of casting stop_pc
8894 to unsigned long.
8895
0516318b
PA
88962009-01-24 Pedro Alves <pedro@codesourcery.com>
8897
8898 * infrun.c (normal_stop): Don't call
8899 deprecated_update_frame_pc_hack.
8900 * frame.c (deprecated_update_frame_pc_hack)
8901 (deprecated_update_frame_base_hack): Delete, and ...
8902 (create_new_frame): ... inline here.
8903 * frame.h (deprecated_update_frame_pc_hack)
8904 (deprecated_update_frame_base_hack): Delete declarations.
8905
1e8fb976
PA
89062009-01-23 Pedro Alves <pedro@codesourcery.com>
8907
8908 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
8909 * cli/cli-setshow.c (do_setshow_command): Handle it.
8910 * command.h (enum var_types): Add var_zuinteger.
8911 (add_setshow_zuinteger_cmd): Declare.
8912
8913 * valprint.c (_initialize_valprint): Change the set input-radix
8914 and set output-radix commands to zuinteger type.
8915
dd7e2d2b
PA
89162009-01-23 Pedro Alves <pedro@codesourcery.com>
8917
8918 PR gdb/9664:
8919 * infrun.c (normal_stop): Tag threads as stopped, and run the
8920 hook-stop before printing the stack frame.
8921
392452f6
PA
89222009-01-22 Pedro Alves <pedro@codesourcery.com>
8923
8924 PR c++/9631:
8925 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
8926 vbasetype.
8927
f6a96b83
KH
89282009-01-20 Kazu Hirata <kazu@codesourcery.com>
8929
8930 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
8931 unsigned long.
8932
5d277928 89332009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
a12cc160
DJ
8934
8935 PR gdb/9346
8936 * infcmd.c (signal_command): Do not specify a resume PC.
8937
b89667eb
DE
89382009-01-19 Doug Evans <dje@google.com>
8939
8940 * dummy-frame.c (dummy_frame): Replace regcache member with
8941 caller_state.
8942 (dummy_frame_push): Replace caller_regcache arg with caller_state.
8943 All callers updated.
8944 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
8945 (dummy_frame_pop): Rewrite. Verify requested frame is in the
8946 dummy frame stack. Restore program state.
8947 (cleanup_dummy_frames): Rewrite.
8948 (dummy_frame_sniffer): Update. Make static.
8949 * dummy-frame.h (regcache,frame_info): Delete forward decls.
8950 (inferior_thread_state): New forward decl.
8951 (dummy_frame_push): Update prototype.
8952 * frame.c (frame_pop): dummy_frame_pop now does all the work for
8953 DUMMY_FRAMEs.
8954 * infcall.c (breakpoint_auto_delete_contents): Delete.
8955 (get_function_name,run_inferior_call): New fns.
8956 (call_function_by_hand): Simplify by moving some code to
8957 get_function_name, run_inferior_call. Inferior function call wrapped
8958 in TRY_CATCH so there's less need for cleanups and all exits from
8959 proceed are handled similarily. Detect program exit.
8960 Detect program stopping in a different thread.
8961 Make error messages more consistent.
8962 * inferior.h (inferior_thread_state): Declare (opaque type).
8963 (save_inferior_thread_state,restore_inferior_thread_state,
8964 make_cleanup_restore_inferior_thread_state,
8965 discard_inferior_thread_state, get_inferior_thread_state_regcache):
8966 Declare.
8967 (save_inferior_status): Update prototype.
8968 * infrun.c: (normal_stop): When stopped for the completion of an
8969 inferior function call, verify the expected stack frame kind.
8970 (inferior_thread_state): New struct.
8971 (save_inferior_thread_state,restore_inferior_thread_state,
8972 do_restore_inferior_thread_state_cleanup,
8973 make_cleanup_restore_inferior_thread_state,
8974 discard_inferior_thread_state,
8975 get_inferior_thread_state_regcache): New functions.
8976 (inferior_status): Move stop_signal, stop_pc, registers to
8977 inferior_thread_state. Remove restore_stack_info.
8978 (save_inferior_status): Remove arg restore_stack_info.
8979 All callers updated. Remove saving of state now saved by
8980 save_inferior_thread_state.
8981 (restore_inferior_status): Remove restoration of state now done by
8982 restore_inferior_thread_state.
8983 (discard_inferior_status): Remove freeing of registers, now done by
8984 discard_inferior_thread_state.
8985
aefc7064
PA
89862009-01-18 Pedro Alves <pedro@codesourcery.com>
8987
8988 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
8989 at a time, times NUM_TO_SCROLL.
8990 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
8991 fetch the selected frame if there is no stack.
8992
29f49a6a
PA
89932009-01-18 Pedro Alves <pedro@codesourcery.com>
8994
8995 PR gdb/9747:
8996 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
8997 Declare.
8998 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
8999 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
9000 is thrown while handling an event, finish the thread state.
9001 (normal_stop): Use finish_thread_state cleanup.
9002 * infcmd.c (run_command_1): If an error is thrown while starting
9003 the inferior, finish the thread state.
9004
e7243d73
PA
90052009-01-18 Pedro Alves <pedro@codesourcery.com>
9006
9007 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
9008 skip breakpoints without a location (pending breakpoints).
9009
e74994b5
PA
90102009-01-18 Pedro Alves <pedro@codesourcery.com>
9011
9012 PR build/9186:
9013 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
9014
8405c36e
NR
90152009-01-18 Nick Roberts <nickrob@snap.net.nz>
9016
9017 * thread.c (thread_command): Move call to annotate_thread_changed
9018 to...
9019 (do_captured_thread_select): ... here, to avoid printing an
9020 annotation if the thread change generates an exception.
9021
b8bfd3ed
JB
90222009-01-16 Joel Brobecker <brobecker@adacore.com>
9023
9024 * NEWS: Document x86_64/MinGW as a new native configuration.
9025
2dde91e9
JB
90262009-01-16 Joel Brobecker <brobecker@adacore.com>
9027
9028 * NEWS: Move the documentation of "info os processes" to
9029 the appropriate section (documenting the new commands).
9030
54363045
DE
90312009-01-15 Doug Evans <dje@google.com>
9032
9033 * target.h (target_signal_to_string): Make return type const char *.
9034 (target_signal_to_name): Ditto.
9035 (target_signal_from_name): Make arg const char *.
54363045 9036 * infrun.c (sig_print_info): Update.
54363045
DE
9037 * signals/signals.c (signals): Make array and struct members const.
9038 (target_signal_to_string): Make return type const char *.
9039 (target_signal_to_name): Ditto.
9040 (target_signal_from_name): Make arg const char *.
9041
572d275c
UW
90422009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
9043 Tristan Gingold <gingold@adacore.com>
9044
9045 * solist.h (struct target_so_ops): New member bfd_open.
9046 (solib_find): Add prototype.
9047 (solib_bfd_fopen): Add prototype.
9048 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
9049 from solib_bfd_open.
9050 (solib_bfd_open): Use ops->bfd_open override if present. Call
9051 solib_find and solib_bfd_open otherwise.
9052
9053 * objfiles.h (OBJF_KEEPBFD): New define.
9054 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
9055 objfile flag is set.
9056 * solib.c (symbol_add_stub): Do not allocate second BFD for
9057 shared library; use OBJF_KEEPBFD flag on solib objfile.
9058
0701b271
UW
90592009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
9060
9061 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
9062
61212c0f
UW
90632009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
9064
9065 * value.h (address_of_variable): Add prototype.
9066 (locate_var_value): Remove prototype.
9067
9068 * findvar.c (read_var_value): Do not attempt to default frame
9069 to selected frame.
9070 (locate_var_value): Remove function.
9071 * valops.c (value_of_variable): Retrieve selected frame for
9072 symbols that require a frame when called with NULL block.
9073 * valops.c (address_of_variable): New function.
9074
9075 * eval.c (evaluate_subexp_for_address): Call address_of_variable
9076 instead of calling locate_var_value.
9077 (evaluate_subexp_with_coercion): Likewise.
9078
adb483fe
DJ
90792009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
9080
9081 * NEWS: Document "define" for prefixed commands.
9082 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
9083 show_user_1 for prefix commands.
9084 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
9085 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
9086 commands. Return the containing command list.
9087 (define_command, document_command): Update to handle prefix commands.
9088 (show_user_1): Add prefix and name arguments. Handle prefix
9089 commands.
9090 * cli/cli-script.h (show_user_1): Update prototype.
9091
a32d7317
KT
90922009-01-14 Kai Tietz <kai.tietz@onevision.com>
9093
92a610f3 9094 * ser-mingw.c (console_select_thread): Add return to make
a32d7317
KT
9095 compiler happy.
9096 (pipe_select_thread): Likewise.
9097 (file_select_thread): Likewise.
9098
041d0fd7
PA
90992009-01-14 Pedro Alves <pedro@codesourcery.com>
9100
9101 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
9102 previous change.
9103
dc1981d7
PA
91042009-01-14 Pedro Alves <pedro@codesourcery.com>
9105
9106 * remote.c (extended_remote_mourn_1): Invalidate our notion of
9107 current general thread.
9108
244bf9ae
PA
91092009-01-14 Pedro Alves <pedro@codesourcery.com>
9110
9111 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
9112 without a live selected thread.
9113
e4d013fc
JB
91142009-01-14 Joel Brobecker <brobecker@adacore.com>
9115
9116 Update the copyright notice of some of the files I missed
9117 in the previous copyright update.
9118
a588db63
JB
91192009-01-14 Joel Brobecker <brobecker@adacore.com>
9120
9121 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
9122 base address instead of casting it to DWORD.
9123
77a732d9
UW
91242009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
9125
9126 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
9127 for NULL frame pointers.
9128
773698b5
JB
91292009-01-13 Mark Kettenis <kettenis@gnu.org>
9130
9131 * utils.c (host_address_to_string): Reimplement in a way that
9132 avoids the cast of the address to long.
9133
9918cab9
JB
91342009-01-13 Joel Brobecker <brobecker@adacore.com>
9135
9136 * mdebugread.c (parse_symbol): Save the symbol private data
9137 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
9138 (psymtab_to_symtab_1): Likewise.
9139 (parse_procedure): Declare variable "e" only in the scope
9140 where it is used. Extract the symbol private data using
9141 SYMBOL_VALUE_BYTES.
9142
74bcbdf3
PA
91432009-01-13 Jim Blandy <jimb@codesourcery.com>
9144
9145 Abstract out common code for copying value locations.
9146
9147 * value.h (set_value_component_location): New declaration.
9148 * value.c (set_value_component_location): New function.
9149 (value_primitive_field): Use it.
9150 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
9151 * valops.c (search_struct_field, value_slice): Same.
9152 * ada-lang.c (coerce_unspec_val_to_type)
9153 (ada_value_primitive_packed_val): Same.
9154
d7dc3873
JB
91552009-01-13 Joel Brobecker <brobecker@adacore.com>
9156
9157 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
9158
dc05df57
CF
91592009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
9160
9161 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
9162 throughout.
9163 * i386-cygwin-tdep.c: Ditto.
9164 * i386-windows-nat.c: Ditto.
9165 * windows-nat.h: Ditto.
9166 * windows-tdep.c: Ditto.
9167 * windows-tdep.h: Ditto.
9168 * windows-nat.c: Ditto.
9169 (cygwin_load_start): Redefine as CORE_ADDR.
9170 (cygwin_load_end): Ditto.
b8511eeb 9171 (windows_make_so): Coerce result of address arithmetic to uintptr_t
dc05df57
CF
9172 before coercing to CORE_ADDR to avoid a compiler warning.
9173 (handle_exception): Define addr as CORE_ADDR and coerce
9174 ExceptionAddress to uintptr_t before assigining to avoid a compiler
9175 warning.
9176 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
9177 files.
9178
31b060a2
CF
91792009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
9180
9181 Fix linking with --enable-targets=all:
9182 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
9183 (HFILES_NO_SRCDIR): Add windows-tdep.h.
9184 (ALLDEPFILES): Add windows-tdep.c.
9185
f3b6bd60 91862009-01-11 Chris Faylor <me.gdb@cgf.cx>
31b060a2
CF
9187
9188 * win32-nat.h: Delete.
9189 * windows-nat.h: Rename from win32-nat.h.
9190 * win32-nat.c: Delete.
9191 * windows-nat.c: Rename from win32-nat.c.
9192 * win32-termcap.c: Delete.
9193 * windows-termcap.c: Rename from win32-termcap.c.
9194 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
9195 * configure.ac: Handle rename from win32-termcap.c ->
9196 windows-termcap.c.
9197 * configure: Regenerate.
9198 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
9199 -> windows-termcap.c.
9200 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
9201 windows-tdep.h.
9202 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
9203 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
9204 windows-tdep.h.
9205 (win32_make_so): Handle cygwin compiler warning due to change of
9206 load_addr from DWORD to LPVOID.
9207 (handle_load_dll): Use %p in format string to properly print address
9208 and avoid a compiler warning.
9209 (DEBUG_EXCEPTION_SIMPLE): Ditto.
9210 (handle_exception): Ditto.
9211 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
9212 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
9213 windows-nat.o.
9214 * config/i386/mingw.mh: Ditto.
9215 * config/i386/mingw64.mh: Ditto.
9216
0311118f
JK
92172009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
9218
9219 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
9220 arrayprint_recurse_level to a parameter. Update all the callers. New
9221 comment at autovariables.
9222
5f61c20e
JK
92232009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
9224
9225 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
9226 coding style.
9227
92282009-01-11 Joel Brobecker <brobecker@adacore.com>
53b71562
JB
9229
9230 * target.c (target_xfer_partial): Use host_address_to_string to
9231 print the address of readbuf and writebuf. Cast the address of
9232 elements inside the myaddr buffer into intptr_t.
9233 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
9234 Cast the address of elements inside the myaddr buffer into
9235 intptr_t.
9236
5f61c20e 92372009-01-11 Joel Brobecker <brobecker@adacore.com>
d0761299
JB
9238
9239 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
9240 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
9241 * configure.host, configure.tgt: Add handling for x86_64/windows.
9242 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
9243 and amd64-windows-tdep.c.
9244
5f61c20e 92452009-01-11 Joel Brobecker <brobecker@adacore.com>
bfb87e33
JB
9246
9247 * win32-tdep.h, win32-tdep.c: New files.
9248 * i386-cygwin-tdep.h: Delete.
9249 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
9250 i386-cygwin-tdep.h.
9251 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
9252 * win32-nat.c: Likewise.
9253 * configure.tgt: Add win32-tdep.o to the list of target object
9254 files for i386-cygwin and i386-mingw targets.
9255
5f61c20e 92562009-01-11 Joel Brobecker <brobecker@adacore.com>
7e63b4e4
JB
9257
9258 * win32-nat.h: New file.
9259 * win32-nat.c (mappings): Initialize to NULL.
9260 (win32_set_context_register_offsets): New function.
9261 * i386-windows-nat.c: New file.
9262 (mappings): Moved here from win32-nat.c.
9263 (_initialize_i386_windows_nat): New function.
9264 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
9265 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
9266
25fc6591
AS
92672009-01-09 Andreas Schwab <schwab@suse.de>
9268
9269 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
9270
87f70781
PA
92712009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9272
9273 * gdbtypes.c (append_composite_type_field): Correct the location of
9274 appended fields.
9275
58d4abe1
PA
92762009-01-09 Pedro Alves <pedro@codesourcery.com>
9277
9278 * defs.h (deprecated_error_hook): Delete declaration.
9279 * interps.c (clear_interpreter_hooks): Adjust.
9280 * remote-sim.c (gdb_os_error): Don't try to call
9281 deprecated_error_hook. No need to call exit anymore.
9282 * top.c (deprecated_error_hook): Delete.
9283
e3cb3832
JB
92842009-01-09 Joel Brobecker <brobecker@adacore.com>
9285
9286 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
9287 to print the address of the gdbarch pointer.
9288
30737ed9
JB
92892009-01-09 Joel Brobecker <brobecker@adacore.com>
9290
9291 * gdbarch.sh: Fix all the compilation errors on amd64-windows
9292 due to casting a pointer to a long when printing a function
9293 address. Instead, use host_address_to_string to convert our
9294 address to a string.
9295 * gdbarch.c: Regenerate.
9296
ec4dfccf
JB
92972009-01-09 Joel Brobecker <brobecker@adacore.com>
9298
9299 * event-top.c (async_disconnect, async_stop_sig): use "raise"
9300 instead of "kill" to raise a signal.
9301
d3653bf6
JB
93022009-01-09 Joel Brobecker <brobecker@adacore.com>
9303
9304 * win32-nat.c (get_module_name): Change the type of parameter
9305 "base_address" to LPVOID. Remove unnecessary cast.
9306 (struct lm_info): Change type of load_addr to LPVOID.
9307 (win32_make_so): Change the type of parameter "load_addr"
9308 to LPVOID. Remove some unnecessary casts.
9309 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
9310 (win32_xfer_shared_libraries): Add missing cast.
9311
308a8808
JB
93122009-01-09 Joel Brobecker <brobecker@adacore.com>
9313
9314 * win32-nat.c (has_detach_ability, set_process_privilege):
9315 Cast the result of GetProcAddress to (void *) to avoid
9316 a compilation warning.
9317
5851ab76
JB
93182009-01-09 Joel Brobecker <brobecker@adacore.com>
9319
9320 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
9321 already defined.
9322
5732a500
JB
93232009-01-09 Joel Brobecker <brobecker@adacore.com>
9324
9325 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
9326 definition of local variable "done".
9327 (info_w32_command, handle_exception): Remove unnecessary cast.
9328
def4de3a
JB
93292009-01-09 Joel Brobecker <brobecker@adacore.com>
9330
9331 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
9332 DebugSetProcessKillOnExit. Update all uses in this file.
9333 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
9334 Update all uses in this file.
9335
93362009-01-09 Joel Brobecker <brobecker@adacore.com>
0795be10
JB
9337
9338 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
9339 and use it when pushing the target.
9340 (win32_attach, win32_create_inferior): Update call to
9341 do_initial_win32_stuff.
9342 (win32_detach, win32_mourn_inferior): Use our ops parameter
9343 instead of the global win32_ops to unpush the target.
9344
1be7fe8d
JB
93452009-01-09 Joel Brobecker <brobecker@adacore.com>
9346
9347 * ser-mingw.c (ser_windows_open): Use proper type when casting
9348 in call to _open_osfhandle.
9349
1dac1b47
KT
93502009-01-09 Kai Tietz <kai.tietz@onevision.com>
9351
9352 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
9353
ecf180db
JB
93542009-01-09 Joel Brobecker <brobecker@adacore.com>
9355
9356 * CONTRIBUTE: Minor reformatting.
9357
8234eceb
KT
93582009-01-08 Kai Tietz <kai.tietz@onevision.com>
9359
9360 * MAINTAINERS: Add myself to Write After Approval.
a68ddad5
KT
9361 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
9362 export directory.
8234eceb 9363
72ee8797
NF
93642009-01-08 Nathan Froyd <froydnj@codesourcery.com>
9365
9366 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
9367 Call exit to make it obvious to GCC.
9368
f7545552
TT
93692009-01-08 Tom Tromey <tromey@redhat.com>
9370
9371 PR breakpoints/9350:
9372 * varobj.c (varobj_invalidate): Unconditionally free
9373 all_rootvarobj.
9374 * symfile.c (syms_from_objfile): Free local_addr when returning
9375 normally.
9376 * exec.c (exec_file_attach): Do cleanups before returning.
9377 (exec_file_command): Likewise.
9378 * corefile.c (reopen_exec_file): Do cleanups before returning.
9379 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
a2f63f5e 9380 returning.
f7545552
TT
9381 (do_vec_free): New function.
9382 (update_global_location_list): Make a cleanup for old_locations.
9383 Do cleanups before returning. Remove unused variable 'e'.
9384 (find_condition_and_thread): Free result of parsing the
9385 expression.
9386 (print_it_typical): Do cleanups before returning.
9387 (breakpoint_re_set_one): Always free sals.sals.
9388
dde02812
ES
93892009-01-08 Joel Brobecker <brobecker@adacore.com>
9390 Emi Suzuki <emi-suzuki@tjsys.co.jp>
a2f63f5e 9391
dde02812
ES
9392 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
9393 watchpoints.
9394
69bcc6bc
DE
93952009-01-07 Doug Evans <dje@google.com>
9396
9397 * top.c (gdb_prompt_string): Delete, unused.
9398
fa3a767f
PA
93992009-01-07 Pedro Alves <pedro@codesourcery.com>
9400
9401 Delete ONE_PROCESS_WRITETEXT leftovers.
9402
9403 * breakpoint.c (insert_bp_location): Delete process_warning
9404 argument. Adjust.
9405 (insert_breakpoint_locations): Adjust.
9406 (reattach_breakpoints): Adjust.
9407 * infrun.c (normal_stop): Drop "It might be running in another
9408 process" notice.
9409
7b93f36d
SS
94102009-01-07 Stan Shebs <stan@codesourcery.com>
9411
9412 * config/pa/linux.mh (XDEPFILES): Remove.
9413
0380c18b
DE
94142009-01-07 Doug Evans <dje@google.com>
9415
9416 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
9417
60023297
JK
94182009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9419
9420 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
9421 spacing, a regression from 2008-04-22.
9422
ea8992ce
JB
94232009-01-07 Joel Brobecker <brobecker@adacore.com>
9424
9425 * utils.c (gdb_print_host_address): Adjust implementation to
9426 reuse host_address_to_string. Move comment explaining the conversion
9427 from host address to string from here...
9428 (host_address_to_string): ... to there.
9429
301d2c47
ES
94302009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
9431
9432 * MAINTAINERS: Add myself for write after approval privileges.
9433
170ce852
TT
94342009-01-06 Tom Tromey <tromey@redhat.com>
9435
9436 * value.c (set_internalvar): Use value_free, not xfree.
9437
fdb7262a
JB
94382009-01-06 Jim Blandy <jimb@red-bean.com>
9439
bf1d7d9c
JB
9440 Check return values of functions declared with warn_unused_result
9441 attribute in GLIBC 2.8.
9442 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
9443 * inflow.c (check_syscall): New function.
9444 (new_tty): Use check_syscall to check return values from open and dup.
9445 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
9446 * main.c (captured_main): Call cwd after setting up gdb_stderr;
9447 check for errors from getcwd.
9448 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
9449 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
9450 (stdio_file_fputs): Same.
9451 * utils.c (internal_vproblem): abort if last-ditch error message
9452 write fails.
9453
fdb7262a
JB
9454 * top.c (gdb_init): Don't set the current directory here; that's
9455 already been done in captured_main.
9456
84603566
SL
94572009-01-06 Sandra Loosemore <sandra@codesourcery.com>
9458
9459 * ser-tcp.c: Adjust includes.
9460 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
9461 (tcp_auto_retry, tcp_retry_limit): Declare.
9462 (TIMEOUT): Remove, in favor of tcp_retry_limit.
9463 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
9464 (wait_for_connect): New function.
9465 (net_open): Use it. Add auto-retry logic.
9466 (set_tcp_cmd, show_tcp_cmd): New functions.
9467 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
9468 and "set/show tcp connect-timeout" commands.
9469 * NEWS: Document new commands.
9470
5171e6b3
TT
94712009-01-05 Tom Tromey <tromey@redhat.com>
9472
9473 * python/python-internal.h (Py_ssize_t): Define as int.
9474
a367a1f2
JB
94752009-01-05 Jim Blandy <jimb@red-bean.com>
9476
9477 * MAINTAINERS: Fix my e-mail address as steering committee member.
9478
0fb0cc75
JB
94792009-01-03 Joel Brobecker <brobecker@adacore.com>
9480
9481 Updated copyright notices for most files.
9482
c9fc347d
JB
94832009-01-03 Joel Brobecker <brobecker@adacore.com>
9484
9485 * top.c (print_gdb_version): Update copyright year.
9486
a85d99b4
JB
94872009-01-03 Joel Brobecker <brobecker@adacore.com>
9488
9489 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
9490
4d78a120
JB
94912009-01-01 Pedro Alves <pedro@codesourcery.com>
9492
9493 PR breakpoints/9681:
9494 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
9495 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
9496 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
9497 retrow all other exceptions.
9498
67de2a4c 9499For older changes see ChangeLog-2008.
c906108c
SS
9500\f
9501Local Variables:
9502mode: change-log
9503left-margin: 8
9504fill-column: 74
9505version-control: never
57da7796 9506coding: utf-8
c906108c 9507End:
This page took 1.581109 seconds and 4 git commands to generate.