1 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3 * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
4 (AUTOCONF, configure_deps, AUTOHEADER): New variables.
5 ($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
6 (am--refresh): New rules.
7 (stamp-h, config.status): List config.in and configure including
9 * aclocal.m4: Regenerate.
10 * configure: Regenerate.
12 2009-07-30 Thomas Schwinge <tschwinge@gnu.org>
14 * gnu-nat.c (add_task_commands) <stopped>: Register the correct
17 2009-07-30 H.J. Lu <hongjiu.lu@intel.com>
19 * ia64-tdep.c (ia64_access_reg): Correct paddress.
21 2009-07-30 Jan Kratochvil <jan.kratochvil@redhat.com>
23 Replace public function varobj_list by all_root_varobjs iterator.
24 * mi/mi-cmd-var.c (struct mi_cmd_var_update, mi_cmd_var_update_iter):
26 (mi_cmd_var_update): Replace the varobj_list call by all_root_varobjs.
27 Remove the variables rootlist, cr. New variable data.
28 * varobj.c (rootcount, varobj_list): Remove.
29 (install_variable, uninstall_variable): Remove the rootcount updates.
30 (all_root_varobjs): New function.
31 (varobj_invalidate): Use the all_root_varobjs call. Move the code to...
32 (varobj_invalidate_iter): ... a new function.
33 * varobj.h (varobj_list): Remove the prototype.
34 (all_root_varobjs): New prototype.
36 2009-07-29 Paul Pluzhnikov <ppluzhnikov@google.com>
39 * dbxread.c (read_dbx_symtab): Reduce stack use.
41 2009-07-29 Jan Kratochvil <jan.kratochvil@redhat.com>
43 Fix gcc-4.5 HEAD warnings.
44 * cp-name-parser.y (%union <typed_val_int>, %token GLOBAL)
45 (GLOBAL_CONSTRUCTORS, GLOBAL_DESTRUCTORS, demangler_special <GLOBAL>):
47 (yylex <"global constructors keyed to ">)
48 (yylex <"global destructors keyed to ">): Base it on DEMANGLER_SPECIAL.
49 (cp_comp_to_string): Remove variables str, prefix and buf. Remove the
50 GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS handling.
51 (cp_print): Remove the GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS
54 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
56 * NEWS: Mention ARM VFP support.
57 * target-descriptions.c (tdesc_register_type): Make public.
58 (tdesc_unnumbered_register): New function.
59 (tdesc_register_reggroup_p): Allow missing
60 pseudo_register_reggroup_p.
61 * target-descriptions.h (tdesc_register_type): Declare.
62 (tdesc_unnumbered_register): Declare.
63 * arm-tdep.c (arm_neon_quad_read, arm_neon_quad_write): New functions.
64 (arm_push_dummy_call): Use arm_neon_quad_write.
65 (arm_neon_double_type, arm_neon_quad_type): New functions.
66 (arm_register_type): Handle VFP and NEON registers. Override the
67 types of double-precision registers for NEON. Disable FPA registers
68 if they are not present.
69 (arm_dwarf_reg_to_regnum): Add current VFP and NEON register numbers.
70 (arm_return_value): Use arm_neon_quad_write and arm_neon_quad_read.
71 (arm_register_name): Handle VFP single and NEON quad registers.
72 (arm_pseudo_read, arm_pseudo_write): New functions.
73 (arm_gdbarch_init): Check for VFP and NEON in the target description.
74 Assign numbers to double-precision registers. Register VFP and NEON
75 pseudo registers. Remove a shadowed "i" variable.
76 * arm-tdep.h (enum gdb_regnum): Add ARM_D0_REGNUM and
78 (struct gdbarch_tdep): Add have_neon_pseudos, have_neon,
79 have_vfp_registers, have_vfp_pseudos, neon_double_type,
82 * features/Makefile: Make expedite settings only architecture
84 (WHICH): Add new ARM descriptions.
85 * features/arm-with-neon.xml, features/arm-with-vfpv2.c,
86 features/arm-with-vfpv3.c, features/arm-vfpv2.xml,
87 features/arm-vfpv3.xml, features/arm-with-vfpv2.xml,
88 features/arm-with-vfpv3.xml, features/arm-with-neon.c: New files.
89 * regformats/arm-with-neon.dat, regformats/arm-with-vfpv2.dat,
90 regformats/arm-with-vfpv3.dat: Generate.
92 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
94 * infrun.c (handle_inferior_event): Clear trap_expected after
95 stepping past a single-step breakpoint.
97 2009-07-28 Joseph Myers <joseph@codesourcery.com>
99 * arm-tdep.c (enum arm_vfp_cprc_base_type,
100 arm_vfp_cprc_unit_length, arm_vfp_cprc_reg_char,
101 arm_vfp_cprc_sub_candidate, arm_vfp_call_candidate,
102 arm_vfp_abi_for_function): New.
103 (arm_push_dummy_call): Handle VFP ABI.
104 (arm_extract_return_value, arm_store_return_value): Handle
106 (arm_return_value): Handle VFP ABI.
107 (arm_gdbarch_init): Default fp_model based on Tag_ABI_VFP_args for
110 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
112 * arch-utils.c (displaced_step_at_entry_point): Do not call
113 gdbarch_convert_from_func_ptr_addr.
114 * cris-tdep.c: Remove outdated comment.
115 * infcall.c (call_function_by_hand): Do not call
116 gdbarch_convert_from_func_ptr_addr after entry_point_address.
117 * objfiles.c (entry_point_address): Call both
118 gdbarch_convert_from_func_ptr_addr and
119 gdbarch_addr_bits_remove.
121 2009-07-28 Aleksandar Ristovski <aristovski@qnx.com>
123 * nto-tdep.c (nto_thread_state_str): New array.
124 (nto_extra_thread_info): New function definition.
125 * nto-tdep.h (gdbthread.h): New include.
126 (private_thread_info): New struct.
127 (nto_extra_thread_info): New declaration.
128 * nto-procfs.c (procfs_thread_alive): Properly check if
129 thread is still alive.
130 (update_thread_private_data_name, update_thread_private_data): New
132 (procfs_find_new_threads): Fetch thread private data.
133 (init_procfs_ops): Register to_extra_thread_info.
135 2009-07-25 Pedro Alves <pedro@codesourcery.com>
137 * stack.c (backtrace_command_1): Remove dead check of NULL current
140 2009-07-23 Keith Seitz <keiths@redhat.com>
142 * source.c (forward_search_command): Don't fclose the stream,
143 just run the cleanups.
144 (reverse_search_command): Likewise.
146 2009-07-23 Paul Pluzhnikov <ppluzhnikov@google.com>
148 * symtab.c (search_symbols): Add QUIT.
150 2009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
152 * symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.
154 2009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
156 * objfiles.h (objfiles_changed): New prototype.
157 * objfiles.c (objfiles_updated_p): Rename to objfiles_changed_p.
158 (allocate_objfile, free_objfile): Must rebuild section map.
159 (objfile_relocate): Likewise.
160 (update_section_map, find_pc_section): Adjust.
161 (set_objfiles_updated_on_exe_change): Remove.
162 (set_objfiles_updated_on_solib_activity): Remove.
163 (_initialize_objfiles): Remove.
164 (objfiles_changed): New function.
165 * symfile.c (reread_symbols): Call objfiles_changed.
167 2009-07-22 Hui Zhu <teawater@gmail.com>
169 * record.c (record_xfer_partial): Call error When nquery
172 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
174 * objfiles.c (objfiles_updated_p): New variable.
175 (qsort_cmp, bsearch_cmp, update_section_map): New function.
176 (find_pc_section): Use bsearch.
177 (set_objfiles_updated_on_exe_change): New function.
178 (set_objfiles_updated_on_solib_activity): New function.
179 (_initialize_objfiles): New function.
181 2009-07-21 Michael Eager <eager@eagercon.com>
183 * features/rs6000/powerpc-405.xml: New.
184 * rs6000-tdep.c: Add include & initialize for
185 powerpc-405.c, add 405 to variants.
186 * features/rs6000/powerpc-405.c: Generate.
188 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
190 * utils.c (internal_vproblem): Always print failure message.
192 2009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
193 Vladimir Prus <vladimir@codesourcery.com>
195 * valops.c (value_fetch_lazy): Handle bitfields explicitly.
196 (value_assign): Remove unnecessary FIXME. Honor the container
197 type of bitfields if possible.
198 * value.c (struct value): Add parent field.
199 (value_parent): New function.
200 (value_free): Free the parent also.
201 (value_copy): Copy the parent also.
202 (value_primitive_field): Do not read the contents of a lazy
203 value to create a child bitfield value. Set bitpos and offset
204 according to the container type if possible.
205 (unpack_bits_as_long): Rename from unpack_field_as_long. Take
206 field_type, bitpos, and bitsize instead of type and fieldno.
207 (unpack_field_as_long): Use unpack_bits_as_long.
208 * value.h (value_parent, unpack_bits_as_long): New prototypes.
210 2009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
212 * value.c (struct value): Add reference_count field.
213 (allocate_value_lazy): Initialize reference_count.
214 (value_incref): New function.
215 (value_free): Check the reference count.
216 * value.h (value_incref): New prototype.
218 2009-07-20 Marc Khouzam <marc.khouzam@ericsson.com>
220 * utils.c (defaulted_query): Update comment and remove dead code.
222 2009-07-20 Doug Evans <dje@google.com>
224 Add support for "comdat types" from DWARF4.
225 * dwarf2read.c (dwarf2_per_objfile): New member types,
227 (TYPES_SECTION): New macro.
228 (dwarf2_per_cu_data): Change size of length field from 30 bits
229 to 29 bits. New member from_debug_types.
230 (signatured_type): New struct.
231 (struct attribute): New union member signatured_type.
232 (DW_SIGNATURED_TYPE): New macro.
233 (dwarf2_attr_no_follow): New function.
234 (read_type_unit_scope): New function.
235 (follow_die_ref_or_sig, follow_die_sig): New functions.
236 (dwarf2_locate_sectoins): Handle .debug_types.
237 (dwarf2_build_psymtabs): Read .debug_types.
238 (read_type_comp_unit_head): New function.
239 (hash_type_signature, eq_type_signature): New functions.
240 (create_debug_types_hash_table): New function.
241 (lookup_signatured_type): New function.
242 (process_psymtab_comp_unit): Handle type units too.
243 (process_type_comp_unit, build_type_psymtabs): New functions.
244 (dwarf2_build_psymtabs_hard): Call build_type_psymtabs.
245 (load_partial_comp_unit): Assert not called for a type unit.
246 (skip_one_die): Handle DW_FORM_sig8.
247 (queue_comp_unit): Don't call load_full_comp_unit here, or
248 update read_in_chain.
249 (psymtab_to_symtab_1): Call read_signatured_type_at_offset for
250 type units, or load_full_comp_unit for comp units after
251 queue_comp_unit returns.
252 (load_full_comp_unit): Assert not called for type units.
253 (load_full_comp_unit): Update read_in_chain here.
254 (process_die): Handle DW_TAG_type_unit.
255 (read_structure_type): Look for signatured types.
256 (read_enumeration_type): Ditto.
257 (init_cu_die_reader): Handle .debug_types.
258 (read_comp_unit): Assert hash not computed yet.
259 (read_die_and_children): Expand debugging printf to handle .debug_types.
260 (read_partial_die): Handle DW_TAG_type_unit:
261 (find_patial_die): Handle .debug_types.
262 (read_attribute_value): Handle DW_FORM_sig8.
263 (die_type): Call follow_die_ref_or_sig instead of follow_die_ref.
264 (die_containing_type): Ditto.
265 (dwarf_tag_name): Handle DW_TAG_type_unit.
266 (dwarf_attr_name): Handle DW_AT_signature.
267 (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
268 DW_FORM_flag_present, DW_FORM_sig8.
269 (dump_die_shallow): Handlel DW_FORM_sig8.
270 (maybe_queue_comp_unit): Change return type to int from void.
272 (follow_die_ref): Handle .debug_types.
273 (lookup_signatured_type_at_offset): New function.
274 (read_signatured_type_at_offset): New function.
275 (read_signatured_type): New function.
277 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
279 * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT
280 if the macro is defined.
282 2009-07-20 Pedro Alves <pedro@codesourcery.com>
284 * features/gdb-target.dtd (target): Accept an optional 'osabi'
286 (osabi): Define element.
287 * features/mips-linux.xml (target): Add an osabi subelement set to
289 * regformats/regdat.sh (xmlarch, xmlosabi): New variables. Don't
290 write the architecture into $xmltarget. Store it in $xmlarch.
291 Handle the 'osabi' type. Handle outputting the osabi element of
292 the target description.
293 * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
294 * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
296 * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
297 * target-descriptions.c (struct target_desc) <osabi>: New field.
298 (tdesc_osabi): New function.
299 (set_tdesc_osabi): New function.
300 * xml-tdesc.c: Include osabi.h.
301 (tdesc_end_osabi): New.
302 (target_children): Parse "osabi" elements.
303 * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
304 target description if the user didn't override it or it is not
305 extractable from the bfd. If that still fails, fallback to the
306 configured in default.
307 * osabi.h (osabi_from_tdesc_string): Declare.
308 * osabi.c (osabi_from_tdesc_string): New.
309 (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
312 * NEWS: Mention that target descriptions can now describe the
315 2009-07-20 Mike Frysinger <vapier@gentoo.org>
317 * configure.ac (AC_CHECK_FUNCS): Check for pipe.
318 * config.in, configure: Regenerate.
319 * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
321 2009-07-20 Pedro Alves <pedro@codesourcery.com>
323 * gnu-nat.c: Include "inf-child.h".
324 (gnu_mourn_inferior): Use the passed in target_ops
325 instead of the gnu_ops global.
326 (gnu_create_inferior): Inline `attach_to_child', use the passed in
327 target_ops instead of the gnu_ops global.
328 (gnu_can_run): Delete.
329 (gnu_attach): Use the passed in target_ops instead of the gnu_ops
332 (gnu_prepare_to_store, gnu_open): Delete.
333 (gnu_store_registers, gnu_fetch_registers): Delete declarations.
335 (init_gnu_ops): Delete.
337 (_initialize_gnu_nat): Don't call init_gnu_ops or add_target here.
338 * gnu-nat.h (gnu_target): Declare.
339 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Make
341 (_initialize_i386gnu_nat): New.
343 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
345 * dwarf2loc.c (find_location_expression): Retrieve beginning and
346 ending address offsets in location list entries as integers,
349 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
351 * infrun.c (wait_for_inferior): Invalidate registers and overlay
352 cache every time before calling target_wait.
353 (handle_inferior_event): Make static. Always reset waiton_ptid.
354 Never call registers_changed.
355 (prepare_to_wait): Do not invaliate registers or overlay cache
356 (moved to wait_for_inferior). Do not reset waiton_ptid (moved
357 to handle_inferior_event).
358 (fetch_inferior_event): Remove check for always-true condition.
360 2009-07-20 Thomas Schwinge <tschwinge@gnu.org>
362 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Adjust to
363 2009-02-23 target_ops changes.
365 2009-07-18 Michael Snyder <msnyder@vmware.com>
367 * infrun.c (handle_inferior_event): Remove an execution_direction
368 check in the "check for subroutine calls" test, and add some
369 additional handling for reverse-stepping through shared libraries.
371 2009-07-18 Anthony Green <green@moxielogic.com>
373 * moxie-tdep.c (moxie_analyze_prologue): Take gdbarch as last
374 parameter instead of frame_info.
375 (moxie_frame_cache): Call moxie_analyze_prologue with different
378 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
380 * solib.c (solib_bfd_open): Do not call ops->bfd_open.
381 (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
382 * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
383 * solib-irix.c (_initialize_irix_solib): Likewise.
384 * solib-null.c (_initialize_null_solib): Likewise.
385 * solib-osf.c (_initialize_osf_solib): Likewise.
386 * solib-pa64.c (_initialize_pa64_solib): Likewise.
387 * solib-som.c (_initialize_som_solib): Likewise.
388 * solib-sunos.c (_initialize_sunos_solib): Likewise.
389 * solib-svr4.c (_initialize_svr4_solib): Likewise.
390 * solib-target.c (_initialize_solib_target): Likewise.
392 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
394 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
396 2009-07-16 Doug Evans <dje@google.com>
398 * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
400 2007-07-16 Paul Pluzhnikov <ppluzhnikov@google.com>
402 * linux-thread-db.c (thread_db_find_new_threads_silently):
404 (try_thread_db_load_1): Call it.
406 2009-07-15 Doug Evans <dje@google.com>
408 Code reorg in preparation for adding comdat types support.
409 * dwarf2read.c (struct die_reader_specs): New struct.
410 (locate_pdi_sibling): New arg buffer. All callers updated.
411 (load_partial_dies, read_partial_die): Ditto.
412 (read_8_bytes): Change return type to ULONGEST.
413 (read_comp_unit): Delete arg abfd. All callers updated.
414 (read_die_and_children_1): Delete args abfd, cu. New arg reader.
416 (read_die_and_children, read_die_and_siblings): Ditto.
417 (read_full_die): Ditto. Move closer to callers.
418 (skip_one_die): New arg buffer. All callers updated.
419 (load_full_comp_unit): Change return type to void. All callers
421 (partial_read_comp_unit_head): New args buffer, buffer_size.
423 (process_psymtab_comp_unit): New function, split out from
424 dwarf2_build_psymtabs_hard.
425 (dwarf2_build_psymtabs_hard): Call it.
426 (load_partial_comp_unit): Renamed from load_comp_unit.
428 (skip_children): New arg buffer. All callers updated.
429 (init_cu_die_reader): New function.
430 (is_ref_attr): New function.
431 (dwarf2_get_ref_die_offset): Call it.
432 (alloc_one_comp_unit): New function.
434 2009-07-14 Stan Shebs <stan@codesourcery.com>
436 * MAINTAINERS (Global Maintainers): Add Doug Evans.
438 2009-07-14 Stan Shebs <stan@codesourcery.com>
440 Conditional tracepoints.
441 * ax-gdb.h (gen_eval_for_expr): Declare.
442 * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
443 and other comparisons.
444 (gen_eval_for_expr): New function.
445 (agent_eval_command): New maintenance command.
446 (_initialize_ax_gdb): Define the command.
447 * remote.c (struct remote_state): New field cond_tracepoints.
448 (PACKET_ConditionalTracepoints): New packet config type.
449 (remote_cond_tracepoint_feature): New function.
450 (remote_protocol_features): Add ConditionalTracepoints.
451 (remote_supports_cond_tracepoints): New function.
452 (_initialize_remote): Add ConditionalTracepoints.
453 * tracepoint.c (download_tracepoint): Add conditional.
454 * NEWS: Mention conditional tracepoints.
456 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
458 * objfiles.c (objfile_relocate): Do not relocate the same
459 BLOCKVECTOR_MAP address map multiple times.
461 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
463 * remote.c (process_stop_reply): Access expedited target registers
466 2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
468 Fix memory access from signed 32bit inferior registers on 64bit GDB.
469 * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
470 addr_bit. Mask OFFSET by the ADDR_BIT width.
472 2009-07-13 Anthony Green <green@moxielogic.com>
474 * moxie-tdep.c (moxie_gdbarch_init): Call
475 set_gdbarch_process_record.
476 (moxie_process_record): New.
477 (moxie_process_readu): New.
479 2009-07-12 Michael Snyder <msnyder@vmware.com>
481 * i386-tdep.c: Add a frame unwinder for function epilogues.
482 (i386_in_function_epilogue_p): New function.
483 (i386_epilogue_frame_sniffer): New function.
484 (i386_epilogue_frame_cache): New function.
485 (i386_epilogue_frame_this_id): New function.
486 (i386_epilogue_frame_unwind): New struct frame_unwind.
487 (i386_gdbarch_init): Hook the new unwinder.
489 2009-07-11 Hui Zhu <teawater@gmail.com>
491 * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
492 to "disassemble" command to print the raw instructions in hex as
493 well as in symbolic form.
494 (init_cli_cmds): Ditto.
495 (print_disassembly): Change "mixed" to "flags" to translate
496 the behavior of disassemble.
497 (disassemble_current_function): Ditto.
498 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
499 * stack.c (gdb_disassembly_stub): Ditto.
500 * disasm.c (do_mixed_source_and_assembly): Ditto.
501 (do_mixed_source_and_assembly): Ditto.
502 (do_assembly_only): Ditto.
503 (gdb_disassembly): Ditto.
504 (dump_insns): print the raw instructions in hex as well as in
505 symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
506 * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
507 assembly if it and flags is true.
508 (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
509 the assembly if it and flags is true.
510 (gdb_disassembly): Update extern.
511 * NEWS: Document disassemble/r support.
513 2009-07-10 Tom Tromey <tromey@redhat.com>
515 * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
516 * dwarf2expr.c: Likewise.
517 * dwarf2loc.c: Likewise.
518 * dwarf2read.c: Likewise.
519 * sh-tdep.c: Likewise.
520 * xtensa-tdep.c: Likewise.
522 2009-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
525 * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv. Move
526 variables var, rootlist and cr to their local sub-block. Move the
527 make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
528 and do_cleanups calls to the common base block. Remove the zero NV
531 2009-07-10 Phil Muldoon <pmuldoon@redhat.com>
533 * python/python-internal.h (apply_varobj_pretty_printer): Update
535 (python_string_to_target_python_string): Add definition.
536 * python/python-utils.c (unicode_to_encoded_python_string)
537 (unicode_to_target_python_string)
538 (python_string_to_target_python_string): New Functions.
539 * python/python-prettyprint.c (pretty_print_one_value): Likewise.
540 (print_string_repr): Refactor to logic to account for PyObject
542 (apply_varobj_pretty_printer): Likewise.
543 * python/python-value.c (valpy_string): Parse length keyword. Use
544 length keyword in LA_GET_STRING.
545 * varobj.c (value_get_print_value): Refactor logic to account for
546 PyObject returned strings.
547 * c-lang.c (c_get_string): If the length parameter is specified,
548 use that. Return value in characters. Update comments.
549 * language.h: Update c_get_string prototype comments.
551 2009-07-09 Doug Evans <dje@google.com>
553 * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
554 to read_memory_unsigned_integer.
556 2009-07-09 Jan Kratochvil <jan.kratochvil@redhat.com>
558 Report error on inaccessible memory.
559 * cli/cli-dump.c: Include gdbcore.h.
560 (dump_memory_to_file): Call read_memory instead of target_read_memory.
562 2009-07-09 Hui Zhu <teawater@gmail.com>
564 * solib.c (solib_bfd_open): Output a warning if solib's
565 architecture is not compatible with inferior's architecture.
567 2009-07-09 Ulrich Weigand <uweigand@de.ibm.com>
568 Jan Kratochvil <jan.kratochvil@redhat.com>
570 * target.h (struct target_ops <to_thread_architecture>): Describe it.
571 (target_thread_architecture): Refer to to_thread_architecture.
573 2009-07-08 Pierre Muller <muller@ics.u-strasbg.fr>
575 * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
577 2009-07-07 Ulrich Weigand <uweigand@de.ibm.com>
579 * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
581 2009-07-07 Pierre Muller <muller@ics.u-strasbg.fr>
583 * breakpoint.c (set_raw_breakpoint): Remove static modifier.
585 2009-07-07 Tom Tromey <tromey@redhat.com>
587 * c-lang.c (convert_octal): Only allow 3 octal digits.
588 (print_wchar): Prefer 3-digit octal form. Fall back to hex if
590 * c-exp.y (c_parse_escape): Only allow 3 octal digits.
592 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
594 * python/python-value.c (valpy_getitem): Remove incorrect assert.
596 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
598 * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
600 2009-07-07 Sami Wagiaalla <swagiaal@redhat.com>
602 * cp-support.h (struct using_direct): Rename members inner and
603 outer to import_src, and import_dest respectively.
604 * cp-namespace.c (cp_add_using_directive): Update.
605 (cp_add_using): Update.
606 (cp_copy_usings): Update.
607 (cp_lookup_symbol_namespace): Update.
608 (cp_scan_for_anonymous_namespaces): Update.
609 * cp-support.c (make_symbol_overload_list_using): Update.
610 * cp-support.h (cp_add_using_directive, cp_add_using): Rename
611 arguments from inner and outer to src and dest respectively.
612 * cp-namespace.c (cp_add_using_directive): Ditto.
613 (cp_add_using): Ditto.
615 2009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
617 * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
618 * varobj.c (varobj_invalidate): Replace a while loop by for loop.
620 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
622 Fix hang in floating varobjs.
624 * varobj.c (varobj_invalidate): Advance to next
625 element when processing floating varobj.
627 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
629 * varobj.c: Remove unnecessary include.
631 2009-07-07 Tristan Gingold <gingold@adacore.com>
633 * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
634 Remove excServer.c target. Remove _all target.
635 * darwin.defs: Removed.
637 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
639 * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
641 2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
643 * source.c (find_and_open_source): Remove the `objfile' parameter.
644 Update the function comment.
645 (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
646 find_and_open_source callers.
648 2009-07-05 Pedro Alves <pedro@codesourcery.com>
650 * coff-pe-read.c (read_pe_exported_syms): Recognize
651 "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
654 2009-07-05 Pedro Alves <pedro@codesourcery.com>
656 * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
657 (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
660 2009-06-29 Tristan Gingold <gingold@adacore.com>
662 * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
663 (amd64_darwin_thread_state_num_regs)
664 (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
666 (_initialize_i386_darwin_tdep): Remove 64 bits parts.
667 (darwin_dwarf_signal_frame_p): Make public.
668 * amd64-darwin-tdep.c: New file with most chunks from
670 * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
671 (amd64_darwin_thread_state_reg_offset)
672 (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
673 * amd64-darwin-tdep.h: New file.
674 * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
676 (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
678 (i386_darwin_store_inferior_registers): Ditto.
679 (darwin_set_sstep): Ditto.
680 (darwin_complete_target): Ditto.
681 (amd64_darwin_sstep_at_sigreturn): Ditto.
682 * configure.tgt: Create a separate entry for x86_64-*-darwin.
683 Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
684 * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
685 i386-darwin-tdep.c i386-darwin-nat.c
686 (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
688 2009-07-02 Pedro Alves <pedro@codesourcery.com>
690 * linux-fork.c (forks_exist_p): Drop unnecessary extern.
691 (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
692 (linux_fork_detach): Ditto.
693 (delete_fork_command): Rename to ...
694 (delete_checkpoint_command): ... this.
695 (detach_fork_command): Rename to ...
696 (detach_checkpoint_command): ... this.
697 (info_forks_command): Rename to ...
698 (info_checkpoints_command): ... this.
699 (_initialize_linux_fork): Remove stale comments. Adjust.
701 2009-07-02 Pedro Alves <pedro@codesourcery.com>
703 * linux-nat.c (linux_child_follow_fork): If we're staying attached
704 to the child process, enable event reporting on it. Don't handle
705 checkpoints here. Instead, add the child fork to the lwp thread
706 and inferior lists without clobbering the previous inferior. Let
707 the thread_db layer learn about a new child process, even if
708 following the parent.
709 (linux_nat_switch_fork): Delete lwps of the current inferior only,
710 instead of clearing the whole list. Use thread_change_ptid to
711 give the core the illusion the new checkpoint is still the same
712 inferior. Clear the register cache.
713 (linux_handle_extended_wait): Handle checkpoints here.
714 (linux_multi_process): Turn on.
715 * linux-fork.c (struct fork_info) <pc>: Remove field.
716 (init_fork_list): Do not delete the checkpoint from the inferior
717 list (it is not there).
718 (fork_load_infrun_state): Don't switch inferior_ptid here. Pass
719 the new checkpoint's ptid to linux_nat_switch_fork.
720 (fork_save_infrun_state): Make static. Don't stop the pc field of
721 fork_info, it's gone.
722 (linux_fork_mourn_inferior): Don't delete the checkpoint from the
723 inferior list, it's not there.
724 (linux_fork_detach): Ditto.
725 (delete_fork_command): Replace mention of fork/checkpoint by
727 (detach_fork_command): Likewise. Don't delete the checkpoint from
729 (info_forks_command): Adjust.
730 (restore_detach_fork): Delete.
731 (checkpointing_pid): New.
732 (linux_fork_checkpointing_p): New.
733 (save_detach_fork): Delete.
734 (checkpoint_command): Delete temp_detach_fork. Don't remove
735 breakpoints, that's a nop. Store the pid of the process we're
736 checkpointing, and use make_cleanup_restore_integer to restore it.
737 Don't reinsert breakpoints here.
738 (process_command, fork_command): Delete.
739 (restart_command): Update comments to only mention checkpoints,
741 (_initialize_linux_fork): Delete "fork", "process", "info forks"
743 * linux-fork.h (fork_save_infrun_state, fork_list): Delete
745 (linux_fork_checkpointing_p): Declare.
746 * cli/cli-cmds.c (killlist): New.
747 * cli/cli-cmds.h (killlist): Declare.
748 * gdbcmd.h (killlist): Declare.
749 * inferior.c: Include "gdbthread.h".
750 (detach_inferior_command, kill_inferior_command)
751 (inferior_command): New.
752 (info_inferiors_command): Allow specifying a specific inferior id.
753 (_initialize_inferiors): Register "inferior", "kill inferior" and
754 "detach inferior" commands.
755 * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
756 * gdbthread.h (any_thread_of_process): Declare.
757 * thread.c (any_thread_of_process): New.
759 * NEWS: Mention multi-inferior debugging. Mention 'info
760 inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
762 (Removed commands): New section, mentioning that 'info forks',
763 'fork', 'process', 'delete fork' and 'detach fork' are now gone.
765 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
767 * gdbarch.sh (current_gdbarch): Remove global variable.
768 (find_arch_by_info): Remove, inline into ...
769 (gdbarch_find_by_info): ... this. Remove current_gdbarch swapping.
770 (deprecated_current_gdbarch_select_hack): Rename to ...
771 (deprecated_target_gdbarch_select_hack): ... this. Do not set
772 or access current_gdbarch.
773 * gdbarch.c, gdbarch.h: Regenerate.
775 * arch-utils.c (gdbarch_update_p): Update call.
776 (set_gdbarch_from_file): Likewise.
778 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
780 * defs.h (extract_signed_integer, extract_unsigned_integer,
781 extract_long_unsigned_integer, store_signed_integer,
782 store_unsigned_integer): Add BYTE_ORDER parameter.
783 * findvar.c (extract_signed_integer, extract_unsigned_integer,
784 extract_long_unsigned_integer, store_signed_integer,
785 store_unsigned_integer): Add BYTE_ORDER parameter. Use it
786 instead of current_gdbarch.
788 * gdbcore.h (read_memory_integer, safe_read_memory_integer,
789 read_memory_unsigned_integer, write_memory_signed_integer,
790 write_memory_unsigned_integer): Add BYTE_ORDER parameter.
791 * corefile.c (struct captured_read_memory_integer_arguments): Add
793 (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into
794 struct captured_read_memory_integer_arguments.
795 (do_captured_read_memory_integer): Pass it to read_memory_integer.
796 (read_memory_integer): Add BYTE_ORDER parameter. Pass it to
797 extract_signed_integer.
798 (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to
799 extract_unsigned_integer.
800 (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it
801 to store_signed_integer.
802 (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it
803 to store_unsigned_integer.
805 * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
806 * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
807 Pass it to extract_unsigned_integer.
810 Update calls to extract_signed_integer, extract_unsigned_integer,
811 extract_long_unsigned_integer, store_signed_integer,
812 store_unsigned_integer, read_memory_integer,
813 read_memory_unsigned_integer, safe_read_memory_integer,
814 write_memory_signed_integer, write_memory_unsigned_integer, and
815 get_target_memory_unsigned to pass byte order:
816 * ada-lang.c (ada_value_binop): Update.
817 * ada-valprint.c (char_at): Update.
818 * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
819 * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
820 alpha_extract_return_value, alpha_read_insn,
821 alpha_get_longjmp_target): Update.
822 * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
823 * amd64obsd-tdep.c (amd64obsd_supply_uthread,
824 amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
825 * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
826 amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
827 amd64_displaced_step_fixup): Update.
828 * arm-linux-tdep.c (arm_linux_sigreturn_init,
829 arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
830 * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
831 arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
832 arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
833 arm_return_value): Update.
834 * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
835 * auxv.c (default_auxv_parse): Update.
836 * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
837 avr_scan_prologue, avr_extract_return_value,
838 avr_frame_prev_register, avr_push_dummy_call): Update.
839 * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
840 bsd_uthread_wait, bsd_uthread_thread_alive,
841 bsd_uthread_extra_thread_info): Update.
842 * c-lang.c (c_printstr, print_wchar): Update.
843 * cp-valprint.c (cp_print_class_member): Update.
844 * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
845 cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
846 cris_extract_return_value, find_step_target, dip_prefix,
847 sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
848 move_mem_to_reg_movem_op, get_data_from_address): Update.
849 * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
850 * dwarf2-frame.c (execute_cfa_program): Update.
851 * dwarf2loc.c (find_location_expression): Update.
852 * dwarf2read.c (dwarf2_const_value): Update.
853 * expprint.c (print_subexp_standard): Update.
854 * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
855 unsigned_address_to_pointer, address_to_signed_pointer,
856 read_var_value): Update.
857 * frame.c (frame_unwind_register_signed,
858 frame_unwind_register_unsigned, get_frame_memory_signed,
859 get_frame_memory_unsigned): Update.
860 * frame-unwind.c (frame_unwind_got_constant): Update.
861 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
862 frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
864 * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
865 frv_extract_return_value, find_func_descr,
866 frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
867 * f-valprint.c (f_val_print): Update.
868 * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
870 * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
871 h8300_push_dummy_call, h8300_extract_return_value,
872 h8300h_extract_return_value, h8300_store_return_value,
873 h8300h_store_return_value): Update.
874 * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
875 * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
877 * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
878 hppa64_hpux_in_solib_call_trampoline,
879 hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
880 hppa_hpux_sigtramp_frame_unwind_cache,
881 hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
882 hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
883 hppa32_hpux_search_dummy_call_sequence,
884 hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
885 hppa_hpux_unwind_adjust_stub): Update.
886 * hppa-linux-tdep.c (insns_match_pattern,
887 hppa_linux_find_global_pointer): Update.
888 * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
889 hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
890 skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
891 hppa_pseudo_register_read, hppa_frame_prev_register_helper,
892 hppa_match_insns): Update.
893 * hpux-thread.c (hpux_thread_fetch_registers): Update.
894 * i386-tdep.c (i386bsd_sigcontext_addr): Update.
895 * i386-cygwin-tdep.c (core_process_module_section): Update.
896 * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
897 amd64_darwin_sstep_at_sigreturn): Update.
898 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
899 amd64_darwin_sigcontext_addr): Likewise.
900 * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
901 * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
902 * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
903 * i386obsd-nat.c (i386obsd_supply_pcb): Update.
904 * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
905 i386obsd_trapframe_cache): Update.
906 * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
907 i386_analyze_frame_setup, i386_analyze_prologue,
908 i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
909 i386_get_longjmp_target, i386_push_dummy_call,
910 i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
911 i386_fetch_pointer_argument): Update.
912 * i387-tdep.c (i387_supply_fsave): Update.
913 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
914 * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
915 examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
916 ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
917 ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
918 ia64_libunwind_frame_prev_register,
919 ia64_libunwind_sigtramp_frame_this_id,
920 ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
921 find_extant_func_descr, find_func_descr,
922 ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
923 ia64_unwind_pc): Update.
924 * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
925 iq2000_scan_prologue, iq2000_extract_return_value,
926 iq2000_push_dummy_call): Update.
927 * irix5nat.c (fill_gregset): Update.
928 * jv-lang.c (evaluate_subexp_java): Update.
929 * jv-valprint.c (java_value_print): Update.
930 * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
931 lm32_extract_return_value, lm32_store_return_value): Update.
932 * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
933 m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
934 m32c_m16c_pointer_to_address): Update.
935 * m32r-tdep.c (m32r_store_return_value, decode_prologue,
936 m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
938 * m68hc11-tdep.c (m68hc11_pseudo_register_read,
939 m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
940 m68hc11_push_dummy_call): Update.
941 * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
942 m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
944 * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
945 m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
946 m68k_get_longjmp_target): Update.
947 * m88k-tdep.c (m88k_fetch_instruction): Update.
948 * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
949 mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
950 * mi/mi-main.c (mi_cmd_data_write_memory): Update.
951 * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
952 mips64_linux_get_longjmp_target, mips64_fill_gregset,
953 mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
954 * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
955 * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
956 mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
957 mips_o32_push_dummy_call, mips_o64_push_dummy_call,
958 mips_single_step_through_delay, mips_skip_pic_trampoline_code,
959 mips_integer_to_address): Update.
960 * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
962 * monitor.c (monitor_supply_register, monitor_write_memory,
963 monitor_read_memory_single): Update.
964 * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
965 moxie_analyze_prologue): Update.
966 * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
967 mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
968 mt_push_dummy_call): Update.
969 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
970 read_objc_methlist_method, read_objc_object, read_objc_super,
971 read_objc_class, find_implementation_from_class): Update.
972 * ppc64-linux-tdep.c (ppc64_desc_entry_point,
973 ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
975 * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
976 ppcobsd_sigtramp_frame_cache): Update.
977 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
978 do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
979 ppc64_sysv_abi_return_value): Update.
980 * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
981 * procfs.c (procfs_auxv_parse): Update.
982 * p-valprint.c (pascal_val_print): Update.
983 * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
984 regcache_raw_write_signed, regcache_raw_write_unsigned,
985 regcache_cooked_read_signed, regcache_cooked_read_unsigned,
986 regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
987 * remote-m32r-sdi.c (m32r_fetch_register): Update.
988 * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
990 * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
991 rs6000_convert_from_func_ptr_addr, branch_dest,
992 rs6000_software_single_step): Update.
993 * rs6000-tdep.c (rs6000_in_function_epilogue_p,
994 ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
995 bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
996 rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
997 rs6000_frame_cache): Update.
998 * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
999 s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
1000 s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
1001 extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
1002 * scm-exp.c (scm_lreadr): Update.
1003 * scm-lang.c (scm_get_field, scm_unpack): Update.
1004 * scm-valprint.c (scm_val_print): Update.
1005 * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
1006 score_fetch_inst): Update.
1007 * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
1008 sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
1009 sh64_pseudo_register_read, sh64_pseudo_register_write,
1010 sh64_frame_prev_register): Update:
1011 * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
1012 sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
1013 sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
1014 * solib-darwin.c (darwin_load_image_infos): Update.
1015 * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
1016 find_canonical_descriptor_in_load_object): Update.
1017 * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
1018 irix_open_symbol_file_object): Update.
1019 * solib-som.c (som_solib_create_inferior_hook, link_map_start,
1020 som_current_sos, som_open_symbol_file_object): Update.
1021 * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
1023 * solib-svr4.c (read_program_header, scan_dyntag_auxv,
1024 solib_svr4_r_ldsomap): Update.
1025 * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
1026 * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
1027 sparc64obsd_collect_uthread): Update.
1028 * sparc64-tdep.c (sparc64_pseudo_register_read,
1029 sparc64_pseudo_register_write, sparc64_supply_gregset,
1030 sparc64_collect_gregset): Update.
1031 * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
1032 * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
1033 sparc32obsd_collect_uthread): Update.
1034 * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
1035 sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
1036 sparc_collect_rwindow): Update.
1037 * spu-linux-nat.c (parse_spufs_run): Update.
1038 * spu-tdep.c (spu_pseudo_register_read_spu,
1039 spu_pseudo_register_write_spu, spu_pointer_to_address,
1040 spu_analyze_prologue, spu_in_function_epilogue_p,
1041 spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
1042 spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
1043 info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
1044 info_spu_dma_command, info_spu_proxydma_command): Update.
1045 * stack.c (print_frame_nameless_args, frame_info): Update.
1046 * symfile.c (read_target_long_array, simple_read_overlay_table,
1047 simple_read_overlay_region_table): Update.
1048 * target.c (debug_print_register): Update.
1049 * tramp-frame.c (tramp_frame_start): Update.
1050 * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
1051 v850_extract_return_value, v850_store_return_value,
1052 * valarith.c (value_binop, value_bit_index): Update.
1053 * valops.c (value_cast): Update.
1054 * valprint.c (val_print_type_code_int, val_print_string,
1055 read_string): Update.
1056 * value.c (unpack_long, unpack_double, unpack_field_as_long,
1057 modify_field, pack_long): Update.
1058 * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
1059 vax_skip_prologue): Update.
1060 * xstormy16-tdep.c (xstormy16_push_dummy_call,
1061 xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
1062 xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
1063 xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
1064 * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
1065 xtensa_pseudo_register_write, xtensa_frame_cache,
1066 xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
1069 * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
1070 decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
1071 BYTE_ORDER parameter.
1072 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
1074 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
1075 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
1076 * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it
1077 instead of current_gdbarch.
1078 (decimal_to_string, decimal_from_integral, decimal_from_floating,
1079 decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
1080 Pass it to match_endianness.
1081 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
1082 parameters. Pass them to match_endianness.
1083 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
1084 Pass them to match_endianness.
1085 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
1086 Pass them to match_endianness.
1087 * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
1088 BYTE_ORDER_Y output parameters.
1089 (value_binop): Update call to value_args_as_decimal.
1091 Update calls to decimal_to_string, decimal_from_string,
1092 decimal_from_integral, decimal_from_floating, decimal_to_doublest,
1093 decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
1094 to pass/receive byte order:
1095 * c-exp.y (parse_number): Update.
1096 * printcmd.c (printf_command): Update.
1097 * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
1098 value_equal, value_less): Update.
1099 * valops.c (value_cast, value_one): Update.
1100 * valprint.c (print_decimal_floating): Update.
1101 * value.c (unpack_long, unpack_double): Update.
1102 * python/python-value.c (valpy_nonzero): Update.
1105 * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
1106 (printstr): Update calls to char_at.
1107 (ada_val_print_array): Likewise.
1108 * valprint.c (read_string): Add BYTE_ORDER parameter.
1109 (val_print_string): Update call to read_string.
1110 * c-lang.c (c_get_string): Likewise.
1111 * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
1112 * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
1113 Use it instead of current_gdbarch.
1114 * printcmd.c (printf_command): Update calls to target_wide_charset.
1115 * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
1116 Pass to target_wide_charset. Use it instead of current_gdbarch.
1117 (classify_type): Add BYTE_ORDER parameter. Pass to
1118 charset_for_string_type. Allow NULL encoding pointer.
1119 (print_wchar): Add BYTE_ORDER parameter.
1120 (c_emit_char): Update calls to classify_type and print_wchar.
1121 (c_printchar, c_printstr): Likewise.
1124 * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
1125 * gdbarch.c, gdbarch.h: Regenerate.
1126 * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
1128 * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
1129 * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
1130 * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
1131 (rs6000_skip_trampoline_code): Update call.
1133 * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1134 dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
1135 (alpha_read_insn): Add GDBARCH parameter.
1136 * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
1137 (alpha_register_to_value): Pass architecture to alpha_sts.
1138 (alpha_extract_return_value): Likewise.
1139 (alpha_value_to_register): Pass architecture to alpha_lds.
1140 (alpha_store_return_value): Likewise.
1141 (alpha_read_insn): Add GDBARCH parameter.
1142 (alpha_skip_prologue): Pass architecture to alpha_read_insn.
1143 (alpha_heuristic_proc_start): Likewise.
1144 (alpha_heuristic_frame_unwind_cache): Likewise.
1145 (alpha_next_pc): Likewise.
1146 (alpha_sigtramp_frame_this_id): Pass architecture to
1147 tdep->dynamic_sigtramp_offset callback.
1148 (alpha_sigtramp_frame_sniffer): Pass architecture to
1149 tdep->pc_in_sigtramp callback.
1150 * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
1151 (alphafbsd_sigtramp_offset): Likewise.
1152 * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
1153 parameter. Pass to alpha_read_insn.
1154 (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to
1155 alpha_linux_sigtramp_offset_1.
1156 (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1157 alpha_linux_sigtramp_offset.
1158 (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
1159 and alpha_linux_sigtramp_offset.
1160 * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
1161 (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1162 alphanbsd_sigtramp_offset.
1163 * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
1164 (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1166 (alphaobsd_sigcontext_addr): Pass architecture to
1167 alphaobsd_sigtramp_offset.
1168 * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
1171 * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
1172 (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
1173 (amd64_frame_cache): Likewise.
1175 * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
1176 (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
1177 thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
1178 * arm-wince-tdep.c: Include "frame.h".
1180 * avr-tdep.c (EXTRACT_INSN): Remove.
1181 (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
1182 (avr_skip_prologue): Pass architecture to avr_scan_prologue.
1183 (avr_frame_unwind_cache): Likewise.
1185 * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
1186 (find_step_target): Initialize it.
1187 (get_data_from_address): Add BYTE_ORDER parameter.
1188 (bdap_prefix): Pass byte order to get_data_from_address.
1189 (handle_prefix_assign_mode_for_aritm_op): Likewise.
1190 (three_operand_add_sub_cmp_and_or_op): Likewise.
1191 (handle_inc_and_index_mode_for_aritm_op): Likewise.
1193 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
1194 (frv_linux_sigcontext_reg_addr): Pass architecture to
1195 frv_linux_pc_in_sigtramp.
1196 (frv_linux_sigtramp_frame_sniffer): Likewise.
1198 * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
1199 (h8300_analyze_prologue): Add GDBARCH parameter. Pass to
1200 h8300_is_argument_spill.
1201 (h8300_frame_cache, h8300_skip_prologue): Pass architecture
1202 to h8300_analyze_prologue.
1204 * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1205 in_solib_call_trampoline callback.
1206 (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
1207 * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
1209 (hppa64_push_dummy_call): Pass architecture to
1210 hppa64_convert_code_addr_to_fptr.
1211 (hppa_match_insns): Add GDBARCH parameter.
1212 (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to
1214 (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
1215 (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to
1216 hppa_match_insns_relaxed.
1217 (hppa_stub_unwind_sniffer): Pass architecture to
1218 tdep->in_solib_call_trampoline callback.
1219 * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
1220 (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
1221 hppa_hpux_search_pattern.
1222 * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
1223 (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
1224 Pass to insns_match_pattern.
1225 (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
1226 hppa_linux_sigtramp_find_sigcontext.
1227 (hppa_linux_sigtramp_frame_sniffer): Likewise.
1228 (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
1229 (hppa64_hpux_in_solib_call_trampoline): Likewise.
1231 * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
1232 (i386_analyze_frame_setup): Add GDBARCH parameter.
1233 (i386_analyze_prologue): Add GDBARCH parameter. Pass to
1234 i386_follow_jump and i386_analyze_frame_setup.
1235 (i386_skip_prologue): Pass architecture to i386_analyze_prologue
1236 and i386_follow_jump.
1237 (i386_frame_cache): Pass architecture to i386_analyze_prologue.
1238 (i386_pe_skip_trampoline_code): Add FRAME parameter.
1239 * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
1240 * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
1241 frame to i386_pe_skip_trampoline_code.
1243 * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
1244 to sigcontext_register_address callback.
1245 * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
1246 (ia64_find_unwind_table): Pass architecture to
1247 ia64_find_global_pointer.
1248 (find_extant_func_descr): Add GDBARCH parameter.
1249 (find_func_descr): Pass architecture to find_extant_func_descr
1250 and ia64_find_global_pointer.
1251 (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
1252 tdep->sigcontext_register_address callback.
1253 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
1256 * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
1257 (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
1259 * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
1260 (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
1261 lm32_analyze_prologue.
1263 * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
1264 (m32r_skip_prologue): Pass architecture to decode_prologue.
1266 * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
1267 (m68hc11_scan_prologue): Pass architecture to
1268 m68hc11_analyze_instruction.
1270 * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
1271 (m68k_analyze_prologue): Pass architecture to
1272 m68k_analyze_frame_setup.
1274 * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
1275 (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order
1276 to m88k_fetch_instruction.
1277 (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
1278 (m88k_frame_cache): Likewise.
1280 * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
1281 (mep_analyze_prologue): Pass architecture to mep_get_insn.
1283 * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
1284 (mips32_next_pc): Pass architecture to mips_fetch_instruction.
1285 (deal_with_atomic_sequence): Likewise.
1286 (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
1287 (mips16_scan_prologue): Likewise.
1288 (mips32_scan_prologue): Likewise.
1289 (mips16_in_function_epilogue_p): Likewise.
1290 (mips32_in_function_epilogue_p): Likewise.
1291 (mips_about_to_return): Likewise.
1292 (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
1293 (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
1294 (mips_skip_prologue): Pass architecture to mips16_scan_prologue
1295 and mips32_scan_prologue.
1296 (mips_in_function_epilogue_p): Pass architecture to
1297 mips16_in_function_epilogue_p and
1298 mips32_in_function_epilogue_p.
1299 (heuristic_proc_start): Pass architecture to mips_fetch_instruction
1300 and mips_about_to_return.
1301 (mips_skip_mips16_trampoline_code): Pass architecture to
1302 mips_fetch_instruction.
1303 (fetch_mips_16): Add GDBARCH parameter.
1304 (mips16_next_pc): Pass architecture to fetch_mips_16.
1305 (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
1308 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
1309 read_objc_methlist_method, read_objc_object, read_objc_super,
1310 read_objc_class): Add GDBARCH parameter.
1311 (find_implementation_from_class): Add GDBARCH parameter, pass
1312 to read_objc_class, read_objc_methlist_nmethods, and
1313 read_objc_methlist_method.
1314 (find_implementation): Add GDBARCH parameter, pass to
1315 read_objc_object and find_implementation_from_class.
1316 (resolve_msgsend, resolve_msgsend_stret): Pass architecture
1317 to find_implementation.
1318 (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
1319 architecture to read_objc_super and find_implementation_from_class.
1321 * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
1322 (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
1323 ppc64_standard_linkage3_target): Pass architecture to
1324 ppc64_desc_entry_point.
1325 * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
1326 (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
1327 (rs6000_fetch_instruction): Add GDBARCH parameter.
1328 (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
1329 rs6000_fetch_instruction.
1330 (skip_prologue): Pass architecture to rs6000_fetch_instruction.
1332 * remote-mips.c (mips_store_word): Return old_contents as host
1333 integer value instead of target bytes.
1335 * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
1336 (s390_analyze_prologue): Initialize it.
1337 (extend_simple_arg): Add GDBARCH parameter.
1338 (s390_push_dummy_call): Pass architecture to extend_simple_arg.
1340 * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
1341 * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
1342 (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
1343 * scm-valprint.c (scm_scmval_print): Likewise.
1344 (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
1347 * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
1348 (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
1349 look_for_args_moves.
1350 (sh64_skip_prologue): Pass architecture to
1351 sh64_skip_prologue_hard_way.
1352 * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
1353 (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
1354 (sh_frame_cache): Likewise.
1356 * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
1357 (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
1358 Pass architecture to extract_mips_address.
1360 * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
1361 * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
1362 (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
1363 to sparc_fetch_wcookie.
1364 (sparc32_frame_prev_register): Likewise.
1365 * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
1366 * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
1367 * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
1369 * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
1370 (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
1371 (spu_virtual_frame_pointer): Likewise.
1372 (spu_frame_unwind_cache): Likewise.
1373 (info_spu_mailbox_list): Add BYTE_ORER parameter.
1374 (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
1375 (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
1376 (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
1377 to info_spu_dma_cmdlist.
1379 * symfile.c (read_target_long_array): Add GDBARCH parameter.
1380 (simple_read_overlay_table, simple_read_overlay_region_table,
1381 simple_overlay_update_1): Pass architecture to read_target_long_array.
1383 * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
1384 (v850_frame_cache): Pass architecture to v850_analyze_prologue.
1386 * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
1388 (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
1389 to xstormy16_analyze_prologue.
1390 (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
1391 (xstormy16_find_jmp_table_entry): Likewise.
1392 (xstormy16_skip_trampoline_code): Pass architecture to
1393 xstormy16_resolve_jmp_table_entry.
1394 (xstormy16_pointer_to_address): Likewise.
1395 (xstormy16_address_to_pointer): Pass architecture to
1396 xstormy16_find_jmp_table_entry.
1398 * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
1399 (call0_analyze_prologue): Add GDBARCH parameter, pass to
1401 (call0_frame_cache): Pass architecture to call0_analyze_prologue.
1402 (xtensa_skip_prologue): Likewise.
1404 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1406 * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
1407 (paddress): Add GDBARCH parameter.
1408 * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
1409 (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
1410 * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
1411 * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
1412 use it instead of current_gdbarch.
1414 Update calls to ui_out_field_core_addr to pass architecture:
1415 * ada-lang.c (print_one_exception): Update.
1416 * breakpoint.c (print_one_breakpoint_location,
1417 print_one_exception_catchpoint): Update.
1418 * disasm.c (dump_insns): Update.
1419 * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
1420 * mi/mi-main.c (mi_cmd_data_read_memory): Update.
1421 * mi/mi-symbol-cmds.c: Include "objfiles.h".
1422 (mi_cmd_symbol_list_lines): Update.
1423 * stack.c (print_frame_info, print_frame): Update.
1425 Update callers of paddress to pass architecture:
1426 * ada-tasks.c (info_task): Update.
1427 * ada-valprint.c (ada_val_print_1): Update.
1428 * annotate.c (annotate_source, annotate_frame_begin): Update.
1429 * breakpoint.c (insert_bp_location, describe_other_breakpoints,
1431 * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
1433 * corefile.c (memory_error): Update.
1434 * c-valprint.c (print_function_pointer_address, c_val_print): Update.
1435 * disasm.c (dis_asm_print_address): Update.
1436 * exec.c (print_section_info): Update.
1437 * f-valprint.c (f_val_print): Update.
1438 * infcmd.c: Include "arch-utils.h".
1439 (jump_command, program_info): Update.
1440 * linux-fork.c: Include "arch-utils.h".
1441 (info_forks_command): Update.
1442 * m2-valprint.c (print_function_pointer_address,
1443 print_unpacked_pointer, print_variable_at_address,
1444 m2_val_print): Update.
1445 * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
1447 * printcmd.c (print_address, print_address_demangle, address_info):
1449 * p-valprint.c (pascal_val_print): Update.
1450 * source.c: Include "arch-utils.h".
1451 (line_info): Update.
1452 * stack.c (frame_info, print_block_frame_labels): Update.
1453 * symfile.c (add_symbol_file_command, list_overlays_command): Update.
1454 * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
1455 print_symbol, print_partial_symbols, maintenance_info_psymtabs,
1456 maintenance_check_symtabs): Update.
1457 * symtab.c (find_pc_sect_symtab): Update.
1458 * target.c (deprecated_debug_xfer_memory): Update.
1459 * tracepoint.c (scope_info): Update.
1460 * tui/tui-stack.c (tui_make_status_line): Update.
1461 * valprint.c (val_print_string): Update.
1463 Update callers of paddr_nz to use paddress instead (keeping
1464 user-visible output identical):
1465 * alpha-tdep.c (alpha_heuristic_proc_start): Update.
1466 * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
1467 amd64_displaced_step_fixup): Update.
1468 * arch-utils.c (simple_displaced_step_copy_insn): Update.
1469 * auxv.c (fprint_target_auxv): Update.
1470 * breakpoint.c (insert_single_step_breakpoint): Update.
1471 * buildsym.c (finish_block): Update.
1472 * cli/cli-dump.c (restore_section_callback): Update.
1473 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1474 * frame.c (frame_unwind_register_value): Update.
1475 * gcore.c (gcore_create_callback): Update.
1476 * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
1477 * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
1478 i386_record_lea_modrm_addr, i386_record_lea_modrm,
1479 i386_process_record): Update.
1480 * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
1481 ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
1482 ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
1483 * infrun.c (displaced_step_prepare, displaced_step_fixup,
1484 handle_inferior_event, insert_step_resume_breakpoint_at_sal,
1485 insert_longjmp_resume_breakpoint): Update.
1486 * linux-nat.c (linux_nat_find_memory_regions): Update.
1487 * linux-record.c (record_linux_system_call): Update.
1488 * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
1489 mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
1490 mips_o64_push_dummy_call): Update.
1491 * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
1492 * record.c (record_arch_list_add_mem, record_wait,
1493 record_xfer_partial): Update.
1494 * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
1495 mips_common_breakpoint): Update.
1496 * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
1497 * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
1498 * solib-som.c (som_current_sos): Update.
1499 * symfile.c (load_progress, generic_load): Update.
1500 * symfile-mem.c (add_vsyscall_page): Update.
1501 * valops.c (value_fetch_lazy): Update.
1502 * windows-tdep.c (windows_xfer_shared_library): Update.
1504 Update callers of paddr_nz to use paddress instead (changing
1505 user-visible output to make it more correct):
1506 * dwarf2loc.c (locexpr_describe_location): Update.
1507 * ia64-tdep.c (ia64_memory_insert_breakpoint,
1508 ia64_memory_remove_breakpoint): Update.
1509 * jv-valprint.c (java_value_print): Update.
1510 * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
1511 * monitor.c (monitor_read_memory): Update.
1513 Update callers of paddr to use paddress instead (changing
1514 user-visible output to make it more correct):
1515 * arm-tdep.c (arm_push_dummy_call): Update.
1516 * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
1517 create_breakpoint): Update.
1518 * darwin-nat-info.c (darwin_debug_regions): Update.
1519 * dcache.c (dcache_info): Update.
1520 * dsrec.c (load_srec, make_srec): Update.
1521 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
1522 dwarf2_frame_cache): Update.
1523 * gcore.c (gcore_copy_callback): Update.
1524 * gnu-nat.c (gnu_xfer_memory): Update.
1525 * mips-linux-nat.c (mips_show_dr): Update.
1526 * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
1527 monitor_remove_breakpoint): Update.
1528 * remote.c (compare_sections_command): Update.
1529 * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
1530 m32r_remove_breakpoint, m32r_insert_watchpoint,
1531 m32r_remove_watchpoint): Update.
1532 * sol-thread.c (info_cb): Update.
1533 * symfile.c (load_progress): Update.
1535 Update callers of paddress or paddr_nz to use hex_string instead
1536 (changes output of internal/error/debug messages only):
1537 * dwarf2read.c (dump_die_shallow): Update.
1538 * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
1539 get_frame_func, create_new_frame): Update.
1540 * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
1541 * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
1542 ia64_get_dyn_info_list): Update.
1543 * maint.c (maintenance_translate_address): Update.
1544 * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
1545 * target.c (target_flash_erase): Update.
1547 Update callers of paddr/paddr_nz to use phex/phex_nz instead,
1548 using an appropriate address size. Remove use of strlen_paddr.
1549 * exec.c (exec_files_info): Update.
1550 * i386-nat.c (i386_show_dr): Update.
1551 * remote.c (remote_flash_erase): Update.
1552 * m32r-rom.c (m32r_load_section): Update.
1553 * monitor.c (monitor_vsprintf, monitor_store_register): Update.
1554 * remote.c (remote_check_symbols, remote_search_memory): Update.
1555 * remote-mips.c (mips_request, mips_common_breakpoint): Update.
1556 * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
1557 * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
1558 * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
1559 sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
1560 sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
1561 sh_dsp_show_regs): Update.
1562 * xcoffsolib.c (sharedlibrary_command): Update.
1565 * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
1566 Use hex_string_custom instead of paddr.
1567 (print_bfd_section_info): Pass address size.
1568 (print_objfile_section_info): Likewise.
1570 * annotate.h (annotate_source): Add GDBARCH parameter.
1571 (annotate_frame_begin): Likewise.
1572 * annotate.c (annotate_source): Add GDBARCH parameter.
1573 (annotate_frame_begin): Likewise.
1574 * source.c (identify_source_line): Update call to annotate_source.
1575 * stack.c (print_frame_info, print_frame): Update call to
1576 annotate_frame_begin.
1578 * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
1579 (create_breakpoint, create_ada_exception_breakpoint): Update call.
1581 * stack.c (print_block_frame_labels): Add GDBARCH parameter.
1582 (print_frame_label_vars): Update call.
1584 * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
1585 (dump_psymtab): Update call to print_partial_symbols.
1586 (struct print_symbol_args): Add GDBARCH member.
1587 (dump_symtab_1): Set print_symbol_args architecture member.
1588 (print_symbol): Use it.
1590 * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
1592 * windows-tdep.c (windows_xfer_shared_library): Likewise.
1593 * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
1594 (core_process_module_section): Pass architecture from cpms_data to
1595 windows_xfer_shared_library.
1596 (windows_core_xfer_shared_libraries): Initialize cmps_data
1597 architecture member.
1598 * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
1599 to windows_xfer_shared_library.
1601 * defs.h (print_address): Add GDBARCH parameter.
1602 * printcmd.c (print_address): Add GDBARCH parameter.
1603 (print_scalar_formatted, do_examine): Update call.
1604 * findcmd.c (find_command): Update call.
1605 * tracepoint.c: Include "arch-utils.h".
1606 (trace_find_line_command): Update call.
1607 * tui/tui-disasm.c (tui_disassemble): Update call.
1609 * value.h (print_address_demangle): Add GDBARCH parameter.
1610 * printcmd.c (print_address_demangle): Add GDBARCH parameter.
1611 * c-valprint.c (print_function_pointer_address, c_val_print):
1613 * f-valprint.c (f_val_print): Update call.
1614 * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
1615 * jv-valprint.c (java_val_print): Update call.
1616 * m2-valprint.c (print_function_pointer_address, m2_val_print):
1618 * p-valprint.c (pascal_val_print): Update call.
1620 * disasm.c (gdb_disassemble_info): Install architecture into
1621 di.application_data field.
1623 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1625 * disasm.h (gdb_disassembly): Add GDBARCH parameter.
1626 (gdb_print_insn): Likewise.
1627 * disasm.c (dump_insns): Add GDBARCH parameter. Use it instead
1629 (do_mixed_source_and_assembly): Add GDBARCH parameter. Pass to
1631 (do_assembly_only): Likewise.
1632 (gdb_disassembly): Add GDBARCH parameter. Use it instead of
1633 current_gdbarch. Pass to subroutines.
1634 (gdb_print_insn): Add GDBARCH parameter. Use it instead of
1637 * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
1638 (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
1639 (do_gdb_disassembly): Add GDBARCH argument. Store into args.
1640 (print_frame_info): Pass architecture to do_gdb_disassembly.
1642 * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
1644 * mi/mi-cmd-disas.c: Include "arch-utils.h"
1645 (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
1647 * cli/cli-cmds.c: Include "arch-utils.h".
1648 (print_disassembly): Add GDBARCH parameter. Pass to gdb_disassembly
1649 and tui_show_assembly.
1650 (disassemble_current_function): Pass architecture to
1651 tui_get_low_disassembly_address and print_disassembly.
1652 (disassemble_command): Pass architecture to
1653 tui_get_low_disassembly_address and print_disassembly.
1655 * tui/tui.c (tui_show_assembly): Add GDBARCH parameter. Pass to
1656 tui_update_source_windows_with_addr.
1658 * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
1659 (struct tui_source_info): Likewise.
1660 * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
1662 * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
1663 Pass to gdb_print_insn.
1664 (tui_find_disassembly_address): Add GDBARCH parameter. Pass to
1666 (tui_set_disassem_content): Add GDBARCH parameter. Install into
1667 source_info.gdbarch. Pass to tui_disassemble.
1668 (tui_show_disassem): Add GDBARCH parameter. Pass to
1669 tui_update_source_window.
1670 (tui_show_disassem_and_update_source): Add GDBARCH parameter. Pass to
1671 tui_show_disassem and tui_update_source_window.
1673 (tui_get_begin_asm_address): Return locator architecture in addition
1674 to locator PC value.
1676 (tui_get_low_disassembly_address): Add GDBARCH parameter. Pass to
1677 tui_get_low_disassembly_address.
1679 (tui_vertical_disassem_scroll): Pass architecture to subroutines.
1681 * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
1682 (tui_show_disassem): Likewise.
1683 (tui_show_disassem_and_update_source): Likewise.
1684 (tui_get_begin_asm_address): Return architecture and PC value.
1686 * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
1687 (tui_show_assembly): Add GDBARCH parameter.
1689 * tui/tui-layout.c (extract_display_start_addr): Return current window
1690 architecture in addition to current PC value.
1692 (tui_set_layout): Update calls to tui_get_low_disassembly_address and
1693 extract_display_start_addr. Pass architecture to
1694 tui_update_source_windows_with_addr.
1696 * tui/tui-source.c: Include "objfiles.h".
1697 (tui_set_source_content): Initialize window architecture.
1698 (tui_show_symtab_source): Add GDBARCH parameter. Pass to
1699 tui_update_source_window_as_is
1701 * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
1703 * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
1704 Install locator architecture.
1705 (tui_set_locator_filename): Update call.
1706 (tui_show_frame_info): Pass architecture to tui_set_locator_info
1709 * tui/tui-win.c (make_visible_with_new_height): Pass architecture
1710 to tui_update_source_window.
1712 * tui/tui-winsource.c: Include "objfiles.h".
1713 (tui_display_main): Update call to tui_get_begin_asm_address.
1714 Pass architecture to tui_update_source_windows_with_addr.
1715 (tui_update_source_window): Add GDBARCH parameter. Pass to
1716 tui_update_source_window_as_is.
1717 (tui_update_source_window_as_is): Add GDBARCH parameter.
1718 Pass to tui_set_disassem_content.
1719 (tui_update_source_windows_with_addr): Add GDBARCH parameter.
1720 Pass to subroutines.
1721 (tui_update_source_windows_with_line): Pass objfile architecture
1723 (tui_horizontal_source_scroll): Pass architecture to
1724 tui_update_source_window_as_is.
1726 * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
1728 (tui_update_source_window_as_is): Likewise.
1729 (tui_update_source_windows_with_addr): Likewise.
1731 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1733 * breakpoint.h (struct breakpoint): New member GDBARCH.
1734 * breakpoint.c: Include "arch-utils.h".
1735 (set_raw_breakpoint_without_location): Add GDBARCH parameter.
1736 Use it to set breakpoint architecture.
1737 (set_raw_breakpoint): Add GDBARCH parameter.
1738 (create_internal_breakpoint): Likewise.
1739 (create_catchpoint): Likewise.
1740 (create_fork_vfork_event_catchpoint): Likewise.
1741 (create_breakpoint): Likewise.
1742 (create_breakpoints): Likewise.
1743 (break_command_really): Likewise.
1744 (create_ada_exception_breakpoint): Likewise.
1745 Update local callers to pass architecture:
1746 (create_internal_breakpoint): Update.
1747 (create_overlay_event_breakpoint): Update.
1748 (create_longjmp_master_breakpoint): Update.
1749 (create_thread_event_breakpoint): Update.
1750 (create_solib_event_breakpoint): Update.
1751 (create_catchpoint): Update.
1752 (create_fork_vfork_event_catchpoint): Update.
1753 (set_momentary_breakpoint): Update.
1754 (clone_momentary_breakpoint): Update.
1755 (create_breakpoint): Update.
1756 (create_breakpoints): Update.
1757 (break_command_really): Update.
1758 (break_command_1): Update.
1759 (set_breakpoint): Update.
1760 (watch_command_1): Update.
1761 (catch_fork_command_1): Update.
1762 (catch_exec_commnd_1): Update.
1763 (handle_gnu_v3_exceptions): Update.
1764 (create_ada_exception_breakpoint): Update.
1765 (catch_ada_exception_command): Update.
1766 (catch_assert_command): Update.
1767 (trace_command): Update.
1769 * breakpoint.h (struct bp_location): New member GDBARCH.
1770 * breakpoint.c (get_sal_arch): New function.
1771 (set_raw_breakpoint): Set location architecture.
1772 (add_location_to_breakpoint): Likewise.
1773 (clone_momentary_breakpoint): Likewise.
1774 (watch_command_1): Likewise.
1775 (update_watchpoint): Likewise.
1776 (bp_loc_is_permanent): Use location architecture instead of
1778 (adjust_breakpoint_address): Add GDBARCH parameter; use it
1779 instead of current_gdbarch.
1780 Update callers of adjust_breakpoint_address to pass
1781 breakpoint location architecture:
1782 (set_raw_breakpoint): Update.
1783 (watch_command_1): Update.
1785 * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
1787 (add_local_symbols): Add GDBARCH parameter. Pass to collect_symbol.
1788 (encode_actions): Pass tracepoint architecture to add_local_symbols
1789 (encode_actions): Use tracepoint architecture instead of
1790 current_gdbarch. Pass it to add_local_symbols and collect_symbol.
1792 * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
1793 of print_one callback with last_loc.
1794 * breakpoint.c (print_one_breakpoint_location): Replace last_addr
1795 parameter with last_loc.
1796 (print_one_breakpoint): Likewise.
1797 (do_captured_breakpoint_query): Update call.
1798 (breakpoint_1): Pass last_loc instead of last_addr to
1799 print_one_breakpoint. Pass last location architecture instead of
1800 current_gdbarch to set_next_address.
1801 Update all implementations of the print_one callback:
1802 * breakpoint.c (print_one_catch_fork): Update.
1803 (print_one_catch_vfork): Update.
1804 (print_one_catch_exec): Update.
1805 (print_one_exception_catchpoint): Update.
1806 * ada-lang.c (print_one_exception): Update.
1807 (print_one_catch_exception): Update.
1808 (print_one_catch_exception_unhandled): Update.
1809 (print_one_catch_assert): Update.
1811 * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
1812 parameter. Use it instead of gdbarch_addr_bit (current_gdbarch).
1813 (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
1814 to print_one_breakpoint_location.
1815 (breakpoint_address_bits): New function.
1816 (do_captured_breakpoint_query): Compute number of address bits to print
1817 and pass it to print_one_breakpoint.
1818 (breakpoint_1): Likewise. Use it instead of current_gdbarch.
1820 * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
1821 * breakpoint.c (create_thread_event_breakpoint): Likewise.
1822 Update callers to create_thread_event_breakpoint:
1823 * aix-thread.c (pd_enable): Update.
1824 * linux-thread-db.c (enable_thread_event): Update.
1826 * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
1827 * breakpoint.c (create_solib_event_breakpoint): Likewise.
1828 Update callers to create_solib_event_breakpoint:
1829 * solib-frv.c (enable_break, enable_break2): Update.
1830 * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
1831 * solib-som.c (som_solib_create_inferior_hook): Update.
1832 * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
1833 * solib-svr4.c (enable_break): Update.
1835 * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
1836 * breakpoint.c (insert_single_step_breakpoint): Likewise.
1837 Update callers to insert_single_step_breakpoint:
1838 * alpha-tdep.c (alpha_software_single_step): Update.
1839 * arm-linux-tdep.c (arm_linux_software_single_step): Update.
1840 * arm-tdep.c (arm_software_single_step): Update.
1841 * cris-tdep.c (cris_software_single_step): Update.
1842 * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
1843 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
1844 * sparc-tdep.c (sparc_software_single_step): Update.
1845 * spu-tdep.c (spu_software_single_step): Update.
1846 * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
1847 Pass it to insert_single_step_breakpoint.
1848 (mips_software_single_step): Pass architecture to
1849 deal_with_atomic_sequence and insert_single_step_breakpoint.
1851 * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
1852 (deprecated_remove_raw_breakpoint): Likewise.
1853 * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
1854 (deprecated_remove_raw_breakpoint): Likewise.
1855 Update callers to deprecated_insert_raw_breakpoint and
1856 deprecated_remove_raw_breakpoint:
1857 * breakpoint.c (single_step_gdbarch): New static variable.
1858 (insert_single_step_breakpoint): Pass GDBARCH parameter to
1859 deprecated_insert_raw_breakpoint. Store it in single_step_gdbarch.
1860 (remove_single_step_breakpoints): Pass architecture stored in
1861 single_step_gdbarch to deprecated_remove_raw_breakpoint.
1862 * rs6000-nat.c (exec_one_dummy_insn): Update.
1863 * solib-irix.c (enable_break, disable_break): Update.
1864 * procfs.c (procfs_mourn_inferior): Update.
1865 (remove_dbx_link_breakpoint): Update.
1867 * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
1868 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
1869 * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
1870 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
1871 Update callers to set_breakpoint, set_momentary_breakpoint and
1872 set_momentary_breakpoint_at_pc:
1873 * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
1874 (until_break_command): Update.
1875 * infcall.c (call_function_by_hand): Update.
1876 * infcmd.c (finish_backward, finish_forward): Update.
1877 * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
1878 parameter. Pass it to set_momentary_breakpoint.
1879 (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
1880 Pass it to set_momentary_breakpoint_at_pc.
1881 (handle_inferior_event): Update.
1882 (insert_step_resume_breakpoint_at_frame): Update.
1883 (insert_step_resume_breakpoint_at_caller): Update..
1884 * mi/mi-cmd-break.c: Include "arch-utils.h".
1885 (mi_cmd_break_insert): Update.
1887 * target.h (struct target_ops): Add GDBARCH parameter to
1888 to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
1889 and to_remove_hw_breakpoint members.
1890 (target_insert_breakpoint, target_remove_breakpoint,
1891 target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
1892 parameter, pass to target routine.
1893 (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
1895 * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
1896 debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
1897 GDBARCH parameter, pass to target routine.
1898 (update_current_target): Update function signature.
1899 * breakpoint.c (insert_bp_location, remove_breakpoint,
1900 deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
1901 Pass architecture to target_ routines.
1902 Update all implementations of the target breakpoint routines to take
1903 GDBARCH parameter and use it instead of GDBARCH as appropriate:
1904 * corelow.c (ignore): Update.
1905 * exec.c (ignore): Update.
1906 * mem-break.c (memory_insert_breakpoint): Update.
1907 (memory_remove_breakpoint): Update.
1908 * monitor.c (monitor_insert_breakpoint): Update.
1909 (monitor_remove_breakpoint): Update.
1910 * record.c (record_insert_breakpoint): Update.
1911 (record_beneath_to_insert_breakpoint): Update.
1912 (record_remove_breakpoint): Update.
1913 (record_beneath_to_remove_breakpoint): Update.
1914 * remote.c (remote_insert_breakpoint): Update.
1915 (remote_remove_breakpoint): Update.
1916 (remote_insert_hw_breakpoint): Update.
1917 (remote_remove_hw_breakpoint): Update.
1918 * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
1919 (m32r_remove_breakpoint): Update.
1920 * remote-mips.c (mips_insert_breakpoint): Update.
1921 (mips_remove_breakpoint): Update.
1922 * i386-nat.c (i386_insert_hw_breakpoint): Update.
1923 (i386_remove_hw_breakpoint): Update.
1924 * nto-procfs.c (procfs_insert_breakpoint): Update.
1925 (procfs_remove_breakpoint): Update.
1926 (procfs_insert_hw_breakpoint): Update.
1927 (procfs_remove_hw_breakpoint): Update.
1929 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1931 * frame.h (frame_unwind_arch): New.
1932 (frame_unwind_caller_arch): Likewise.
1933 * frame-unwind.h (frame_prev_arch_ftype): New type.
1934 (struct frame_unwind): New member prev_arch.
1935 * frame.c (struct frame_info): New member prev_arch.
1936 (frame_unwind_arch): New function.
1937 (frame_unwind_caller_arch): Likewise..
1938 (get_frame_arch): Reimplement in terms of frame_unwind_arch.
1939 * sentinel-frame.c (sentinel_frame_prev_arch): New function.
1940 (sentinel_frame_unwinder): Install it.
1942 * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
1944 (frame_unwind_register_value): Likewise.
1945 (frame_unwind_register_signed): Likewise.
1946 (frame_unwind_register_unsigned): Likewise.
1947 * frame-unwind.c (frame_unwind_got_optimized): Likewise.
1948 (frame_unwind_got_register): Likewise.
1949 (frame_unwind_got_constant): Likewise.
1950 (frame_unwind_got_bytes): Likewise.
1951 (frame_unwind_got_address): Likewise.
1953 * frame.h (enum frame_type): New value ARCH_FRAME.
1954 * frame.c (fprint_frame_type): Handle ARCH_FRAME.
1955 * stack.c (print_frame_info): Likewise.
1957 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1959 * target.h (struct target_ops): New member to_thread_architecture.
1960 (target_thread_architecture): New macro.
1961 * target.c (update_current_target): Inherit to_thread_architecture.
1962 (default_thread_architecture): New function.
1963 (debug_to_thread_architecture): New function.
1964 (setup_target_debug): Handle to_thread_architecture.
1966 * regcache.h (get_thread_arch_regcache): New.
1967 * regcache.c (struct regcache_list): New data type.
1968 (current_regcache): Hold regcache list instead of single regcache.
1969 (current_thread_ptid, current_thread_arch): New static variables.
1970 (get_thread_arch_regcache): New function.
1971 (get_thread_regcache): Use it. Call target_thread_architecture.
1972 (regcache_thread_ptid_changed): Update to current_regcache changes.
1973 (registers_changed): Likewise. Reset current_thread_arch and
1974 current_thread_ptid.
1976 * remote.c (remote_wait): Access target registers in target_gdbarch.
1977 * linux-nat.c (linux_nat_do_thread_registers): Likewise.
1978 * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
1979 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
1980 * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
1981 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
1982 * solib-svr4.c (enable_break): Likewise.
1983 (svr4_relocate_main_executable): Likewise.
1985 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1987 * python/python-internal.h (struct language_defn): Declare.
1988 (python_gdbarch, python_language): Likewise.
1989 (ensure_python_env): Add prototype.
1990 (make_cleanup_py_restore_gil): Remove prototype.
1992 * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
1993 (python_gdbarch, python_language): New global variables.
1994 (struct python_env): New data type.
1995 (ensure_python_env, restore_python_env): New functions.
1996 (eval_python_from_control_command): Call ensure_python_env to
1997 install current architecture and language.
1998 (python_command, gdbpy_new_objfile): Likewise.
1999 * python/python-cmd.c: Include "arch-utils.h" and "language.h".
2000 (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
2002 * python/python-type.c (clean_up_objfile_types): Likewise.
2003 * python/python-objfile.c: Include "language.h".
2004 (clean_up_objfile): Call ensure_python_env.
2005 * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
2006 (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
2007 * varobj.c (varobj_ensure_python_env): New helper function.
2008 (varobj_get_display_hint, update_dynamic_varobj_children,
2009 install_default_visualizer, varobj_set_visualizer, free_variable,
2010 value_get_print_value): Call it.
2011 (value_get_print_value): Add varobj argument instead of pretty
2012 printer argument. Update all callers.
2014 * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
2017 * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
2018 (call_internal_function): Likewise.
2019 * value.c (call_internal_function): Likewise. Pass to handler.
2020 * eval.c (evaluate_subexp_standard): Update call.
2021 * python/python-function.c: Include "language.h".
2022 (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
2023 make_cleanup_python_env.
2025 * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
2026 builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
2027 valpy_str): Use python_gdbarch and python_language instead of
2028 current_gdbarch and current_language.
2029 * python/python-type.c (typy_lookup_typename): Likewise.
2031 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2033 * arch-utils.c (selected_byte_order): Return target_byte_order_user.
2034 (show_endian): Use target_byte_order_user if specified; otherwise
2035 use get_current_arch () instead of current_gdbarch.
2036 (show_architecture): Use set_architecture_string if specified;
2037 otherwise use get_current_arch () instead of current_gdbarch.
2038 (get_current_arch): New function.
2039 * arch-utils.h (get_current_arch): Add prototype.
2041 * osabi.c (show_osabi): Use get_current_arch () instead of
2044 * findcmd.c: Include "arch-utils.h".
2045 (parse_find_args): Add BIG_P argument. Use it instead of byte order
2047 (find_command): Use get_current_arch () instead of current_gdbarch.
2048 Pass byte order to parse_find_args.
2050 * maint.c: Include "arch-utils.h".
2051 (maintenance_print_architecture): Use get_current_arch () instead
2054 * reggroups.c: Include "arch-utils.h".
2055 (maintenance_print_reggroups): Use get_current_arch () instead
2058 * symfile.c: Include "arch-utils.h".
2059 (overlay_load_command): Use get_current_arch () instead of
2062 * value.c: Include "arch-utils.h".
2063 (show_convenience): Use get_current_arch () instead of
2066 * tui/tui-regs.c: Include "arch-utils.h".
2067 (tui_reg_next_command): Use get_current_arch () instead of
2070 * mi/mi-main.c: Include "arch-utils.h".
2071 (mi_cmd_data_read_memory): Use get_current_arch () instead of
2074 * parse.c: Include "arch-utils.h".
2075 (parse_exp_in_context): Use get_current_arch () instead of
2078 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2080 * gdbtypes.c (make_pointer_type, make_reference_type,
2081 smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
2082 Use type architecture instead of current_gdbarch.
2084 * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
2085 Add GDBARCH paramter.
2086 * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
2087 Add GDBARCH parameter. Use it instead of current_gdbarch.
2088 * c-typeprint.c (c_type_print_modifier): Update call.
2089 * parse.c (push_type_address_space): Likewise.
2091 * findvar.c (extract_typed_address, store_typed_address): Use type
2092 architecture instead of current_gdbarch.
2094 * value.c (value_as_address, unpack_field_as_long): Use type architecture
2095 instead of current_gdbarch.
2097 * doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
2098 instead of current_gdbarch.
2099 (floatformat_from_type): Pass type architecture.
2101 * infcall.c (find_function_addr): Use type architecture instead
2104 * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
2105 value_bit_index): Use type architecture instead of current_gdbarch.
2106 * valops.c (value_cast, value_slice): Likewise.
2108 * value.h (modify_field): Add TYPE argument.
2109 * value.c (modify_field): Add TYPE argument. Use type architecture
2110 instead of current_gdbarch.
2111 (set_internalvar_component): Likewise.
2112 * eval.c (evaluate_struct_tuple): Update call.
2113 * valops.c (value_assign): Likewise.
2114 * ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
2115 (make_array_descriptor): Update calls.
2116 (move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
2118 (ada_value_assign, value_assign_to_component): Update calls.
2119 (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
2120 value_assign_to_component): Use type arch instead of current_gdbarch.
2122 * printcmd.c (float_type_from_length): Remove GDBARCH argument,
2123 use type architecture instead.
2124 (print_scalar_formatted, printf_command): Update calls. Use type
2125 architecture instead of current_gdbarch.
2126 * valprint.c (val_print_type_code_int): Use type architecture
2127 instead of current_gdbarch.
2128 * varobj.c (value_get_print_value): Likewise.
2129 * python/python-prettyprint.c (print_string_repr): Add GDBARCH
2130 argument. Use it instead of current_gdbarch.
2131 (apply_val_pretty_printer): Update call.
2133 * ada-valprint.c (ada_val_print_1): Use type architecture instead
2135 * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
2136 Use it instead of current_gdbarch.
2137 (c_val_print): Update calls passing type architecture.
2138 * f-valprint.c (f_val_print): Use type architecture instead of
2140 * jv-valprint (java_value_print): Likewise.
2141 * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
2142 Use it instead of current_gdbarch.
2143 (print_unpacked_pointer): Update calls passing type architecture.
2144 * scm-valprint.c (scm_scmval_print): Use type architecture instead of
2147 * gnu-v3-abi.c (get_class_arch): Remove.
2148 (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
2149 special-case check for Java classes.
2150 (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
2151 gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
2152 Use get_type_arch instead of get_class_arch.
2154 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2156 * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
2157 (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
2158 (alloc_type_arch): Add prototype.
2159 (alloc_type_copy): Likewise.
2160 (get_type_arch): Likewise.
2161 (arch_type): Likewise.
2162 (arch_integer_type): Likewise.
2163 (arch_character_type): Likewise.
2164 (arch_boolean_type): Likewise.
2165 (init_float_type): Remove, replace by ...
2166 (arch_float_type): ... this.
2167 (init_complex_type): Remove, replace by ...
2168 (arch_complex_type): ... this.
2169 (init_flags_type): Remove, replace by ...
2170 (arch_flags_type): ... this.
2171 (init_composite_type): Remove, replace by ...
2172 (arch_composite_type): ... this.
2174 * gdbtypes.c (alloc_type): No longer support NULL objfile.
2175 (init_type): Likewise.
2176 (alloc_type_arch): New function.
2177 (alloc_type_copy): New function.
2178 (get_type_arch): New function.
2180 (smash_type): Preserve type ownership information.
2181 (make_pointer_type, make_reference_type, make_function_type,
2182 smash_to_memberptr_type, smash_to_method_type): No longer
2183 preserve OBJFILE across smash_type calls.
2184 (make_pointer_type, make_reference_type, make_function_type,
2185 lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
2186 create_range_type, create_array_type, create_set_type, copy_type):
2187 Use alloc_type_copy when allocating types.
2188 (check_typedef): Use alloc_type_arch.
2189 (copy_type_recursive): Likewise. Preserve type ownership data
2191 (recursive_dump_type): Dump type ownership data.
2192 (alloc_type_instance): Update type ownership check.
2193 (copy_type, copy_type_recursive): Likewise.
2195 (arch_type): New function.
2196 (arch_integer_type): Likewise.
2197 (arch_character_type): Likewise.
2198 (arch_boolean_type): Likewise.
2199 (init_float_type): Remove, replace by ...
2200 (arch_float_type): ... this.
2201 (init_complex_type): Remove, replace by ...
2202 (arch_complex_type): ... this.
2203 (init_flags_type): Remove, replace by ...
2204 (arch_flags_type): ... this.
2205 (append_flags_type_flag): Move down.
2206 (init_composite_type): Remove, replace by ...
2207 (arch_composite_type): ... this.
2208 (append_composite_type_field_aligned,
2209 append_composite_type_field): Move down.
2211 * gdbarch.c (gdbtypes_post_init): Allocate all types
2212 using per-architecture routines.
2213 * ada-lang.c (ada_language_arch_info): Likewise.
2214 * f-lang.c (build_fortran_types): Likewise.
2215 * jv-lang.c (build_java_types): Likewise.
2216 * m2-lang.c (build_m2_types): Likewise.
2217 * scm-lang.c (build_scm_types): Likewise.
2219 * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
2220 (packed_array_type): Likewise.
2221 (ada_template_to_fixed_record_type_1): Likewise.
2222 (template_to_static_fixed_type): Likewise.
2223 (to_record_with_fixed_variant_part): Likewise.
2224 (to_fixed_variant_branch_type): Likewise.
2225 (to_fixed_array_type): Likewise.
2226 (to_fixed_range_type): Likewise.
2227 (empty_record): Use type instead of objfile argument.
2228 Use alloc_type_copy.
2229 (to_fixed_variant_branch_type): Update call to empty_record.
2230 * jv-lang.c (type_from_class): Use alloc_type_arch.
2232 * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
2233 * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
2234 i386_mmx_type, i386_sse_type): Likewise.
2235 * ia64-tdep.c (ia64_ext_type): Likewise.
2236 * m32c-tdep.c (make_types): Likewise.
2237 * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
2238 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2239 rs6000_builtin_type_vec128): Likewise.
2240 * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
2241 * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
2242 sparc64_fprs_type): Likewise.
2243 * spu-tdep.c (spu_builtin_type_vec128): Likewise.
2244 * xtensa-tdep.c (xtensa_register_type): Likewise.
2245 * linux-tdep.c (linux_get_siginfo_type): Likewise.
2246 * target-descriptions.c (tdesc_gdb_type): Likewise.
2247 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2249 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2251 * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
2252 i386_mxcsr_type members.
2253 (i386_eflags_type): Make into function.
2254 (i386_mxcsr_type): Likewise.
2255 * i386-tdep.c (i386_eflags_type): Make into function.
2256 (i386_mxcsr_type): Likewise.
2257 (i386_register_type): Update uses.
2258 (i386_init_types): Remove.
2259 (_initialize_i386_tdep): Do not call it.
2260 * amd64-tdep.c (amd64_register_type): Update uses.
2262 * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
2263 * m68k-tdep.c (m68k_ps_type): Make into function.
2264 (m68k_register_type): Update use.
2265 (m68k_init_types): Remove.
2266 (_initialize_m68k_tdep): Do not call it.
2268 * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
2269 sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
2270 sparc64_fprs_type members.
2271 * sparc-tdep.c (sparc_psr_type): Make into function.
2272 (sparc_fsr_type): Likewise.
2273 (sparc32_register_type): Update uses.
2274 (sparc_init_types): Remove.
2275 (_initialize_sparc_tdep): Do not call it.
2276 * sparc64-tdep.c (sparc64_pstate_type): Make into function.
2277 (sparc64_fsr_type): Likewise.
2278 (sparc64_fprs_type): Likewise.
2279 (sparc64_register_type): Update uses.
2280 (sparc64_init_types): Remove.
2281 (_initialize_sparc64_tdep): Likewise.
2283 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2285 * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
2286 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2287 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2288 (init_float_type, init_complex_type): Add prototypes.
2289 * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
2290 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2291 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2292 (_initialize_gdbtypes): Do not initialize them.
2293 (build_flt): Rename to ...
2294 (init_float_type): ... this. Make global.
2295 (build_complex): Rename to ...
2296 (init_complex_type): ... this. Make global. Remove BIT argument.
2297 (gdbtypes_post_init): Update calls.
2299 * ada-lang.c (ada_language_arch_info): Use init_float_type.
2300 * jv-lang.c (build_java_types): Likewise.
2301 * m2-lang.c (build_m2_types): Likewise.
2302 * f-lang.c (build_fortran_types): Use init_float_type and
2305 * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
2306 of using builtin_type_ieee_single, builtin_type_ieee_double, or
2307 builtin_type_arm_ext.
2309 * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
2310 * ia64-tdep.c (builtin_type_ia64_ext): Remove.
2311 (_initialize_ia64_tdep): Do not initialize it.
2312 (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
2314 (ia64_ext_type): New function.
2315 (ia64_register_reggroup_p, ia64_convert_register_p,
2316 ia64_register_to_value, ia64_value_to_register,
2317 ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
2318 instead of builtin_type_ia64_ext.
2320 * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
2321 (i387_ext_type): Add prototype.
2322 * i386-tdep.c (i387_ext_type): New function.
2323 (i386_extract_return_value, i386_store_return_value,
2324 i386_register_type): Use it instead of builtin_type_i387_ext.
2325 * amd64-tdep.c (amd64_register_type): Likewise.
2326 * i387-tdep.c (print_i387_value, i387_register_to_value,
2327 i387_value_to_register): Likewise.
2328 (print_i387_value, print_i387_ext): Add GDBARCH argument.
2329 (print_i387_ext, i387_print_float_info): Pass to subroutines.
2331 * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
2332 * m68k-tdep.c (m68881_ext_type): New function.
2333 (m68k_register_type, m68k_convert_register_p): Use it instead
2334 of builtin_type_m68881_ext.
2336 * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
2337 * arm-tdep.c (arm_ext_type): New function.
2338 (arm_register_type): Use it instead of builtin_type_arm_ext.
2340 * alpha-tdep.c (alpha_register_type): Use builtin types
2341 instead of builtin_type_ieee_double.
2343 * mips-tdep.c (mips_float_register_type, mips_double_register_type):
2345 (mips_register_type): Use builtin types instead of
2346 builtin_type_ieee_single and builtin_type_ieee_double.
2347 (mips_print_fp_register): Use builtin types instead of
2348 mips_float_register_type and mips_double_register_type.
2350 * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
2351 Use builtin types instead of builtin_type_ieee_single and
2352 builtin_type_ieee_double.
2354 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2356 * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2357 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2358 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2359 builtin_type_int128, builtin_type_uint128): Remove.
2360 (struct builtin_type): New members builtin_int0, builtin_int8,
2361 builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
2362 builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
2363 and builtin_uint128.
2364 * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2365 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2366 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2367 builtin_type_int128, builtin_type_uint128): Remove.
2368 (_initialize_gdbtypes): Do not initialize them.
2369 (gdbtypes_post_init): Initialize fixed-size integer types.
2371 * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
2372 GDBARCH argument. Return platform-specific type.
2373 (dwarf2_read_address, execute_stack_op): Update calls.
2375 * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
2376 instead of global builtin_int_... variables.
2377 * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
2378 * printcmd.c (do_examine): Likewise.
2379 * jv-exp.y (parse_number): Likewise.
2381 * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
2382 alpha_store_return_value): Likewise.
2383 * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
2384 * amd64-tdep.c (amd64_register_type): Likewise.
2385 * arm-tdep.c (arm_register_type): Likewise.
2386 * avr-tdep.c (avr_register_type): Likewise.
2387 * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
2388 * frv-tdep.c (frv_register_type): Likewise.
2389 * h8300-tdep.c h8300_register_type): Likewise.
2390 * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
2391 hppa64_register_type): Likewise.
2392 * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
2393 * iq2000-tdep.c (iq2000_register_type): Likewise.
2394 * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
2395 * m32r-tdep.c (m32r_register_type): Likewise.
2396 * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
2397 m68hc11_pseudo_register_write): Likewise.
2398 * m68k-tdep.c (m68k_register_type): Likewise.
2399 * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
2400 * mep-tdep.c (mep_register_type): Likewise.
2401 * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
2402 mips_print_fp_register): Likewise.
2403 * moxie-tdep.c (moxie_register_type): Likewise.
2404 * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
2405 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2406 rs6000_builtin_type_vec128): Likewise.
2407 * score-tdep.c (score_register_type): Likewise.
2408 * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
2410 * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
2412 * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
2413 * v850-tdep.c (v850_register_type): Likewise.
2414 * xstormy16-tdep.c (xstormy16_register_type): Likewise.
2415 * xtensa-tdep.c (xtensa_register_type): Likewise.
2417 * mt-tdep.c (struct gdbarch_tdep): New data structure.
2418 (mt_gdbarch_init): Alloc TDEP structures.
2419 (mt_register_type): Cache coprocessor type in TDEP instead of
2420 static global variable.
2422 * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
2423 * xtensa-tdep.c (type_entries): Remove.
2424 (xtensa_register_type): Cache fixed-size types in TDEP instead
2425 of in global variable.
2427 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2429 * gdbtypes.h (builtin_type_true_char): Remove.
2430 (builtin_type_true_unsigned_char): Likewise.
2431 (struct builtin_type): Add builtin_true_char and
2432 builtin_true_unsigned_char members.
2433 * gdbtypes.c (builtin_type_true_char): Remove.
2434 (builtin_type_true_unsigned_char): Likewise.
2435 (_initialize_gdbtypes): Do not initialize them.
2436 (gdbtypes_post_init): Initialize builtin_true_char and
2437 builtin_true_unsigned_char members of builtin_type.
2439 * printcmd.c (print_scalar_formatted): Use builtin_type
2440 members instead of builtin_type_true_char and
2441 builtin_type_true_unsigned_char.
2442 * ada-valprint.c (ada_val_print_1): Likewise.
2444 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2446 * gdbtypes.h (builtin_type_void): Remove.
2447 * gdbtypes.c (builtin_type_void): Remove.
2448 (_initialize_gdbtypes): Do not initialize it.
2450 (safe_parse_type): Add GDBARCH argument. Use it to construct
2452 (check_stub_method): Update call.
2454 * infcall.c (call_function_by_hand): Use platform-specific type
2455 instead of builtin_type_void.
2456 * valops.c (value_cast): Use input void type instead of
2459 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2461 * ada-lang.c (assign_component): Use platform-specific integer type
2462 instead of builtin_type_int32 type.
2463 (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
2465 * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
2466 instead of builtin_type_int8 type.
2467 * valarith.c (value_x_unop): Likewise.
2468 * python/python-value.c (valpy_absolute): Avoid reference to
2469 builtin_type_int8 type.
2471 * eval.c (evaluate_subexp_standard): Use platform-specific integer
2472 type instead of builtin_type_int8 as EVAL_SKIP return value type.
2473 * ada-lang.c (ada_evaluate_subexp): Likewise.
2474 * jv-lang.c (evaluate_subexp_java): Likewise.
2475 * m2-lang.c (evaluate_subexp_modula2): Likewise.
2476 * scm-lang.c (evaluate_exp): Likewise.
2478 * value.h (value_bitstring): Add INDEX_TYPE argument.
2479 * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
2480 of builtin_type_int32 as base range type.
2481 * eval.c (evaluate_subexp_standard): Update value_bitstring call.
2483 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2485 * gdbtypes.c (lookup_array_range_type): Add prototype.
2486 (lookup_string_range_type): Likewise.
2487 * gdbtypes.c (lookup_array_range_type): New function.
2488 (lookup_string_range_type): Likewise.
2490 * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
2491 * parse.c (follow_types): Likewise.
2492 * jv-lang.c (java_array_type): Likewise.
2493 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2494 * mt-tdep.c (mt_register_type): Likewise.
2495 * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
2496 * sh64-tdep.c (sh64_build_float_register_type): Likewise.
2497 * value.c (allocate_repeat_value): Likewise.
2498 * valops.c (value_array, value_cstring): Likewise.
2499 * valops.c (value_string): Use lookup_string_range_type.
2501 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2503 * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
2504 redundant check for NULL TYPE_TARGET_TYPE.
2505 * m2-valprint.c (m2_print_long_set): Likewise.
2506 * p-valprint.c (pascal_type_print_base): Likewise.
2508 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2510 * printcmd.c (next_gdbarch): New static variable.
2511 (set_next_address, do_examine, x_command): Set it.
2512 (decode_format): Use 'a' size to indicate width of an address.
2513 (do_examine): Add GDBARCH argument. Handle 'a' size.
2514 (x_command): Pass architecture to do_examine.
2515 Error if called without argument the first time.
2516 (do_one_display): Pass architecture to do_examine.
2518 (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
2519 examine_g_type): Remove.
2520 (_initialize_printcmd): Do not initialize them.
2521 (do_examine): Use builin_type_int... instead of examine_..._type.
2523 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2525 * gdbtypes.h (struct builtin_type): Add internal_fn member.
2526 * gdbtypes.c (gdbtypes_post_init): Initialize it.
2527 * value.c (internal_fn_type): Remove.
2528 (_initialize_values): Do not initialize it.
2530 * value.c (struct internalvar): Add enum internalvar_kind type and
2531 kind member. Restructure union internalvar_data type. Remove type,
2532 canonical, and make_value members.
2533 (init_if_undefined_command): Update for data structure changes.
2534 (create_internalvar): Likewise.
2535 (create_internalvar_type_lazy): Likewise.
2536 (get_internalvar_integer): Likewise.
2537 (get_internalvar_function): Likewise.
2538 (set_internalvar_component): Likewise.
2539 (set_internalvar): Likewise.
2540 (set_internalvar_integer): Likewise.
2541 (set_internalvar_function): Likewise.
2542 (clear_internalvar): Likewise.
2543 (add_internal_function): Likewise.
2544 (preserve_one_internalvar): New function.
2545 (preserve_values): Call it.
2547 * value.h (value_of_internalvar): Add GDBARCH parameter.
2548 (internalvar_make_value): Likewise.
2549 * value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
2550 make_value callback. Use it to generate per-architecture result value
2551 types for internal variables with no pre-defined type. Update for data
2553 (show_convenience): Pass architecture to value_of_internalvar.
2554 * eval.c (evaluate_subexp_standard): Likewise.
2555 * infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
2556 instead of current frame architecture. Return per-architecture type.
2558 * value.h (set_internalvar_string): Add prototype.
2559 * value.c (set_internalvar_string): New function.
2560 * tracepoint.c (set_traceframe_context): Use it.
2562 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2564 * jv-lang.h (java_int_type, java_byte_type, java_short_type,
2565 java_long_type, java_boolean_type, java_char_type, java_float_type,
2566 java_double_type, java_void_type): Remove.
2567 (struct builtin_java_type): New data type.
2568 (builtin_java_type): Add prototype.
2569 (java_primitive_type): Add GDBARCH argument.
2570 (java_primitive_type_from_name): Likewise.
2571 (type_from_class): Likewise.
2573 * jv-lang.c (java_int_type, java_byte_type, java_short_type,
2574 java_long_type, java_boolean_type, java_char_type, java_float_type,
2575 java_double_type, java_void_type): Remove.
2577 (build_java_types, builtin_java_type): New functions.
2578 (java_type_data): New static variable.
2579 (_initialize_java_language): Initialize it. No longer initialize
2581 (java_language_arch_info): Use per-architecture types.
2583 (java_primitive_type): Add GDBARCH argument. Return per-architecture
2584 type instead of refering to global variable.
2585 (java_primitive_type_from_name): Add GDBARCH argument.
2586 (java_primitive_type_name): New function.
2587 (java_demangled_signature_length): Use it instead of
2588 java_primitive_type_from_name.
2589 (java_demangled_signature_copy): Likewise.
2591 (type_from_class): Add GDBARCH argument. Pass to java_link_class_type,
2592 java_primitive_type, and recursive type_from_class call.
2593 (java_link_class_type): Add GDBARCH argument. Pass to type_from_class
2594 calls. Use per-architecture types instead of global types.
2596 * jv-exp.y (parse_java_type): New define.
2597 Use per-architecture types instead of global types througout.
2599 * jv-valprint.c (java_value_print): Pass architecture to
2600 type_from_class and java_primitive_type_from_name. Use per-
2601 architecture types instead of global types.
2603 2009-07-01 Doug Evans <dje@google.com>
2605 * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
2606 support for i386-linux, amd64-linux, and i386-win32 builds of
2609 2009-07-01 Nick Roberts <nickrob@snap.net.nz>
2611 * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
2613 2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
2615 * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
2616 (check//%): Construct FORCE_PARALLEL for the sub-make. Extend the
2619 2009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
2622 * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
2623 cfa_how and cfa_exp into regs and adjust users.
2625 2009-06-30 Daniel Jacobowitz <dan@codesourcery.com>
2627 * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
2629 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2631 * mi/mi-cmd-stack.c (parse_print_values): New.
2632 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
2634 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2636 * varobj.c (varobj_get_type): Use type_to_string.
2638 2009-06-29 Pedro Alves <pedro@codesourcery.com>
2640 * infrun.c (handle_inferior_event): Context switch to the new
2641 thread when resuming for a new_thread_event.
2643 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2645 * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
2646 * ada-lang.c (convert_actual): Remove stale prototype.
2647 (ensure_lval, make_array_descriptor, ada_convert_actual):
2648 Add GDBARCH argument and pass through to subroutine calls.
2649 (ensure_lval): Use GDBARCH instead of current_gdbarch.
2650 * infcall.c (value_arg_coerce): Update ada_convert_actual call.
2652 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2654 * ada-lang.c (resolve): Use per-architecture void type instead
2655 of platform-independent one.
2656 (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
2657 (ada_resolve_function): Reimplement fallback logic to avoid
2658 explicit reference to builtin_type_void.
2660 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2662 * ada-valprint.c (ada_print_scalar): Accept NULL type argument
2663 to indicate scalar should be printed as default integer.
2664 (print_optional_low_bound): Pass NULL to ada_print_scalar to
2665 indicate default integer output.
2666 * ada-typeprint.c (print_range, print_range_bound): Likewise.
2667 (print_choices): Likewise. Thus, accept NULL as val_type.
2668 * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
2669 to look up controlling discriminant name.
2671 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2673 * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
2674 Fall back to orig_type as index type if symbol lookup fails.
2675 Allocate result types from ORIG_TYPE's objfile.
2676 (ada_array_bound_from_type, to_fixed_array_type,
2677 ada_evaluate_subexp): Pass original index type to
2678 to_fixed_range_type. Do not pass objfile.
2680 * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
2681 Fall back to orig_type as index type if symbol lookup fails.
2682 (print_array_type, ada_print_type): Pass original index type
2683 to print_range_type_named.
2685 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2687 * ada-lang.c (ada_index_type): Update comment.
2689 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2691 * ada-lang.c (ada_index_type): Make static. Add NAME argument.
2692 Throw error on invalid input arguments. Return NULL if unable
2693 to determine index type.
2695 (ada_array_bound_from_type): Remove TYPEP argument.
2696 (ada_array_bound): Make static. Return LONGEST instead of value.
2697 Update for ada_array_bound_from_type change.
2698 (ada_array_length): Return LONGEST instead of value.
2699 Update for ada_array_bound_from_type change.
2700 (make_array_descriptor): Update for ada_array_bound change.
2702 (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
2703 OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
2704 ada_array_bound, ada_array_length, ada_index_type changes.
2705 Always use ada_index_type to compute result type; fall back
2706 to architecture-specific integer type if ada_index_type fails.
2708 * ada-lang.h (ada_index_type): Remove prototype.
2709 (ada_array_bound): Likewise.
2711 2009-06-29 Pedro Alves <pedro@codesourcery.com>
2713 * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
2716 2009-06-29 Tom Tromey <tromey@redhat.com>
2718 * README: Mention parallel check.
2720 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com>
2722 * dwarf2read.c (read_import_statement): Properly set import location
2724 * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
2725 inner, char* outer arguments. Updated callers.
2727 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2729 * value.h (value_subscript, value_subscripted_rvalue,
2730 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2731 of value as type of the index argument.
2732 (value_ptrsub): Remove.
2733 * valarith.c (value_subscript, value_subscripted_rvalue,
2734 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2735 of value as type of the index argument.
2736 (value_ptrsub): Remove.
2738 * wrapper.h (gdb_value_subscript): Use LONGEST instead of
2739 value as type of the index argument.
2740 * wrapper.c (gdb_value_subscript): Likewise.
2742 Update calls to gdb_value_subscript, value_subscript,
2743 value_subscripted_rvalue, value_bitstring_subscript and
2744 value_ptradd to use LONGEST instead of value as index
2745 argument type. Use value_ptradd instead of value_ptrsub.
2746 * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
2747 ada_tag_name_2): Update.
2748 * ada-tasks.c (read_atcb): Update.
2749 * eval.c (evaluate_subexp_standard): Update.
2750 * valarith.c (value_subscript): Update.
2751 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
2752 * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
2753 gnuv3_method_ptr_to_value): Update.
2754 * jv-lang.c (evaluate_subexp_java): Update.
2755 * m2-lang.c (evaluate_subexp_modula2): Update.
2756 * python/python-value.c (valpy_getitem, valpy_binop): Update.
2757 * wrapper.c (gdb_value_subscript): Update.
2758 * varobj.c (c_describe_child): Update.
2760 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2762 * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
2763 * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
2764 (lookup_function_type): Update call.
2765 * stabsread.c (read_type): Likewise.
2766 * dwarf2read.c (read_subroutine_type): Use lookup_function_type
2767 instead of make_function_type.
2768 * jv-lang.c (type_from_class): Likewise. Do not allocate types
2769 on the fake "dynamics" obstack.
2771 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2773 * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
2774 nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
2775 and nodebug_tls_symbol members.
2776 (struct objfile_type): New data structure.
2777 (objfile_type): Add prototype.
2778 * gdbtypes.c (gdbtypes_post_init): Remove initialization code
2779 for types no longer in struct builtin_type.
2780 (objfile_type_data): New static variable.
2781 (_initialize_gdbtypes): Initialize it.
2782 (objfile_type): New function.
2784 * gdbtypes.h (builtin_type_error): Remove.
2785 * gdbtypes.c (build_complex): Do not use builtin_type_error.
2786 * symtab.c (builtin_type_error): Remove.
2787 (_initialize_symtab): Remove initialization.
2789 * stabsread.c (dbx_lookup_type, define_symbol, error_type,
2790 rs6000_builtin_type, read_range_type): Use per-objfile types
2791 instead of global or per-architecture builtin types.
2792 * coffread.c (decode_type): Likewise.
2793 * dwarf2read.c (read_array_type, read_tag_string_type,
2794 new_symbol, die_type): Likewise.
2795 * mdebugread.c (parse_symbol, basic_type, upgrade_type,
2796 parse_procedure, psymtab_to_symtab_1): Likewise.
2797 * xcoffread.c (process_xcoff_symbol): Likewise.
2798 * parse.c (write_exp_msymbol): Likewise.
2800 * stabsread.c (rs6000_builtin_type_data): New static variable.
2801 (_initialize_stabsread): Initialize it.
2802 (rs6000_builtin_type): Add OBJFILE argument. Allocate builtin
2803 types per-objfile instead of globally.
2805 * stabsread.c (dbx_lookup_type): Add OBJFILE argument. Use it
2806 instead of current_objfile; pass it to rs6000_builtin_type.
2807 (dbx_alloc_type, read_type, read_range_type): Update calls.
2808 (cleanup_undefined_types_noname): Add OBJFILE argument and
2809 pass it to dbx_lookup_type.
2810 (cleanup_undefined_types): Add OBJFILE argument and pass it
2811 to cleanup_undefined_types_noname.
2812 * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
2813 * buildsym.c (end_symtab): Update call.
2815 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2817 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2818 target_gdbarch instead of current_gdbarch.
2820 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2822 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
2823 (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
2826 * configure.tgt: Add comment.
2828 2009-06-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2830 * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
2832 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2833 Jan Kratochvil <jan.kratochvil@redhat.com>
2835 * NEWS: Document inlined function support.
2836 * Makefile.in (SFILES): Add inline-frame.c.
2837 (COMMON_OBS): Add inline-frame.o.
2838 * block.c (contained_in): Rewrite to use lexical nesting.
2839 (block_linkage_function): Skip inlined function blocks.
2840 (block_inlined_p): New.
2841 * block.h (struct block): Update comment.
2842 (block_inlined_p): New prototype.
2843 * blockframe.c (get_frame_block): Handle inlined functions.
2844 (get_frame_function): Do not use block_linkage_function.
2845 (block_innermost_frame): Use get_frame_block and contained_in.
2846 * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
2847 Skip over inlined functions. Simplify epilogue check.
2848 (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
2850 (set_momentary_breakpoint): Only accept non-inlined frames.
2851 (watch_command_1): Use frame_unwind_caller_pc and
2852 frame_unwind_caller_id instead of get_prev_frame.
2853 (until_break_command): Likewise. Use get_stack_frame_id.
2854 * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
2855 * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
2856 * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
2857 (read_func_scope, new_symbol): Likewise. Handle arguments specially
2858 for inlined functions without call site information.
2859 (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
2860 (die_specification): Treat DW_AT_abstract_origin as a specification.
2861 (read_type_die): Handle DW_TAG_inlined_subroutine.
2862 * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
2863 * frame.c (fprint_frame_id): Print inline depth.
2864 (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
2865 (skip_inlined_frames, get_stack_frame_id): New.
2866 (frame_unwind_caller_id): Use skip_inlined_frames.
2867 (frame_id_inlined_p): New.
2868 (frame_id_eq): Make the logic match the comments. Add inline_depth
2870 (frame_id_inner): Handle inlined functions.
2871 (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
2872 (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
2873 (get_prev_frame_1): Check for inline frames. Split out frame
2874 allocation to get_prev_frame_raw.
2875 (get_prev_frame_raw): New function.
2876 (get_prev_frame): Handle inline frames.
2877 (get_frame_pc): Use frame_unwind_pc.
2878 (get_frame_address_in_block): Skip inlined frames on both sides.
2879 (pc_notcurrent): Delete.
2880 (find_frame_sal): Rewrite to handle inline call sites. Use
2881 get_frame_address_in_block.
2882 (deprecated_update_frame_pc_hack): Make static.
2883 * frame.h: Update comments.
2884 (struct frame_id): Add inline_depth.
2885 (enum frame_type): Add INLINE_FRAME.
2886 (frame_id_inlined_p, get_stack_frame_id): New prototypes.
2887 * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
2888 * infcmd.c (set_step_frame): New function.
2889 (step_once): Use set_step_frame. Handle inlined functions.
2890 (until_next_command): Use set_step_frame.
2891 (finish_backward), finish_forward): Use get_stack_frame_id.
2892 (finish_command): Support inlined functions.
2893 * inferior.h (set_step_info): New prototype.
2894 * infrun.c (RESUME_ALL): Use minus_one_ptid.
2895 (clear_proceed_status): Clear step_stack_frame_id.
2896 (init_wait_for_inferior): Call clear_inline_frame_state.
2897 (init_execution_control_state): Make static.
2898 (set_step_info): New function.
2899 (init_thread_stepping_state): Do not set the symtab or line here.
2900 (stepped_in_from): New function.
2901 (handle_inferior_event): Handle inlined functions. Use set_step_info.
2902 (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
2903 (struct inferior_status): Add step_stack_frame_id.
2904 (save_inferior_status, restore_inferior_status): Save and restore
2905 step_stack_frame_id.
2906 * inline-frame.c, inline-frame.h: New files.
2907 * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
2908 * regcache.c (regcache_write_pc): Call reinit_frame_cache.
2909 * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
2910 * stack.c (frame_show_address): New.
2911 (print_frame_info, print_frame): Use it.
2912 (find_frame_funname): Use get_frame_function. Handle inlined blocks.
2913 (frame_info): Mark inlined functions.
2914 (backtrace_command_1): Use get_current_user_frame.
2915 (print_frame_local_vars, print_frame_label_vars): Update comments.
2916 (return_command): Refuse inlined functions.
2917 * symtab.c (lookup_symbol_aux_local): Stop at inlined function
2919 (find_function_start_sal): Avoid inlined functions.
2920 (completion_list_add_fields): New function.
2921 (default_make_symbol_completion_list): Use it. Use block_static_block
2922 and block_global_block. Check for inlined functions.
2923 (skip_prologue_using_sal): Avoid line number comparison across
2925 * symtab.h (struct symbol): Add is_inlined.
2926 (SYMBOL_INLINED): New.
2927 * target.c (target_resume): Call clear_inline_frame_state.
2928 * valops.c (value_of_variable): Check block_inlined_p.
2930 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2932 * frame.c (frame_unwind_id): Renamed to ...
2933 (frame_unwind_caller_id): ... this. All callers updated.
2934 (frame_pc_unwind): Renamed to ...
2935 (frame_unwind_caller_pc): ... this. All callers updated.
2936 * frame.h: Document frame_unwind_caller_WHAT functions.
2937 (frame_unwind_id): Renamed to ...
2938 (frame_unwind_caller_id): ... this.
2939 (frame_pc_unwind): Renamed to ...
2940 (frame_unwind_caller_pc): ... this.
2941 * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
2942 * stack.c (parse_frame_specification_1): Do not rely on
2945 2009-06-27 Michael Snyder <msnyder@vmware.com>
2947 * infrun.c (handle_inferior_event): Improve handling of
2948 reverse-stepping into and over shared library functions.
2950 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
2952 * linespec.c (find_method): Add new not_found_ptr parameter to
2953 bring in line with symtab_from_filename, decode_variable.
2954 (decode_compound): Likewise. Also propagate not_found_ptr to
2956 (decode_line_1): Propagate not_found_ptr to decode_compound.
2957 (cplusplus_error): Now throws NOT_FOUND_ERROR.
2959 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
2961 * MAINTAINERS (Write After Approval): Add self.
2963 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2965 * valops.c (value_one): Reimplement broken decimal-float case.
2967 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2969 * eval.c (evaluate_subexp_standard): Use expression architecture
2970 instead of current_gdbarch.
2972 * infrun.c (handle_inferior_event): Avoid unncessary reference
2973 to current_gdbarch and get_current_frame ().
2975 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2977 * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
2978 (enum bptype): Add bp_longjmp_master.
2980 * breakpoint.c (create_longjmp_master_breakpoint): New function.
2981 (update_breakpoints_after_exec): Handle bp_longjmp_master
2982 breakpoints. Call create_longjmp_master_breakpoint.
2983 (print_it_typical, bpstat_stop_status, bpstat_what,
2984 print_one_breakpoint_location, allocate_bp_location, mention,
2985 delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
2986 (breakpoint_re_set): Call create_longjmp_master_breakpoint.
2987 (create_longjmp_breakpoint): Delete.
2988 (set_longjmp_breakpoint): Add THREAD argument. Reimplement
2989 to install momentary clones of bp_longjmp_master breakpoints.
2991 * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
2993 2009-06-23 Cary Coutant <ccoutant@google.com>
2995 * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
2996 Set basic_block to 0 after a special opcode.
2998 2009-06-23 Jan Kratochvil <jan.kratochvil@redhat.com>
3000 Fix a regression by the mmap patch from 2009-06-16.
3001 * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
3002 calls before deleting the OBJFILE obstack. Extend the comment.
3004 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3006 * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
3007 (get_java_object_header_size): Add GDBARCH parameter.
3008 * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
3009 Use it instead of current_gdbarch.
3010 (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
3011 get_java_object_header_size.
3012 * jv-valprint.c (java_value_print): Likewise.
3014 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
3016 * dwarf2read.c (process_die): Handle import statements
3017 (DW_TAG_imported_declaration, case DW_TAG_imported_module)
3018 (read_import_statement): New.
3019 (read_func_scope): Update using_directives to point to current context
3020 (read_lexical_block_scope): Ditto.
3021 * cp-support.h: Added prototype for cp_add_using.
3022 * cp-namespace.c: Removed local context_stack.
3023 (cp_initialize_namespace): Deleted.
3024 (cp_finalize_namespace): Deleted.
3025 (cp_add_using_directive): Use using_directives instead of using_list.
3026 (cp_add_using): No longer static.
3027 * buildsym.h: Created global using_direct variable.
3028 Created using_direct variable in context_stack.
3029 * buildsym.c (finish_block): Set using directives for the block under
3031 (start_symtab): Removed call to cp_initialize_namespace().
3032 (end_symtab): Removed call to cp_finalize_namespace().
3033 (push_context): Save and reset using_directives.
3034 * block.c (block_using): Return using directives for given
3035 block instead of static block.
3037 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
3039 * target-descriptions.h (struct type): Do not declare.
3040 (struct tdesc_type): Declare.
3041 (tdesc_named_type): Change return type to struct tdesc_type *.
3042 (tdesc_record_type): Remove.
3043 (tdesc_create_vector): Add prototype.
3044 (tdesc_create_union): Likewise.
3045 (tdesc_add_field): Likewise.
3047 * target-descriptions.c (struct tdesc_reg): Replace gdb_type
3048 member by tdesc_type member.
3049 (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
3050 (struct tdesc_type, tdesc_type_p): Likewise.
3051 (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
3052 (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
3053 (struct tdesc_arch_data): Replace registers member by arch_regs.
3055 (tdesc_predefined_types): Change to array of pre-defined
3056 struct tdesc_type structures. Add "code_ptr" and "data_ptr".
3057 (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
3058 (tdesc_gdb_type): New function.
3060 (target_find_description): Update for data structure changes.
3061 (tdesc_data_cleanup): Likewise.
3062 (tdesc_numbered_register): Likewise.
3063 (tdesc_use_registers): Likewise.
3064 (tdesc_create_reg): Likewise.
3066 (tdesc_find_arch_register): New function.
3067 (tdesc_find_register): Use it.
3068 (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
3069 tdesc_type on demand; cache generated types in tdesc_arch_reg.
3071 (tdesc_free_type): New function.
3072 (tdesc_free_feature): Call it.
3074 (tdesc_create_vector): New function.
3075 (tdesc_create_union): Likewise.
3076 (tdesc_add_field): Likewise.
3077 (tdesc_record_type): Remove.
3079 (tdesc_type_id): Remove.
3080 (maint_print_c_tdesc_cmd): Update for data structure changes. Update
3081 generated code to create tdesc_type structures instead of GDB types.
3083 * xml-tdesc.c: Do not include "gdbtypes.h".
3084 (struct tdesc_parsing_data): Change type of current_union to
3085 struct tdesc_type *.
3086 (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
3087 (tdesc_start_union): Call tdesc_create_union.
3088 (tdesc_start_field): Call tdesc_add_field.
3089 (tdesc_start_vector): Call tdesc_create_vector.
3090 (tdesc_end_union): Remove.
3091 (feature_children): Remove reference to tdesc_end_union.
3093 * features/arm-with-iwmmxt.c: Regenerate.
3094 * features/mips-linux.c: Regenerate.
3095 * features/mips64-linux.c: Regenerate.
3096 * features/rs6000/powerpc-32.c: Regenerate.
3097 * features/rs6000/powerpc-32l.c: Regenerate.
3098 * features/rs6000/powerpc-403.c: Regenerate.
3099 * features/rs6000/powerpc-403gc.c: Regenerate.
3100 * features/rs6000/powerpc-505.c: Regenerate.
3101 * features/rs6000/powerpc-601.c: Regenerate.
3102 * features/rs6000/powerpc-602.c: Regenerate.
3103 * features/rs6000/powerpc-603.c: Regenerate.
3104 * features/rs6000/powerpc-604.c: Regenerate.
3105 * features/rs6000/powerpc-64.c: Regenerate.
3106 * features/rs6000/powerpc-64l.c: Regenerate.
3107 * features/rs6000/powerpc-7400.c: Regenerate.
3108 * features/rs6000/powerpc-750.c: Regenerate.
3109 * features/rs6000/powerpc-860.c: Regenerate.
3110 * features/rs6000/powerpc-altivec32.c: Regenerate.
3111 * features/rs6000/powerpc-altivec32l.c: Regenerate.
3112 * features/rs6000/powerpc-altivec64.c: Regenerate.
3113 * features/rs6000/powerpc-altivec64l.c: Regenerate.
3114 * features/rs6000/powerpc-e500.c: Regenerate.
3115 * features/rs6000/powerpc-e500l.c: Regenerate.
3116 * features/rs6000/powerpc-isa205-32l.c: Regenerate.
3117 * features/rs6000/powerpc-isa205-64l.c: Regenerate.
3118 * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
3119 * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
3120 * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
3121 * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
3122 * features/rs6000/powerpc-vsx32.c: Regenerate.
3123 * features/rs6000/powerpc-vsx32l.c: Regenerate.
3124 * features/rs6000/powerpc-vsx64.c: Regenerate.
3125 * features/rs6000/powerpc-vsx64l.c: Regenerate.
3126 * features/rs6000/rs6000.c: Regenerate.
3128 2009-06-23 Joel Brobecker <brobecker@adacore.com>
3130 * ada-lang.c (decode_packed_array): If the value is a pointer to
3131 an array, then use value_ind to dereference it, not ada_value_ind.
3132 (ada_template_to_fixed_record_type_1): Handle the case where a
3133 dynamic field is an aligner type.
3134 (to_fixed_array_type): Add handling for packed array types.
3135 (ada_get_base_type): Do not follow the XVS type if the type is
3137 (ada_evaluate_subexp): Split a few statements up for clarity
3139 <OP_FUNCALL>: Add handling of the case of a packed array that
3140 has already been fixed.
3142 2009-06-23 Joel Brobecker <brobecker@adacore.com>
3144 * ada-lang.c (evaluate_subexp): Delete. Use the version from eval.c.
3145 (evaluate_subexp_type): Reimplement using evaluate_subexp.
3146 * value.h (evaluate_subexp): Add declaration.
3147 * eval.c (evaluate_subexp): Make non-static.
3148 * objc-lang.c (print_object_command): Use evaluate_subexp.
3150 2009-06-23 Paul Pluzhnikov <ppluzhnikov@google.com>
3152 Revert 2009-05-14 breakpoint commit (no longer needed).
3153 * breakpoint.h (breakpoint_re_set_objfile): Remove
3154 * breakpoint.c (breakpoint_re_set_objfile): Likewise
3155 (create_overlay_event_breakpoint): Remove objfile parameter,
3156 iterate over all objfiles.
3157 * objfiles.c (objfile_relocate): Update.
3158 * symfile.c (new_symfile_objfile): Likewise.
3160 2009-06-23 Tom Tromey <tromey@redhat.com>
3163 * c-lang.c (classify_type): Iterate over typedefs.
3164 * c-valprint.c (textual_element_type): Iterate over typedefs.
3166 2009-06-22 Tristan Gingold <gingold@adacore.com>
3168 * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
3171 2009-06-22 Jan Kratochvil <jan.kratochvil@redhat.com>
3174 * buildsym.c (block_compar): New function.
3175 (end_symtab): Replace the bubble sort by a qsort based code.
3177 2009-06-22 Sami Wagiaalla <swagiaal@redhat.com>
3179 * MAINTAINERS (Write After Approval): Add self.
3181 2009-06-22 Ulrich Weigand <uweigand@de.ibm.com>
3183 * spu-tdep.c (spu_get_longjmp_target): New function.
3184 (spu_gdbarch_init): Install it.
3186 2009-06-22 H.J. Lu <hongjiu.lu@intel.com>
3189 * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
3191 2009-06-21 Michael Snyder <msnyder@vmware.com>
3193 * inferior.h: Update ancient comment.
3195 2009-06-20 Aleksandar Ristovski <aristovski@qnx.com>
3196 Pedro Alves <pedro@codesourcery.com>
3198 * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
3200 (scan_dyntag): Skip if input bfd isn't elf flavoured.
3201 (locate_base): Call elf_locate_base even without an exec_bfd.
3203 2009-06-19 Samuel Bronson <naesten@gmail.com>
3206 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
3207 for prefix commands to avoid duplicates in the output.
3209 2009-06-19 Samuel Bronson <naesten@gmail.com>
3212 * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
3215 2009-06-19 Jerome Guitton <guitton@adacore.com>
3217 * breakpoint.c (expand_line_sal_maybe): When explicit_line,
3218 skip prologue on each sals.
3219 (skip_prologue_sal): Return explicit_line and explicit_pc
3222 2009-06-19 Tristan Gingold <gingold@adacore.com>
3224 * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
3227 2009-06-19 Tristan Gingold <gingold@adacore.com>
3228 * machoread.c (macho_symtab_read): Adjust for bfd changes.
3229 * darwin-nat.h (struct darwin_exception_msg): New type to describe
3231 (struct private_thread_info): New type to describe the state of the
3233 (DEF_VEC_I thread_t): Removed, replaced by ...
3234 (DEF_VEC_O darwin_thread_t): ... this new type.
3235 (struct darwin_inferior): Renamed to ...
3236 (struct private_inferior): ... this type. Fields added.
3237 (darwin_not_port): Moved into the private inferior structure.
3238 * darwin-nat.c: Add includes, improve comments.
3239 Rewrite to handle multiple threads and processes.
3240 (darwin_resume_to): New function and protype.
3241 (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
3242 (darwin_kill_inferior): Add ops argument.
3243 (darwin_pid_to_str): New function.
3244 (darwin_thread_alive): Ditto.
3245 (darwin_inf, darwin_not_port): Removed.
3246 (darwin_inf_fake_stop): New variable.
3247 (msgin, msgout, msg_state, exc_msg): Removed.
3248 (mach_check_error): Use warning instead of error.
3249 (darwin_ptrace): Adjust debug level.
3250 (cmp_thread_t): Fix names (typo).
3251 (darwin_check_new_threads): Argument is now an inferior,
3252 adjust for new structures, add no change check, ignore dead ports,
3253 handle first thread case.
3254 (find_inferior_task_it): New function.
3255 (find_inferior_notify_it): Ditto.
3256 (darwin_find_inferior_by_task): Ditto.
3257 (darwin_find_inferior_by_notify): Ditto.
3258 (darwin_find_thread): Ditto.
3259 (darwin_suspend_inferior): Ditto.
3260 (darwin_resume_inferior): Ditto.
3261 (catch_exception_raise_state): Removed.
3262 (catch_exception_raise_state_identity): Removed.
3263 (darwin_suspend_inferior_it): New function.
3264 (darwin_resume_inferior_it): Ditto.
3265 (darwin_dump_message): New function, extracted from darwin_wait.
3266 (darwin_decode_exception_message): New function.
3267 (darwin_encode_reply): New function.
3268 (catch_exception_raise): Removed.
3269 (darwin_send_reply): New function, extracted from darwin_resume.
3270 (darwin_resume_thread): New function, extracted from darwin_resume.
3271 (struct resume_inferior_threads_param): New type.
3272 (darwin_resume_inferior_threads_it): New function.
3273 (darwin_resume_inferior_threads): New function.
3274 (darwin_suspend_inferior_threads): New function.
3275 (darwin_resume): Mostly rewritten to handle multiple threads and
3277 (darwin_decode_message): New function extracted from darwin_wait.
3278 (cancel_breakpoint): New function.
3279 (darwin_wait): Mostly rewritten. Handle multiple threads.
3280 (darwin_mourn_inferior): Adjust for per process structures.
3281 (darwin_reply_to_all_pending_messages): New function.
3282 (darwin_stop_inferior): Adjust for per inferior structures.
3283 (darwin_attach_pid): Ditto.
3284 (darwin_init_thread_list): Ditto.
3285 (darwin_attach): Ditto.
3286 (darwin_detach): Ditto.
3287 (darwin_files_info): Now empty.
3288 (darwin_pid_to_str): Adjust returns string to match one expected by
3290 (darwin_read_write_inferior): Rename err variable to match other uses.
3291 Adjust debug message. Handle submaps.
3292 (darwin_xfer_memory): Adjust for per inferior structures.
3293 (set_enable_mach_exceptions): Ditto.
3294 (darwin_pid_to_exec_file): New function.
3295 (darwin_get_ada_task_ptid): Ditto.
3296 (darwin_supports_multi_process): Ditto.
3297 (_initialize_darwin_inferior): Remove useless assertion, adjust for
3298 per inferior structures. Add new target operations.
3300 2009-06-18 Hui Zhu <teawater@gmail.com>
3301 Michael Snyder <msnyder@vmware.com>
3303 * infrun.c (handle_inferior_event): Improve reverse stepping
3304 through function epilogue.
3306 * infrun.c (handle_inferior_event): Reverse-next through
3309 2009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
3311 * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
3314 2009-06-17 Tom Tromey <tromey@redhat.com>
3316 * dwarf2read.c (zlib_decompress_section): Use a cleanup.
3318 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3320 * gdbarch.sh (pointer_to_address): Change to type 'm'.
3321 (address_to_pointer): Likewise.
3322 * gdbarch.c, gdbarch.h: Regenerate.
3324 * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
3325 (signed_pointer_to_address): Likewise.
3326 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3327 * findvar.c (unsigned_pointer_to_address): Likewise.
3328 (signed_pointer_to_address): Likewise.
3329 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3331 * avr-tdep.c (avr_address_to_pointer): Likewise.
3332 (avr_pointer_to_address): Likewise.
3333 * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
3334 (iq2000_address_to_pointer): Likewise.
3335 * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
3336 (m32c_m16c_pointer_to_address): Likewise.
3337 * spu-tdep.c (spu_pointer_to_address): Likewise.
3338 * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
3339 (xstormy16_address_to_pointer): Likewise.
3341 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3343 * printcmd.c (print_scalar_formatted): Always truncate
3344 unsigned data types.
3346 * cli-dump.c (struct callback_data): Change type of load_offset
3348 (restore_binary_file): Update type casts.
3349 (restore_command): Parse load_offset as address, not long.
3351 * utils.c (string_to_core_addr): Do not sign-extend value.
3352 * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
3353 before comparing against requested frame address.
3355 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3357 * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
3358 * gdbarch.h, gdbarch.c: Regenerate.
3360 * gcore.c (default_gcore_target): Make return value const.
3361 Call gdbarch_gcore_bfd_target if present.
3362 (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
3364 * corelow.c (core_read_description): Call gdbarch_core_read_description
3365 on core_gdbarch instead of current_gdbarch.
3367 * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
3369 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3371 * gdbtypes.c (create_string_type): Receive character type as argument.
3372 * gdbtypes.h (create_string_type): Add character type argument.
3373 * dwarf2read.c (read_tag_string_type): Pass character type to
3376 * value.h (value_string): Add character type argument.
3377 * valops.c (value_string): Add character type argument. Pass it to
3378 create_string_type. Do not allocate space in inferior.
3379 * valarith.c (value_concat): Pass character type to value_string.
3381 * value.h (value_typed_string): Rename to ...
3382 (value_cstring): ... this.
3383 * valops.c (value_typed_string): Rename to ...
3384 (value_cstring): ... this.
3385 * c-lang.c (evaluate_subexp_c): Update.
3387 * python/python-value.c (builtin_type_pychar): New define.
3388 (convert_value_from_python): Call value_cstring instead
3389 of value_from_string.
3390 * value.c (value_from_string): Remove.
3391 * value.h (value_from_string): Remove.
3393 * eval.c (evaluate_subexp_standard): Pass character type to
3394 value_string. Pass expression architecture to value_nsstring
3395 and lookup_child_selector.
3396 * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
3397 (lookup_child_selector): Likewise.
3398 (value_nsstring): Likewise.
3399 * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
3400 Pass character type to value_string..
3401 (lookup_child_selector): Likewise.
3402 (value_nsstring): Add GDBARCH parameter, use it instead of
3403 objfile architecture. Pass architecture to lookup_objc_class
3404 and lookup_child_selector. Pass character type to value_string.
3405 (end_msglist): Pass architecture to lookup_objc_class.
3406 * objc-exp.y: Pass architecture to lookup_objc_class.
3408 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3410 * gdbtypes.h (struct language_defn): Add forward declaration.
3411 (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3412 (lookup_unsigned_typename): Likewise.
3413 (lookup_signed_typename): Likewise.
3414 * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3415 Use them instead of current_language and current_gdbarch.
3416 (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
3417 Pass them to lookup_typename.
3418 (lookup_signed_typename): Likewise.
3420 * c-exp.y: Pass parse_language and parse_gdbarch to
3421 lookup_unsigned_typename and lookup_signed_typename.
3422 * objc-exp.y: Likewise.
3423 * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
3425 * c-lang.c (evaluate_subexp_c): Pass expression language and
3426 gdbarch to lookup_typename.
3427 * printcmd.c (printf_command): Pass current language and
3428 gdbarch to lookup_typename.
3429 * python/python-type.c (typy_lookup_typename): Likewise.
3430 Include "language.h".
3432 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3434 * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
3435 Use it instead of current_gdbarch. Pass architecture to
3436 sparc32_gregset_supplies_p.
3437 (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
3438 of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
3439 * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
3440 sparc64nbsd_fpregset_supplies_p): Likewise.
3441 * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
3442 Add GDBARCH parameter.
3443 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3444 (sparc_fetch_inferior_registers): Pass regcache architecture to
3445 sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
3446 (sparc_store_inferior_registers): Likewise.
3447 * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
3448 Add GDBARCH parameter.
3449 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3451 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3453 * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
3455 * aix-thread.c (pd_enable): Likewise.
3456 * amd64-linux-nat.c (ps_get_thread_area): Likewise.
3457 * bsd-uthread.c (bsd_uthread_activate): Likewise.
3458 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
3459 * linux-thread-db.c (enable_thread_event): Likewise.
3460 * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
3461 * nto-procfs.c (procfs_open): Likewise.
3462 * procfs.c (invalidate_cache, procfs_insert_watchpoint,
3463 info_proc_mappings, info_mappings_callback): Likewise.
3464 * record.c (record_open): Likewise.
3465 * rs6000-nat.c (ARCH64): Likewise.
3466 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
3467 (darwin_bfd_open): Likewise.
3468 * memattr.c (mem_info_command): Likewise.
3470 * windows-nat.c (win32_resume): Use current regcache architecture
3471 instead of current_gdbarch.
3473 * dbug-rom.c (dbug_regname): Remove check against number of
3474 registers in current_gdbarch.
3475 * solib-pa64.c (read_dynamic_info): Remove unused variable.
3477 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3479 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
3480 use it instead of current_gdbarch.
3481 * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
3482 * arm-tdep.c (arm_skip_prologue): Pass architecture to
3483 deprecated_pc_in_call_dummy.
3485 * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
3486 Use it instead of current_gdbarch.
3487 * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
3488 * breakpoint.c (expand_line_sal_maybe): Pass architecture to
3489 skip_prologue_using_sal.
3490 * arm-tdep.c (skip_prologue_using_sal): Likewise.
3491 * lm32-tdep.c (lm32_skip_prologue): Likewise.
3492 * m32-tdep.c (m32c_skip_prologue): Likewise.
3493 * mips-tdep.c (mips_skip_prologue): Likewise.
3494 * moxie-tdep.c (moxie_skip_prologue): Likewise.
3495 * mt-tdep.c (mt_frame_unwind_cache): Likewise.
3496 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
3497 * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
3498 it to skip_prologue_using_sal. Update call sites ...
3499 (frv_skip_prologue, frv_frame_unwind_cache): ... here.
3501 * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
3502 (check_for_saved): Use it instead of current_gdbarch.
3503 (mn10300_analyze_prologue): Set it.
3505 * value.c (using_struct_return): Add GDBARCH parameter. Use it
3506 instead of current_gdbarch.
3507 * value.h (using_struct_return): Add GDBARCH parameter.
3508 * eval.c (evaluate_subexp_standard): Pass architecture to
3509 using_struct_return.
3510 * infcall.c (call_function_by_hand): Likewise.
3511 * stack.c (return_command): Likewise.
3512 * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
3514 * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
3516 * symtab.h (in_prologue): Add GDBARCH parameter.
3517 * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
3519 * eval.c (evaluate_subexp_standard): Use expression architecture
3520 instead of current_gdbarch.
3522 * c-lang.c (evaluate_subexp_c): Use expression architecture and
3523 language instead of current_gdbarch and current_language.
3525 * printcmd.c (do_one_display): Use expression architecture instead
3528 * infcmd.c (print_return_value): Use architecture of stop_regcache
3529 instead of current_gdbarch.
3530 (print_vector_info, print_float_info): Remove GDBARCH argument,
3531 use frame architecture instead.
3532 (vector_info, float_info): Update calls.
3534 * objc-lang.c (objc_skip_trampoline): Use frame architecture
3535 instead of current_gdbarch.
3537 * parse.c (write_dollar_variable): Use parse architecture instead
3540 * source.c (line_info): Use objfile architecture instead of
3543 * symtab.c (find_function_start_sal): Use gdbarch instead of
3545 (print_msymbol_info): Use objfile architecture instead of
3548 * valops.c (value_assign): Use frame architecture instead of
3551 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3553 * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
3555 * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
3556 calling record_line.
3557 (enter_linenos): Likewise.
3558 * dbxread.c (process_one_symbol): Likewise.
3559 * dwarf2read.c (dwarf_decode_lines): Likewise.
3560 * mdebugread.c (psymtab_to_symtab_1): Likewise.
3561 * xcoffread.c (enter_line_range): Likewise.
3563 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3565 * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
3566 architecture instead of current_gdbarch.
3567 (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
3568 (gen_expr): Pass expression to get_struct_ref.
3570 * symtab.h (struct symbol_ops): Add GDBARCH parameter to
3571 tracepoint_var_ref callback.
3572 * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
3573 symbol operation callback.
3574 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
3575 Use it instead of current_gdbarch.
3576 (locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
3577 dwarf2_tracepoint_var_ref.
3578 (loclist_tracepoint_var_ref): Likewise.
3580 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3582 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3583 Use it instead of address bits of current_gdbarch.
3584 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3585 * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
3587 (arm_scan_prologue): Likewise.
3588 * m32c-tdep.c (m32c_analyze_prologue): Likewise.
3589 * mep-tdep.c (mep_analyze_prologue): Likewise.
3590 * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
3591 * s390-tdep.c (s390_analyze_prologue): Likewise.
3593 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3595 * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
3596 frame architecture instead of current_gdbarch.
3597 (mi_cmd_data_list_changed_registers): Likewise.
3598 (mi_cmd_data_list_register_values): Likewise. Pass selected
3599 frame to get_register.
3600 (get_register): Add FRAME argument, use it as frame to retrieve
3601 registers from (instead of selected frame). Use frame architecture
3602 instead of current_gdbarch.
3603 (mi_cmd_data_write_register_values): Use current regcache
3604 architecture instead of current_gdbarch.
3606 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3608 * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
3609 use frame architecture instead. Replace current_gdbarch uses.
3610 (tui_show_registers): Update call.
3611 (tui_get_register): Remove GDBARCH parameter; use frame architecture
3613 (tui_show_register_group): Update call.
3614 (tui_check_register_values): Likewise.
3615 (tui_register_format): Remove GDBARCH parameter; use frame
3616 architecture instead. Replace current_gdbarch uses.
3617 (tui_get_register): Update call.
3619 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3621 * gdbarch.sh (construct_inferior_arguments): Remove.
3622 * gdbarch.c, gdbarch.h: Regenerate.
3623 * infcmd.c (get_inferior_args): Call construct_inferior_arguments
3624 directly instead of gdbarch_construct_inferior_arguments.
3625 (construct_inferior_arguments): Remove GDBARCH argument.
3626 * inferior.h (construct_inferior_arguments): Likewise.
3628 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3630 * symfile.c (section_is_mapped): Use objfile architecture instead
3632 (TARGET_LONG_BYTES): Remove.
3633 (read_target_long_array): Add SIZE argument. Use it instead of
3635 (simple_read_overlay_table): Retrieve long size from objfile
3636 architecture; pass it to read_target_long_array.
3637 (simple_read_overlay_region_table): Likewise.
3638 (simple_overlay_update_1): Likewise.
3640 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3642 * infrun.c (cleanup_displaced_step_closure): Remove.
3643 (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
3644 (displaced_step_prepare): Use displaced_step_clear_cleanup instead
3645 of cleanup_displaced_step_closure.
3646 (handle_inferior_event, keep_going): Use thread architecture instead
3649 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3651 * infrun.c (handle_inferior_event): Use current frame architecture
3652 or thread architecture instead of current_gdbarch. Pass to
3653 handle_step_into_function and handle_step_into_function_backward.
3654 (handle_step_into_function): Add GDBARCH parameter. Use it instead
3656 (handle_step_into_function_backward): Likewise.
3657 (insert_step_resume_breakpoint_at_frame): Use frame architecture
3658 instead of current_gdbarch.
3659 (insert_step_resume_breakpoint_at_caller): Likewise.
3661 2009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
3662 Pedro Alves <pedro@codesourcery.com>
3664 * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
3665 is pushed for watchpoint promotion to hardware watchpoint.
3667 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3669 * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
3670 (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
3671 (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
3672 (dwarf_ranges_section, dwarf_frame_section)
3673 (dwarf_eh_frame_section): Removed.
3674 (dwarf2_resize_section): Likewise.
3675 (dwarf2_read_section): Now static, use bfd_mmap() if possible.
3676 (dwarf2_get_section_info): New function.
3677 (munmap_section_buffer): Likewise.
3678 (dwarf2_per_objfile_cleanup): Likewise.
3679 (section_is_p): Signature change.
3680 * dwarf2-frame.c (dwarf2_build_frame_info): Use
3681 dwarf2_get_section_info instead of dwarf2_read_section.
3683 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3685 * solib.c (symbol_add_stub): New FLAGS parameter.
3686 (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
3688 (solib_add): Defer breakpoint_re_set until after all solibs.
3689 * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
3690 * rs6000-nat.c (objfile_symbol_add): Adjust.
3691 * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
3692 (new_symfile_objfile): Likewise.
3693 (symbol_file_add_with_addrs_or_offsets): Likewise.
3694 (symbol_file_add_from_bfd): Likewise.
3695 (symbol_file_add): Likewise.
3696 * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
3697 * symfile-mem.c (symbol_file_add_from_memory): Adjust.
3698 * windows-nat.c (safe_symbol_file_add_stub): Adjust.
3699 * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
3701 2009-06-16 Keith Seitz <keiths@redhat.com>
3703 * linespec.c (collect_methods): Delete.
3704 (add_matching_methods): Reove destructor special case.
3705 (find_method): Call find_methods directly instead of
3707 * valops.c (value_struct_elt): Remove destructor
3709 (check_field): Likewise.
3710 (value_struct_elt_for_reference): Likewise.
3711 (destructor_name_p): Remove misleading comment about dtors
3712 being "special cases".
3713 * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
3714 * gdbtypes.c (get_destructor_fn_field): Likewise.
3716 2009-06-16 Pedro Alves <pedro@codesourcery.com>
3718 * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
3719 TARGET_OJECT_MEMORY reads to the topmost target, not to the
3720 flattened current_target.
3722 2009-06-16 Tristan Gingold <gingold@adacore.com>
3724 * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
3726 (avr_register_name): Add const to register_names.
3727 (avr_scan_arg_moves): Move inside avr_scan_prologue.
3728 (avr_scan_prologue): Add pc_end argument.
3729 Only read prologue bytes that can be read.
3730 Limit the scan to the known prologue length.
3731 Makes pattern variables static and const.
3733 (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
3735 (avr_breakpoint_from_pc): Constify avr_break_insn.
3736 (avr_extract_return_value): Fix function comment.
3737 (avr_frame_unwind_cache): Fix GNU style violations.
3738 Pass current_pc argument to avr_scan_prologue to stop prologue
3739 analysis to the current pc. This fixes the bug with the 'next'
3741 Correctly set the SP register of the previous frame (use call_length).
3742 (avr_frame_prev_register): Fix indentation.
3743 Correctly read PC from the stack on avr6 architectures.
3744 (avr_push_dummy_call): Fix indentation.
3745 (avr_gdbarch_init): Set call_length according to the architecture.
3747 2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
3749 * infcall.c (show_unwind_on_terminating_exception_p): New
3751 (call_function_by_hand): Create breakpoint and clean-up call for
3752 std::terminate.breakpoint. Add unwind_on_terminating_exception_p
3753 gate. Pop frame on breakpoint hit.
3754 (_initialize_infcall): Add add_setshow_boolean_cmd for
3755 unwind-on-terminating-exception.
3757 2009-06-12 Kevin Buettner <kevinb@redhat.com>
3759 * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
3760 `has_section_at_zero' flag from stripped objfile to separate,
3761 debug info only, objfile.
3763 2009-06-12 Pedro Alves <pedro@codesourcery.com>
3765 * exec.h (section_table_xfer_memory_partial): Improve description,
3766 mention SECTION_NAME.
3767 * exec.c (section_table_xfer_memory_partial): Remove stale
3770 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3772 * nto-tdep.h (nto_generic_supply_gpregset)
3773 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3774 * nto-tdep.c (nto_generic_supply_gpregset)
3775 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3777 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3779 * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
3780 (i386nto_sigcontext_addr): Change the way context address is calculated.
3781 (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
3782 sc_sp_offset and set sc_reg_offset and sc_num_regs.
3784 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3786 * i386-nto-tdep.c (i386_nto_target): Remove definition.
3787 (init_i386nto_ops): Use macros to set fields to global
3788 current_nto_target directly.
3789 (i386nto_init_abi): Remove unused nto_set_target call.
3790 * nto-tdep.h (nto_set_target): Remove unused declaration.
3791 * nto-tdep.c (nto_set_target): Remove unused function.
3793 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3795 * breakpoint.c (break_command_really): Rename local variable
3796 breakpoint_chain to bkpt_chain.
3798 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3800 Add support for XMM registers.
3801 * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
3802 (i386nto_register_area): Correctly calculate offsets and sizes for
3803 all supported registers.
3805 2009-06-11 Tom Tromey <tromey@redhat.com>
3807 * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
3808 'static' from local variable definitions.
3810 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3812 * symtab.c (append_expanded_sal): Remove unused local variables.
3814 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3816 * infrun.c (sched_multi): New global.
3817 (resume): If sched_multi is set, resume only threads of the
3819 (prepare_to_proceed): Don't switch over to wait_ptid if we're
3820 resuming a different inferior, and sched_multi is off.
3821 (show_schedule_multiple): New.
3822 (_initialize_infrun): Register new "set schedule-multiple" command.
3823 * inferior.h (sched_multi): Declare.
3824 * NEWS: Mention new "schedule-multiple" setting.
3826 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3828 * varobj.c (varobj_create): Properly restore the selected frame.
3830 2009-06-05 Tom Tromey <tromey@redhat.com>
3832 * inferior.c (print_inferior): Make a table, not a list. Emit
3835 2009-06-10 Jonas Maebe <jonas.maebe@elis.ugent.be>
3837 * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
3838 darwin_wait (blocking wait).
3839 (darwin_kill_inferior): Likewise.
3841 2009-06-10 Pedro Alves <pedro@codesourcery.com>
3843 * infrun.c (handle_inferior_event): Update comment around trying
3844 to revert back to a stepping thread that has exited.
3846 2009-06-10 Cary Coutant <ccoutant@google.com>
3848 * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
3849 DW_LNE_set_discriminator.
3851 2009-06-10 Pierre Muller <muller@ics.u-strasbg.fr>
3853 * breakpoint.c: ARI fixes.
3854 (create_overlay_event_breakpoint): Avoid assignment inside if statement.
3855 (print_one_breakpoint_location): Likewise.
3856 (create_longjmp_breakpoint): Likewise.
3857 (tracepoint_save_command): Likewise
3858 (bpstat_find_step_resume_breakpoint): No operator at end of line.
3859 (bpstat_stop_status): Likewise.
3860 (describe_other_breakpoints): Likewise.
3861 (hw_watchpoint_used_count): Likewise.
3862 (expand_line_sal_maybe): Likewise.
3863 (break_command_really): Likewise.
3864 (delete_command): Likewise.
3865 (do_enable_breakpoint): Likewise.
3866 (delete_trace_command): Likewise.
3867 (catch_exception_command_1): Likewise and remove extra parentheses.
3869 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
3871 * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
3872 "ubreak" command that does not exist.
3874 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
3876 * cli/cli-decode.c (add_alias_cmd): Correct assertion.
3878 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3880 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
3882 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3885 * proc-utils.h (procfs_first_available): Don't declare here.
3886 * sol-thread.c: Include procfs.h instead of sys/procfs.h and
3888 * procfs.c: Include procfs.h.
3889 (procfs_target): Make it public. Don't register
3890 procfs_can_use_hw_breakpoint here.
3891 (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
3892 defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
3893 (procfs_can_use_hw_breakpoint): Remove check of
3894 TARGET_HAS_HARDWARE_WATCHPOINTS.
3895 (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
3897 (_initialize_procfs): Don't add the procfs target here.
3899 * i386-sol2-nat.c: Include target.h and procfs.h.
3900 (_initialize_amd64_sol2_nat): Install the procfs target here,
3901 customized with watchpoints support.
3902 * irix5-nat.c: Include target.h.
3903 (_initialize_core_irix5): Rename to ...
3904 (_initialize_irix5_nat): ... this. Install the procfs target
3905 here, customized with watchpoints support.
3906 * alpha-nat.c: Include procfs.h.
3907 (_initialize_core_alpha): Rename to...
3908 (_initialize_alpha_nat): ... this. Install the procfs target
3909 here, customized with watchpoints support.
3910 * sparc-sol2-nat.c: Include target.h and procfs.h.
3911 (_initialize_sparc_sol2_nat): New.
3913 * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
3914 * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
3915 * config/mips/irix5.mh (NAT_FILE): Delete.
3916 * config/mips/irix6.mh (NAT_FILE): Delete.
3917 * config/mips/nm-irix5.h: Delete.
3919 20009-06-07 Pedro Alves <pedro@codesourcery.com>
3921 * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
3922 to enum target_object. Cleanup comments.
3923 * auxv.h: Include "target.h". Cleanup comments to not mention
3924 NATIVE_XFER_AUXV anymore.
3926 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3928 * inferior.h (procfs_first_available): Move declaration to...
3929 * proc-utils.h: ... here.
3930 * sol-thread.c: Include procfs.h and proc-utils.h.
3932 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3934 * inferior.h (proc_iterate_over_mappings): Delete declaration.
3935 * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
3936 * procfs.c (proc_iterate_over_mappings): Delete.
3938 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3940 * target.h (struct target_ops): Make to_has_all_memory,
3941 to_has_memory, to_has_stack, to_has_registers and to_has_execution
3942 methods instead of variables.
3943 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
3944 (target_has_registers_1, target_has_execution_1): Declare
3946 (target_has_all_memory): Rewrite to call target_has_all_memory_1.
3947 (target_has_memory): Rewrite to call target_has_memory_1.
3948 (target_has_stack): Rewrite to call target_has_all_stack_1.
3949 (target_has_registers): Rewrite to call target_has_registers_1.
3950 (target_has_execution): Rewrite to call target_has_execution_1.
3951 (default_child_has_all_memory, default_child_has_memory)
3952 (default_child_has_stack, default_child_has_registers)
3953 (default_child_has_execution): Declare.
3954 (target_mark_running, target_mark_exited): Delete declarations.
3955 * target.c (default_child_has_all_memory,
3956 default_child_has_memory, default_child_has_stack,
3957 default_child_has_registers, default_child_has_execution): New.
3958 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
3959 target_has_registers_1, target_has_execution_1): New.
3960 (add_target): Default the to_has_all_memory, to_has_all_memory,
3961 to_has_memory, to_has_stack, to_has_registers and to_has_execution
3962 callbacks to return 0.
3963 (update_current_target): Do not inherit to_has_all_memory,
3964 to_has_memory, to_has_stack, to_has_registers or to_has_execution.
3965 (target_mark_running, target_mark_exited): Delete.
3966 (memory_xfer_partial): Adjust.
3967 (target_read_memory, target_write_memory, target_search_memory):
3968 Dispatch to the the top-most target, not the flattened
3970 (target_info): Adjust.
3971 (init_dummy_target): Install return_zero as callback for
3972 to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
3974 (set_maintenance_target_async_permitted): Use have_live_inferiors
3975 instead of target_has_execution.
3976 * target-memory.c (target_write_memory_blocks): Dispatch memory
3977 writes to the the top-most target, not the flattened
3980 * breakpoint.c (insert_breakpoints): Don't check for
3981 target_has_execution here.
3982 (update_global_location_list): Check if there are live inferiors
3983 to debug instead of target_has_execution.
3984 * infcmd.c (kill_command, detach_command): Check if there are
3985 inferiors instead of target_has_execution.
3986 * inferior.h (have_live_inferiors): Declare.
3987 * inferior.c (have_live_inferiors): New.
3988 * infrun.c (normal_stop): Don't check for target_has_execution to
3989 finish the thread states.
3990 * thread.c (is_thread_state, is_stopped, is_exited, is_running)
3991 (any_running, is_executing): Remove checks for
3992 target_has_execution.
3993 * top.c (kill_or_detach): Don't try to kill core inferiors.
3994 (quit_target): Don't check for target_has_execution.
3996 * corelow.c (core_has_memory, core_has_stack, core_has_registers):
3998 (init_core_ops): Install core_has_memory, core_has_stack and
4000 * exec.c (exec_has_memory): New.
4001 (init_exec_ops): Install exec_has_memory.
4002 * remote.c (remote_add_inferior): Don't call target_mark_running.
4003 (remote_start_remote): Don't call target_mark_exited or call
4004 target_mark_running.
4005 (remote_open_1): Use have_inferiors instead of
4006 target_has_execution. Don't use target_mark_exited.
4007 (init_remote_ops): Install deafult_child_has_all_memory,
4008 default_child_has_memory, default_child_has_stack,
4009 default_child_has_registers, default_child_has_execution.
4010 * bsd-kvm.c (bsd_kvm_return_one): New.
4011 (bsd_kvm_add_target): Register bsd_kvm_return_one as
4012 to_has_memory, to_has_stack and to_has_registers callbacks.
4013 * remote-m32r-sdi.c (m32r_return_one): New.
4014 (init_m32r_ops): Register it.
4015 * inf-child.c (inf_child_target): Adjust to register
4016 default_child_has_all_memory, default_child_has_memory,
4017 default_child_has_stack, default_child_has_registers,
4018 default_child_has_execution callbacks.
4019 * gnu-nat.c (init_gnu_ops): Likewise.
4020 * go32-nat.c (init_go32_ops): Likewise.
4021 * hpux-thread.c (init_hpux_thread_ops): Likewise.
4022 * monitor.c (init_base_monitor_ops): Likewise.
4023 * nto-procfs.c (init_procfs_ops): Likewise.
4024 * remote-mips.c (_initialize_remote_mips): Likewise.
4025 * windows-nat.c (init_windows_ops): Likewise.
4026 * remote-sim.c (gdbsim_create_inferior): Don't use
4027 target_mark_running or target_mark_exited.
4028 (gdbsim_mourn_inferior): Don't call target_mark_exited.
4029 (init_gdbsim_ops): Adjust to register
4030 default_child_has_all_memory, default_child_has_memory,
4031 default_child_has_stack, default_child_has_registers,
4032 default_child_has_execution callbacks.
4034 * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
4035 there's no inferior selected, defer to a lower stratum.
4037 2009-06-05 Tom Tromey <tromey@redhat.com>
4039 * varobj.c (update_dynamic_varobj_children): Wrap error text in
4041 (install_visualizer): Likewise.
4042 (varobj_set_visualizer): Likewise.
4044 2009-06-05 Marc Khouzam <marc.khouzam@ericsson.com>
4046 * mi/mi-main.c (mi_cmd_exec_continue)
4047 (mi_cmd_exec_interrupt): Adjust parsing of thread group
4048 ids to current reality, where they don't have any 'p' prefix.
4050 2009-06-05 Aleksandar Ristovski <aristovski@qnx.com>
4052 * corelow.c (core_open): Check for core_gdbarch before calling
4053 gdbarch_target_signal_from_host.
4055 2009-06-05 Tom Tromey <tromey@redhat.com>
4057 * c-exp.y (parse_number): Don't use K&R definition.
4059 (yyerror): Likewise.
4061 2009-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
4063 * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
4065 2009-06-04 Ulrich Weigand <uweigand@de.ibm.com>
4067 * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
4068 * ax-gdb.c (gen_var_ref): Likewise.
4069 * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
4070 * printcmd.c (address_info): Likewise.
4071 * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
4072 * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
4073 * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
4074 * dwarf2loc.h: Likewise.
4075 * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
4077 * symtab.h: (struct symbol_register_ops): New struct definition.
4078 (struct symbol): Make "ops" member a union of symbol_computed_ops and
4079 symbol_register_ops callback pointers.
4080 (SYMBOL_REGISTER_OPS): New macro.
4081 * tracepoint.c: Include "objfiles.h".
4082 (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
4083 callback to retrieve register numbers.
4084 * ax-gdb.c (gen_var_ref): Likewise.
4085 * findvar.c (read_var_value): Likewise.
4086 * printcmd.c (address_info): Likewise.
4088 * coffread.c (coff_reg_to_regnum): New function.
4089 (coff_register_funcs): New static variable.
4090 (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
4091 Install SYMBOL_REGISTER_OPS callbacks.
4092 * mdebugread.c (mdebug_reg_to_regnum): New function.
4093 (mdebug_register_funcs): New static variable.
4094 (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
4095 Install SYMBOL_REGISTER_OPS callbacks.
4096 * stabsread.c (stab_reg_to_regnum): New function.
4097 (stab_register_funcs): New static variable.
4098 (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
4099 Install SYMBOL_REGISTER_OPS callbacks.
4101 2009-06-03 Doug Evans <dje@google.com>
4103 * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
4104 after discarding its contents.
4106 2009-06-03 Pedro Alves <pedro@codesourcery.com>
4108 * target.c: Include "exec.h".
4109 (update_current_target): Don't inherit to_sections or
4111 (target_get_section_table): New.
4112 (target_section_by_addr): Fetch the section table from the passed
4114 (memory_xfer_partial): Handle unmapped overlay sections before
4115 anything else. Get the overlay mapped address here. Adjust to
4116 use section_table_xfer_memory_partial.
4117 (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
4118 instead of TARGET_OBJECT_MEMORY.
4119 (target_resize_to_sections): Delete.
4120 (remove_target_sections): Adjust to remove target sections from
4121 `current_target_sections', and use resize_section_table.
4122 * target.h (struct target_ops) <to_sections, to_sections_end>:
4124 <to_get_section_table>: New method.
4125 (xfer_memory, print_section_info): Delete declarations.
4126 (struct target_section_table): New type.
4127 (target_get_section_table): Declare.
4128 (target_resize_to_sections): Delete declaration.
4129 (remove_target_sections): Delete declaration.
4130 * bfd-target.c (target_bfd_xfer_partial): Get the section table
4132 (target_bfd_get_section_table): New.
4133 (target_bfd_xclose): Adjust.
4134 (target_bfd_reopen): Store the section table in the to_data field.
4135 * corelow.c (core_data): New.
4136 (core_close): Adjust to release core_data and its sections.
4137 (core_open): Allocate core_data, and build its target sections
4139 (deprecated_core_resize_section_table): New.
4140 (core_files_info): Pass core_data to print_section_info.
4141 (core_xfer_partial): Adjust to use
4142 section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
4143 (init_core_ops): Do not install a deprecated_xfer_memory callback
4145 * solib.c (update_solib_list): Add the shared library sections
4146 to the current target sections table.
4147 * exec.c (current_target_sections_1): New global.
4148 (current_target_sections): New global.
4149 (exec_close_1): New function, refactored from exec_close. Remove
4150 the exec_bfd's sections from the current target sections table.
4151 Adjust to not use to_sections.
4152 (exec_close): Remove all target sections. Call exec_close_1.
4153 (exec_file_clear): Use exec_close_1 instead of unpushing the
4155 (exec_file_attach): Likewise. Adjust to not use to_sections. Add
4156 exec_bfd's sections to the current target sections table. Don't
4157 push the exec_ops target here.
4158 (resize_section_table): New.
4159 (add_target_sections): New.
4160 (remove_target_sections): Moved here.
4161 (section_table_xfer_memory): Adjust to implement the xfer_partial
4162 interface, and rename to...
4163 (section_table_xfer_memory_partial): ... this, replacing the
4164 current function of that same name.
4165 (exec_get_section_table): New.
4166 (exec_xfer_partial): New.
4167 (xfer_memory): Delete.
4168 (print_section_info): Replace the target_ops parameter by a
4169 target_section_table parameter.
4170 (exec_files_info, set_section_command, exec_set_section_address):
4171 Adjust to use the current sections table.
4172 (init_exec_ops): Do not register a deprecated_xfer_memory
4173 callback. Register to_xfer_partial and to_get_section_table
4175 * infrun.c (handle_inferior_event): Update comments around
4177 * rs6000-nat.c (xcoff_relocate_core): Adjust to use
4178 deprecated_core_resize_section_table.
4179 * exec.h (resize_section_table): Declare.
4180 (section_table_xfer_memory_partial): Add const char * argument.
4181 (remove_target_sections): Declare here.
4182 (add_target_sections): Declare.
4183 (print_section_info): Declare here.
4184 * gdbcore.h (deprecated_core_resize_section_table): Declare.
4186 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4188 * value.h (struct internalvar): Remove.
4189 (get_internalvar_integer): Add prototype.
4190 (set_internalvar_integer): Add prototype.
4191 (clear_internalvar): Add prototype.
4193 * value.c (struct internalvar): Move here. Add type member. Remove
4194 endian member. Add union_internalvar member instead of value member.
4195 (init_if_undefined_command): Use intvar->type.
4196 (create_internalvar): Do not initialize value/endian, but type.
4197 (create_internalvar_type_lazy): Call create_internalvar.
4198 (value_of_internalvar): Handle host-side internalvar contents.
4199 (set_internalvar_component): Likewise.
4200 (set_internalvar): Likewise.
4201 (get_internalvar_integer): New function.
4202 (clear_internalvar): Likewise.
4203 (set_internalvar_integer): Likewise.
4204 (preserve_values): Handle host-side internalvar contents.
4206 * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
4207 set_internalvar_integer instead of set_internalvar.
4208 * findcmd.c (find_command): Likewise.
4209 * infrun.c (handle_inferior_event): Likewise.
4210 * source.c (forward_search_command, reverse_search_command): Likewise.
4211 * tracepoint.c (set_traceframe_num, set_tracepoint_num,
4212 set_traceframe_context): Likewise.
4214 * printcmd.c (x_command): Call clear_internalvar instead of
4216 * tracepoint.c (set_traceframe_context): Likewise.
4218 * breakpoint.c (get_number_trailer): Call get_internalvar_integer
4219 instead of value_of_internalvar.
4220 * linespec.c (decode_dollar): Likewise.
4222 * expprint.c (dump_subexp_body_standard): Use internalvar_name
4223 instead of accessing internalvar private elements.
4224 * valops.c (value_assign): Copy from original source instead of
4225 accessing internalvar private elements.
4227 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4229 * scm-lang.c (builtin_type_scm): Remove.
4230 (scm_lookup_name): Add GDBARCH parameter. Use it instead of
4231 objfile architecture. Use per-architecture builtin_scm_type instead
4232 of builtin_type_scm.
4233 (evaluate_exp): Pass expression architecture to scm_lookup_name.
4235 (scm_get_field): Add SIZE parameter. Use it instead of
4236 TYPE_LENGTH (builtin_type_scm).
4238 (build_scm_types): New function.
4239 (scm_type_data): New variable.
4240 (builtin_scm_type): New function.
4241 (_initialize_scheme_language): Do not initialize builtin_type_scm.
4242 Register build_scm_types as post-init function for scm_type_data.
4244 * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
4245 instead of builtin_type_scm.
4247 * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
4248 (scm_get_field): Add SIZE paramter.
4249 (scm_scmval_print): Remove prototype.
4250 (builtin_type_scm): Remove.
4251 (struct builtin_scm_type): Add structure definition.
4252 (builtin_scm_type): Add prototype.
4254 * scm-valprint.c (scm_inferior_print): Add TYPE parameter. Use it
4255 instead of builtin_core_addr type; do not use objfile architecture.
4256 (scm_scmlist_print): Add TYPE parameter. Use it to define SCM_SIZE.
4257 Pass type to scm_scmval_print.
4258 (scm_ipruk): Add TYPE parameter. Use it to define SCM_SIZE.
4259 (scm_scmval_print): Make static. Add TYPE parameter. Use it to
4260 define SCM_SIZE. Pass type to scm_ipruk and scm_scmlist_print.
4261 (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
4263 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4265 * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
4266 mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
4267 mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
4268 mdebug_type_unsigned_char, mdebug_type_unsigned_short,
4269 mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
4270 mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
4271 mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
4272 mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
4273 mdebug_type_complex, mdebug_type_double_complex,
4274 mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
4277 (basic_type_data): New global variable.
4278 (basic_type): New function.
4279 (parse_type): Remove static basic type map map_bt. Call basic_type
4280 to get basic types instead of using mdebug_type_ variables.
4282 (parse_symbol): Use builtin types instead of mdebug_type_ variables.
4283 (upgrade_type): Likewise.
4284 (parse_procedure): Likewise.
4285 (psymtab_to_symtab_1): Likewise.
4287 (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
4288 Initialize basic_type_data.
4290 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4292 * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
4293 * dfp.c (promote_decimal): Remove.
4294 (decimal_binop): Convert LEN_RESULT to input parameter.
4295 Remove call to decimal_binop.
4296 (decimal_compare): Remove call to decimal_binop.
4298 * valarith.c (value_binop): Pass desired result type length
4301 2009-06-01 Tristan Gingold <gingold@adacore.com>
4303 * configure.tgt (avr): Set gdb_sim to use the simulator.
4305 2009-05-29 Doug Evans <dje@google.com>
4307 * infrun.c (prepare_to_proceed): Document. Assert !non_stop.
4308 If scheduler-locking is enabled, we're not going to be singlestepping
4309 any other previously stopped thread.
4311 2009-05-29 Pedro Alves <pedro@codesourcery.com>
4313 * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
4315 2009-05-29 Eli Zaretskii <eliz@gnu.org>
4317 * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
4318 for stabs and COFF debug info.
4320 2009-05-28 Pedro Alves <pedro@codesourcery.com>
4322 * infrun.c (handle_inferior_event): When thread hoping, switch
4323 inferior_ptid to the event thread before removing breakpoints from
4324 the target. If not stopping, also try to revert back to a thread
4325 that was doing a "next". Check if that thread still exists before
4327 (currently_stepping_thread): Delete and merge with ...
4328 (currently_stepping): ... this.
4329 (currently_stepping_callback): Rename to ...
4330 (currently_stepping_or_nexting_callback): ... this, and also
4331 return true if the thread was stepping over a call (has a
4332 step-resume breakpoint).
4334 2009-05-28 Tom Tromey <tromey@redhat.com>
4336 * python/python.c (gdbpy_parameter): Rename. Fix error message.
4337 (GdbMethods): Change "get_parameter" to "parameter".
4339 2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
4340 Paul Pluzhnikov <ppluzhnikov@google.com>
4342 * configure.ac (!have_libpython): Add python-prettyprint source
4344 * configure: Regenerate.
4345 * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
4348 2009-05-27 Vladimir Prus <vladimir@codesourcery.com>
4349 Tom Tromey <tromey@redhat.com>
4350 Thiago Jung Bauermann <bauerman@br.ibm.com>
4352 * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
4353 * varobj.h (varobj_set_visualizer): Declare.
4354 (varobj_get_display_hint): Likewise.
4355 (varobj_update_result_t) <children_changed, value_installed>: New
4357 * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
4358 * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
4359 mi_cmd_var_set_child_range): Declare.
4360 * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
4361 (mi_cmd_var_list_children): Emit display hint.
4362 (varobj_update_one): Emit display hint. Handle dynamic children.
4363 * python/python.c (GdbMethods): Add "default_visualizer".
4364 * python/python-internal.h (apply_varobj_pretty_printer,
4365 gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
4367 (gdbpy_default_visualizer): Likewise.
4368 * varobj.c: Include python.h, python-internal.h.
4369 (PyObject): New typedef.
4370 (struct varobj) <children_requested, pretty_printer>: New fields.
4371 (varobj_create): Call install_default_visualizer.
4372 (instantiate_pretty_printer): New function.
4373 (varobj_set_display_format): Update.
4374 (varobj_get_display_hint): New function.
4375 (update_dynamic_varobj_children): New function.
4376 (varobj_get_num_children): Handle dynamic children.
4377 (varobj_list_children): Likewise.
4378 (install_new_value): Likewise.
4379 (varobj_add_child): New function.
4380 (install_visualizer): Likewise.
4381 (install_default_visualizer): Likewise.
4382 (varobj_set_visualizer): Likewise.
4383 (varobj_update): Handle dynamic children.
4384 (create_child): Use create_child_with_value.
4385 (create_child_with_value): New function.
4386 (value_get_print_value): Call pretty printer. Add value_formatter
4388 (c_value_of_variable): Update.
4389 (varobj_invalidate): Always free all_rootvarobj.
4390 * python/python-prettyprint.c (apply_varobj_pretty_printer): New
4392 (gdbpy_get_varobj_pretty_printer): Likewise.
4393 (gdbpy_default_visualizer): Likewise.
4395 2009-05-27 Tom Tromey <tromey@redhat.com>
4396 Thiago Jung Bauermann <bauerman@br.ibm.com>
4397 Phil Muldoon <pmuldoon@redhat.com>
4398 Paul Pluzhnikov <ppluzhnikov@google.com>
4399 Vladimir Prus <vladimir@codesourcery.com>
4401 * python/python-value.c (value_object_to_value): New function.
4402 * python/python-internal.h: Include frameobject.h.
4403 (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
4405 (value_object_to_value): Declare.
4406 * printcmd.c (struct format_data) <raw>: New field.
4407 (last_format): Default to 0.
4408 (decode_format): Initialize val.raw. Handle /r flag.
4409 (print_command_1): Initialize fmt.raw and opts.raw.
4410 (output_command): Likewise.
4411 (x_command): Fix initialization of fmt.format. Initialize
4413 (display_command): Initialize fmt.raw.
4414 (do_one_display): Set opts.raw.
4415 * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
4416 gdbpy_display_hint_cst): New globals.
4417 (_initialize_python): Initialize them. Set gdb.pretty_printers.
4418 * cp-valprint.c: Include python.h.
4419 (cp_print_value): Call apply_val_pretty_printer.
4420 * python/python.h (apply_val_pretty_printer): Declare.
4421 * stack.c (print_this_frame_argument_p): Remove.
4422 (print_frame_args): Compute summary flag. Don't use
4423 print_this_frame_argument_p.
4424 * valprint.c: Include python.h.
4425 (user_print_options): Initialize new fields.
4426 (scalar_type_p): New function.
4427 (val_print): Handle 'raw' and 'summary' modes. Call
4428 apply_val_pretty_printer.
4429 (value_print): Handle 'raw' mode.
4430 * valprint.h (struct value_print_options) <raw, summary>: New
4432 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
4433 (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
4434 (python-prettyprint.o): New target.
4435 * python/python-prettyprint.c: New file.
4437 2009-05-27 Tom Tromey <tromey@redhat.com>
4438 Paul Pluzhnikov <ppluzhnikov@google.com>
4440 * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
4442 * cli/cli-dump.c (dump_value_to_file): Use value_address.
4443 * valprint.c (common_val_print): Likewise.
4444 * v850-tdep.c (v850_push_dummy_call): Use value_address.
4445 * tracepoint.c (encode_actions): Use value_address.
4446 * printcmd.c (print_formatted): Use value_address.
4447 (x_command): Likewise.
4448 * p-valprint.c (pascal_object_print_static_field): Use
4450 * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
4451 * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
4452 * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
4453 * jv-valprint.c (java_value_print): Use value_address.
4454 * infcall.c (find_function_addr): Use value_address.
4455 * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
4456 * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
4457 * frv-tdep.c (frv_push_dummy_call): Use value_address.
4458 * frame.c (frame_register_unwind): Use value_address.
4459 (frame_unwind_register_value): Likewise.
4460 * darwin-nat-info.c (info_mach_region_command): Use
4462 * cp-valprint.c (cp_print_static_field): Use value_address.
4463 * c-valprint.c (c_value_print): Use value_address.
4464 * breakpoint.c (update_watchpoint): Use value_address.
4465 (can_use_hardware_watchpoint): Likewise.
4466 * ada-valprint.c (ada_val_print_1): Use value_address.
4467 (ada_value_print): Likewise.
4468 * ada-tasks.c (read_fat_string_value): Use value_address.
4469 * jv-lang.c (java_link_class_type): Use set_value_address.
4470 (java_link_class_type): Likewise.
4471 (get_java_utf8_name): Use value_address.
4472 (type_from_class): Likewise.
4473 (java_link_class_type): Likewise.
4474 * findvar.c (value_of_register): Use set_value_address.
4475 (read_var_value): Likewise.
4476 (read_var_value): Likewise.
4477 * eval.c (evaluate_subexp_standard): Use set_value_address.
4478 (evaluate_subexp_standard): Use value_address.
4479 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
4480 * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
4481 (ada_value_primitive_packed_val): Likewise.
4482 (ensure_lval): Likewise.
4483 (thin_data_pntr): Use value_address.
4484 (desc_bounds): Likewise.
4485 (ada_value_primitive_packed_val): Likewise.
4486 (value_assign_to_component): Likewise.
4487 (ensure_lval): Likewise.
4488 (make_array_descriptor): Likewise.
4489 (ada_to_fixed_value): Likewise.
4490 (unwrap_value): Likewise.
4491 * value.c (deprecated_value_address_hack): Remove.
4492 (value_address): New function.
4493 (value_raw_address): Likewise.
4494 (set_value_address): Likewise.
4495 (value_fn_field): Use set_value_address.
4496 (value_from_contents_and_address): Likewise.
4497 (value_fn_field): Likewise.
4498 (allocate_value_lazy): Don't use VALUE_ADDRESS.
4499 (value_as_address): Use value_address.
4500 (value_static_field): Likewise.
4501 * valops.c (search_struct_field): Use set_value_address.
4502 (value_at): Likewise.
4503 (value_at_lazy): Likewise.
4504 (value_repeat): Likewise.
4505 (value_cast_structs): Use value_address.
4506 (value_cast): Likewise.
4507 (value_fetch_lazy): Likewise.
4508 (value_assign): Likewise.
4509 (value_repeat): Likewise.
4510 (address_of_variable): Likewise.
4511 (value_coerce_array): Likewise.
4512 (value_coerce_function): Likewise.
4513 (value_addr): Likewise.
4514 (search_struct_field): Likewise.
4515 (search_struct_method): Likewise.
4516 (find_method_list): Likewise.
4517 (value_struct_elt_for_reference): Likewise.
4518 (value_full_object): Likewise.
4519 * jv-valprint.c (java_value_print): Use set_value_address.
4520 * value.h (deprecated_value_address_hack): Remove.
4521 (VALUE_ADDRESS): Remove.
4522 (value_address): Declare.
4523 (value_raw_address): Declare.
4524 (set_value_address): Declare.
4526 2009-05-27 Tom Tromey <tromey@redhat.com>
4527 Thiago Jung Bauermann <bauerman@br.ibm.com>
4528 Phil Muldoon <pmuldoon@redhat.com>
4529 Paul Pluzhnikov <ppluzhnikov@google.com>
4531 * python/python.c (_initialize_python): Call
4532 gdbpy_initialize_types.
4533 (GdbMethods): Add "lookup_type".
4534 * python/python-value.c (value_object) <type>: New field.
4535 (valpy_dealloc): Decref type.
4536 (valpy_new): Initialize type.
4537 (valpy_get_type): New function.
4538 (value_to_value_object): Initialize type.
4539 (valpy_cast): New function.
4540 (value_object_getset): Add "type".
4541 (value_object_methods): Add "cast".
4542 * python/python-internal.h (type_to_type_object): Declare.
4543 (type_object_to_type): Likewise.
4544 (gdbpy_initialize_types): Likewise.
4545 (gdbpy_lookup_type): Declare.
4546 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
4547 (SUBDIR_PYTHON_SRCS): Add python-type.c.
4548 (python-type.o): New target.
4549 * python/python-type.c: New file.
4551 2009-05-27 Tom Tromey <tromey@redhat.com>
4552 Thiago Jung Bauermann <bauerman@br.ibm.com>
4553 Phil Muldoon <pmuldoon@redhat.com>
4555 * python/python.c: Include objfiles.h, observer.h.
4556 (gdbpy_auto_load): New global.
4557 (gdbpy_current_objfile): Likewise.
4558 (GDBPY_AUTO_FILENAME): New define.
4559 (gdbpy_new_objfile): New function.
4560 (gdbpy_get_current_objfile): Likewise.
4561 (gdbpy_objfiles): Likewise.
4562 (_initialize_python): Add "maint set auto-load". Call
4563 gdbpy_initialize_objfile. Attach objfile observer.
4564 (GdbMethods): New methods current_objfile, objfiles.
4565 * python/python-objfile.c: New file.
4566 * python/python-internal.h (objfile_to_objfile_object): Declare.
4567 (objfpy_get_printers): Likewise.
4568 (gdbpy_initialize_objfile): Likewise.
4569 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
4570 (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
4571 (python-objfile.o): New target.
4573 2009-05-27 Pedro Alves <pedro@codesourcery.com>
4575 * infrun.c (follow_exec): Clear the stop_requested flag.
4576 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
4579 2009-05-27 Aleksandar Ristovski <aristovski@qnx.com>
4581 * nto-procfs.c (get_regset): Pass correct pointer.
4583 2009-05-26 Doug Evans <dje@google.com>
4585 * dwarf2read.c (follow_die_ref): Add comment.
4586 (dwarf2_mark_helper): Tweak comment.
4587 (dwarf2_mark): Move description to its proper place.
4589 2009-05-25 Pierre Muller <muller@ics.u-strasbg.fr>
4591 * procfs.c (procfs_wait): Add options parameter.
4593 2009-05-24 Doug Evans <dje@google.com>
4595 Global renaming of find_thread_pid to find_thread_ptid.
4596 * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
4597 * thread.c (find_thread_ptid): Renamed from find_thread_pid.
4598 All callers updated.
4600 * infrun.c (follow_fork): Initialize new step_* locals
4601 to avoid "may be used uninitialized" warnings.
4603 2009-05-24 Pedro Alves <pedro@codesourcery.com>
4605 * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
4607 2009-05-24 Pedro Alves <pedro@codesourcery.com>
4609 * gdbthread.h (struct thread_info): New `pending_follow' field.
4610 * thread.c (new_thread): New function.
4611 (add_thread_silent): Use it.
4612 * breakpoint.c (internal_breakpoint_number): New global, moved
4614 (create_internal_breakpoint): ... this.
4615 (clone_momentary_breakpoint): New.
4616 * breakpoint.h (clone_momentary_breakpoint): Declare.
4617 * infrun.c (nullify_last_target_wait_ptid): Move declaration
4619 (pending_follow): Delete.
4620 (follow_fork): Handle pending follow fork event here. Moved the
4621 preserving of thread stepping state here.
4622 (resume): Don't handle pending follow fork events here. Only
4623 install the inferior's terminal modes if we're about to resume it.
4624 (proceed): Handle possible pending follow fork events here.
4625 (init_wait_for_inferior): No need to clear pending_follow anymore,
4627 (handle_inferior_event): Adjust to per-thread `pending_follow'.
4628 Call `follow_fork' to handle following the fork. If the
4629 follow-fork is cancelled, stop stepping.
4630 * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
4631 `pending_follow' events. Remove code that handled preserving the
4632 thread stepping state.
4633 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
4634 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
4636 2009-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
4638 * symfile.c (add_shared_symbol_files_command): Remove
4639 prototype and function.
4640 (_initialize _symfile): Move "add-shared-symbol-files"
4641 command and "assf" alias.
4642 * windows-nat.c (_initialize_windows_nat): to here.
4643 Change "add-shared-symbol-files" to alias.
4645 * config/i386/cygwin.mh: Remove NAT_FILE.
4646 * config/i386/mingw.mh: Remove NAT_FILE.
4647 * config/i386/mingw64.mh: Remove NAT_FILE.
4648 * config/i386/nm-cygwin.h: Remove file.
4649 * config/i386/nm-cygwin64.h: Remove file.
4651 2009-05-24 Hui Zhu <teawater@gmail.com>
4653 * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
4654 I386_LINUX_RECORD_IOCTL_*,
4655 I386_LINUX_RECORD_FCNTL_*) Removed.
4656 (i386_linux_init_abi): Change size of record from macros to
4659 2009-05-24 Hui Zhu <teawater@gmail.com>
4661 * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
4662 * linux-record.c (record_linux_system_call): Ditto.
4663 * linux-record.h (linux_record_tdep): Ditto.
4665 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4667 Replace the savestring calls by xstrdup calls where possible.
4668 * breakpoint.c (condition_command, set_raw_breakpoint)
4669 (create_catchpoint, update_breakpoint_locations): Replace the
4670 savestring calls by xstrdup calls where possible.
4671 * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
4672 (record_producer): Likewise.
4673 * coffread.c (coff_start_symtab, complete_symtab): Likewise.
4674 * corefile.c (set_gnutarget): Likewise.
4675 * dbxread.c (add_new_header_file): Likewise.
4676 * demangle.c (set_demangling_command, set_demangling_style): Likewise.
4677 * event-top.c (push_prompt, pop_prompt, command_line_handler)
4678 (set_async_prompt): Likewise.
4679 * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
4681 * language.c (set_language_command, _initialize_language): Likewise.
4682 * linespec.c (decode_line_2): Likewise.
4683 * rs6000-nat.c (add_vmap): Likewise.
4684 * top.c (set_prompt, init_history, init_main): Likewise.
4685 * tracepoint.c (stringify_collection_list): Likewise.
4686 * varobj.c (varobj_create): Remove variable expr_len. Replace the
4687 savestring calls by xstrdup calls where possible.
4688 (value_of_root, c_name_of_variable, c_describe_child): Replace the
4689 savestring calls by xstrdup calls where possible.
4690 * xcoffread.c (complete_symtab): Likewise.
4691 * cli/cli-script.c (build_command_line, define_command): Likewise.
4692 * cli/cli-setshow.c (do_setshow_command): Likewise.
4694 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4696 Remove already unreachable code.
4697 * varobj.c (varobj_get_handle): Fix comment when error is called.
4698 All callers updated.
4700 2009-05-23 Eli Zaretskii <eliz@gnu.org>
4702 * README (`configure' options): Document GDB-specific options to
4705 * symtab.c (skip_prologue_using_lineinfo): New function.
4706 (find_function_start_sal): Use it to get to the first line of
4707 function's body that has an entry in the lineinfo table.
4709 * symmisc.c (dump_symtab): Switch the current language to
4710 the language of the symtab we are dumping only if the symtab's
4711 language is neither language_auto nor language_unknown.
4713 * coffread.c (coff_symtab_read): Set language_minimal as the
4714 language for the "_globals_" pseudo-file.
4715 (process_coff_symbol): Set the symbol's language to the language
4718 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4720 * target.h (struct section_table): Rename to ...
4721 (struct target_section): ... this.
4722 * exec.c: Adjust all references.
4723 * exec.h: Adjust all references.
4724 * nto-tdep.c: Adjust all references.
4725 * nto-tdep.h: Adjust all references.
4726 * ppc-linux-tdep.c: Adjust all references.
4727 * rs6000-nat.c: Adjust all references.
4728 * s390-tdep.c: Adjust all references.
4729 * solib-darwin.c: Adjust all references.
4730 * solib-frv.c: Adjust all references.
4731 * solib-irix.c: Adjust all references.
4732 * solib-null.c: Adjust all references.
4733 * solib-osf.c: Adjust all references.
4734 * solib-pa64.c: Adjust all references.
4735 * solib-som.c: Adjust all references.
4736 * solib-sunos.c: Adjust all references.
4737 * solib-svr4.c: Adjust all references.
4738 * solib-target.c: Adjust all references.
4739 * solib.c: Adjust all references.
4740 * solist.h: Adjust all references.
4741 * symfile.c: Adjust all references.
4742 * symfile.h: Adjust all references.
4743 * target.c: Adjust all references.
4745 2009-05-22 Hui Zhu <teawater@gmail.com>
4747 Add sys_fcntl argument interfaces to linux_record_tdep.
4749 * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
4750 fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
4752 * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
4753 I386_LINUX_RECORD_FCNTL_F_GETLK64,
4754 I386_LINUX_RECORD_FCNTL_F_SETLK64,
4755 I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
4756 of I386 Linux sys_fcntl arguments.
4757 (i386_linux_init_abi): Set macros values to linux_record_tdep.
4758 * linux-record.c (record_linux_system_call): Change to use
4759 the interface in linux_record_tdep in sys_fcntl and
4762 * linux-record.c (record_linux_system_call): Fix the process
4763 record build error about type in CYGWIN.
4765 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4767 * inflow.c (kill_command): Delete left over static declaration.
4769 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4771 * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
4773 (struct section_closure): Delete.
4774 (add_to_section_table): Delete.
4775 (build_target_sections_from_bfd): Delete.
4776 (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
4777 (target_bfd_reopen): Use build_section_table.
4778 * exec.c (xfer_memory): Move most code except for overlay
4779 debugging support from here...
4780 (section_table_xfer_memory): ... to this new function.
4781 (section_table_xfer_memory_partial): New.
4782 * exec.h (section_table_xfer_memory_partial): Declare.
4783 * bfd-target.h (build_target_sections_from_bfd): Delete
4786 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4788 * remote.c (compare_sections_command): Don't declare exec_bfd.
4789 * tracepoint.c: Include "gdbcore.h".
4790 (remote_set_transparent_ranges): Don't declare exec_bfd.
4792 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4794 * aix-thread.c (init_aix_thread_ops): Whitespace.
4796 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4798 * dec-thread.c (dec_thread_wait): Add options parameter. Use it
4799 to call the to_wait method in the target beneath.
4800 * remote-m32r-sdi.c (m32r_wait): Add options parameter.
4802 2009-05-21 Joel Brobecker <brobecker@adacore.com>
4804 * aix-thread.c (aix_thread_wait): Add options parameter. Use it
4805 to call the to_wait method in the target_beneath.
4807 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4809 * linux-nat.c (linux_nat_terminal_inferior)
4810 (linux_nat_terminal_ours): Don't check sync_execution.
4811 * remote.c (remote_terminal_inferior, remote_terminal_ours):
4812 Don't check sync_execution. Update comments.
4813 * target.c (target_terminal_inferior): New.
4814 * target.h (target_terminal_inferior): Delete macro, and declare
4816 * event-top.c (async_disable_stdin): Make idempotent. Don't give
4817 the target the terminal here.
4818 * inflow.c (terminal_ours_1): Don't return early without setting
4821 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4823 * target.h (TARGET_WNOHANG): New.
4824 * target.c (target_wait): Add `options' argument. Adjust.
4825 (struct target_ops) <to_wait>: Add `options' argument.
4826 (target_wait): Add `options' argument.
4827 * infrun.c (wait_for_inferior): Pass 0 as options to
4828 target_wait (blocking wait).
4829 (fetch_inferior_event): Pass TARGET_WNOHANG as options to
4831 * fork-child.c (startup_inferior): Pass 0 as options to
4832 target_wait (blocking wait).
4833 * linux-nat.c (linux_nat_create_inferior): Remove async masking.
4834 (linux_nat_wait_1): Add `target_options' argument. Use it instead
4835 of checking on target_can_async_p.
4836 (linux_nat_wait): Add `target_options' argument. Adjust.
4837 * remote.c (remote_wait_ns): Add `options' argument. Adjust to
4838 check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
4839 (remote_wait_as): Add `options' argument. Adjust to check on
4840 TARGET_WNOWAIT instead of checking on remote_is_async_p. If doing
4841 a blocking wait, keep waiting until an interesting event comes
4843 (remote_wait): Add `options' argument. Don't loop here if the
4844 target is in async mode, and a blocking wait has been requested.
4846 * top.c (deprecated_target_wait_hook): Add `options' argument.
4847 * linux-thread-db.c (thread_db_wait): Add `options' argument, and
4848 pass it down to the layer beneath.
4849 * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
4850 * record.c (record_beneath_to_wait): Add `options' argument.
4851 (record_wait): Add `options' argument, and pass it down to the
4853 * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
4854 * darwin-nat.c (darwin_wait): Likewise.
4855 * defs.h (deprecated_target_wait_hook): Likewise.
4856 * gnu-nat.c (gnu_wait): Add `options' argument.
4857 * go32-nat.c (go32_wait): Likewise.
4858 * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
4859 pass it down to the layer beneath.
4860 * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
4861 * monitor.c (monitor_wait): Likewise.
4862 * nto-procfs.c (procfs_wait): Likewise.
4863 * remote-mips.c (mips_wait): Add `options' argument.
4864 * remote-sim.c (gdbsim_wait): Likewise.
4865 * rs6000-nat.c (rs6000_wait): Add `options' argument.
4866 * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
4867 it down to the layer beneath.
4868 * spu-linux-nat.c (spu_child_wait): Add `options' argument.
4869 * windows-nat.c (windows_wait): Likewise.
4870 * tui/tui-hooks.c (tui_target_wait_hook): Likewise. Adjust.
4872 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4874 * mi/mi-interp.c (mi_on_resume): Account for whole process
4877 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4879 * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
4881 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4883 * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
4885 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4887 Fix parsing DW_AT_const_value using DW_FORM_string.
4888 * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
4890 2009-05-20 Joel Brobecker <brobecker@adacore.com>
4892 * aix-thread.c (giter_count): Do not count the main thread.
4893 (giter_accum): Do not include the main thread.
4895 2009-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4897 Remove the PROT parameter from openp.
4898 * source.c (openp): Remove the parameter PROT. Assertion check MODE.
4899 defs.h (openp): Update the prototype.
4900 Update all the openp callers.
4902 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4904 * inflow.c (kill_command): Moved to infcmd.c.
4905 (_initialize_inflow): Don't add the "kill" command or clear
4907 * infcmd.c (kill_command): Moved here from inflow.c.
4908 (_initialize_infcmd): Add the "kill" command here.
4910 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4912 * fork-child.c: Don't include frame.h. Include terminal.h.
4913 (fork_inferior): Call new_tty_postfork after forking adn adding
4914 the child to the inferior list.
4915 * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
4917 * inflow.c (struct terminal_info): Remove const qualifier from
4918 `run_terminal' field.
4919 (inferior_thisrun_terminal): Tweak comment.
4920 (inflow_inferior_exit): Release the `run_terminal' field.
4921 (copy_terminal_info): New function.
4922 (new_tty_postfork): New function.
4923 * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
4924 (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
4925 * inf-ptrace.c: Include terminal.h.
4926 (inf_ptrace_follow_fork): Copy the parent's terminal info to the
4928 * linux-nat.c: Include terminal.h.
4929 (linux_child_follow_fork): Copy the parent's terminal info to the
4931 * inf-ttrace.c: Include terminal.h.
4932 (inf_ttrace_follow_fork): Copy the parent's terminal info to the
4935 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4937 * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
4938 (update_global_location_list): Use gdbarch_has_global_breakpoints
4939 instead of gdbarch_has_global_solist and
4940 target_supports_multi_process.
4941 * dicos-tdep.c (dicos_init_abi): Set
4942 gdbarch_has_global_breakpoints.
4943 * gdbarch.sh (has_global_solist): Update comment.
4944 (has_global_breakpoints): New.
4945 * remote.c (remote_start_remote): Use
4946 gdbarch_has_global_breakpoints instead of
4947 gdbarch_has_global_solist.
4948 * target.c (target_detach): Use gdbarch_has_global_breakpoints
4949 instead of gdbarch_has_global_solist.
4950 * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
4951 of target_supports_multi_process.
4953 2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
4955 * objc-lang.c (find_methods): Plug a small memory leak.
4957 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4959 * solib-svr4.c: Include observer.h.
4960 (debug_base, debug_loader_offset_p, debug_loader_offset)
4961 (debug_loader_name, main_lm_addr): Move these globals...
4962 (struct svr4_info): ... into this new structure.
4963 (svr4_info_p): New typedef.
4964 (svr4_info): New global.
4965 (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
4967 (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
4968 (solib_svr4_r_ldsomap): Add svr4_info argument. Adjust to
4970 (open_symbol_file_object): Adjust to per-inferior svr4.
4971 (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
4973 (enable_break): Add svr4_info argument. Adjust to per-inferior
4975 (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
4976 Adjust to per-inferior svr4.
4977 (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
4980 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4982 * linux-nat.h (linux_proc_get_tgid): Declare.
4983 * linux-nat.c (linux_proc_get_tgid): New.
4984 * linux-thread-db.c (struct thread_db_info): New field
4985 `need_stale_parent_threads_check'.
4986 (add_thread_db_info): Set it.
4987 (find_new_threads_callback): Ignore stale fork parent threads.
4988 (thread_db_resume): New.
4989 (init_thread_db_ops): Install thread_db_resume.
4991 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4993 * fork-child.c (fork_inferior): Only reset the thread list if this
4994 is the first inferior.
4995 (startup_inferior): If the target support multi-process, tell it
4996 to resume only the new process.
4997 * linux-nat.c (num_lwps): Delete global.
4998 (purge_lwp_list): New function.
4999 (num_lwps): New function.
5000 (add_lwp, delete_lwp): Adjust.
5002 (iterate_over_lwps): Add filter argument. Handle it.
5003 (linux_nat_attach): Remove FIXME note.
5004 (linux_nat_detach): Adjust to iterate over threads of the inferior
5005 we're detaching from. Adjust to num_lwps being a function. Don't
5006 assume the head of the lwp list is the main thread of the process
5007 we're detaching from. Don't destroy the LWP list.
5008 (resume_callback): Add debug output.
5009 (linux_nat_resume): Handle resuming a single inferior. Allow a
5010 wildcard resume in non-stop mode.
5011 (linux_handle_extended_wait): Don't assume inferior_ptid is the
5012 correct inferior of the parent LWP.
5013 (status_callback): Also check lp->waitstatus.
5014 (select_event_lwp): Add new filter parameter. Handle it.
5015 (linux_nat_filter_event): Adjust to num_lwps being a function.
5016 (linux_nat_wait_1): When adding the first lwp of the inferior, use
5017 an is_lwp check instead of checking for the number of lwps.
5018 (linux_nat_wait_1): Handle waiting for a specific tgid. Handle
5019 pending process exit statuses.
5020 (linux_nat_mourn_inferior): Don't destroy all the LWP info.
5021 Instead delete LWPs of the inferior that we're mourning. Don't
5022 unregister from the event loop here.
5023 (linux_nat_pid_to_str): Use `num_lwps'.
5024 (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
5026 (linux_nat_is_async_p): Check if async was masked out.
5027 (linux_multi_process): New global.
5028 (linux_nat_supports_multi_process): New.
5029 (linux_nat_stop_lwp): Remove LWP filtering. It is done by the
5031 (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
5033 (linux_nat_close): New.
5034 (linux_nat_add_target): Register linux_nat_close and
5035 linux_nat_supports_multi_process.
5036 * linux-nat.h (iterate_over_lwps): Add filter argument.
5037 * linux-thread-db.c (thread_db_handle): Delete.
5038 (proc_handle, thread_agent, td_init_p, td_ta_new_p)
5039 (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
5040 (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
5041 (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
5042 (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
5043 longer globals, moved to...
5044 (struct thread_db_info): ... this new structure.
5045 (thread_db_list): New.
5046 (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
5048 (have_threads_callback): Filter out threads of all inferiors but
5049 the one specified by the ARGS argument.
5050 (have_threads): Add ptid argument specifying the inferior we're
5051 interested in. Handle it.
5052 (struct thread_get_info_inout): New.
5053 (thread_get_info_callback, thread_from_lwp): Adjust to use it.
5054 (thread_db_attach_lwp): Check that inferior of the passed in
5055 thread is using thread-db. Adjust.
5056 (enable_thread_event): Remove thread_agent parameter. Instead,
5057 get it from the per-inferior thread-db info.
5058 (dladdr_to_soname): Move higher up.
5059 (enable_thread_event_reporting): Adjust to use per-inferior
5061 (try_thread_db_load_1): Replace `handle' parameter by a
5062 thread_db_info parameter. Adjust to use per-inferior thread-db
5064 (try_thread_db_load): Adjust to use per-inferior thread-db info.
5065 (thread_db_load, disable_thread_event_reporting): Ditto.
5066 (check_for_thread_db): Remove conditional reporting of which
5067 libthread_db is in use.
5068 (thread_db_new_objfile): Add comment about inferior_ptid.
5069 (attach_thread): Adjust to use per-inferior thread-db info.
5070 (thread_db_detach): Adjust to use per-inferior thread-db info.
5071 Remove thread event breakpoints of the current inferior. Only
5072 unpush the thread-db target if there are no more processes using
5074 (check_event): Adjust to use per-inferior thread-db info.
5075 (thread_db_wait): Adjust to use per-inferior thread-db info. Only
5076 unpush the thread-db target if there are no more processes using
5078 (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
5079 info. Mark breakpoints of the current inferior out before
5080 deleting them. Only unpush the thread-db target if there are no
5081 more processes using it.
5082 (find_new_threads_callback): Adjust to use per-inferior thread_db
5084 (thread_db_find_new_threads_1): Add new ptid argument. Adjust to
5085 use per-inferior thread-db info.
5086 (thread_db_find_new_threads): Adjust to use per-inferior thread-db
5088 (thread_db_get_thread_local_address): Adjust.
5089 (thread_db_get_ada_task_ptid): Adjust.
5090 * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
5091 if there no more processes left to debug.
5092 * thread.c (set_running, set_executing): Handle resuming all
5093 threads of a single inferior.
5094 * mi/mi-interp.c (mi_output_running_pid): New.
5095 (mi_inferior_count): New.
5096 (mi_on_resume): For backwards compatibility, if resuming all
5097 threads of an inferior, and there is only one inferior, output
5100 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5102 * ada-lang.c (ada_find_any_type): Move check for primitive types ...
5103 (to_fixed_range_type): ... to here.
5105 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5107 * ada-lang.c (desc_data_type): Remove, replace by ...
5108 (desc_data_target_type): ... this.
5109 (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
5110 (ada_is_array_descriptor_type): Likewise.
5111 (ada_type_of_array): Likewise.
5112 (ada_coerce_to_simple_array_type): Likewise.
5113 (ada_array_element_type): Likewise.
5115 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5117 * ada-valprint.c (ada_val_print_1): Use val_print_string to print
5118 result of ada_vax_float_print_function inferior call.
5120 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5122 * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
5123 avoid creating a dummy value.
5125 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5127 * p-valprint.c (pascal_val_print): Use extract_typed_address
5128 to extract reference value.
5130 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
5132 * doublest.c (NAN): Remove unused define.
5133 (extract_floating_by_length, deprecated_extract_floating): Remove.
5134 (store_floating_by_length, deprecated_store_floating): Remove.
5135 (extract_typed_floating): Do not call extract_floating_by_length.
5136 (store_typed_floating): Do not call store_floating_by_length.
5137 (convert_typed_floating): Remove redundant assertions.
5138 * doublest.h (deprecated_extract_floating): Remove.
5139 (deprecated_store_floating): Remove.
5140 * sh64-tdep.c (sh64_register_convert_to_raw): Call
5141 extract_typed_floating instead of deprecated_extract_floating.
5143 2009-05-18 Jon Beniston <jon@beniston.com>
5145 * MAINTAINERS: Add lm32 target.
5146 * Makefile.in: Add lm32 dependencies.
5147 * NEWS: Indicate lm32 is a new target.
5148 * configure.tgt: Add lm32 targets.
5149 * lm32-tdep.c: New file.
5151 2009-05-18 Pedro Alves <pedro@codesourcery.com>
5153 * corelow.c (core_open): Flush the register cache before doing
5154 anything with registers.
5156 2009-05-18 Pedro Alves <pedro@codesourcery.com>
5158 * inflow.h (our_process_group): Remove declaration.
5159 (inferior_process_group): Delete global variable declaration.
5160 (inferior_process_group): New function declaration.
5161 * inflow.c: Include observer.h.
5162 (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
5164 (struct terminal_info): New struct.
5165 (our_terminal_info): New global.
5166 (inferior_process_group): New function.
5167 (inferior_thisrun_terminal): Extend description comment.
5168 (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
5170 (terminal_init_inferior_with_pgrp): Adjust to per-inferior
5172 (terminal_inferior): Ditto.
5173 (terminal_ours_1): Ditto.
5174 (inflow_new_inferior, inflow_inferior_exit): New functions.
5175 (child_terminal_info): Adjust to per-inferior terminal settings.
5176 (osig_set): New global.
5177 (set_sigint_trap): Adjust to per-inferior terminal settings. Set
5178 or clear `osig_set' accordingly.
5179 (clear_sigint_trap): Check `osig_set' to decide wheater to restore
5180 SIGINT handler, instead of checking the current inferior (which
5182 (_initialize_inflow): Attach inflow_new_inferior and
5183 inflow_inferior_exit to the "new_inferior" and "inferior_exit"
5184 notifications, respectively.
5185 * inferior.h (struct terminal_info): Forward declare.
5186 (struct inferior): Add `terminal_info' field.
5187 * inferior.c (delete_inferior_1): Notify the inferior_exit
5188 observers before removing the inferior from the lists and deleting
5190 * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
5191 a function instead of a variable. Adjust.
5192 * procfs.c (procfs_stop): Ditto.
5194 2009-05-17 Pedro Alves <pedro@codesourcery.com>
5196 * infrun.c (handle_inferior_event): When handling a
5197 TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
5199 * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
5200 from the child if vforking.
5201 * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
5202 breakpoints from the child here.
5204 2009-05-17 Pedro Alves <pedro@codesourcery.com>
5206 * infrun.c (pending_follow): Remove execd_pathname member.
5207 (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
5208 (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
5209 event, don't copy `execd_pathname' to pending_follow, use the
5210 event copy instead. Release `execd_pathname' once done with
5213 * infrun.c (pending_follow): Remove mention of exec events.
5215 2009-05-17 Hui Zhu <teawater@gmail.com>
5217 * i386-tdep.c (i386_process_record): Make it extern.
5218 (i386_gdbarch_init): Don't call set_gdbarch_process_record
5220 * i386-tdep.h (i386_process_record): Declare.
5221 * i386-linux-tdep.c (i386_linux_init_abi): Call
5222 set_gdbarch_process_record.
5224 2009-05-17 Vladimir Prus <vladimir@codesourcery.com>
5226 Always report varobj as changed when in_scope attribute changes.
5228 * varobj.c (install_new_value): If non-NULL-ness of value
5231 2009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
5233 * NEWS: Mention set/show libthread-db-search-path.
5234 * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
5235 (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
5236 * linux-thread-db.c (libthread_db_search_path): New setting.
5237 (thread_db_handle): New variable (replaces using_thread_db).
5238 (try_thread_db_load_1): New function.
5239 (try_thread_db_load, thread_db_load_search): Likewise.
5240 (dladdr_to_soname): Likewise.
5241 (thread_db_load): Iterate over possibly multiple libthread_db's.
5242 (check_for_thread_db): Attempt to load new libthread_db.
5243 (thread_db_detach, thread_db_wait): Unload libthread_db.
5244 (thread_db_mourn_inferior): Likewise.
5245 (_initialize_thread_db): Add new libthread-db-search-path option.
5246 Defer loading of libthread_db to check_for_thread_db.
5247 * solib.c (libpthread_name_p): New function.
5248 (libpthread_solib_p): Call it.
5249 * solib.h (libpthread_name_p): New prototype.
5251 2009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
5253 * MAINTAINERS: Update my email address.
5255 2009-05-14 Paul Pluzhnikov <ppluzhnikov@google.com>
5257 * breakpoint.h: Add breakpoint_re_set_objfile prototype.
5258 * breakpoint.c (create_overlay_event_breakpoint): Renamed
5259 from create_overlay_event_breakpoint_1, old
5260 create_overlay_event_breakpoint deleted.
5261 (breakpoint_re_set_objfile): Don't rescan all objfiles
5263 (breakpoint_re_set): New function.
5264 * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
5265 instead of breakpoint_re_set.
5266 * objfiles.c (objfile_relocate): Likewise.
5268 2009-05-14 Joel Brobecker <brobecker@adacore.com>
5270 * gdbarch.sh: Add comment documenting the target_gdbarch global.
5271 gdbarch.h does NOT need to be regenerated as the corresponding
5272 change has already been made in a previous commit.
5274 2009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
5276 Remove all i386 debug register low level macros in config nm files.
5277 (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
5278 (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
5279 (I386_USE_GENERIC_WATCHPOIINTS): Remove.
5281 * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
5282 (struct i386_dr_low_type): New type.
5283 (i386_dr_low): New global variable.
5284 * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
5285 (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
5286 i386_dr_low struct variable fields.
5287 (i386_remove_aligned_watchpoint): Likewise.
5288 (i386_stopped_data_address): Likewise.
5289 (i386_stopped_by_hwbp): Likewise.
5290 (show_debug_regs_command_added): New static variable.
5291 (add_show_debug_regs_command): New static function.
5292 (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
5293 (i386_set_debug_register_length): New function.
5294 (_initialize_i386_nat): Delete.
5296 * amd64-linux-nat.c: Include "i386-nat.h".
5297 (amd64_linux_dr_set_control): Change to static.
5298 (amd64_linux_dr_get_status): Change to static.
5299 (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
5300 (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
5302 * go32-nat.c: Include "i386-nat.h".
5303 (go32_set_addr): Change to static.
5304 (go32_set_dr7): Change to static. Change arg type to unisgned long.
5305 (go32_get_dr6): Change to static. Change return type to unisnged long.
5306 (init_go32_ops): Set i386_dr_low variable fields.
5307 * i386-linux-nat.c: Include "i386-nat.h".
5308 (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
5309 (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
5310 (_initialize_i386_linux_nat): Set i386_dr_low variable fields.
5311 * i386bsd-nat.h: Declare functions used for
5312 i386_dr_low fields in i386fbsd-nat.c.
5313 * i386fbsd-nat.c: Include "i386-nat.h".
5314 (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
5315 * windows-nat.c: Include "i386-nat.h".
5316 (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
5318 (cygwin_get_dr6): Change return type to unisnged long.
5319 (cygwin_set_dr7): Change arg type to unisgned long.
5320 (init_windows_ops): Set i386_dr_low function fields.
5322 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
5323 i386_set_debug_register_length.
5324 * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
5326 * config/i386/nm-cygwin.h: Remove all I386_* macros.
5327 * config/i386/nm-cygwin64.h: Likewise.
5328 * config/i386/nm-fbsd.h: Likewise.
5329 * config/i386/nm-linux.h: Likewise.
5330 * config/i386/nm-i386.h: Remove completely.
5331 * config/i386/nm-go32.h: Remove completely.
5332 * config/i386/nm-linux64.h: Remove completely.
5333 * config/i386/go32.mh (NAT_FILE): Remove entry.
5334 * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
5336 2009-05-14 Jon Beniston <jon@beniston.com>
5338 * MAINTAINERS: Add Jon Beniston to write after approval list.
5340 2009-05-13 Paul Pluzhnikov <ppluzhnikov@google.com>
5342 * objc-lang.c (objc_objfile_data): New variable.
5343 (find_methods): Skip objfiles without Obj-C methods.
5344 (_initialize_objc_lang): New function.
5346 2009-05-13 Joel Brobecker <brobecker@adacore.com>
5348 * c-lang.c (print_wchar): Remove unnecessary cast.
5350 2009-05-12 Jim Blandy <jimb@red-bean.com>
5352 * MAINTAINERS: Remove self as m32c target maintainer.
5354 2009-05-12 Pedro Alves <pedro@codesourcery.com>
5356 * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
5357 * command.h (deprecated_add_set_cmd): Delete declaration.
5358 * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
5359 'set debug gnu-nat' and 'show debug gnu-nat'.
5360 * i386-nat.c (_initialize_i386_nat): Replace 'maint
5361 show-debug-registers' with 'maint set show-debug-registers' and
5362 'maint show show-debug-registers'.
5363 * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
5364 show-debug-registers' with 'maint set show-debug-registers' and
5365 'maint show show-debug-registers'.
5367 2009-05-12 Joel Brobecker <brobecker@adacore.com>
5369 * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
5370 pushing it on the output obstack.
5372 2009-05-11 Joel Brobecker <brobecker@adacore.com>
5374 Fix internal error on breaking at a multi-locations caller source line.
5375 * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
5376 command with no parameters.
5378 2009-05-11 Pedro Alves <pedro@codesourcery.com>
5380 * linux-nat.c (enum sigchld_state): Delete.
5381 (linux_nat_async_events_state): Delete.
5382 (struct waitpid_result): Delete.
5383 (waitpid_queue): Delete.
5384 (queued_waitpid_1): Delete.
5385 (async_file_flush): New.
5386 (queued_waitpid, push_waitpid): Delete.
5387 (async_file_mark): New.
5388 (drain_queued_events): Delete.
5389 (my_waitpid): Remove locally queued events handling.
5390 (linux_test_for_tracefork): Upjust.
5391 (linux_child_follow_fork): Ditto.
5392 (sync_sigchld_action): Delete.
5393 (blocked_mask): Reinstate.
5394 (async_sigchld_action): Rename to...
5395 (sigchld_action): ... this.
5396 (block_child_signals): New.
5397 (restore_child_signals_mask): New.
5398 (lin_lwp_attach_lwp): Adjust.
5399 (linux_nat_create_inferior): Ditto.
5400 (linux_nat_attach): Also use lp->status in async mode.
5401 (get_pending_status): Don't use queued_waitpid.
5402 (linux_nat_detach): Don't drain locally queued events.
5403 (linux_nat_resume): Allow pending wait statuses stored lp->status
5404 in async mode. If returning early due to a pending event,
5405 re-register the event source.
5406 (stop_wait_callback): Allow pending wait statuses stored
5407 lp->status in async mode.
5408 (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
5409 (linux_nat_wait): Rename to ...
5410 (linux_nat_wait_1): ... this. Allow pending wait statuses stored
5411 lp->status in async mode. Always add WNOHANG to the waitpid
5412 options in async mode.
5413 (linux_nat_wait): New.
5414 (kill_callback): Don't drain locally queued events.
5415 (sigchld_handler): Rewrite.
5416 (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
5417 refer to "set target-async".
5418 (linux_nat_async_mask): If in non-stop, and re-enabling async
5419 mode, re-register the target event source in the event loop.
5420 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
5421 (get_pending_events, async_sigchld_handler)
5422 (linux_nat_async_events): Delete.
5423 (handle_target_event): New.
5424 (linux_nat_async_file_handler): Delete.
5425 (linux_async_pipe): New.
5426 (linux_nat_async): Only re-register in the event loop if not
5427 registered yet. Always notify the event-loop once if enabling the
5429 (linux_nat_stop_lwp): Rewrite to handle pending events stored in
5430 lp->status, not in the locally queued event list.
5431 (linux_nat_stop): Don't mask out async event handling.
5432 (linux_nat_setup_async): Delete.
5433 (_initialize_linux_nat): Adjust.
5434 (lin_thread_get_thread_signals): blocked_mask is global again.
5437 2009-05-11 Pierre Muller <muller@ics.u-strasbg.fr>
5439 Unify target macros.
5441 * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
5442 (target_stoppped_by_watchpoint): New macro.
5443 (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
5444 (target_have_steppable_watchpoint): New macro.
5445 (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
5446 (target_have_continuable_watchpoint): New macro.
5447 (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
5448 (target_can_use_hardware_watchpoint): New macro.
5449 (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
5450 (target_region_ok_for_hw_watchpoint): New macro.
5452 * breakpoint.c (update_watchpoint): Use new macros.
5453 (bpstat_alloc): Likewise.
5454 (create_breakpoint): Likewise.
5455 (watch_command_1): Likewise.
5456 (can_use_hardware_watchpoint): Likewise.
5457 (do_enable_breakpoint): Likewise.
5458 * infrun.c (handle_inferior_event): Adapt to new macros.
5459 * mips-tdep.c (mips_gdbarch_init): Update comments.
5460 * procfs.c (procfs_set_watchpoint): Update comment.
5461 (procfs_insert_watchpoint): Adapt to new macros.
5462 * remote-m32r-sdi.c (m32r_stop):
5463 * remote-mips.c (mips_remove_breakpoint):
5464 * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
5465 (debug_to_stopped_by_watchpoint): Likewise.
5468 2009-05-10 Pierre Muller <muller@ics.u-strasbg.fr>
5470 * src/gdb/target.h: Remove all tests for already defined
5471 macros. All macros defined here should not be set in config
5474 2009-05-08 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5476 * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
5477 (have_ptrace_getsetfpregs): Likewise.
5478 fetch_all_gp_regs): New function.
5479 (fetch_gp_regs): New function.
5480 (fetch_all_fp_regs): Likewise.
5481 (fetch_fp_regs): New function.
5482 (fetch_ppc_registers): Using the new methods to fetch general-
5483 purpose and floating-pointer registers.
5484 (store_all_gp_regs): New function.
5485 (store_gp_regs): Likewise.
5486 (store_all_fp_regs): New function.
5487 (store_fp_regs): Likewise.
5488 (store_ppc_registers): Using the new methods to store general-
5489 purpose and floating-pointer registers.
5491 2009-05-08 Doug Evans <dje@google.com>
5493 * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
5495 2009-05-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5497 * MAINTAINERS (Write After Approval): Add self.
5499 2009-05-07 Joel Brobecker <brobecker@adacore.com>
5501 * gdbarch.h (target_gdbarch): Add comment documenting this global.
5503 2009-05-06 Joel Brobecker <brobecker@adacore.com>
5505 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
5507 * configure: Regenerate.
5509 2009-05-06 Joel Brobecker <brobecker@adacore.com>
5511 * utils.c: Add include of gdb_usleep.h.
5512 (defaulted_query): Detect false EOF conditions that happen
5513 on terminals opened with the O_NONBLOCK flag when there is
5516 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5518 * inferior.c (add_inferior): Move observer_notify_new_inferior
5520 (add_inferior_silent): ... here.
5522 2009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
5523 Pedro Alves <pedro@codesourcery.com>
5525 * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
5526 (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
5528 (procfs_stopped_by_watchpoint): Made static, ptid argument
5530 (_initialize_procfs): Register new watchpoint related target
5532 * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
5533 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
5534 (HAVE_CONTINUABLE_WATCHPOINT): Delete.
5535 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5536 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5538 * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
5539 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
5540 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5541 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5543 * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
5544 (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
5545 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5546 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5549 2009-05-06 Hui Zhu <teawater@gmail.com>
5551 * i386-tdep.c (i386_process_record): Change bzero to memset.
5553 2009-05-06 Hui Zhu <teawater@gmail.com>
5555 * NEWS: Add item for process record and replay.
5557 2009-05-05 Maxim Grigoriev <maxim2405@gmail.com>
5559 * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
5561 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5563 * inferior.h (read_pc, write_pc): Remove.
5564 * regcache.c (read_pc, write_pc): Remove.
5566 * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
5568 (handle_inferior_event): Use regcache_read_pc instead of read_pc
5569 when determining value of stop_pc. Replace subsequent uses of
5570 read_pc by inspecting already-retrieved stop_pc value.
5571 (keep_going): Use regcache_read_pc instead of read_pc.
5573 * breakpoint.c (watchpoint_check): Use current frame architecture
5574 and PC instead of current_gdbarch and read_pc ().
5575 * tracepoint.c (set_traceframe_context): Replace PC argument
5576 with FRAME argument.
5577 (trace_start_command, finish_tfind_command): Update calls.
5578 (finish_tfind_command): Compare frame IDs to identify transitions
5580 (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
5581 * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
5582 of gdbarch. Use regcache_read_pc and regcache_write_pc instead
5583 of read_pc and write_pc.
5584 (store_register): Make regcache argument non-const. Update call
5585 to exec_one_dummy_insn.
5587 * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
5588 * infcmd.c (post_create_inferior): Likewise.
5589 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
5590 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
5591 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
5592 * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
5593 * linux-fork.c (fork_load_infrun_state): Likewise.
5594 * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
5595 * record.c (record_wait): Likewise.
5596 * procfs.c (procfs_wait): Likewise.
5597 * remote-mips.c (common_open, mips_wait): Likewise.
5598 * remote-m32r-sdi.c (m32r_resume): Likewise.
5600 * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
5601 * monitor.c (monitor_create_inferior, monitor_load): Likewise.
5602 * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
5603 * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
5604 * remote-mips.c (mips_create_inferior, mips_load): Likewise.
5606 * solib-darwin.c: Include "regcache.h".
5607 * solib-pa64.c: Include "regcache.h".
5608 * solib-svr4.c: Include "regcache.h.".
5610 * symfile.c: Do not mention read_pc or write_pc in comments.
5611 * dink32-rom.c: Likewise.
5612 * m32r-rom.c: Likewise.
5613 * mips-tdep.c: Likewise.
5615 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5617 * fork-child.c (startup_inferior): Move setting stop_pc ...
5618 * infcmd.c (post_create_inferior): ... to here.
5620 2009-05-04 Michael Snyder <msnyder@vmware.com>
5622 * NEWS: Add item for reverse debugging commands.
5624 2009-05-04 Pedro Alves <pedro@codesourcery.com>
5626 * go32-nat.c (go32_stop): Delete.
5627 (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
5628 (go32_create_inferior): Don't call go32_stop or
5630 (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
5632 (init_go32_ops): Don't register go32_stop.
5634 2009-05-02 Eli Zaretskii <eliz@gnu.org>
5636 * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
5639 * infcall.c (find_function_addr): Avoid compiler warnings for
5642 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5644 * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
5645 (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
5647 2009-05-01 Doug Evans <dje@google.com>
5649 * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
5652 2009-05-01 Eli Zaretskii <eliz@gnu.org>
5654 * record.c (_initialize_record): Reformat and clarify doc strings
5655 for stop-at-limit and insn-number-max.
5657 * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
5659 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5661 Make specifiable the make_function_type type memory ownership.
5662 * gdbtypes.c (make_function_type): New parameter `objfile', use it
5663 explicitely instead of TYPE-initialized removed local variable
5664 `objfile'. Describe `objfile' it in the function comment.
5665 (lookup_function_type): Update make_function_type callers.
5666 * gdbtypes.h (make_function_type): Update the prototype.
5667 * jv-lang.c (java_link_class_type): Update make_function_type callers.
5668 * dwarf2read.c (read_subroutine_type): Likewise.
5669 * stabsread.c (read_type): Likewise.
5671 2009-05-01 Eli Zaretskii <eliz@gnu.org>
5673 * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
5674 printing a bogus "Thread <main>".
5675 (go32_thread_alive): Don't return 1 for null_ptid.
5677 * i386-tdep.c (i386_go32_init_abi): Override the number of
5678 registers due to non-support of SSE.
5680 2009-04-30 Anthony Green <green@moxielogic.com>
5682 * configure.tgt: Link the moxie simulator in with gdb.
5684 2009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
5686 * elfread.c (elf_symtab_read): Don't assume .data and .rodata
5689 2009-04-30 Hui Zhu <teawater@gmail.com>
5690 Michael Snyder <msnyder@vmware.com>
5692 I386 Linux process record and replay support.
5694 * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
5695 This struct has the argument for the function
5696 "record_linux_system_call".
5697 (i386_linux_intx80_sysenter_record): New function. Parse the
5698 system call instruction and call function
5699 "record_linux_system_call" to record execute log.
5700 (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
5701 Set "i386_linux_intx80_sysenter_record" to
5702 "i386_intx80_record" and "i386_sysenter_record".
5704 2009-04-30 Hui Zhu <teawater@gmail.com>
5705 Michael Snyder <msnyder@vmware.com>
5707 I386 architecture process record and replay support.
5709 * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
5710 PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
5712 (aflag, dflag, override, modrm, mod, reg, rm, ot,
5713 i386_record_pc): New variables. Ditto.
5714 (i386_record_modrm, i386_record_lea_modrm_addr,
5715 i386_record_lea_modrm): New functions. Ditto.
5716 (i386_process_record): New function. Parse the instruction in
5717 address "addr" and record the values of registers and memory
5718 that will be changed by this instruction.
5719 (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
5720 "process_record" interface.
5721 * i386-tdep.h (gdbarch_tdep): New function pointers
5722 "i386_intx80_record" and "i386_sysenter_record" that point to
5723 the function that can record "intx80" and "sysenter" execute
5726 2009-04-30 Hui Zhu <teawater@gmail.com>
5727 Michael Snyder <msnyder@vmware.com>
5729 * infrun.c (use_displaced_stepping): Return false if process
5730 record and replay target is used.
5731 (proceed): Call function "record_not_record_set" if pocess
5732 record and replay target is used.
5734 2009-04-30 Hui Zhu <teawater@gmail.com>
5735 Michael Snyder <msnyder@vmware.com>
5737 Linux process record and replay support.
5739 * Makefile.in (ALLDEPFILES): Add linux-record.c.
5740 (ALL_TARGET_OBS): Add linux-record.o.
5741 * configure.tgt (x86_64-*-linux*): Add linux-record.o.
5742 (i[34567]86-*-linux*): Add linux-record.o.
5743 * linux-record.c, linux-record.h: New file.
5745 2009-04-30 Hui Zhu <teawater@gmail.com>
5746 Michael Snyder <msnyder@vmware.com>
5748 Process record and replay target.
5750 * Makefile.in (SFILES): Add record.c.
5751 (COMMON_OBS): Add record.o.
5752 * record.c, record.h: New file.
5754 2009-04-30 Hui Zhu <teawater@gmail.com>
5755 Michael Snyder <msnyder@vmware.com>
5757 * target.h (strata): New stratum "record_stratum".
5759 2009-04-30 Hui Zhu <teawater@gmail.com>
5760 Michael Snyder <msnyder@vmware.com>
5762 GDBARCH interface for process record and replay.
5764 * gdbarch.sh (process_record): This interface point to the
5765 function that records the inferior execute log.
5767 2009-04-29 Doug Evans <dje@google.com>
5769 * i386-nat.c (child_post_startup_inferior): Delete, unused.
5771 2009-04-29 Pedro Alves <pedro@codesourcery.com>
5773 * breakpoint.c (print_exception_catchpoint): Access `b' directly
5774 instead of `b->loc->owner'.
5775 (print_mention_exception_catchpoint): Ditto.
5777 2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
5779 * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
5781 2009-04-27 Tom Tromey <tromey@redhat.com>
5783 * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
5785 2009-04-27 Jerome Guitton <guitton@adacore.com>
5787 * symtab.c (append_exact_match_to_sals): New function, extracted
5788 from expand_line_sal.
5789 (expand_line_sal): Use append_exact_match_to_sals to append exact
5790 matches. If none found, append all best items.
5792 2009-04-27 Jerome Guitton <guitton@adacore.com>
5794 * main.c (captured_main): Move gdbinit lookups after gdb_init.
5796 2009-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
5799 * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
5800 (read_func_scope): Call inherit_abstract_dies.
5802 2009-04-25 Eli Zaretskii <eliz@gnu.org>
5804 * Makefile.in (ALLDEPFILES): Remove duplicate entries for
5805 sparc-sol2-nat.c and sparc-sol2-tdep.c.
5807 * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
5809 2009-04-24 Pierre Muller <muller@ics.u-strasbg.fr>
5811 ARI change: Use "/* ARI: rule */" pattern.
5812 * utils.c: Update ARI patterns.
5813 * gdb_dirent.h: Likewise.
5815 2009-04-23 Anthony Green <green@moxielogic.com>
5817 * MAINTAINERS: Add moxie target.
5818 * configure.tgt: Add moxie-*-elf target.
5819 * moxie-tdep.c: New file.
5820 * moxie-tdep.h: New file.
5822 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5824 * ada-lang.c: Remove an extra empty line. No code change.
5826 2009-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5828 Fix double free on error inserting the breakpoint instruction.
5829 * breakpoint.c (create_breakpoints): Move the
5830 update_global_location_list call to ...
5831 (break_command_really): ... here together with the second local call
5832 both unified after all the cleanups.
5834 2009-04-23 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5835 Tom Tromey <tromey@redhat.com>
5837 * configure, config.in: Regenerate.
5838 * configure.ac: Support for relocatable GDB datadir. Use
5839 GDB_AC_WITH_DIR. Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
5840 * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
5841 * top.c (init_main): Add "set data-directory".
5842 * defs.h (gdb_datadir): Declare.
5843 * main.c (gdb_datadir): New global.
5844 (captured_main): Initialize gdb_datadir. Use relocate_directory.
5845 (relocate_path): New function.
5846 (relocate_directory): Likewise.
5847 (get_init_files): Use relocate_path.
5848 (README): Mention --with-gdb-datadir.
5850 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5852 * ada-tasks (task_command_1): Call target_find_new_threads.
5854 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5856 * stack.c (do_gdb_disassembly): Print the exception message if an
5857 error was thrown while trying to perform the disassembly.
5859 2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
5861 * varobj.c (free_variable): Replace free_current_contents by xfree.
5863 2009-04-22 Kazu Hirata <kazu@codesourcery.com>
5865 * arm-linux-nat.c (fetch_register, store_register): Use
5866 ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
5867 * arm-linux-tdep.c (arm_linux_supply_gregset,
5868 arm_linux_collect_gregset): Likewise.
5869 * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
5870 * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
5872 2009-04-22 Hui Zhu <teawater@gmail.com>
5874 * stack.c (_initialize_stack): Set the default of
5875 disassemble-next-line to off.
5877 2009-04-21 Tom Tromey <tromey@redhat.com>
5879 * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
5880 * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
5882 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
5884 * configure.ac: Add quotes to not lose brackets in help text.
5885 * configure: Rebuild.
5887 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
5889 * configure.ac: Don't postprocess Makefile in config.status.
5890 Substitute GDB_NM_FILE. Don't substitute nm_h.
5891 * Makefile.in (GDB_NM_FILE): Substitute.
5892 (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
5893 * configure: Regenerate.
5894 * gnulib/Makefile.in: Regenerate.
5896 2009-04-21 Joseph Myers <joseph@codesourcery.com>
5898 * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
5899 --with-htmldir): New.
5900 * configure: Regenerate.
5902 2009-04-21 Tom Tromey <tromey@redhat.com>
5904 * configure: Rebuild.
5905 * configure.ac: Use lower case for start of help strings. Clean
5906 up --with-sysroot help.
5908 2009-04-21 Tom Tromey <tromey@redhat.com>
5910 * configure: Rebuild.
5911 * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
5912 * configure.ac: Use AC_HELP_STRING. Use upper case for variables
5915 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
5917 ARI fix: remove "%p".
5918 * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
5919 (ia64_sigtramp_frame_this_id): Ditto.
5920 (ia64_libunwind_frame_this_id): Ditto.
5921 (ia64_libunwind_sigtramp_frame_this_id): Ditto.
5922 * symmisc.c (maintenance_info_psymtabs): Ditto.
5924 2009-04-21 Joseph Myers <joseph@codesourcery.com>
5926 * configure.ac (--with-relocated-sources): New.
5927 * configure, config.in: Regenerate.
5928 * source.c (add_substitute_path_rule): Remove static.
5929 * source.h (add_substitute_path_rule): Declare.
5930 * main.c: Include "source.h".
5931 (captured_main): Add substitution rule if RELOC_SRCDIR.
5933 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
5935 * gnu-nat.h (proc_debug): Add missing continuation line in macro.
5937 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5939 * NEWS: Mention MIPS/Linux hardware watchpoint support.
5941 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5943 * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
5944 (maint_show_dr, super_close): New variables.
5945 (super_fetch_registers, super_store_registers): Make static.
5946 (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
5947 (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
5948 (pt_watch_style): Define new enum.
5949 (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
5951 (watch_readback_valid, watch_readback, current_watches, watch_mirror):
5953 (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
5954 (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
5955 (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
5956 (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
5957 (type_to_irw, fill_mask, try_one_watch)
5958 (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
5959 (mips_linux_new_thread, populate_regs_from_watches)
5960 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5961 (mips_linux_close): New functions.
5962 (_initialize_mips_linux_nat): Register watchpoint functions with
5963 the target_ops. Add show-debug-regs maintenance command.
5965 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5967 * infrun.c (handle_inferior_event): Move gegisters_changed call down.
5969 2009-04-19 Pedro Alves <pedro@codesourcery.com>
5971 * NEWS: Mention gdbserver support for x86 Windows CE.
5973 2009-04-19 Eli Zaretskii <eliz@gnu.org>
5975 * config/djgpp/fnchange.lst: Fix typos.
5977 Set default host and target charsets in the DJGPP port.
5979 * config/djgpp/config.sed (am_cv_langinfo_codeset)
5980 (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
5981 in all configure scripts that define ac_cv_env_CPP_value.
5983 * go32-nat.c (dos_codepage, nl_langinfo): New functions.
5986 * config/djgpp/nl_types.h: New file.
5988 * config/djgpp/langinfo.h: New file.
5990 * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
5992 2009-04-18 Carlos O'Donell <carlos@codesourcery.com>
5994 * Makefile.in (MAKEHTML): Set to makeinfo --html.
5995 (MAKEHTMLFLAGS): Set to empty.
5997 2009-04-18 Eli Zaretskii <eliz@gnu.org>
5999 * NEWS: Mention all new set/show commands added since GDB 6.8 was
6002 * go32-nat.c (go32_sysinfo): Check if the call to
6003 __dpmi_get_capabilities fills the buffer with information, and
6004 don't use the buffer if not.
6006 2009-04-17 Tom Tromey <tromey@redhat.com>
6008 * charset.c (_initialize_charset): Add special case for "646".
6010 2009-04-17 Carlos O'Donell <carlos@codesourcery.com>
6012 * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
6013 * configure: Regenerate.
6014 * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
6015 configure substitutions.
6016 (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
6018 2009-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
6020 ARI fix: Do not use %p, replace by call to host_address_to_string
6022 * darwin-nat.c (darwin_xfer_partial): Apply change.
6023 * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
6024 * gnu-nat.h (proc_debug): Ditto.
6025 * symmisc.c (maintenance_info_symtabs): Ditto.
6026 (maintenance_info_psymtabs): Ditto.
6027 * windows-nat.c (handle_load_dll): Ditto.
6028 (handle_unload_dll, info_w32_command, handle_exception): Ditto.
6029 * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
6031 2009-04-17 Joseph Myers <joseph@codesourcery.com>
6033 * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
6034 --enable-64-bit-bfd.
6035 (sparc-*-linux*): Likewise.
6037 2009-04-17 Eli Zaretskii <eliz@gnu.org>
6039 * go32-nat.c (go32_sysinfo): Update list of Windows versions of
6042 2009-04-16 Pedro Alves <pedro@codesourcery.com>
6044 * remote.c (remote_query_attached): Fix pasto in packet_ok result
6047 2009-04-16 Joel Brobecker <brobecker@adacore.com>
6049 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
6050 Revert the previous change. Might not be correct, actually.
6052 2009-04-16 Joel Brobecker <brobecker@adacore.com>
6054 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
6055 (ada_get_current_task, ada_print_exception_breakpoint_nontask)
6056 (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
6057 Remove declaration. These are non-existent functions.
6059 2009-04-16 Joel Brobecker <brobecker@adacore.com>
6061 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
6062 Fix a compilation warning on mips-irix due to casting from
6063 a pointer of different size.
6065 2009-04-16 Joel Brobecker <brobecker@adacore.com>
6067 * ada-lang.c (symtab_for_sym): Delete.
6068 (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
6070 2009-04-16 Joel Brobecker <brobecker@adacore.com>
6072 * ada-lang.c (extract_string): Delete.
6073 (ada_main_name): Reimplement using target_read_string instead of
6076 2009-04-16 Andreas Schwab <schwab@linux-m68k.org>
6078 * m68klinux-nat.c: Remove obsolete comment.
6079 (fetch_register, store_register): Don't call
6080 gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
6081 which are always nops here.
6083 2009-04-14 Tom Tromey <tromey@redhat.com>
6085 * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
6086 (c_printstr): Likewise.
6087 * charset.c: Include gdb_wait.h.
6088 (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
6089 (find_charset_names): Use pexecute. Handle libiconv's output.
6091 (_initialize_charset): Use xstrdup.
6092 * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar
6094 (INTERMEDIATE_ENCODING): New define.
6095 * configure, config.in: Rebuild.
6096 * configure.ac: Check for btowc.
6098 2009-04-15 Tom Tromey <tromey@redhat.com>
6100 * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
6102 2009-04-15 Eli Zaretskii <eliz@gnu.org>
6104 * utils.c (parse_escape): Initialize target_char to pacify GCC.
6106 2009-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
6108 * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
6110 2009-04-14 Pierre Muller <muller@ics.u-strasbg.fr>
6112 ARI fix: sprintf rule.
6113 * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
6114 * ada-lang.c (add_angle_brackets): Use xstrprintf.
6115 (ada_decode): Replace sprintf by xsnprintf.
6116 (find_old_style_renaming_symbol): Ditto.
6117 (ada_to_fixed_type_1, ada_enum_name): Ditto.
6120 2009-04-14 Joel Brobecker <brobecker@adacore.com>
6122 * target.c (target_mourn_inferior): Call bfd_cache_close_all
6123 after having executed the target mourn_inferior routine.
6125 2009-04-14 Eli Zaretskii <eliz@gnu.org>
6127 * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
6130 2009-04-13 David Daney <ddaney@caviumnetworks.com>
6132 * infrun.c (maybe_software_singlestep): New function.
6133 (resume): Call maybe_software_singlestep.
6134 (handle_inferior_event): Same.
6136 2009-04-13 Tom Tromey <tromey@redhat.com>
6138 * python/python-frame.c (frapy_richcompare): Return
6139 Py_NotImplemented, not an error. Handle Py_NE as well.
6141 2009-04-13 Eli Zaretskii <eliz@gnu.org>
6143 * charset.c (EILSEQ): Define if not defined by system headers.
6145 2009-04-11 Eli Zaretskii <eliz@gnu.org>
6147 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
6148 to be consistent with renaming config.intl.in into config_intl.in.
6150 * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
6151 consistent with the change from 2008-11-09.
6153 2009-04-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6155 * gdbtypes.c: Remove excessive parentheses at the return keywords.
6156 * varobj.c (varobj_invalidate): Fix indentation.
6157 * varobj.c (varobj_invalidate): Fix formatting text width.
6159 2009-04-08 Vladimir Prus <vladimir@codesourcery.com>
6161 Implement -exec-jump.
6163 * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
6164 * mi/mi-main.c (mi_cmd_exec_jump): New.
6165 * mi/mi-cmds.c (mi_cmds): Register exec-jump.
6167 2009-04-07 Doug Evans <dje@google.com>
6169 * symfile.c (symbol_file_clear): Fix indentation.
6171 2009-04-06 Mark Kettenis <kettenis@gnu.org>
6173 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
6175 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6177 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
6178 (ppc_linux_auxv_parse): New function.
6179 (ppc_linux_read_description): Use ppc_linux_target_wordsize.
6180 (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
6182 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6184 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
6185 BFD to contents of SPU name note.
6186 (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
6187 with "from_tty" argument 1 instead of 0.
6189 2009-04-02 Jan Kratochvil <jan.kratochvil@redhat.com>
6192 (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
6193 Create the symbol in local scope.
6194 * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
6196 2009-04-02 Keith Seitz <keiths@redhat.com>
6198 * stabsread.c (read_member_functions): GCC may emit an extra space
6199 at the end of the names "__base_ctor" and "__base_dtor"; so ignore
6200 whitespace when looking for these functions.
6202 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6204 Change the default value for "set print frame-arguments" to scalars.
6206 * stack.c (print_frame_arguments): Set initial value to "scalars".
6208 2009-04-01 Aleksandar Ristovski <aristovski@qnx.com>
6210 * mips-tdep.c (mips_numeric_register_alieses): New definition.
6211 (mips_gdbarch_init): Add user registers from
6212 mips_numeric_register_aliases.
6214 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6216 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
6218 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6220 * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
6221 this is the last one.
6223 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6225 * remote.c (append_resumption): New.
6226 (remote_vcont_resume): Use it.
6228 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6230 * windows-nat.c (+windows_get_ada_task_ptid): New function.
6231 (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
6233 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
6234 Keith Seitz <keiths@redhat.com>
6235 Jan Kratochvil <jan.kratochvil@redhat.com>
6238 * Makefile.in (dbxread.o): Update.
6239 * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
6240 * dwarf2read.c (GDB_FORM_cached_string): New.
6241 (read_partial_die): Use dwarf2_canonicalize_name.
6242 (dwarf2_linkage_name): Use dwarf2_name.
6243 (dwarf2_canonicalize_name): New.
6244 (dwarf2_name): Use dwarf2_canonicalize_name.
6245 (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
6246 * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
6247 * symtab.c (lookup_symbol_in_language): Canonicalize input before
6249 * cp-name-parser.y: operator() requires two parameters,
6250 according to libiberty.
6251 * minsyms.c (lookup_minimal_symbol): Canonicalize input
6255 2009-03-31 Joel Brobecker <brobecker@adacore.com>
6257 Provide support for (Ada) task-specific breakpoints.
6259 * ada-lang.h (ada_get_task_number): Add declaration.
6260 (breakpoint_ada_task_match): Delete declaration.
6261 * ada-tasks.c (ada_get_task_number): Make non-static.
6262 * breakpoint.h (struct breakpoint): Add field "task".
6263 * breakpoint.c (print_one_breakpoint_location): Add handling of
6264 task-specific breakpoints.
6265 (create_breakpoint, create_breakpoints, find_condition_and_thread):
6266 New parameter "task".
6267 (break_command_really): Update calls to find_condition_and_thread
6268 and create_breakpoints.
6269 (breakpoint_re_set_one): Update call to find_condition_and_thread.
6272 2009-03-31 Joel Brobecker <brobecker@adacore.com>
6274 * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
6276 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6278 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
6279 if the thread's ptid without a thread id field is in the list
6280 before calling thread_change_ptid.
6281 (extended_remote_attach_1): In non-stop mode, do not rely on
6282 querying the current thread, instead, query the thread list, and
6283 select the first thread of the process.
6284 * gdbthread.h (first_thread_of_process): Declare.
6285 * thread.c (first_thread_of_process): Define.
6287 2009-03-30 Stan Shebs <stan@codesourcery.com>
6289 Make tracepoints into a type of breakpoint.
6290 * breakpoint.h (enum bptype): Add bp_tracepoint.
6291 (struct breakpoint): Add fields step_count, pass_count, actions.
6292 (get_tracepoint, get_tracepoint_by_number): Declare.
6293 (all_tracepoints): Declare.
6294 * breakpoint.c: Include tracepoint.h, readline.h.
6295 (ALL_TRACEPOINTS): Move here from tracepoint.c.
6296 (tracepoint_count): Ditto.
6297 (should_be_inserted): GDB does not insert tracepoints itself.
6298 (print_it_typical): Add tracepoint case.
6299 (bpstat_what): Ditto.
6300 (print_one_breakpoint_location): Ditto, and add printing for
6301 pass count, step count, and action list.
6302 (user_settable_breakpoint): Add tracepoint case.
6303 (allocate_bp_location): Ditto.
6304 (set_breakpoint_location_function): Ditto.
6305 (disable_breakpoints_in_shlibs): Ditto.
6307 (break_command_really): Add argument traceflag, use to choose
6308 basic breakpoint type.
6309 (break_command_1): Pass extra argument.
6310 (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
6311 (breakpoint_re_set_one): Add tracepoint case.
6312 (disable_command, enable_command): Ditto.
6313 (set_tracepoint_count): Move here from tracepoint.c.
6314 (trace_command): Move here from tracepoint.c and use
6315 break_command_really.
6316 (tracepoints_info): Move here from tracepoint.c and call
6318 (enable_trace_command): Move here from tracepoint.c and call
6320 (disable_trace_command): Move here from tracepoint.c and call
6322 (delete_trace_command): Move here from tracepoint.c and call
6324 (trace_pass_command): Move here from tracepoint.c.
6325 (get_tracepoint_by_number): Ditto.
6326 (tracepoint_save_command): Ditto.
6327 (get_tracepoint): New function.
6328 (all_tracepoints): New function.
6329 (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
6330 deprecate "enable trace" and "disable trace" commands.
6331 * tracepoint.h (struct tracepoint): Remove.
6332 (tracepoint_chain): Remove decl.
6333 (deprecated_create_tracepoint_hook): Remove decl.
6334 (deprecated_delete_tracepoint_hook): Remove decl.
6335 (deprecated_modify_tracepoint_hook): Remove decl.
6336 (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
6337 (free_actions): Update signature.
6338 (validate_actionline): Update signature.
6339 (end_actions_pseudocommand): Declare.
6340 (while_stepping_pseudocommand): Declare.
6341 * tracepoint.c: Include breakpoint.h.
6342 (tracepoint_chain, tracepoint_count): Remove.
6343 (free_actions, make_cleanup_free_actions): Update signature.
6344 (trace_command, set_raw_tracepoint): Remove.
6345 (trace_mention): Remove.
6346 (tracepoints_info): Remove.
6347 (tracepoint_operation, map_args_over_tracepoints): Remove.
6348 (get_tracepoint_by_number): Remove.
6349 (enable_trace_command, disable_trace_command): Remove.
6350 (delete_trace_command, trace_pass_command): Remove.
6351 (trace_actions_command, read_actions): Update signature.
6352 (validate_actionline): Update signature, use bp loc.
6353 (encode_actions): Ditto.
6354 (download_tracepoint): New function, body of trace_start_command.
6355 (trace_start_command): Call it, use all_tracepoints.
6356 (tracepoint_save_command): Remove.
6357 (tracepoint_dump_command): Use get_tracepoint.
6358 (end_actions_pseudocommand): Make globally visible.
6359 (while_stepping_pseudocommand): Ditto.
6360 (_initialize_tracepoint): Move command definitions to breakpoint.c.
6362 2009-03-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
6364 Expose frames to Python.
6365 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
6366 (SUBDIR_PYTHON_SRCS): Add python-frame.c.
6367 (python-frame.o): New target.
6368 * python/python-frame.c: New file.
6369 * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
6370 gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
6371 gdbpy_initialize_frames): New prototypes.
6372 * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
6373 (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
6375 * stack.c (find_frame_funname): New function, factored out of
6377 (print_frame): Call find_frame_funname.
6378 * stack.h (find_frame_funname): Add prototype.
6380 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6382 Remove unused value_object attribute `owned_by_gdb'.
6383 * python/python-value.c (value_object): Remove owned_by_gdb
6385 (valpy_dealloc): Remove reference to self->owned_by_gdb.
6386 (valpy_new): Likewise.
6387 (value_to_value_object): Likewise.
6389 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6391 Change gdb.Value.address from a method to an attribute.
6392 * python/python-value.c (value_object): Add `address' element.
6393 (valpy_dealloc): Decrement reference to self->address if set.
6394 (valpy_new): Initialize val_obj->address.
6395 (valpy_address): Rename to ...
6396 (valpy_get_address): ... this. Change signature from method to
6397 attribute. Update self->address if not set.
6398 (value_to_value_object): Initialize val_obj->address.
6399 (value_object_getset): Add `address' element.
6400 (value_object_methods): Remove `address' element.
6402 2009-03-29 Andreas Schwab <schwab@linux-m68k.org>
6404 * observer.sh: Set LANG/LC_ALL to C, not c.
6406 2009-03-28 Kevin Buettner <kevinb@redhat.com>
6408 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
6411 2009-03-28 Pedro Alves <pedro@codesourcery.com>
6413 * remote.c (remote_stop_ns): If multi-process extensions are off,
6414 and GDB is requesting the whole process to stop, sent "vCont;t",
6417 2009-03-28 Pedro Alves <pedro@codesourcery.com>
6419 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
6422 2009-03-27 Eli Zaretskii <eliz@gnu.org>
6424 * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
6426 2009-03-26 Doug Evans <dje@google.com>
6428 * thread.c (do_restore_current_thread_cleanup): Redo test for
6429 whether to restore old->inferior_ptid.
6431 2009-03-26 Tom Tromey <tromey@redhat.com>
6433 * breakpoint.c (resolve_sal_pc): Preserve original line number
6434 when skipping prologue.
6436 2009-03-26 Doug Evans <dje@google.com>
6438 * thread.c (inferior_thread) Remove "extern" in definition.
6440 2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
6442 Add gdb.Value.is_optimized_out attribute.
6443 * python/python-value.c (valpy_get_is_optimized_out): New
6445 (value_object_getset): New variable.
6446 (value_object_type): Initialize tp_getset element.
6448 2009-03-26 Joel Brobecker <brobecker@adacore.com>
6450 Recognize missing DW_AT_location as <value optimized out>.
6452 (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
6453 Call add_symbol_to_list.
6455 2009-03-25 Tom Tromey <tromey@redhat.com>
6457 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
6458 * stack.c (print_this_frame_argument_p): Use check_typedef.
6460 2009-03-25 Tom Tromey <tromey@redhat.com>
6462 * configure: Rebuild.
6463 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
6464 Rearrange flags setting. Add comments.
6466 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6468 * config/i386/nm-i386.h: Remove code within
6469 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
6470 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
6472 * config/i386/nm-cygwin64.h: Ditto.
6473 * config/i386/nm-fbsd.h: Ditto.
6474 * config/i386/nm-go32.h: Ditto.
6475 * config/i386/nm-linux.h: Ditto.
6476 * config/i386/nm-linux64.h: Ditto.
6478 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6480 ARI fix: "xasprintf" rule.
6481 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
6483 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6485 * remote.c (remote_start_remote): In non-stop mode, call
6486 init_wait_for_inferior before adding threads and inferiors.
6488 2009-03-25 Joel Brobecker <brobecker@adacore.com>
6490 * breakpoint.c (breakpoint_thread_match): Split a large condition
6491 into several smaller conditions. No behavior change.
6493 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6495 * infrun.c (infrun_thread_thread_exit): New.
6496 (_initialize_infrun): Attach it to the thread_exit observer.
6497 * thread.c (delete_thread_1): Always call the observer, passing it
6499 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
6500 SILENT, return immediately.
6502 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6504 * infrun.c (normal_stop): Use has_stack_frames instead of
6506 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
6507 when there is no thread selected.
6508 (mi_cmd_execute): Don't special case commands that can run without
6509 a valid selected thread.
6510 * top.c (execute_command): Don't special case commands that can
6511 run without a valid selected thread. Use has_stack_frames.
6512 * infcmd.c (ensure_valid_thread): New.
6513 (continue_1, step_1, jump_command, signal_command): Use it.
6514 (detach_command): Error out if there's no selected thread/inferior.
6515 * thread.c (print_thread_info): Allow having no thread selected.
6516 (switch_to_thread): Don't read the PC if there is no current thread.
6517 (do_restore_current_thread_cleanup): Don't record the current
6518 frame if there is no current thread.
6519 (make_cleanup_restore_current_thread): Don't read frame info if
6520 there is no selected thread.
6521 (_initialize_thread): Don't mark commands as
6522 "no_selected_thread_ok".
6523 * frame.c (get_current_frame): Error out if there is no valid
6525 (has_stack_frames): Return false if there is no valid
6527 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
6528 "no_selected_thread_ok".
6529 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
6530 (get_cmd_no_selected_thread_ok): Delete.
6531 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
6532 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
6534 * stack.c (get_selected_block): Use has_stack_frames.
6536 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6538 Fix size of FPSCR in Power 7 processors.
6539 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6540 (PPC_FEATURE_HAS_DFP): New #define.
6541 (ppc_linux_read_description): Check for DFP feature instead of
6542 ISA 2.05 to decide on size of the FPSCR.
6544 2009-03-25 Kevin Buettner <kevinb@redhat.com>
6546 * mn10300-tdep.c (trad-frame.h): Don't include.
6547 (prologue-value.h): Include.
6548 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
6549 (struct mn10300_prologue): Define.
6550 (push_reg, translate_rreg, check_for_saved): New functions.
6551 (mn10300_analyze_prologue): Rewrite, using prologue-value
6552 machinery. Handle more instructions than before. Permit
6553 instructions to occur in any order.
6554 (mn10300_skip_prologue): Find the extents of the function
6555 in question; mn10300_analyze_prologue no longer does this.
6556 (mn10300_analyze_frame_prologue): New function.
6557 (mn10300_frame_base): New function.
6558 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
6560 (mn10300_frame_prev_register): Likewise.
6561 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
6562 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
6564 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
6566 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6568 Fix completer problem for filename completion on the first try.
6570 * gdb/completer.h (gdb_completion_word_break_characters): New function.
6571 * gdb/completer.c: Include gdb_assert.h.
6572 (complete_line_internal_reason): New enum.
6573 (complete_line_internal): Change last argument type to
6574 complete_line_internal_reason.
6575 Modify function to handle the different complete_line_internal_reason
6577 (complete_line): Adapt to change in complete_line_internal.
6578 (command_completer): Ditto.
6579 (gdb_completion_word_break_characters): Implement new function.
6580 * top.c (init_main): Set rl_completion_word_break_hook to
6581 gdb_completion_word_break_characters.
6584 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6586 ARI fix: "strlen d_name" rule.
6587 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
6590 2009-03-24 Tom Tromey <tromey@redhat.com>
6591 Pedro Alves <pedro@codesourcery.com>
6593 * configure, config.in: Rebuild.
6594 * configure.ac: Check for libiconvlist.
6595 * charset.c: Check HAVE_LIBICONVLIST.
6596 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
6597 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
6598 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
6600 (INTERNAL_CFLAGS_BASE): Update.
6601 (INTERNAL_LDFLAGS): Update.
6604 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6606 * configure.ac: Initialize the variable $PREFER_CURSES.
6607 * configure: Regenerated.
6609 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6611 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
6612 * configure: Regenerated.
6614 2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
6616 ARI fix: "strerror" rule.
6617 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
6618 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
6620 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6622 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
6623 before looking up the fields inside our struct type.
6625 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6627 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
6628 trying to resolve the type qualification.
6630 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6632 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
6633 we try to apply the attribute on the real type, rather than
6634 its associated typedef.
6636 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6638 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
6639 to make sure we try to get the modulus of the actual type, not the
6642 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6644 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
6645 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
6646 to get the real type, not the associated typedef.
6648 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6650 * ada-lang.c (ada_get_field_index): Add handling of the case
6651 when TYPE is a typedef of a struct.
6653 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6655 Add gdb_usleep as a portable version of usleep based on gdb_select.
6656 * gdb_usleep.h, gdb_usleep.c: New files.
6657 * Makefile.in (SFILES): Add gdb_usleep.c.
6658 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
6659 (COMMON_OBS): Add gdb_usleep.o.
6660 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
6661 by call to gdb_usleep.
6663 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6665 * buildsym.c (end_symtab): If we ignore the subfiles, then
6666 unlink the associated symtabs if they were already allocated.
6668 2009-03-23 Jerome Guitton <guitton@adacore.com>
6670 Provide a way to force building of GDB with libcurses.
6671 * configure.ac: Add --with-curses.
6672 * configure: Regenerated.
6674 2009-03-23 Tom Tromey <tromey@redhat.com>
6676 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
6679 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
6681 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
6682 solib_contains_address_p instead of searching.
6684 2009-03-23 Tom Tromey <tromey@redhat.com>
6686 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
6687 (iconv): Make 'inbuf' argument const.
6688 (convert_between_encodings): Use ICONV_CONST.
6689 (wchar_iterate): Likewise.
6691 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6693 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
6694 dynamically loaded function.
6695 (LookupPrivilegeValueA): Ditto.
6696 (OpenProcessToken): Ditto.
6697 (AdjustTokenPrivileges): Rename and define placeholder for address of
6698 dynamically loaded function.
6699 (LookupPrivilegeValueA): Ditto.
6700 (OpenProcessToken): Ditto.
6701 (set_process_privilege): Remove check for loaded functions.
6702 (bad_OpenProcessToken): Define.
6703 (_initialize_loadable): Load token functions from advapi here, setting
6704 OpenProcessToken function to a dummy static function which always return
6705 error if OS doesn't support this functionality.
6707 2009-03-22 Nicolas Roche <roche@adacore.com>
6708 Christopher Faylor <me+cygwin@cgf.cx>
6710 * win32-nat.c (ctrl_c_handler): New function.
6711 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
6712 is run in a separate console.
6714 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6716 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
6717 for dynamically loaded function.
6718 (DebugBreakProcess): Ditto.
6719 (DebugSetProcessKillOnExit): Ditto.
6720 (EnumProcessModules): Ditto.
6721 (GetModuleFileNameExA): Ditto.
6722 (GetModuleInformation): Ditto.
6723 (DebugActiveProcessStop): Rename and define placeholder for address of
6724 dynamically loaded function.
6725 (DebugBreakProcess): Ditto.
6726 (DebugSetProcessKillOnExit): Ditto.
6727 (EnumProcessModules): Ditto.
6728 (GetModuleFileNameExA): Ditto.
6729 (GetModuleInformation): Ditto.
6730 (psapi_loaded): Delete.
6731 (get_module_name): Don't check psapi_loaded, just rely on the fact that
6732 dynamically loaded functions will return failure if they weren't
6734 (has_detach_ability): Delete.
6735 (windows_attach): Remove call to has_detach_ability (). Just rely on
6736 functions being callable.
6737 (bad_DebugActiveProcessStop): Define.
6738 (bad_DebugBreakProcess): Ditto.
6739 (bad_DebugSetProcessKillOnExit): Ditto.
6740 (bad_EnumProcessModules): Ditto.
6741 (bad_GetModuleFileNameExA): Ditto.
6742 (bad_GetModuleInformation): Ditto.
6743 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
6744 dynamic storage here, setting nonexistent functions to dummy static
6745 functions which always return error.
6747 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6749 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
6750 to the about_to_proceed observer notification.
6751 (mi_about_to_proceed): New.
6752 (mi_on_resume): Only output ^running and the prompt here if the
6753 target was proceeded.
6754 * breakpoint.c (breakpoint_proceeded): New static.
6755 (breakpoint_about_to_proceed): New.
6756 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
6757 the about_to_proceed observer notification.
6758 * inferior.h (breakpoint_proceeded): Delete declaration.
6759 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
6760 Notify the about_to_proceed observers.
6761 (struct inferior_status): Delete breakpoint_proceeded member.
6762 (save_inferior_status): Don't save it.
6763 (restore_inferior_status): Don't restore it.
6764 * mi-main.h (mi_proceeded): Declare.
6765 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
6768 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6770 * gdbthread.h (struct thread_info): Add in_infcall member.
6771 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
6772 Remove reverences to suppress_resume_observer. Refresh
6773 `call_thread' after returning from `proceed'.
6774 * infcmd.c (suppress_resume_observer): Delete.
6775 * inferior.h (suppress_resume_observer): Delete declaration.
6776 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
6778 * thread.c (set_running): Remove references to
6779 suppress_resume_observer.
6780 * infrun.c (struct inferior_status): Add in_infcall member.
6781 (save_inferior_status): Save it.
6782 (restore_inferior_status): Restore it.
6784 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6786 * infcall.c (run_inferior_call): Remove references to
6787 suppress_stop_observer.
6788 * infcmd.c (suppress_stop_observer): Delete.
6789 (finish_command_continuation): Remove NOTE. Don't clear
6790 suppress_stop_observer anymore.
6791 (finish_command_continuation_free_arg): Likewise.
6792 (finish_forward): Remove references to suppress_stop_observer.
6793 Call normal_stop observer if we haven't already.
6794 * inferior.h (suppress_stop_observer): Delete.
6795 * infrun.c (normal_stop): When deciding to suppress the
6796 normal_stop observer, check for proceed_to_finish instead of
6797 suppress_stop_observer.
6799 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6801 * symfile.c (symfile_relocate_debug_section): Remove check for
6804 2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6805 Jim Blandy <jimb@red-bean.com>
6806 Thiago Jung Bauermann <bauerman@br.ibm.com>
6807 Tom Tromey <tromey@redhat.com>
6809 Miscellaneous fixes to the Python code.
6810 * python/python-cmd.c (cmdpy_init): Accept keyword
6812 * python/python-value.c (valpy_string): Accept keyword
6814 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
6815 Do not call value_to_value_object on NULL RES_VAL.
6816 (value_object_methods): Change `string' entry to also accept
6818 (convert_value_from_python): Return a copy of the value if obj is
6820 (value_object_methods): Mark the `string' method as accepting
6821 keywords, and show method "prototype" in the doc string.
6822 * python/python.c (get_parameter): Don't return inside a
6825 2009-03-20 Tom Tromey <tromey@redhat.com>
6827 Add support for convenience functions in Python.
6828 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
6829 (SUBDIR_PYTHON_SRCS): Add python-function.c.
6830 (python-function.o): New target.
6831 * eval.c: Include "python/python.h" and <ctype.h>.
6832 (evaluate_subexp_standard): Handle values of type
6833 TYPE_CODE_INTERNAL_FUNCTION.
6834 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
6835 * parse.c (write_exp_string): Remove duplicate word in comment.
6836 * python/python-function.c: New file.
6837 * python/python-internal.h (gdbpy_initialize_functions): Add
6839 * python/python.c (_initialize_python): Call
6840 gdbpy_initialize_functions.
6841 * valprint.c (value_check_printable): Handle values of type
6842 TYPE_CODE_INTERNAL_FUNCTION.
6843 * value.c: Include "cli/cli-decode.h".
6844 (internal_function): New struct.
6845 (functionlist, internal_fn_type): New static variables.
6846 (lookup_only_internalvar,
6847 lookup_internalvar): Add const qualifier to name argument.
6848 (create_internalvar): Likewise. Initialize new field.
6849 (set_internal_var): Fix typo in comment. Don't allow assignment
6850 to canonical variable.
6851 (value_create_internal_function, value_internal_function_name,
6852 call_internal_function, function_command, function_destroyer,
6853 add_internal_function): New functions.
6854 (_initialize_values): Create `function' placeholder command.
6855 Initialize internal_fn_type.
6856 * value.h (lookup_only_internalvar, create_internalvar,
6857 lookup_internalvar): Add const qualifier to name argument.
6858 (internal_function_fn, add_internal_function, call_internal_function,
6859 value_internal_function_name): Add prototypes.
6860 (struct internalvar) <canonical>: New field.
6862 2009-03-20 Tom Tromey <tromey@redhat.com>
6864 * c-lang.c (evaluate_subexp_c): Call check_typedef.
6866 2009-03-20 Tom Tromey <tromey@redhat.com>
6867 Julian Brown <julian@codesourcery.com>
6869 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
6870 PR i18n/9401, PR exp/9613:
6872 * value.h (value_typed_string): Declare.
6873 (val_print_string): Update.
6874 * valprint.h (print_char_chars): Update.
6875 * valprint.c (print_char_chars): Add type argument. Update.
6876 (val_print_string): Likewise.
6877 * valops.c (value_typed_string): New function.
6878 * utils.c (host_char_to_target): New function.
6879 (parse_escape): Use host_char_to_target, host_hex_value. Update.
6881 (no_control_char_error): Remove.
6882 * typeprint.c (print_type_scalar): Update.
6883 * scm-valprint.c (scm_scmval_print): Update.
6884 * scm-lang.h (scm_printchar, scm_printstr): Update.
6885 * scm-lang.c (scm_printchar): Add type argument.
6886 (scm_printstr): Likewise.
6887 * printcmd.c (print_formatted): Update.
6888 (print_scalar_formatted): Update.
6889 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
6890 Handle '%lc' and '%ls'.
6891 * parser-defs.h (struct typed_stoken): New type.
6892 (struct stoken_vector): Likewise.
6893 (write_exp_string_vector): Declare.
6894 * parse.c (write_exp_string_vector): New function.
6895 * p-valprint.c (pascal_val_print): Update.
6896 * p-lang.h (is_pascal_string_type, pascal_printchar,
6897 pascal_printstr): Update.
6898 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
6899 Add 'char_type' argument.
6900 (pascal_emit_char): Add type argument.
6901 (pascal_printchar): Likewise.
6902 (pascal_printstr): Likewise.
6903 * objc-lang.c (objc_emit_char): Add type argument.
6904 (objc_printchar): Likewise.
6905 (objc_printstr): Likewise.
6906 * macroexp.c (get_character_constant): Handle unicode characters.
6908 (get_string_literal): Handle unicode strings. Use
6910 * m2-valprint.c (print_unpacked_pointer): Update.
6911 (m2_print_array_contents): Update.
6912 (m2_val_print): Update.
6913 * m2-lang.c (m2_emit_char): Add type argument.
6914 (m2_printchar): Likewise.
6915 (m2_printstr): Likewise.
6916 * language.h (struct language_defn) <la_printchar>: Add type
6918 <la_printstr, la_emitchar>: Likewise.
6919 (LA_PRINT_CHAR): Likewise.
6920 (LA_PRINT_STRING): Likewise.
6921 (LA_EMIT_CHAR): Likewise.
6922 * language.c (unk_lang_emit_char): Add type argument.
6923 (unk_lang_printchar): Likewise.
6924 (unk_lang_printstr): Likewise.
6925 * jv-valprint.c (java_val_print): Update.
6926 * jv-lang.c (java_emit_char): Add type argument.
6927 * f-valprint.c (f_val_print): Update.
6928 * f-lang.c (f_emit_char): Add type argument.
6929 (f_printchar): Likewise.
6930 (f_printstr): Likewise.
6931 * expprint.c (print_subexp_standard): Update.
6932 * charset.h (target_wide_charset): Declare.
6933 (c_target_char_has_backslash_escape, c_parse_backslash,
6934 host_char_print_literally, host_char_to_target,
6935 target_char_to_host, target_char_to_control_char): Remove.
6936 (enum transliterations): New type.
6937 (convert_between_encodings): Declare.
6938 (HOST_ESCAPE_CHAR): New define.
6939 (host_letter_to_control_character, host_hex_value): Declare.
6940 (enum wchar_iterate_result): New enum.
6941 (struct wchar_iterator): Declare.
6942 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
6943 wchar_push_back): Declare.
6944 * charset-list.h: New file.
6945 * c-valprint.c (textual_name): New function.
6946 (textual_element_type): Handle wide character types.
6947 (c_val_print): Pass original type to textual_element_type. Handle
6948 wide character types.
6949 (c_value_print): Use textual_element_type. Pass original type of
6951 * c-lang.h (enum c_string_type): New type.
6952 (c_printchar, c_printstr): Update.
6953 * c-lang.c (classify_type): New function.
6954 (print_wchar): Likewise.
6955 (c_emit_char): Add type argument. Handle wide characters.
6956 (c_printchar): Likewise.
6957 (c_printstr): Add type argument. Handle wide and multibyte
6959 (convert_ucn): New function.
6960 (emit_numeric_character): Likewise.
6961 (convert_octal): Likewise.
6962 (convert_hex): Likewise.
6963 (ADVANCE): New macro.
6964 (convert_escape): New function.
6965 (parse_one_string): Likewise.
6966 (evaluate_subexp_c): Likewise.
6967 (exp_descriptor_c): New global.
6968 (c_language_defn): Use exp_descriptor_c.
6969 (cplus_language_defn): Likewise.
6970 (asm_language_defn): Likewise.
6971 (minimal_language_defn): Likewise.
6972 (charset_for_string_type): New function.
6973 * c-exp.y (%union): Add 'svec' and 'tsval'.
6975 (exp): Add CHAR production.
6976 (string_exp): Rewrite.
6977 (exp) <string_exp>: Rewrite.
6978 (tempbuf): Now global.
6979 (tempbuf_init): New global.
6980 (parse_string_or_char): New function.
6981 (yylex) <tempbuf>: Now global.
6982 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
6984 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
6985 (c_parse_escape): New function.
6986 * auxv.c (fprint_target_auxv): Update.
6987 * ada-valprint.c (ada_emit_char): Add type argument.
6988 (ada_printchar): Likewise.
6989 (ada_print_scalar): Update.
6990 (printstr): Add type argument. Update calls to ada_emit_char.
6991 (ada_printstr): Add type argument.
6992 (ada_val_print_array): Update.
6993 (ada_val_print_1): Likewise.
6994 * ada-lang.c (emit_char): Add type argument.
6995 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
6997 * gdb_locale.h: Include langinfo.h.
6998 * charset.c (_initialize_charset): Set default host charset from
6999 the locale. Don't register charsets. Add target-wide-charset
7000 commands. Call find_charset_names.
7001 (struct charset, struct translation): Remove.
7002 (GDB_DEFAULT_HOST_CHARSET): Remove.
7003 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
7004 (target_wide_charset_name): New global.
7005 (show_host_charset_name): Handle "auto".
7006 (show_target_wide_charset_name): New function.
7007 (host_charset_enum, target_charset_enum): Remove.
7008 (charset_enum): New global.
7009 (all_charsets, register_charset, lookup_charset, all_translations,
7010 register_translation, lookup_translation): Remove.
7011 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
7012 (iso_8859_print_literally, iso_8859_to_control,
7013 iso_8859_family_charset): Remove.
7014 (ebcdic_print_literally, ebcdic_to_control,
7015 ebcdic_family_charset): Remove.
7016 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
7017 register_iconv_charsets): Remove.
7018 (target_wide_charset_be_name, target_wide_charset_le_name): New
7020 (identity_either_char_to_other): Remove.
7021 (set_be_le_names, validate): New functions.
7022 (backslashable, backslashed, represented): Remove.
7023 (default_c_target_char_has_backslash_escape): Remove.
7024 (default_c_parse_backslash, iconv_convert): Remove.
7025 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
7026 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
7027 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
7028 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
7029 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
7030 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
7031 (table_convert_char, table_translation, simple_table_translation):
7033 (current_host_charset, current_target_charset,
7034 c_target_char_has_backslash_escape_func,
7035 c_target_char_has_backslash_escape_baton): Remove.
7036 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
7037 (host_char_to_target_func, host_char_to_target_baton): Remove.
7038 (target_char_to_host_func, target_char_to_host_baton): Remove.
7039 (cached_iconv_host_to_target, cached_iconv_target_to_host):
7041 (lookup_charset_or_error, check_valid_host_charset): Remove.
7042 (set_host_and_target_charsets): Remove.
7043 (set_host_charset, set_target_charset): Remove.
7044 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
7045 (set_target_wide_charset_sfunc): New function.
7046 (show_charset): Print target wide character set.
7047 (host_charset, target_charset): Rewrite.
7048 (target_wide_charset): New function.
7049 (c_target_char_has_backslash_escape): Remove.
7050 (c_parse_backslash): Remove.
7051 (host_letter_to_control_character): New function.
7052 (host_char_print_literally): Remove.
7053 (host_hex_value): New function.
7054 (target_char_to_control_char): Remove.
7055 (cleanup_iconv): New function.
7056 (convert_between_encodings): New function.
7057 (target_char_to_host): Remove.
7058 (struct wchar_iterator): Define.
7059 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
7060 wchar_push_back): New functions.
7061 (do_cleanup_iterator): New function.
7062 (char_ptr): New typedef.
7063 (charsets): New global.
7064 (add_one, find_charset_names): New functions.
7065 (default_charset_names): New global.
7066 (auto_host_charset_name): Likewise.
7067 * aclocal.m4, config.in, configure: Rebuild.
7068 * configure.ac: Call AM_LANGINFO_CODESET.
7069 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
7070 (AM_ICONV): Invoke earlier.
7071 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
7072 LIBICONV_LIBDIR. Check for libiconv in build tree.
7073 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
7074 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
7075 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
7076 * gdb_obstack.h (obstack_grow_wstr): New define.
7077 * gdb_wchar.h: New file.
7078 * defs.h: Include it.
7080 2009-03-20 Tom Tromey <tromey@redhat.com>
7081 Jan Kratochvil <jan.kratochvil@redhat.com>
7083 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
7084 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
7086 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
7088 * ada-typeprint.c (print_array_type): Do the NULL check
7091 2009-03-19 Tom Tromey <tromey@redhat.com>
7093 * utils.c (do_obstack_free): New function.
7094 (make_cleanup_obstack_free): Likewise.
7095 * defs.h (make_cleanup_obstack_free): Declare.
7097 2009-03-18 Doug Evans <dje@google.com>
7099 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
7100 int, not a long long.
7101 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
7103 * expprint.c (dump_raw_expression): Print note if non-NULL.
7105 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
7108 2009-03-18 Nathan Sidwell <nathan@codesourcery.com>
7110 * Makefile.in: Update license to GPLv3.
7111 * ada-exp.y: Update license to GPLv3.
7112 * ada-lex.l: Update license to GPLv3.
7113 * c-exp.y: Update license to GPLv3.
7114 * cp-name-parser.y: Update license to GPLv3.
7115 * darwin-nat-info.c: Update license to GPLv3.
7116 * f-exp.y: Update license to GPLv3.
7117 * gdb_thread_db.h: Update license to GPLv3.
7118 * hppanbsd-nat.c: Update license to GPLv3.
7119 * hppanbsd-tdep.c: Update license to GPLv3.
7120 * hppaobsd-tdep.c: Update license to GPLv3.
7121 * jv-exp.y: Update license to GPLv3.
7122 * m2-exp.y: Update license to GPLv3.
7123 * objc-exp.y: Update license to GPLv3.
7124 * p-exp.y: Update license to GPLv3.
7125 * reply_mig_hack.awk: Update license to GPLv3.
7126 * reverse.c: Update license to GPLv3.
7127 * xtensa-xtregs.c: Update license to GPLv3.
7129 2009-03-18 Pedro Alves <pedro@codesourcery.com>
7131 * remote.c (remote_close): Don't call generic_mourn_inferior.
7132 (remote_mourn_1): Call generic_mourn_inferior after closing the
7135 2009-03-18 Pedro Alves <pedro@codesourcery.com>
7137 * remote.c (remote_start_remote): Add missing call to
7138 init_wait_for_inferior in non-stop mode.
7140 2009-03-18 Pedro Alves <pedro@codesourcery.com>
7142 * breakpoint.c (bpstat_should_step): Only consider software
7143 watchpoints that have a location.
7145 2009-03-17 Joel Brobecker <brobecker@adacore.com>
7147 Add a target_ops parameter to the to_kill method in struct target_ops.
7149 * target.h (struct target_ops): Add a "target_ops *" parameter to
7151 (target_kill): Remove macro. Add declaration.
7152 * target.c (debug_to_kill): Delete, no longer necessary.
7153 (target_kill): New function.
7154 (update_current_target): Stop inheriting the to_kill method.
7155 Do not de_fault it to no_process either.
7156 (setup_target_debug): Do not set current_target.to_kill.
7157 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
7158 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
7159 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
7162 2009-03-17 Doug Evans <dje@google.com>
7164 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
7165 glibc 2.3.2 and earlier.
7167 2009-03-17 Joel Brobecker <brobecker@adacore.com>
7169 * frame.c (get_prev_frame_1): Do not perform the inner_frame
7170 sanity check if this_frame is not NORMAL.
7171 (frame_id_inner): Update the description of this function.
7173 2009-03-17 Hui Zhu <teawater@gmail.com>
7175 * stack.c: Change the introduce of "disassemble-next-line".
7177 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7179 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
7182 2009-03-17 Hui Zhu <teawater@gmail.com>
7184 * stack.c: Include valprint.h.
7185 (disassemble_next_line): New enum.
7186 (show_disassemble_next_line): New function. Show the current
7187 value of disassemble-next-line.
7188 (gdb_disassembly_stub_args): New struct for argument passing
7189 between function do_gdb_disassembly and function
7190 gdb_disassembly_stub.
7191 (gdb_disassembly_stub): New function. Helper for
7193 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
7194 the exception from the gdb_disassembly because it will be
7195 broken by filter sometime.
7196 (print_frame_info): If disassemble-next-line is set to auto
7197 or on and doesn't have the line debug messages for $pc,
7198 output the next instruction.
7199 If disassemble-next-line is set to on and there is line debug
7200 messages, output assembly codes for next line.
7201 (_initialize_stack): Make the "set disassemble-next-line"
7202 command an auto-boolean command. Change its class to
7203 class_stack. Place it in the top level set list. Extend help
7204 to describe the auto mode.
7206 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7208 * infrun.c (normal_stop): Don't overwrite old_chain.
7210 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7212 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
7213 which is undefined, by call to regcache_invalidate, which should
7214 do what the original author wanted to do.
7216 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7218 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
7219 (mips_create_inferior): Likewise.
7221 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7223 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
7225 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7227 * darwin-nat.c (darwin_resume): Fix a compiler warning when
7228 building on x86_64-darwin.
7230 2009-03-16 Tristan Gingold <gingold@adacore.com>
7232 * configure.tgt: Add handling for x86_64-darwin.
7234 2009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
7236 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
7238 2009-03-15 Joel Brobecker <brobecker@adacore.com>
7240 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
7241 Use the ops parameter to get to the target beneath, rather than
7242 using the current_target global. Using the current_target global
7243 was an unintended accident.
7245 2009-03-15 Joel Brobecker <brobecker@adacore.com>
7247 Fix an error happening while loading symbols from a core file
7250 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
7251 to detect whether we're debugging a core file or not.
7253 2009-03-15 Joel Brobecker <brobecker@adacore.com>
7255 Modernize the aix-thread later by getting rid of the base_target
7256 global. This brings back to life the AIX port which was otherwise
7257 crashing all the time.
7259 * aix-thread.c (base_target): Delete.
7260 (pd_enable): Do not set base_target.
7261 (aix_thread_attach): Use find_target_beneath instead of base_target.
7262 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7263 (aix_thread_fetch_registers, aix_thread_store_registers),
7264 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7265 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
7266 (aix_thread_kill): Delete. Does not seem necessary.
7267 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
7269 2009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7271 * stack.c (return_command <retval_exp>): New variables retval_expr
7272 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
7273 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
7274 if RETURN_TYPE is NULL.
7276 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7278 * remote.c (PACKET_qAttached): New.
7279 (remote_query_attached): New.
7280 (remote_add_inferior): Add new `attached' argument. Handle it.
7281 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
7282 -1 to remote_add_inferior in new parameter.
7283 (extended_remote_attach_1): Adjust to pass 1 to
7284 remote_add_inferior in the new parameter.
7285 (extended_remote_create_inferior_1): Adjust to pass 0 to
7286 remote_add_inferior in the new parameter.
7287 (_initialize_remote): Add "set/show remote query-attached-packet"
7290 2009-03-13 Tom Tromey <tromey@redhat.com>
7292 * symtab.c (lookup_symbol_in_language): Use a cleanup.
7294 2009-03-13 Doug Evans <dje@google.com>
7296 * exceptions.h: Clean up some comments on catch_exceptions usage.
7297 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
7300 2009-02-17 Joel Brobecker <brobecker@adacore.com>
7302 The following patch helps getting rid of a warning inside solib-som.c.
7304 * source.c (source_full_path_of): Constify parameter filename.
7305 * defs.h (source_full_path_of): Update declaration accordingly.
7307 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7309 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
7310 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
7311 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
7313 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7315 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
7316 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
7318 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7320 * ada-tasks.c (ada_task_is_alive): Move up and make static.
7321 * ada-lang.h (ada_task_is_alive): Remove declaration.
7323 2009-03-12 Jerome Guitton <guitton@adacore.com>
7325 * ada-lang.c (ada_delta): Change the type of numerators and
7326 denominators to DOUBLEST, as they may not fit into a long.
7327 (scaling_factor): Ditto.
7329 2009-03-12 Jerome Guitton <guitton@adacore.com>
7331 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
7333 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7335 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
7336 types, if we are unable to determine the actual symbol type
7337 from its tag, then use the static approximation instead.
7339 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7341 Fix crash printing packed record with packed array.
7343 * ada-lang.c (ada_modulus_from_name): New function.
7344 (ada_modulus): In the case where the type length is bigger than
7345 the size of the type used to hold the bounds, try determining
7346 the modulus from the type name.
7347 (ada_value_primitive_packed_val): Fix bug in the computation of
7348 ntarg causing an out-of-buffer invalid access.
7350 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7352 Fix segfault when printing short_integer'last.
7354 * ada-lang.c (ada_find_any_type): Search in the primitive types
7355 if a symbol could not be found.
7357 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7359 * ada-tasks.c (task_states,long_task_states): Add new states
7360 Activating and Acceptor_Delay_Sleep. Update the description
7361 of state Acceptor_Sleep.
7363 2009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
7365 Fix a build failure on Darwin following some changes in
7366 the profile of some target_ops methods.
7368 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
7370 (darwin_stop_inferior, darwin_detach): Likewise.
7372 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7374 Include token in ^running notification for CLI commands.
7376 * mi/mi-main.c (mi_execute_command): Set current_token here.
7377 (mi_cmd_execute): Do not set current_token here.
7379 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7383 * mi/mi-main.c (mi_print_timing_maybe): New.
7384 (captured_mi_execute_command): Simplify. Output timings to
7386 (mi_execute_async_cli_command): Do not print timings.
7387 * mi/mi-main.h (mi_print_timing_maybe): Declare.
7388 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
7390 2009-03-12 Jerome Guitton <guitton@adacore.com>
7392 * xcoffread.c (process_linenos): Check if the line in the
7393 include table refers to the main source file and, if so,
7394 add them to the main subfile.
7396 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7398 Fix a build failure on AIX introduced after a change in the profile
7399 of some of the "methods" in the target_ops structure.
7400 * aix-thread.c: Add missing target_ops parameter throughout.
7402 Implement Ada task switching on AIX.
7403 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
7404 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
7406 2009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
7408 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
7409 value_mark and value_free_to_mark.
7410 * objfiles.c (free_objfile): Call objfile_free_data before
7413 2009-03-10 Hui Zhu <teawater@gmail.com>
7415 * disasm.c (gdb_disassembly): Remove unused argument
7417 * disasm.h (gdb_disassembly): Ditto.
7418 * cli/cli-cmds.c (print_disassembly): Ditto.
7419 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
7421 2009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
7423 * solib.c (solib_contains_address_p): New function.
7424 (solib_name_from_address): Use it.
7425 * printcmd.c (display_uses_solib_p): Use it.
7426 * solib.h (solib_contains_address_p): Declare it.
7428 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7430 * varobj.c (free_variable): Call value_free.
7432 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7435 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
7436 Move the variable `macinfo_type' out of the loop. Create a new
7437 processing pass before the current one to pre-create `current_file'.
7438 New complaint on misplaced zero/non-zero definitions/includes.
7439 Skip first DW_MACINFO_start_file with `at_commandline' set.
7441 2008-03-09 Vladimir Prus <vladimir@codesourcery.com>
7443 * solib.c (reload_shared_libraries): Give
7444 inferior a chance to reset solib breakpoint.
7447 2009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
7449 * windows-nat.c (dr): Redefine to use largest possible integer which
7451 (cygwin_set_dr): Avoid coercion.
7453 2009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
7455 * windows-nat.c (windows_create_inferior): Implement --tty handling on
7458 2009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
7460 Rename solib_address to solib_name_from_address.
7461 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
7462 (disable_breakpoints_in_unloaded_shlib): Update.
7463 * printcmd.c (display_uses_solib_p): Likewise.
7464 * stack.c (print_frame): Likewise.
7468 2009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
7470 * printcmd.c (do_one_display): Reparse exp_string.
7471 (display_uses_solib_p): New function.
7472 (clear_dangling_display_expressions): New function.
7473 (_initialize_printcmd): Add observer.
7474 * solib.c (no_shared_libraries): Swap order of calls to
7475 clear_solib and objfile_purge_solibs.
7477 2009-03-05 Joel Brobecker <brobecker@adacore.com>
7479 Implement the target-specific part of Ada tasking support
7482 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
7483 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
7485 2009-03-05 Joel Brobecker <brobecker@adacore.com>
7487 Get rid of the global "base_target" and use "find_target_beneath"
7488 to find the underlying target.
7489 * dec-thread.c (base_target): Delete.
7490 (enable_dec_thread): Remove assignement to base_target.
7491 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
7492 (dec_thread_fetch_registers, dec_thread_store_registers)
7493 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
7494 Update the function profile if necessary.
7495 Use find_target_beneath to call the same method but from
7496 the underlying target, removing the need for "base_target".
7498 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
7499 Fix a copy/paste error in a few debug traces...
7501 * solib-osf.c (init_so): Use a simpler method for computing
7502 the size of lm_info structure. This also gets rid of warning
7503 emitted by the compiler.
7505 2009-03-05 Pedro Alves <pedro@codesourcery.com>
7507 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
7508 duplicates of permanent breakpoints.
7510 2009-03-04 Pedro Alves <pedro@codesourcery.com>
7512 * inferior.h (notice_new_inferior): Declare.
7513 * infcmd.c (notice_new_inferior): New.
7514 * remote.c (remote_add_inferior, remote_add_thread): New.
7515 (notice_new_inferiors): Rename to...
7516 (remote_notice_new_inferior): ... this. Add RUNNING argument.
7517 Use remote_add_thread instead of add_thread, passing it the
7518 RUNNING argument. Add an inferior with remote_add_inferior. If
7519 we just learned about an inferior, call notice_new_inferior.
7520 (record_currthread): Adjust.
7521 (remote_threads_info): Adjust to use remote_notice_new_inferior.
7522 (remote_start_remote, extended_remote_attach_1): Use
7523 remote_add_inferior.
7524 (process_stop_reply): Adjust. Call remote_notice_new_inferior
7525 after handling expedited registers and watchpoint state.
7526 (extended_remote_create_inferior_1): Use remote_add_inferior.
7528 2009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
7530 * infcmd.c (registers_info): Remove register number case.
7532 2009-03-03 Pedro Alves <pedro@codesourcery.com>
7534 * top.c (quit_target): Check for target_has_execution before
7535 killing or detaching from inferiors.
7537 2009-03-02 Joel Brobecker <brobecker@adacore.com>
7539 Remove some unused routines.
7541 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
7543 * ada-lang.c (ada_task_list_iterator_ftype)
7544 (iterate_over_live_ada_tasks): Delete.
7545 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
7548 2009-03-01 Doug Evans <dje@google.com>
7550 * symtab.c: Remove trailing whitespace throughout the file.
7551 (expand_line_sal): Fix some typos and whitespace.
7553 * Makefile.in (clean): rm -f $(DEPDIR)/*.
7555 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
7556 (init.c): signals/ -> common/.
7557 (signals.o): Update.
7558 * target.h (target_signal_to_string,target_signal_to_string)
7559 (target_signal_from_name,target_signal_to_host_p)
7560 (target_signal_from_host,target_signal_to_host): Move to ...
7561 * common/gdb_signals.h: ... here. New file.
7562 * common/signals.c: Moved here from signals/signals.c.
7563 #include gdb_signals.h, remove #include of target.h in gdb case.
7564 (target_signal_from_command,default_target_signal_to_host)
7565 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
7567 Include thread ID in target_wait debugging output.
7568 * infrun.c (print_target_wait_results): New function.
7569 (wait_for_inferior,fetch_inferior_event): Call it.
7571 2009-02-27 Pedro Alves <pedro@codesourcery.com>
7573 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
7574 with a ptid_t field.
7575 * linux-thread-db.c (thread_get_info_callback): Build the ptid
7576 using the pid stored in proc_handle.ptid.
7577 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
7578 (check_for_thread_db, thread_db_detach, check_event)
7579 (thread_db_mourn_inferior, find_new_threads_callback)
7580 (thread_db_find_new_threads_1): Adjust.
7581 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
7582 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
7584 2009-02-27 Phil Muldoon <pmuldoon@redhat.com>
7586 * valprint.c (read_string): Rework clean-up logic. Use
7587 free_current_contents to clean-up buffer.
7589 2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
7591 * MAINTAINERS: Update e-mail address.
7593 2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
7595 * python/python-utils.c (python_string_to_unicode): Always return
7597 (python_string_to_target_string): Decrement transient python
7599 (python_string_to_host_string): Likewise.
7601 2007-02-26 Pedro Alves <pedro@codesourcery.com>
7603 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
7604 call to super_fetch_registers.
7605 (mips64_linux_store_registers): Pass `ops' to call to
7606 super_store_registers.
7608 2009-02-25 Doug Evans <dje@google.com>
7610 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
7613 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
7614 disabled_shlib_breaks, unused.
7616 * printcmd.c (build_address_symbolic): Fix comment.
7618 2009-02-25 Hui Zhu <teawater@gmail.com>
7620 * cli/cli-script.c (define_command): Add _() to query.
7621 * gnu-nat.c (inf_validate_task_sc): Ditto.
7622 * infcmd.c (kill_if_already_running): Ditto.
7623 (jump_command): Ditto.
7624 (attach_command): Ditto.
7625 * inflow.c (kill_command): Ditto.
7626 * infrun.c (handle_command): Ditto.
7627 * maint.c (maintenance_dump_me): Ditto.
7628 * memattr.c (mem_delete_command): Ditto.
7629 * monitor.c (monitor_interrupt_query): Ditto.
7630 * nto-procfs.c (interrupt_query): Ditto.
7631 * printcmd.c (undisplay_command): Ditto.
7632 * remote-mips.c (mips_kill): Ditto.
7633 * remote.c (interrupt_query): Ditto.
7634 * solib-irix.c (irix_open_symbol_file_object): Ditto.
7635 * solib-osf.c (osf_open_symbol_file_object): Ditto.
7636 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
7637 * solib-som.c (som_open_symbol_file_object): Ditto.
7638 * solib-svr4.c (open_symbol_file_object): Ditto.
7639 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
7640 * target.c (kill_or_be_killed): Ditto.
7641 * tracepoint.c (delete_trace_command): Ditto.
7642 * top.c (quit_confirm): Add _() to s that will be used
7645 2009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
7647 Fix windows-nat.c compilation failure.
7649 * windows-nat.c (windows_thread_alive): Fix forward declaration.
7650 (get_windows_debug_event): Add ops parameter to call to windows_resume.
7652 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7654 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
7656 2009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
7658 * symtab.c (find_line_symtab): Initialize exact to avoid
7661 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7663 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
7664 `ops' to recursive call.
7666 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7668 * corelow.c (get_core_registers): Adjust.
7669 (core_file_thread_alive): Rename to...
7670 (core_thread_alive): ... this.
7671 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
7672 (init_core_ops): Adjust.
7673 (coreops_suppress_target): Delete.
7674 (_initialize_corelow): Unconditionally add core_ops.
7675 * procfs.c: Include "inf-child.h".
7676 (procfs_ops): Delete.
7677 (init_procfs_ops): Delete. Reimplement as...
7678 (procfs_target): ... this, inheriting from inf-child.
7679 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
7680 (procfs_prepare_to_store): Delete.
7681 (procfs_store_registers, procfs_resume): Adjust.
7682 (procfs_open): Delete.
7683 (procfs_suppress_run): Delete.
7684 (procfs_can_run): Delete.
7685 (procfs_mourn_inferior): Adjust.
7686 (procfs_init_inferior): Add target_ops parameter. Adjust.
7687 (procfs_create_inferior): Don't pass procfs_init_inferior to
7688 fork_inferior. Instead call it after fork_inferior returns.
7689 (procfs_find_new_threads): Adjust.
7690 (_initialize_procfs): Adjust to use procfs_target instead of
7692 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
7693 (lwp_to_thread): Use target_thread_alive.
7694 (sol_thread_open): Delete.
7695 (sol_thread_attach): Delete.
7696 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7697 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
7698 to use find_target_beneath.
7699 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
7700 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
7701 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
7702 (check_for_thread_db): New.
7703 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
7704 (sol_thread_new_objfile): Call check_for_thread_db.
7705 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
7706 (sol_thread_can_run): Delete.
7707 (sol_thread_alive): Adjust to use find_target_beneath.
7708 (sol_thread_stop): Delete.
7709 (rw_common): Use target_write_memory or target_read_memory.
7710 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
7711 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
7712 (solaris_pid_to_str): Remove check for libthread_db initialization
7714 (sol_find_new_threads): Remove check for libthread_db
7715 initialization failing, or for an invalid inferior_ptid. Adjust
7716 to use find_target_beneath.
7717 (sol_core_open, sol_core_close, sol_core_detach,
7718 sol_core_files_info, sol_find_memory_regions,
7719 sol_make_note_section, ignore): Delete.
7720 (init_sol_thread_ops): Make it a thread_stratum target. Remove
7721 unneeded callback settings.
7722 (init_sol_core_ops): Delete.
7723 (_initialize_sol_thread): No longer call init_sol_core_ops, set
7724 procfs_suppress_run, or hack with core_ops.
7726 * target.h (struct target_ops): Add a target_ops * parameter to
7727 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
7728 and to_find_new_threads.
7729 (target_fetch_registers, target_store_registers)
7730 (target_thread_alive, target_find_new_threads): Redeclare as
7733 * target.c (update_current_target): Do not inherit or de_fault
7734 to_resume, to_fetch_registers, to_store_registers,
7735 to_thread_alive, to_find_new_threads.
7736 (target_resume): Adjust.
7737 (target_thread_alive, target_find_new_threads): New.
7738 (debug_to_resume, debug_to_fetch_registers): Delete.
7739 (target_fetch_registers): New.
7740 (debug_to_store_registers): Delete.
7741 (target_store_registers): New.
7742 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
7743 (setup_target_debug): Adjust.
7745 * gdbcore.h (core_ops): Delete declaration.
7747 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
7748 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
7749 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
7750 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
7751 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
7752 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
7753 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
7754 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
7755 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
7756 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
7757 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
7758 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
7759 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
7760 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
7762 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
7763 * gdbarch.h, gdbarch.c: Regenerate.
7765 * sol2-tdep.c: Include "inferior.h".
7766 (sol2_core_pid_to_str): New.
7767 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
7769 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
7770 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
7771 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
7772 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
7774 2009-02-22 Doug Evans <dje@google.com>
7776 * exec.c (exec_file_attach): Fix comment.
7778 2009-02-22 Pedro Alves <pedro@codesourcery.com>
7780 Silence a few -Wmissing-prototypes warnings.
7783 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
7785 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
7786 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
7787 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
7788 (_initialize_amd64nbsd_tdep): ... this.
7789 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
7790 (_initialize_arm_linux_tdep): Declare.
7791 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
7792 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
7793 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
7794 * avr-tdep.c (avr_return_value): Make it static.
7795 (avr_frame_unwind_cache): Ditto.
7796 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
7797 (bsd_uthread_solib_loaded): Ditto.
7798 (bsd_uthread_solib_unloaded): Ditto.
7799 (bsd_uthread_target): Ditto.
7800 (_initialize_bsd_uthread): Declare.
7801 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
7802 (cris_frame_unwind_cache): Ditto.
7803 * frv-tdep.c (frv_return_value): Ditto.
7804 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
7805 (h8300h_use_struct_convention): Ditto.
7806 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
7808 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
7810 * hppabsd-tdep.c: Include hppabsd-tdep.h.
7811 (hppabsd_find_global_pointer): Make it static.
7812 * hppabsd-tdep.h: New.
7813 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
7814 (hppabsd_init_abi): Remove declaration.
7815 (_initialize_hppabsd_tdep): Remove declaration.
7816 (_initialize_hppanbsd_tdep): Declare.
7817 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
7818 (hppabsd_init_abi): Delete declaration.
7819 (hppaobsd_init_abi): Make it static.
7820 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
7821 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
7822 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
7823 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
7824 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
7825 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
7826 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
7827 (_initialize_m32c_tdep): Declare.
7828 * m32r-rom.c (_initialize_m32r_rom): Declare.
7829 * m32r-tdep.c (m32r_skip_prologue): Make it static.
7830 (m32r_return_value): Ditto.
7831 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
7832 (m68hc11_return_value): Ditto.
7833 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
7834 * m88k-tdep.c (m88k_frame_cache): Make it static.
7835 * mep-tdep.c (mep_gdb_print_insn): Ditto.
7836 (mep_return_value): Ditto.
7837 (_initialize_mep_tdep): Declare.
7838 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
7839 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
7840 (mips_linux_syscall_next_pc): Ditto.
7841 (_initialize_mips_linux_tdep): Declare.
7842 * mips-tdep.c (mips_single_step_through_delay): Make it static.
7843 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
7844 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
7845 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
7846 * mt-tdep.c (_initialize_mt_tdep): Declare.
7847 * nbsd-tdep.c: Include nbsd-tdep.h.
7848 * nto-tdep.c (find_load_phdr): Make it static.
7849 (_initialize_nto_tdep): Declare.
7850 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
7852 (_initialize_ppc_linux_tdep): Declare.
7853 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
7854 (m32r_insert_watchpoint, m32r_remove_watchpoint)
7855 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
7857 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
7858 * rs6000-nat.c: Include xcoffread.h.
7859 (find_toc_address): Don't extern declare get_toc_offset. Adjust
7860 to call xcoff_get_to_offset.
7861 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
7862 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
7863 (rs6000_skip_trampoline_code): Make static.
7864 * s390-tdep.c (s390_regset_from_core_section): Ditto.
7865 * sh-tdep.c (sh_register_reggroup_p): Ditto.
7866 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
7867 (_initialize_shnbsd_tdep): Declare.
7868 * solib-frv.c (displacement_from_map): Make static.
7869 (_initialize_frv_solib): Declare.
7870 * solib-irix.c (fetch_lm_info): Make static.
7871 (_initialize_irix_solib): Declare.
7872 * solib-som.c: Include solib-som.h.
7873 (som_solib_select): Line break.
7874 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
7875 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
7876 (_initialize_sparcnbsd_tdep): ... this.
7877 * spu-tdep.c (spu_software_single_step): Make it static.
7878 (_initialize_spu_tdep): Declare.
7879 * vax-tdep.c (vax_frame_cache): Make it static.
7880 * xcoffread.c: Include xcoffread.h.
7881 (get_toc_offset): Rename to ...
7882 (xcoff_get_toc_offset): ... this.
7883 (_initialize_xcoffread): Declare.
7885 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
7886 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
7888 (_initialize_xtensa_tdep): Declare.
7890 2008-02-21 Pedro Alves <pedro@codesorcery.com>
7892 Silence a few -Wmissing-prototypes warnings.
7895 * amd64-nat.c: Include "amd64-nat.h".
7896 * fork-child.c (_initialize_fork_child): Ditto.
7897 * gcore.c (_initialize_gcore): Ditto.
7898 * inf-ptrace.c: Include "inf-ptrace.h".
7899 (inf_ptrace_store_registers): Make it static.
7900 * linux-nat.c (linux_nat_terminal_ours): Make it static.
7901 (_initialize_linux_nat): Declare before definition.
7902 * linux-tdep.c: Include "linux-tdep.h".
7903 * linux-thread-db.c (_initialize_thread_db): Declare before
7905 * proc-service.c (_initialize_proc_service): Ditto.
7906 * remote.c (remote_send_printf): Make it static.
7907 * solib.c: Include "solib.h".
7908 * symfile-mem.c (_initialize_symfile_mem): Declare before
7910 * ada-lang.c (ada_la_decode, ada_match_name)
7911 (ada_suppress_symbol_printing, ada_is_array_type)
7912 (ada_value_ptr_subscript, ada_array_length)
7913 (ada_to_static_fixed_value): Make them static.
7914 (_initialize_ada_language): Declare before definition.
7915 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
7916 (ada_task_list_changed, ada_new_objfile_observer): Make them
7918 (_initialize_tasks): Declare before definition.
7919 * addrmap.c (_initialize_addrmap): Declare before definition.
7920 * auxv.c (default_auxv_parse): Make it static.
7921 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
7923 * breakpoint.c (remove_sal): Add line break.
7924 (expand_line_sal_maybe): Make it static.
7925 * cp-name-parser.y: Include "cp-support.h".
7926 * cp-valprint.c (cp_find_class_member): Make it static.
7927 * eval.c (value_f90_subarray): Ditto.
7928 * exceptions.c (print_any_exception): Ditto.
7929 * findcmd.c (_initialize_mem_search): Declare before definition.
7930 * frame.c (frame_observer_target_changed): Make it static.
7931 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
7932 * inf-child.c: Include "inf-child.h".
7933 * inferior.h (valid_inferior_id): Rename to ...
7934 (valid_gdb_inferior_id): ... this.
7935 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
7937 * jv-lang.c (java_language_arch_info): Make it static.
7938 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
7939 * osdata.c (info_osdata_command): Make it static.
7940 * regcache.c (regcache_observer_target_changed): Make it static.
7941 * reverse.c (_initialize_reverse): Declare before definition.
7942 * stabsread.c (cleanup_undefined_types_noname)
7943 (cleanup_undefined_types_1): Make them static.
7944 * symfile.c (place_section): Make it static.
7945 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
7946 * target-descriptions.c (_initialize_target_descriptions): Declare
7948 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
7949 (find_default_is_async_p, find_default_supports_non_stop): Make
7951 (target_supports_non_stop): Add prototype.
7952 (dummy_pid_to_str): Make it static.
7953 * utils.c (_initialize_utils): Declare before definition.
7954 * ada-exp.y (_initialize_ada_exp): Declare before definition.
7955 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
7956 * target.h (struct target_ops): Add a prototype to the
7957 to_can_execute_reverse callback.
7958 * macroscope.c (_initialize_macroscope): Declare before definition.
7959 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
7960 * python/python.c (_initialize_python): Declare before definition.
7961 * tui/tui-command.c: Include "tui/tui-command.h".
7962 * tui/tui-data.c (init_content_element, init_win_info): Make them
7964 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
7965 * tui/tui-interp.c (_initialize_tui_interp): Declare before
7967 * tui/tui-layout.c: Include "tui/tui-layout.h".
7968 (_initialize_tui_layout): Declare before definition.
7969 * tui/tui-regs.c: Include "tui/tui-regs.h".
7970 (tui_display_reg_element_at_line): Make it static.
7971 (_initialize_tui_regs): Declare before definition.
7972 * tui/tui-stack.c (_initialize_tui_stack): Declare before
7974 * tui/tui-win.c: Include "tui/tui-win.h".
7975 (_initialize_tui_win): Declare before definition.
7976 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
7977 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
7978 (tui_get_cmd_list): Add a prototype.
7979 * tui/tui-windata.c: Include tui-windata.h.
7980 * tui/tui-wingeneral.c (box_win): Make it static.
7981 * cli/cli-logging.c (show_logging_command): Make it static.
7982 (_initialize_cli_logging): Declare before definition.
7983 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
7986 2009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
7988 Extend use of i386_use_watchpoints to all i386 native files
7989 using hardware watchpoints.
7990 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
7991 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
7992 * windows-nat.c (init_windows_ops): Ditto.
7993 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
7994 * config/i386/nm-cygwin64.h: Ditto.
7995 * config/i386/nm-fbsd.h: Ditto.
7996 * config/i386/nm-go32.h: Ditto.
7998 2009-02-19 Joel Brobecker <brobecker@adacore.com>
8000 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
8002 2009-02-18 Vladimir Prus <vladimir@codesourcery.com>
8004 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
8005 (mi_interpreter_init): Register the above.
8006 * solib.c (clear_solib): Notify solib unload.
8007 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
8008 disable breakpoints on a.out targets.
8010 2009-02-17 Vladimir Prus <vladimir@codesourcery.com>
8012 * observer.c (observer_test_first_notification_function)
8013 (observer_test_second_notification_function)
8014 (observer_test_third_notification_function): Adjust prototype.
8016 2009-02-17 Pedro Alves <pedro@codesourcery.com>
8018 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
8019 (ALL_TARGET_OBS): Add dicos-tdep.o.
8020 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
8021 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
8023 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
8025 * dicos-tdep.h, dicos-tdep.c: New.
8026 * amd64-dicos-tdep.c: New.
8027 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
8028 inferior.h. Include dicos-tdep.h.
8029 (i386_dicos_init_abi): Call dicos_init_abi.
8030 (i386_dicos_bfd_has_symbol_p): Delete.
8031 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
8033 * NEWS: Mention x86-64 DICOS target support.
8035 2009-02-16 Doug Evans <dje@google.com>
8037 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
8038 All callers updated.
8039 (amd64_get_insn_details): Handle more 3-byte opcode insns.
8040 (amd64_breakpoint_p): Delete.
8041 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
8042 don't back up pc to the start of the int3.
8043 * i386-tdep.c: #include opcode/i386.h.
8044 (i386_skip_prefixes): New function.
8045 (i386_absolute_jmp_p): Constify argument.
8046 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
8047 (i386_breakpoint_p): Delete.
8048 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
8049 When fixing up after stepping an int3, don't back up pc to the start
8052 2009-02-16 Pedro Alves <pedro@codesourcery.com>
8054 * corelow.c (core_close): Don't hardcode the core's pid.
8055 (core_open): Find core threads before calling
8056 post_create_inferior.
8057 (add_to_thread_list, get_core_register_section): Take into account
8058 systems where the regset section names encode the pid of the
8061 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
8062 * gdbarch.h, gdbarch.c: Regenerate.
8064 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
8065 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
8066 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
8067 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
8069 2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
8071 Include frame information for *stopped due to CLI commands.
8073 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
8074 * infcmd.c (finish_command_continuation): Pass '1' for
8075 'print_frame' parameter to the observer.
8076 * infrun.c (normal_stop): Don't print mi-specific information
8077 here. Pass 'stop_print_frame' to the 'print_frame' parameter
8079 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
8080 If we need to print frame, and current uiout is not the MI one,
8083 2009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
8085 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
8086 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
8088 2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8091 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
8092 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
8094 2009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
8096 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
8097 for DW_ATE_signed_char and DW_ATE_unsigned_char
8098 for pascal language.
8100 2009-02-11 Jim Meyering <meyering@redhat.com>
8101 Jan Kratochvil <jan.kratochvil@redhat.com>
8103 Avoid NULL dereference.
8104 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
8105 New variable func_type.
8107 2009-02-11 Pedro Alves <pedro@codesourcery.com>
8109 * gdbarch.c: Regenerate.
8111 2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
8113 * p-lang.c (is_pascal_string_type): Fix comment.
8114 Determine exact size of char elements for GPC
8116 (pascal_printstr): Handle char width of 2 or 4.
8117 * p-valprint.c (pascal_val_print): Handle char
8120 2009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
8122 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
8123 inside the loop. Only call addrmap_set_empty if the compilation unit
8124 had DW_AT_high_pc and DW_AT_low_pc. Update call to
8125 scan_partial_symbols.
8126 (scan_partial_symbols): Take NEED_PC argument and pass it along with
8128 (add_partial_namespace): Take NEED_PC argument and pass it through.
8129 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
8132 2009-02-07 Pedro Alves <pedro@codesourcery.com>
8134 * NEWS: Mention inspecting extra signal information, $_siginfo,
8135 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
8137 2009-02-07 Pedro Alves <pedro@codesourcery.com>
8139 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
8142 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8144 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
8145 (compat_timer_t, compat_clock_t, struct compat_timeval)
8146 (compat_sigval_t, compat_siginfo_t): New types.
8147 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
8148 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
8149 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
8150 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8151 (amd64_linux_siginfo_fixup): New.
8152 * linux-nat.c (linux_nat_siginfo_fixup): New.
8153 (siginfo_fixup): New.
8154 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
8155 siginfo layout expected by ptrace and the siginfo layout of the
8157 (linux_nat_set_siginfo_fixup): New.
8158 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
8160 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8162 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
8163 * infrun.c (siginfo_value_read, siginfo_value_write): New.
8164 (siginfo_value_funcs): New.
8165 (siginfo_make_value): New.
8166 (_initialize_infrun): Create the $_siginfo convenience variable.
8167 * gdbtypes.h (append_composite_type_field_aligned): Declare.
8168 * gdbtypes.c (append_composite_type_field): Rename to...
8169 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
8170 argument. Handle it.
8171 (append_composite_type_field): Rewrite on top of
8172 append_composite_type_field_aligned.
8173 * value.h (internalvar_make_value): New typedef.
8174 (struct internalvar) <make_value>: New field.
8175 (create_internalvar_type_lazy): Declare.
8176 * value.c (create_internalvar): Clear make_value.
8177 (create_internalvar_type_lazy): New.
8178 (value_of_internalvar): If make_value is set use it.
8179 (preserve_values): Skip internal variables that don't have a
8181 * gdbarch.sh (get_siginfo_type): New.
8182 * gdbarch.h, gdbarch.c: Regenerate.
8184 * linux-tdep.h, linux-tdep.c: New.
8185 * amd64-linux-tdep.c: Include "linux-tdep.h".
8186 (amd64_linux_init_abi): Register linux_get_siginfo_type and
8187 linux_get_siginfo_mapper.
8188 * i386-linux-tdep.c: Include "linux-tdep.h".
8189 (i386_linux_init_abi): Register linux_get_siginfo_type and
8190 linux_get_siginfo_mapper.
8191 * arm-linux-tdep.c: Include "linux-tdep.h".
8192 (i386_linux_init_abi): Register linux_get_siginfo_type and
8193 linux_get_siginfo_mapper.
8195 * linux-nat.c (linux_xfer_siginfo): New.
8196 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8197 * remote.c (PACKET_qXfer_siginfo_read)
8198 (PACKET_qXfer_siginfo_write): New.
8199 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
8200 "qXfer:siginfo:write" features.
8201 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8202 (_initialize_remote): Add "set/show remote read-siginfo-object"
8203 and "set/show remote write-siginfo-object" commands.
8205 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
8206 (HFILES_NO_SRCDIR): Add linux-tdep.h.
8207 (ALLDEPFILES): Add linux-tdep.c.
8209 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
8210 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
8213 2009-02-06 Jim Blandy <jimb@codesourcery.com>
8214 Daniel Jacobowitz <dan@codesourcery.com>
8215 Vladimir Prus <vladimir@codesourcery.com>
8216 Pedro Alves <pedro@codesourcery.com>
8218 * defs.h (enum lval_type): New value: lval_computed.
8219 * value.h (struct lval_funcs): New type.
8220 (allocate_computed_value, value_computed_funcs)
8221 (value_computed_closure): New declarations.
8222 * value.c (struct value): Add a structure to the location union
8223 for computed lvalues, containing 'funcs' and 'closure' members.
8224 (allocate_computed_value, value_computed_funcs)
8225 (value_computed_closure): New functions.
8226 (value_free): For computed lvalues, call the closure's
8227 'free_closure' function before freeing the value itself.
8228 (value_copy): If we're copying an lval_computed value, call the
8229 closure's 'copy_closure' function.
8230 (set_value_component_location): If the original value is a
8231 computed lvalue, then call the closure's 'copy_closure' function.
8232 (value_of_internalvar): If an internal variable's value is a
8233 computed lvalue, make retrieving its value produce an equivalent
8235 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
8236 their read function.
8237 (value_assign): Assign to computed lvalues by calling their write
8240 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8242 * linux-nat.c (linux_nat_wait): Adjust.
8243 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
8244 * linux-nat.h (thread_db_init): Delete declaration.
8245 * linux-thread-db.c (target_beneath): Delete.
8246 (thread_db_init): Delete.
8247 (thread_db_detach): Use find_target_beneath.
8248 (thread_db_wait): Adjust interface. Use find_target_beneath.
8249 (thread_db_mourn_inferior): Use find_target_beneath.
8250 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
8251 (thread_db_async_mask): Delete.
8252 (thread_db_pid_to_str): Adjust interface. Use
8253 find_target_beneath.
8254 (thread_db_get_thread_local_address): Adjust interface. Use
8255 find_target_beneath.
8256 (init_thread_db_ops): Delete references to delete functions.
8257 * target.c (update_current_target): Don't inherit or default
8258 to_wait. Don't inherit to_pid_to_str and
8259 to_get_thread_local_address.
8260 (target_translate_tls_address): Look for a pushed target that
8261 implements to_get_thread_local_address, and use it instead of
8262 checking for target_get_thread_local_address_p.
8263 (target_wait, target_pid_to_str): Reimplement as functions.
8264 (dummy_pid_to_str): New.
8265 (init_dummy_target): Register it.
8266 (debug_to_wait): Delete.
8267 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
8268 to_get_thread_local_address accept a pointer to struct target_ops.
8269 (target_wait): Delete macro, and declare as function.
8270 (target_pid_to_str): Likewise.
8271 (target_get_thread_local_address)
8272 (target_get_thread_local_address_p): Delete.
8273 (noprocess): Add NORETURN and ATTR_NORETURN tags.
8274 * inf-ptrace.c (inf_ptrace_wait): Adjust.
8275 (inf_ptrace_pid_to_str): New.
8276 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
8277 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
8278 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
8279 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
8281 * corelow.c (core_pid_to_str): Adjust.
8282 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
8283 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
8284 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
8285 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
8286 * hpux-thread.c (hpux_thread_wait): Adjust.
8287 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
8288 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
8289 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
8290 * procfs.c (procfs_pid_to_str): Adjust.
8291 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
8292 * remote-mips.c (mips_wait): Adjust.
8293 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
8294 * remote.c (remote_wait, remote_pid_to_str)
8295 (remote_get_thread_local_address): Adjust.
8296 * rs6000-nat.c (rs6000_wait): Adjust.
8297 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
8298 (sol_thread_wait, solaris_pid_to_str): Adjust.
8299 * spu-linux-nat.c (spu_child_wait): Adjust.
8300 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
8302 2009-02-06 Tom Tromey <tromey@redhat.com>
8304 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
8305 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
8306 (python-cmd.o): New target.
8307 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
8308 completer prototype.
8309 (add_cmd): Initialize destroyer member of cmd_list_element. Use
8310 make_symbol_completion_list_fn as completer.
8311 (delete_cmd): Call destroyer if one is set.
8312 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
8313 completer member. Add destroyer member.
8314 (set_cmd_completer): Add self parameter to
8315 completer prototype.
8316 * command.h (set_cmd_completer): Add cmd parameter to
8317 completer prototype.
8318 * completer.c (noop_completer, filename_completer,
8319 location_completer, expression_completer, command_completer): Adapt
8320 to new completer prototype.
8321 (complete_line_internal): Pass new parameter to completer function.
8322 * completer.h (noop_completer, filename_completer,
8323 location_completer, expression_completer, command_completer): Adapt
8324 prototypes to new completer prototype.
8325 * interps.c (interpreter_completer): Adapt to new completer
8327 * python/python-cmd.c: New file.
8328 * python/python-internal.h (gdbpy_initialize_commands): Add
8330 (gdbpy_doc_cst): Add forward declaration.
8331 * python/python.c (gdbpy_doc_cst): Declare.
8332 (_initialize_python): Call gdbpy_initialize_commands. Initialize
8334 * symtab.c (make_symbol_completion_list_fn): New function.
8335 * symtab.h (make_symbol_completion_list_fn): Add prototype.
8337 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8339 * target.c (target_get_osdata): Check for equal or higher than
8340 process_stratum, not dummy_stratum.
8342 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8344 * remote.c (extended_remote_can_run): Delete.
8345 (init_remote_ops): Don't register it.
8346 * target.c (target_get_osdata): Don't check for target_can_run.
8347 Instead any target that has already been pushed, otherwise
8348 fallback to the default run target.
8350 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8352 * target.c (target_create_inferior, target_detach)
8353 (target_mourn_inferior, target_attach, target_close): Do target
8355 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
8356 (debug_to_mourn_inferior, debug_to_close): Delete.
8357 (setup_target_debug): Adjust.
8359 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8361 * target.h (target_stopped_data_address_p): Delete declaration,
8362 and don't define as macro.
8363 * target.c (target_stopped_data_address_p): Delete.
8365 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8366 Tom Tromey <tromey@redhat.com>
8368 * python/python-utils.c (target_string_to_unicode): New function.
8369 * python/python-internal.h (target_string_to_unicode): New prototype.
8370 * python/python-value.c (valpy_string): New function.
8371 (value_object_methods): Add `string' entry.
8373 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8375 * target.h (target_tid_to_str): Delete.
8376 * thread.c (print_thread_info, thread_apply_all_command)
8377 (thread_apply_command, thread_command, do_captured_thread_select):
8378 Use target_pid_to_str instead of target_tid_to_str.
8379 * linux-fork.c (delete_fork_command): Likewise.
8381 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8383 * frame.c (has_stack_frames): Make public.
8384 (get_prev_frame): Don't allow a NULL this_frame anymore.
8385 * frame.h (has_stack_frames): Declare.
8386 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
8387 to get_prev_frame, instead start at get_current_frame.
8388 (varobj_create): Check has_stack_frames before getting any frame;
8389 eliminate one usage of deprecated_safe_get_selected_frame.
8391 2009-02-05 Tom Tromey <tromey@redhat.com>
8392 Thiago Jung Bauermann <bauerman@br.ibm.com>
8394 * python/python.c (GdbMethods): Move to bottom of file.
8395 (get_parameter, execute_gdb_command, gdbpy_write,
8396 gdbpy_flush): Remove forward declarations.
8397 (eval_python_from_control_command): Fix error checking of function
8398 PyRun_SimpleString. Fix error string.
8399 (python_command): Likewise.
8400 (execute_gdb_command): Added from_tty argument.
8402 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8404 * language.h (language_dfn): Add la_get_string member.
8405 (LA_GET_STRING): New macro.
8406 (default_get_string): New prototype.
8407 * language.c (default_get_string): New function.
8408 (unknown_language_defn, auto_language_defn, local_language_defn): Use
8409 default_get_string for la_get_string.
8410 * c-lang.c (c_get_string): New function.
8411 (c_language_defn, cplus_language_defn, asm_language_defn): Use
8412 c_get_string for la_get_string.
8413 (minimal_language_defn): Likewise
8414 * ada-lang.c (ada_language_defn): Likewise.
8415 * f-lang.c (f_language_defn): Use default_get_string for
8417 * jv-lang.c (java_language_defn): Likewise.
8418 * m2-lang.c (m2_language_defn): Likewise.
8419 * objc-lang.c (objc_language_defn): Likewise.
8420 * p-lang.c (p_language_defn): Likewise.
8421 * scm-lang.c (scm_language_defn): Likewise.
8422 * typeprint.c (type_to_string): New function.
8423 * value.h (type_to_string): New prototype.
8424 * valprint.c (val_print_string): Factor out code for reading string
8425 from the inferior into its own function. Put 2 spaces after period
8427 (read_string): New function.
8428 * valprint.h (read_string): New prototype.
8430 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
8431 Tom Tromey <tromey@redhat.com>
8433 PR breakpoints/8079:
8434 * breakpoint.c (print_one_breakpoint): Use exp_string field
8435 to display expression of watchpoints.
8436 (mention): Likewise.
8437 (watch_command_1): Remove trailing whitespace from expression.
8438 * printcmd.c (struct display) <exp_string>: New field.
8439 (display_command): Set exp_string.
8440 (free_display): Free exp_string.
8441 (clear_displays): Use free_display.
8442 (do_one_display): Print exp_string.
8443 (display_info): Likewise.
8445 2009-02-04 Tom Tromey <tromey@redhat.com>
8446 Thiago Jung Bauermann <bauerman@br.ibm.com>
8447 Phil Muldoon <pmuldoon@redhat.com>
8449 * python/python-internal.h (gdbpy_get_value_from_history): Rename
8450 prototype to gdbpy_history.
8451 (gdbpy_is_string): Declare.
8452 (python_string_to_host_string): Declare.
8453 * python/python-utils.c (gdbpy_is_string): New function.
8454 (unicode_to_encoded_string): New function.
8455 (unicode_to_target_string): Use it.
8456 (python_string_to_host_string): New function.
8457 * python/python-value.c (valpy_address): New function.
8458 (convert_value_from_python): Use gdbpy_is_string. Change to throw
8459 Python exception instead of a GDB exception on error. Properly check
8461 (valpy_getitem): Convert field name to host string. Handle array
8462 accesses. Adapt to new behaviour of convert_value_from_python.
8463 (valpy_new): Adapt to new behaviour of convert_value_from_python.
8464 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
8465 VALPY_BITXOR, VALPY_BITOR>: New constants.
8466 (valpy_binop): Update. Adapt to new behaviour of
8467 convert_value_from_python.
8468 (valpy_invert): New function.
8469 (valpy_lsh): Likewise.
8470 (valpy_rsh): Likewise.
8471 (valpy_and): Likewise.
8472 (valpy_or): Likewise.
8473 (valpy_xor): Likewise.
8474 (valpy_richcompare): Call convert_value_from_python instead of doing
8476 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
8477 (gdbpy_get_value_from_history): Rename
8478 function to gdbpy_history.
8479 (gdbpy_initialize_values): Don't set tp_new.
8480 (value_object_type): Add valpy_new.
8481 (value_object_methods): Add `address' entry.
8482 (value_object_as_number): Update for new methods.
8483 * python/python.c (GdbMethods): Rename entry from
8484 `get_value_from_history' to `history'.
8486 2009-02-04 Jerome Guitton <guitton@adacore.com>
8488 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
8489 of type to guard against a crash.
8491 2009-02-04 Jerome Guitton <guitton@adacore.com>
8493 * value.c (value_from_contents_and_address): Always return
8494 a lval_memory value, even if address is null.
8496 2009-02-04 Tristan Gingold <gingold@adacore.com>
8498 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
8499 (amd64_darwin_sigcontext_addr): Ditto.
8500 (darwin_dwarf_signal_frame_p): Ditto.
8501 (i386_darwin_init_abi): Handle signal frames, use the const for
8503 (x86_darwin_init_abi_64): Ditto.
8505 2009-02-04 Tristan Gingold <gingold@adacore.com>
8507 * i386-tdep.c (i386_sigtramp_p): Make it public.
8508 * i386-tdep.h (i386_sigtramp_p): Declare.
8510 2009-02-04 Tristan Gingold <gingold@adacore.com>
8512 * machoread.c (macho_symfile_read): Read minsymtab also from
8514 (macho_symfile_read): Try to read dwarf2 frame info from main
8515 object file, but not from OSO files.
8516 (macho_symfile_offsets): Update section names for latest BFD
8518 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
8519 (x86_darwin_init_abi_64): Ditto.
8520 * solib-darwin.c: New file.
8521 * solib-darwin.h: New file.
8522 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
8524 2009-02-04 Tristan Gingold <gingold@adacore.com>
8526 * solist.h (struct target_so_ops): Comment fallback behavior for
8529 2009-02-03 Tom Tromey <tromey@redhat.com>
8531 * completer.c (add_struct_fields): Check type_name against NULL
8534 2009-02-03 Joel Brobecker <brobecker@adacore.com>
8536 * MAINTAINERS: Update Elena's email address.
8538 2009-02-02 Joel Brobecker <brobecker@adacore.com>
8540 * breakpoint (update_watchpoint): Minor comment adjustment.
8542 2009-02-02 Tom Tromey <tromey@redhat.com>
8545 * completer.c (count_struct_fields): Count method names.
8546 (add_struct_fields): Add matching method names.
8548 2009-02-02 Doug Evans <dje@google.com>
8550 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
8551 doing any further tcl/tk configury. Don't configure gdbtk if
8552 tcl or tk check fails.
8553 * aclocal.m4: Regenerate.
8554 * configure: Regenerate.
8556 2009-02-02 Tom Tromey <tromey@redhat.com>
8559 * valops.c (find_overload_match): Follow typedefs before taking
8560 address of object argument.
8562 2009-02-01 Doug Evans <dje@google.com>
8564 * target.h (target_waitstatus_to_string): Declare.
8565 * target.c (target_waitstatus_to_string): New function. Copied from
8566 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
8567 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
8568 TARGET_WAITKIND_NO_HISTORY.
8569 (debug_to_wait): Call it.
8570 * infrun.c (wait_for_inferior): If debug_infrun, print result of
8572 (fetch_inferior_event): Ditto.
8574 2009-01-30 Tom Tromey <tromey@redhat.com>
8576 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
8578 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8581 * thread.c (do_captured_list_thread_ids): Report the current
8584 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8586 * breakpoint.c (create_breakpoint, create_breakpoints)
8587 (break_command_really, set_breakpoint): New parameter enabled.
8588 (create_breakpoint, break_command_really): Make breakpoint
8589 disabled if so requested.
8590 * breakpoint.h (set_breakpoint): New parameter enabled.
8591 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
8593 2009-01-28 Doug Evans <dje@google.com>
8595 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
8596 (amd64_displaced_step_fixup): Declare.
8597 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
8598 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
8599 and make static global.
8600 (amd64_arch_regmap_len): New static global.
8601 (amd64_arch_reg_to_regnum): New function.
8602 (struct amd64_insn): New struct.
8603 (struct displaced_step_closure): New struct.
8604 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
8605 (rex_prefix_p,skip_prefixes)
8606 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
8607 (amd64_insn_length,amd64_get_unused_input_int_reg)
8608 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
8609 (amd64_displaced_step_copy_insn)
8610 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
8611 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
8612 (amd64_displaced_step_fixup): New functions.
8613 * amd64-linux-tdep.c: #include arch-utils.h.
8614 (amd64_linux_init_abi): Install displaced stepping support.
8616 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
8617 Jerome Guitton <guitton@adacore.com>
8619 * configure, config.in: Regenerated.
8620 * configure.ac: Add --with-system-gdbinit.
8621 * main.c (get_init_files): New.
8622 (captured_main): Use get_init_files. Load system gdbinit before
8624 (print_gdb_help): Print location of init files.
8626 2009-01-28 Pedro Alves <pedro@codesourcery.com>
8628 * corefile.c (generic_search): Delete disabled code.
8629 * gdbcore.h (generic_search): Delete declaration.
8631 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8633 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
8634 parent to the child.
8635 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
8636 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
8637 remove_breakpoints to remove breakpoints from the parent.
8639 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8641 PR backtrace/9458, PR backtrace/8864:
8642 * frame.c (create_new_frame): Update the frame's cached PC before
8643 finding its unwinder. Use frame_id_build to build the new frame's
8645 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
8646 array values from the ``args'' array values.
8648 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8650 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
8651 (create_array_type, create_set_type, init_flags_type)
8652 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
8653 with a call to XZALLOC or XCALLOC, and pairs of calls to
8654 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
8656 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8658 Add "maint set|show internal-error|internal-warning quit|corefile
8659 ask|yes|no" commands.
8662 * utils.c (internal_problem_ask, internal_problem_yes)
8663 (internal_problem_no, internal_problem_modes): New.
8664 (struct internal_problem): Remove FIXME. Make should_quit and
8665 should_dump_core types to char *.
8666 (internal_vproblem, internal_error_problem)
8667 (internal_warning_problem): Adjust.
8668 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
8670 (add_internal_problem_command): New.
8671 (_initialize_utils): New.
8673 2009-01-25 Pedro Alves <pedro@codesourcery.com>
8675 * infcmd.c (program_info): Use paddress instead of casting stop_pc
8678 2009-01-24 Pedro Alves <pedro@codesourcery.com>
8680 * infrun.c (normal_stop): Don't call
8681 deprecated_update_frame_pc_hack.
8682 * frame.c (deprecated_update_frame_pc_hack)
8683 (deprecated_update_frame_base_hack): Delete, and ...
8684 (create_new_frame): ... inline here.
8685 * frame.h (deprecated_update_frame_pc_hack)
8686 (deprecated_update_frame_base_hack): Delete declarations.
8688 2009-01-23 Pedro Alves <pedro@codesourcery.com>
8690 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
8691 * cli/cli-setshow.c (do_setshow_command): Handle it.
8692 * command.h (enum var_types): Add var_zuinteger.
8693 (add_setshow_zuinteger_cmd): Declare.
8695 * valprint.c (_initialize_valprint): Change the set input-radix
8696 and set output-radix commands to zuinteger type.
8698 2009-01-23 Pedro Alves <pedro@codesourcery.com>
8701 * infrun.c (normal_stop): Tag threads as stopped, and run the
8702 hook-stop before printing the stack frame.
8704 2009-01-22 Pedro Alves <pedro@codesourcery.com>
8707 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
8710 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
8712 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
8715 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
8718 * infcmd.c (signal_command): Do not specify a resume PC.
8720 2009-01-19 Doug Evans <dje@google.com>
8722 * dummy-frame.c (dummy_frame): Replace regcache member with
8724 (dummy_frame_push): Replace caller_regcache arg with caller_state.
8725 All callers updated.
8726 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
8727 (dummy_frame_pop): Rewrite. Verify requested frame is in the
8728 dummy frame stack. Restore program state.
8729 (cleanup_dummy_frames): Rewrite.
8730 (dummy_frame_sniffer): Update. Make static.
8731 * dummy-frame.h (regcache,frame_info): Delete forward decls.
8732 (inferior_thread_state): New forward decl.
8733 (dummy_frame_push): Update prototype.
8734 * frame.c (frame_pop): dummy_frame_pop now does all the work for
8736 * infcall.c (breakpoint_auto_delete_contents): Delete.
8737 (get_function_name,run_inferior_call): New fns.
8738 (call_function_by_hand): Simplify by moving some code to
8739 get_function_name, run_inferior_call. Inferior function call wrapped
8740 in TRY_CATCH so there's less need for cleanups and all exits from
8741 proceed are handled similarily. Detect program exit.
8742 Detect program stopping in a different thread.
8743 Make error messages more consistent.
8744 * inferior.h (inferior_thread_state): Declare (opaque type).
8745 (save_inferior_thread_state,restore_inferior_thread_state,
8746 make_cleanup_restore_inferior_thread_state,
8747 discard_inferior_thread_state, get_inferior_thread_state_regcache):
8749 (save_inferior_status): Update prototype.
8750 * infrun.c: (normal_stop): When stopped for the completion of an
8751 inferior function call, verify the expected stack frame kind.
8752 (inferior_thread_state): New struct.
8753 (save_inferior_thread_state,restore_inferior_thread_state,
8754 do_restore_inferior_thread_state_cleanup,
8755 make_cleanup_restore_inferior_thread_state,
8756 discard_inferior_thread_state,
8757 get_inferior_thread_state_regcache): New functions.
8758 (inferior_status): Move stop_signal, stop_pc, registers to
8759 inferior_thread_state. Remove restore_stack_info.
8760 (save_inferior_status): Remove arg restore_stack_info.
8761 All callers updated. Remove saving of state now saved by
8762 save_inferior_thread_state.
8763 (restore_inferior_status): Remove restoration of state now done by
8764 restore_inferior_thread_state.
8765 (discard_inferior_status): Remove freeing of registers, now done by
8766 discard_inferior_thread_state.
8768 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8770 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
8771 at a time, times NUM_TO_SCROLL.
8772 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
8773 fetch the selected frame if there is no stack.
8775 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8778 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
8780 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
8781 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
8782 is thrown while handling an event, finish the thread state.
8783 (normal_stop): Use finish_thread_state cleanup.
8784 * infcmd.c (run_command_1): If an error is thrown while starting
8785 the inferior, finish the thread state.
8787 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8789 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
8790 skip breakpoints without a location (pending breakpoints).
8792 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8795 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
8797 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
8799 * thread.c (thread_command): Move call to annotate_thread_changed
8801 (do_captured_thread_select): ... here, to avoid printing an
8802 annotation if the thread change generates an exception.
8804 2009-01-16 Joel Brobecker <brobecker@adacore.com>
8806 * NEWS: Document x86_64/MinGW as a new native configuration.
8808 2009-01-16 Joel Brobecker <brobecker@adacore.com>
8810 * NEWS: Move the documentation of "info os processes" to
8811 the appropriate section (documenting the new commands).
8813 2009-01-15 Doug Evans <dje@google.com>
8815 * target.h (target_signal_to_string): Make return type const char *.
8816 (target_signal_to_name): Ditto.
8817 (target_signal_from_name): Make arg const char *.
8818 * infrun.c (sig_print_info): Update.
8819 * signals/signals.c (signals): Make array and struct members const.
8820 (target_signal_to_string): Make return type const char *.
8821 (target_signal_to_name): Ditto.
8822 (target_signal_from_name): Make arg const char *.
8824 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8825 Tristan Gingold <gingold@adacore.com>
8827 * solist.h (struct target_so_ops): New member bfd_open.
8828 (solib_find): Add prototype.
8829 (solib_bfd_fopen): Add prototype.
8830 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
8831 from solib_bfd_open.
8832 (solib_bfd_open): Use ops->bfd_open override if present. Call
8833 solib_find and solib_bfd_open otherwise.
8835 * objfiles.h (OBJF_KEEPBFD): New define.
8836 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
8837 objfile flag is set.
8838 * solib.c (symbol_add_stub): Do not allocate second BFD for
8839 shared library; use OBJF_KEEPBFD flag on solib objfile.
8841 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8843 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
8845 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8847 * value.h (address_of_variable): Add prototype.
8848 (locate_var_value): Remove prototype.
8850 * findvar.c (read_var_value): Do not attempt to default frame
8852 (locate_var_value): Remove function.
8853 * valops.c (value_of_variable): Retrieve selected frame for
8854 symbols that require a frame when called with NULL block.
8855 * valops.c (address_of_variable): New function.
8857 * eval.c (evaluate_subexp_for_address): Call address_of_variable
8858 instead of calling locate_var_value.
8859 (evaluate_subexp_with_coercion): Likewise.
8861 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
8863 * NEWS: Document "define" for prefixed commands.
8864 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
8865 show_user_1 for prefix commands.
8866 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
8867 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
8868 commands. Return the containing command list.
8869 (define_command, document_command): Update to handle prefix commands.
8870 (show_user_1): Add prefix and name arguments. Handle prefix
8872 * cli/cli-script.h (show_user_1): Update prototype.
8874 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
8876 * ser-mingw.c (console_select_thread): Add return to make
8878 (pipe_select_thread): Likewise.
8879 (file_select_thread): Likewise.
8881 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8883 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
8886 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8888 * remote.c (extended_remote_mourn_1): Invalidate our notion of
8889 current general thread.
8891 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8893 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
8894 without a live selected thread.
8896 2009-01-14 Joel Brobecker <brobecker@adacore.com>
8898 Update the copyright notice of some of the files I missed
8899 in the previous copyright update.
8901 2009-01-14 Joel Brobecker <brobecker@adacore.com>
8903 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
8904 base address instead of casting it to DWORD.
8906 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
8908 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
8909 for NULL frame pointers.
8911 2009-01-13 Mark Kettenis <kettenis@gnu.org>
8913 * utils.c (host_address_to_string): Reimplement in a way that
8914 avoids the cast of the address to long.
8916 2009-01-13 Joel Brobecker <brobecker@adacore.com>
8918 * mdebugread.c (parse_symbol): Save the symbol private data
8919 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
8920 (psymtab_to_symtab_1): Likewise.
8921 (parse_procedure): Declare variable "e" only in the scope
8922 where it is used. Extract the symbol private data using
8925 2009-01-13 Jim Blandy <jimb@codesourcery.com>
8927 Abstract out common code for copying value locations.
8929 * value.h (set_value_component_location): New declaration.
8930 * value.c (set_value_component_location): New function.
8931 (value_primitive_field): Use it.
8932 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
8933 * valops.c (search_struct_field, value_slice): Same.
8934 * ada-lang.c (coerce_unspec_val_to_type)
8935 (ada_value_primitive_packed_val): Same.
8937 2009-01-13 Joel Brobecker <brobecker@adacore.com>
8939 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
8941 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
8943 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
8945 * i386-cygwin-tdep.c: Ditto.
8946 * i386-windows-nat.c: Ditto.
8947 * windows-nat.h: Ditto.
8948 * windows-tdep.c: Ditto.
8949 * windows-tdep.h: Ditto.
8950 * windows-nat.c: Ditto.
8951 (cygwin_load_start): Redefine as CORE_ADDR.
8952 (cygwin_load_end): Ditto.
8953 (windows_make_so): Coerce result of address arithmetic to uintptr_t
8954 before coercing to CORE_ADDR to avoid a compiler warning.
8955 (handle_exception): Define addr as CORE_ADDR and coerce
8956 ExceptionAddress to uintptr_t before assigining to avoid a compiler
8958 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
8961 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8963 Fix linking with --enable-targets=all:
8964 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
8965 (HFILES_NO_SRCDIR): Add windows-tdep.h.
8966 (ALLDEPFILES): Add windows-tdep.c.
8968 2009-01-11 Chris Faylor <me.gdb@cgf.cx>
8970 * win32-nat.h: Delete.
8971 * windows-nat.h: Rename from win32-nat.h.
8972 * win32-nat.c: Delete.
8973 * windows-nat.c: Rename from win32-nat.c.
8974 * win32-termcap.c: Delete.
8975 * windows-termcap.c: Rename from win32-termcap.c.
8976 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
8977 * configure.ac: Handle rename from win32-termcap.c ->
8979 * configure: Regenerate.
8980 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
8981 -> windows-termcap.c.
8982 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
8984 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
8985 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
8987 (win32_make_so): Handle cygwin compiler warning due to change of
8988 load_addr from DWORD to LPVOID.
8989 (handle_load_dll): Use %p in format string to properly print address
8990 and avoid a compiler warning.
8991 (DEBUG_EXCEPTION_SIMPLE): Ditto.
8992 (handle_exception): Ditto.
8993 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
8994 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
8996 * config/i386/mingw.mh: Ditto.
8997 * config/i386/mingw64.mh: Ditto.
8999 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
9001 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
9002 arrayprint_recurse_level to a parameter. Update all the callers. New
9003 comment at autovariables.
9005 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
9007 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
9010 2009-01-11 Joel Brobecker <brobecker@adacore.com>
9012 * target.c (target_xfer_partial): Use host_address_to_string to
9013 print the address of readbuf and writebuf. Cast the address of
9014 elements inside the myaddr buffer into intptr_t.
9015 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
9016 Cast the address of elements inside the myaddr buffer into
9019 2009-01-11 Joel Brobecker <brobecker@adacore.com>
9021 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
9022 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
9023 * configure.host, configure.tgt: Add handling for x86_64/windows.
9024 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
9025 and amd64-windows-tdep.c.
9027 2009-01-11 Joel Brobecker <brobecker@adacore.com>
9029 * win32-tdep.h, win32-tdep.c: New files.
9030 * i386-cygwin-tdep.h: Delete.
9031 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
9033 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
9034 * win32-nat.c: Likewise.
9035 * configure.tgt: Add win32-tdep.o to the list of target object
9036 files for i386-cygwin and i386-mingw targets.
9038 2009-01-11 Joel Brobecker <brobecker@adacore.com>
9040 * win32-nat.h: New file.
9041 * win32-nat.c (mappings): Initialize to NULL.
9042 (win32_set_context_register_offsets): New function.
9043 * i386-windows-nat.c: New file.
9044 (mappings): Moved here from win32-nat.c.
9045 (_initialize_i386_windows_nat): New function.
9046 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
9047 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
9049 2009-01-09 Andreas Schwab <schwab@suse.de>
9051 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
9053 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
9055 * gdbtypes.c (append_composite_type_field): Correct the location of
9058 2009-01-09 Pedro Alves <pedro@codesourcery.com>
9060 * defs.h (deprecated_error_hook): Delete declaration.
9061 * interps.c (clear_interpreter_hooks): Adjust.
9062 * remote-sim.c (gdb_os_error): Don't try to call
9063 deprecated_error_hook. No need to call exit anymore.
9064 * top.c (deprecated_error_hook): Delete.
9066 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9068 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
9069 to print the address of the gdbarch pointer.
9071 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9073 * gdbarch.sh: Fix all the compilation errors on amd64-windows
9074 due to casting a pointer to a long when printing a function
9075 address. Instead, use host_address_to_string to convert our
9076 address to a string.
9077 * gdbarch.c: Regenerate.
9079 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9081 * event-top.c (async_disconnect, async_stop_sig): use "raise"
9082 instead of "kill" to raise a signal.
9084 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9086 * win32-nat.c (get_module_name): Change the type of parameter
9087 "base_address" to LPVOID. Remove unnecessary cast.
9088 (struct lm_info): Change type of load_addr to LPVOID.
9089 (win32_make_so): Change the type of parameter "load_addr"
9090 to LPVOID. Remove some unnecessary casts.
9091 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
9092 (win32_xfer_shared_libraries): Add missing cast.
9094 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9096 * win32-nat.c (has_detach_ability, set_process_privilege):
9097 Cast the result of GetProcAddress to (void *) to avoid
9098 a compilation warning.
9100 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9102 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
9105 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9107 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
9108 definition of local variable "done".
9109 (info_w32_command, handle_exception): Remove unnecessary cast.
9111 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9113 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
9114 DebugSetProcessKillOnExit. Update all uses in this file.
9115 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
9116 Update all uses in this file.
9118 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9120 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
9121 and use it when pushing the target.
9122 (win32_attach, win32_create_inferior): Update call to
9123 do_initial_win32_stuff.
9124 (win32_detach, win32_mourn_inferior): Use our ops parameter
9125 instead of the global win32_ops to unpush the target.
9127 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9129 * ser-mingw.c (ser_windows_open): Use proper type when casting
9130 in call to _open_osfhandle.
9132 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
9134 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
9136 2009-01-09 Joel Brobecker <brobecker@adacore.com>
9138 * CONTRIBUTE: Minor reformatting.
9140 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
9142 * MAINTAINERS: Add myself to Write After Approval.
9143 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
9146 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
9148 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
9149 Call exit to make it obvious to GCC.
9151 2009-01-08 Tom Tromey <tromey@redhat.com>
9153 PR breakpoints/9350:
9154 * varobj.c (varobj_invalidate): Unconditionally free
9156 * symfile.c (syms_from_objfile): Free local_addr when returning
9158 * exec.c (exec_file_attach): Do cleanups before returning.
9159 (exec_file_command): Likewise.
9160 * corefile.c (reopen_exec_file): Do cleanups before returning.
9161 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
9163 (do_vec_free): New function.
9164 (update_global_location_list): Make a cleanup for old_locations.
9165 Do cleanups before returning. Remove unused variable 'e'.
9166 (find_condition_and_thread): Free result of parsing the
9168 (print_it_typical): Do cleanups before returning.
9169 (breakpoint_re_set_one): Always free sals.sals.
9171 2009-01-08 Joel Brobecker <brobecker@adacore.com>
9172 Emi Suzuki <emi-suzuki@tjsys.co.jp>
9174 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
9177 2009-01-07 Doug Evans <dje@google.com>
9179 * top.c (gdb_prompt_string): Delete, unused.
9181 2009-01-07 Pedro Alves <pedro@codesourcery.com>
9183 Delete ONE_PROCESS_WRITETEXT leftovers.
9185 * breakpoint.c (insert_bp_location): Delete process_warning
9187 (insert_breakpoint_locations): Adjust.
9188 (reattach_breakpoints): Adjust.
9189 * infrun.c (normal_stop): Drop "It might be running in another
9192 2009-01-07 Stan Shebs <stan@codesourcery.com>
9194 * config/pa/linux.mh (XDEPFILES): Remove.
9196 2009-01-07 Doug Evans <dje@google.com>
9198 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
9200 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9202 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
9203 spacing, a regression from 2008-04-22.
9205 2009-01-07 Joel Brobecker <brobecker@adacore.com>
9207 * utils.c (gdb_print_host_address): Adjust implementation to
9208 reuse host_address_to_string. Move comment explaining the conversion
9209 from host address to string from here...
9210 (host_address_to_string): ... to there.
9212 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
9214 * MAINTAINERS: Add myself for write after approval privileges.
9216 2009-01-06 Tom Tromey <tromey@redhat.com>
9218 * value.c (set_internalvar): Use value_free, not xfree.
9220 2009-01-06 Jim Blandy <jimb@red-bean.com>
9222 Check return values of functions declared with warn_unused_result
9223 attribute in GLIBC 2.8.
9224 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
9225 * inflow.c (check_syscall): New function.
9226 (new_tty): Use check_syscall to check return values from open and dup.
9227 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
9228 * main.c (captured_main): Call cwd after setting up gdb_stderr;
9229 check for errors from getcwd.
9230 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
9231 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
9232 (stdio_file_fputs): Same.
9233 * utils.c (internal_vproblem): abort if last-ditch error message
9236 * top.c (gdb_init): Don't set the current directory here; that's
9237 already been done in captured_main.
9239 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
9241 * ser-tcp.c: Adjust includes.
9242 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
9243 (tcp_auto_retry, tcp_retry_limit): Declare.
9244 (TIMEOUT): Remove, in favor of tcp_retry_limit.
9245 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
9246 (wait_for_connect): New function.
9247 (net_open): Use it. Add auto-retry logic.
9248 (set_tcp_cmd, show_tcp_cmd): New functions.
9249 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
9250 and "set/show tcp connect-timeout" commands.
9251 * NEWS: Document new commands.
9253 2009-01-05 Tom Tromey <tromey@redhat.com>
9255 * python/python-internal.h (Py_ssize_t): Define as int.
9257 2009-01-05 Jim Blandy <jimb@red-bean.com>
9259 * MAINTAINERS: Fix my e-mail address as steering committee member.
9261 2009-01-03 Joel Brobecker <brobecker@adacore.com>
9263 Updated copyright notices for most files.
9265 2009-01-03 Joel Brobecker <brobecker@adacore.com>
9267 * top.c (print_gdb_version): Update copyright year.
9269 2009-01-03 Joel Brobecker <brobecker@adacore.com>
9271 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
9273 2009-01-01 Pedro Alves <pedro@codesourcery.com>
9275 PR breakpoints/9681:
9276 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
9277 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
9278 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
9279 retrow all other exceptions.
9281 For older changes see ChangeLog-2008.
9287 version-control: never