1 2009-07-23 Paul Pluzhnikov <ppluzhnikov@google.com>
3 * symtab.c (search_symbols): Add QUIT.
5 2009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
7 * symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.
9 2009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
11 * objfiles.h (objfiles_changed): New prototype.
12 * objfiles.c (objfiles_updated_p): Rename to objfiles_changed_p.
13 (allocate_objfile, free_objfile): Must rebuild section map.
14 (objfile_relocate): Likewise.
15 (update_section_map, find_pc_section): Adjust.
16 (set_objfiles_updated_on_exe_change): Remove.
17 (set_objfiles_updated_on_solib_activity): Remove.
18 (_initialize_objfiles): Remove.
19 (objfiles_changed): New function.
20 * symfile.c (reread_symbols): Call objfiles_changed.
22 2009-07-22 Hui Zhu <teawater@gmail.com>
24 * record.c (record_xfer_partial): Call error When nquery
27 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
29 * objfiles.c (objfiles_updated_p): New variable.
30 (qsort_cmp, bsearch_cmp, update_section_map): New function.
31 (find_pc_section): Use bsearch.
32 (set_objfiles_updated_on_exe_change): New function.
33 (set_objfiles_updated_on_solib_activity): New function.
34 (_initialize_objfiles): New function.
36 2009-07-21 Michael Eager <eager@eagercon.com>
38 * features/rs6000/powerpc-405.xml: New.
39 * rs6000-tdep.c: Add include & initialize for
40 powerpc-405.c, add 405 to variants.
41 * features/rs6000/powerpc-405.c: Generate.
43 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
45 * utils.c (internal_vproblem): Always print failure message.
47 2009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
48 Vladimir Prus <vladimir@codesourcery.com>
50 * valops.c (value_fetch_lazy): Handle bitfields explicitly.
51 (value_assign): Remove unnecessary FIXME. Honor the container
52 type of bitfields if possible.
53 * value.c (struct value): Add parent field.
54 (value_parent): New function.
55 (value_free): Free the parent also.
56 (value_copy): Copy the parent also.
57 (value_primitive_field): Do not read the contents of a lazy
58 value to create a child bitfield value. Set bitpos and offset
59 according to the container type if possible.
60 (unpack_bits_as_long): Rename from unpack_field_as_long. Take
61 field_type, bitpos, and bitsize instead of type and fieldno.
62 (unpack_field_as_long): Use unpack_bits_as_long.
63 * value.h (value_parent, unpack_bits_as_long): New prototypes.
65 2009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
67 * value.c (struct value): Add reference_count field.
68 (allocate_value_lazy): Initialize reference_count.
69 (value_incref): New function.
70 (value_free): Check the reference count.
71 * value.h (value_incref): New prototype.
73 2009-07-20 Marc Khouzam <marc.khouzam@ericsson.com>
75 * utils.c (defaulted_query): Update comment and remove dead code.
77 2009-07-20 Doug Evans <dje@google.com>
79 Add support for "comdat types" from DWARF4.
80 * dwarf2read.c (dwarf2_per_objfile): New member types,
82 (TYPES_SECTION): New macro.
83 (dwarf2_per_cu_data): Change size of length field from 30 bits
84 to 29 bits. New member from_debug_types.
85 (signatured_type): New struct.
86 (struct attribute): New union member signatured_type.
87 (DW_SIGNATURED_TYPE): New macro.
88 (dwarf2_attr_no_follow): New function.
89 (read_type_unit_scope): New function.
90 (follow_die_ref_or_sig, follow_die_sig): New functions.
91 (dwarf2_locate_sectoins): Handle .debug_types.
92 (dwarf2_build_psymtabs): Read .debug_types.
93 (read_type_comp_unit_head): New function.
94 (hash_type_signature, eq_type_signature): New functions.
95 (create_debug_types_hash_table): New function.
96 (lookup_signatured_type): New function.
97 (process_psymtab_comp_unit): Handle type units too.
98 (process_type_comp_unit, build_type_psymtabs): New functions.
99 (dwarf2_build_psymtabs_hard): Call build_type_psymtabs.
100 (load_partial_comp_unit): Assert not called for a type unit.
101 (skip_one_die): Handle DW_FORM_sig8.
102 (queue_comp_unit): Don't call load_full_comp_unit here, or
103 update read_in_chain.
104 (psymtab_to_symtab_1): Call read_signatured_type_at_offset for
105 type units, or load_full_comp_unit for comp units after
106 queue_comp_unit returns.
107 (load_full_comp_unit): Assert not called for type units.
108 (load_full_comp_unit): Update read_in_chain here.
109 (process_die): Handle DW_TAG_type_unit.
110 (read_structure_type): Look for signatured types.
111 (read_enumeration_type): Ditto.
112 (init_cu_die_reader): Handle .debug_types.
113 (read_comp_unit): Assert hash not computed yet.
114 (read_die_and_children): Expand debugging printf to handle .debug_types.
115 (read_partial_die): Handle DW_TAG_type_unit:
116 (find_patial_die): Handle .debug_types.
117 (read_attribute_value): Handle DW_FORM_sig8.
118 (die_type): Call follow_die_ref_or_sig instead of follow_die_ref.
119 (die_containing_type): Ditto.
120 (dwarf_tag_name): Handle DW_TAG_type_unit.
121 (dwarf_attr_name): Handle DW_AT_signature.
122 (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
123 DW_FORM_flag_present, DW_FORM_sig8.
124 (dump_die_shallow): Handlel DW_FORM_sig8.
125 (maybe_queue_comp_unit): Change return type to int from void.
127 (follow_die_ref): Handle .debug_types.
128 (lookup_signatured_type_at_offset): New function.
129 (read_signatured_type_at_offset): New function.
130 (read_signatured_type): New function.
132 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
134 * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT
135 if the macro is defined.
137 2009-07-20 Pedro Alves <pedro@codesourcery.com>
139 * features/gdb-target.dtd (target): Accept an optional 'osabi'
141 (osabi): Define element.
142 * features/mips-linux.xml (target): Add an osabi subelement set to
144 * regformats/regdat.sh (xmlarch, xmlosabi): New variables. Don't
145 write the architecture into $xmltarget. Store it in $xmlarch.
146 Handle the 'osabi' type. Handle outputting the osabi element of
147 the target description.
148 * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
149 * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
151 * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
152 * target-descriptions.c (struct target_desc) <osabi>: New field.
153 (tdesc_osabi): New function.
154 (set_tdesc_osabi): New function.
155 * xml-tdesc.c: Include osabi.h.
156 (tdesc_end_osabi): New.
157 (target_children): Parse "osabi" elements.
158 * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
159 target description if the user didn't override it or it is not
160 extractable from the bfd. If that still fails, fallback to the
161 configured in default.
162 * osabi.h (osabi_from_tdesc_string): Declare.
163 * osabi.c (osabi_from_tdesc_string): New.
164 (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
167 * NEWS: Mention that target descriptions can now describe the
170 2009-07-20 Mike Frysinger <vapier@gentoo.org>
172 * configure.ac (AC_CHECK_FUNCS): Check for pipe.
173 * config.in, configure: Regenerate.
174 * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
176 2009-07-20 Pedro Alves <pedro@codesourcery.com>
178 * gnu-nat.c: Include "inf-child.h".
179 (gnu_mourn_inferior): Use the passed in target_ops
180 instead of the gnu_ops global.
181 (gnu_create_inferior): Inline `attach_to_child', use the passed in
182 target_ops instead of the gnu_ops global.
183 (gnu_can_run): Delete.
184 (gnu_attach): Use the passed in target_ops instead of the gnu_ops
187 (gnu_prepare_to_store, gnu_open): Delete.
188 (gnu_store_registers, gnu_fetch_registers): Delete declarations.
190 (init_gnu_ops): Delete.
192 (_initialize_gnu_nat): Don't call init_gnu_ops or add_target here.
193 * gnu-nat.h (gnu_target): Declare.
194 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Make
196 (_initialize_i386gnu_nat): New.
198 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
200 * dwarf2loc.c (find_location_expression): Retrieve beginning and
201 ending address offsets in location list entries as integers,
204 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
206 * infrun.c (wait_for_inferior): Invalidate registers and overlay
207 cache every time before calling target_wait.
208 (handle_inferior_event): Make static. Always reset waiton_ptid.
209 Never call registers_changed.
210 (prepare_to_wait): Do not invaliate registers or overlay cache
211 (moved to wait_for_inferior). Do not reset waiton_ptid (moved
212 to handle_inferior_event).
213 (fetch_inferior_event): Remove check for always-true condition.
215 2009-07-20 Thomas Schwinge <tschwinge@gnu.org>
217 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Adjust to
218 2009-02-23 target_ops changes.
220 2009-07-18 Michael Snyder <msnyder@vmware.com>
222 * infrun.c (handle_inferior_event): Remove an execution_direction
223 check in the "check for subroutine calls" test, and add some
224 additional handling for reverse-stepping through shared libraries.
226 2009-07-18 Anthony Green <green@moxielogic.com>
228 * moxie-tdep.c (moxie_analyze_prologue): Take gdbarch as last
229 parameter instead of frame_info.
230 (moxie_frame_cache): Call moxie_analyze_prologue with different
233 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
235 * solib.c (solib_bfd_open): Do not call ops->bfd_open.
236 (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
237 * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
238 * solib-irix.c (_initialize_irix_solib): Likewise.
239 * solib-null.c (_initialize_null_solib): Likewise.
240 * solib-osf.c (_initialize_osf_solib): Likewise.
241 * solib-pa64.c (_initialize_pa64_solib): Likewise.
242 * solib-som.c (_initialize_som_solib): Likewise.
243 * solib-sunos.c (_initialize_sunos_solib): Likewise.
244 * solib-svr4.c (_initialize_svr4_solib): Likewise.
245 * solib-target.c (_initialize_solib_target): Likewise.
247 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
249 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
251 2009-07-16 Doug Evans <dje@google.com>
253 * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
255 2007-07-16 Paul Pluzhnikov <ppluzhnikov@google.com>
257 * linux-thread-db.c (thread_db_find_new_threads_silently):
259 (try_thread_db_load_1): Call it.
261 2009-07-15 Doug Evans <dje@google.com>
263 Code reorg in preparation for adding comdat types support.
264 * dwarf2read.c (struct die_reader_specs): New struct.
265 (locate_pdi_sibling): New arg buffer. All callers updated.
266 (load_partial_dies, read_partial_die): Ditto.
267 (read_8_bytes): Change return type to ULONGEST.
268 (read_comp_unit): Delete arg abfd. All callers updated.
269 (read_die_and_children_1): Delete args abfd, cu. New arg reader.
271 (read_die_and_children, read_die_and_siblings): Ditto.
272 (read_full_die): Ditto. Move closer to callers.
273 (skip_one_die): New arg buffer. All callers updated.
274 (load_full_comp_unit): Change return type to void. All callers
276 (partial_read_comp_unit_head): New args buffer, buffer_size.
278 (process_psymtab_comp_unit): New function, split out from
279 dwarf2_build_psymtabs_hard.
280 (dwarf2_build_psymtabs_hard): Call it.
281 (load_partial_comp_unit): Renamed from load_comp_unit.
283 (skip_children): New arg buffer. All callers updated.
284 (init_cu_die_reader): New function.
285 (is_ref_attr): New function.
286 (dwarf2_get_ref_die_offset): Call it.
287 (alloc_one_comp_unit): New function.
289 2009-07-14 Stan Shebs <stan@codesourcery.com>
291 * MAINTAINERS (Global Maintainers): Add Doug Evans.
293 2009-07-14 Stan Shebs <stan@codesourcery.com>
295 Conditional tracepoints.
296 * ax-gdb.h (gen_eval_for_expr): Declare.
297 * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
298 and other comparisons.
299 (gen_eval_for_expr): New function.
300 (agent_eval_command): New maintenance command.
301 (_initialize_ax_gdb): Define the command.
302 * remote.c (struct remote_state): New field cond_tracepoints.
303 (PACKET_ConditionalTracepoints): New packet config type.
304 (remote_cond_tracepoint_feature): New function.
305 (remote_protocol_features): Add ConditionalTracepoints.
306 (remote_supports_cond_tracepoints): New function.
307 (_initialize_remote): Add ConditionalTracepoints.
308 * tracepoint.c (download_tracepoint): Add conditional.
309 * NEWS: Mention conditional tracepoints.
311 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
313 * objfiles.c (objfile_relocate): Do not relocate the same
314 BLOCKVECTOR_MAP address map multiple times.
316 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
318 * remote.c (process_stop_reply): Access expedited target registers
321 2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
323 Fix memory access from signed 32bit inferior registers on 64bit GDB.
324 * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
325 addr_bit. Mask OFFSET by the ADDR_BIT width.
327 2009-07-13 Anthony Green <green@moxielogic.com>
329 * moxie-tdep.c (moxie_gdbarch_init): Call
330 set_gdbarch_process_record.
331 (moxie_process_record): New.
332 (moxie_process_readu): New.
334 2009-07-12 Michael Snyder <msnyder@vmware.com>
336 * i386-tdep.c: Add a frame unwinder for function epilogues.
337 (i386_in_function_epilogue_p): New function.
338 (i386_epilogue_frame_sniffer): New function.
339 (i386_epilogue_frame_cache): New function.
340 (i386_epilogue_frame_this_id): New function.
341 (i386_epilogue_frame_unwind): New struct frame_unwind.
342 (i386_gdbarch_init): Hook the new unwinder.
344 2009-07-11 Hui Zhu <teawater@gmail.com>
346 * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
347 to "disassemble" command to print the raw instructions in hex as
348 well as in symbolic form.
349 (init_cli_cmds): Ditto.
350 (print_disassembly): Change "mixed" to "flags" to translate
351 the behavior of disassemble.
352 (disassemble_current_function): Ditto.
353 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
354 * stack.c (gdb_disassembly_stub): Ditto.
355 * disasm.c (do_mixed_source_and_assembly): Ditto.
356 (do_mixed_source_and_assembly): Ditto.
357 (do_assembly_only): Ditto.
358 (gdb_disassembly): Ditto.
359 (dump_insns): print the raw instructions in hex as well as in
360 symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
361 * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
362 assembly if it and flags is true.
363 (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
364 the assembly if it and flags is true.
365 (gdb_disassembly): Update extern.
366 * NEWS: Document disassemble/r support.
368 2009-07-10 Tom Tromey <tromey@redhat.com>
370 * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
371 * dwarf2expr.c: Likewise.
372 * dwarf2loc.c: Likewise.
373 * dwarf2read.c: Likewise.
374 * sh-tdep.c: Likewise.
375 * xtensa-tdep.c: Likewise.
377 2009-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
380 * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv. Move
381 variables var, rootlist and cr to their local sub-block. Move the
382 make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
383 and do_cleanups calls to the common base block. Remove the zero NV
386 2009-07-10 Phil Muldoon <pmuldoon@redhat.com>
388 * python/python-internal.h (apply_varobj_pretty_printer): Update
390 (python_string_to_target_python_string): Add definition.
391 * python/python-utils.c (unicode_to_encoded_python_string)
392 (unicode_to_target_python_string)
393 (python_string_to_target_python_string): New Functions.
394 * python/python-prettyprint.c (pretty_print_one_value): Likewise.
395 (print_string_repr): Refactor to logic to account for PyObject
397 (apply_varobj_pretty_printer): Likewise.
398 * python/python-value.c (valpy_string): Parse length keyword. Use
399 length keyword in LA_GET_STRING.
400 * varobj.c (value_get_print_value): Refactor logic to account for
401 PyObject returned strings.
402 * c-lang.c (c_get_string): If the length parameter is specified,
403 use that. Return value in characters. Update comments.
404 * language.h: Update c_get_string prototype comments.
406 2009-07-09 Doug Evans <dje@google.com>
408 * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
409 to read_memory_unsigned_integer.
411 2009-07-09 Jan Kratochvil <jan.kratochvil@redhat.com>
413 Report error on inaccessible memory.
414 * cli/cli-dump.c: Include gdbcore.h.
415 (dump_memory_to_file): Call read_memory instead of target_read_memory.
417 2009-07-09 Hui Zhu <teawater@gmail.com>
419 * solib.c (solib_bfd_open): Output a warning if solib's
420 architecture is not compatible with inferior's architecture.
422 2009-07-09 Ulrich Weigand <uweigand@de.ibm.com>
423 Jan Kratochvil <jan.kratochvil@redhat.com>
425 * target.h (struct target_ops <to_thread_architecture>): Describe it.
426 (target_thread_architecture): Refer to to_thread_architecture.
428 2009-07-08 Pierre Muller <muller@ics.u-strasbg.fr>
430 * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
432 2009-07-07 Ulrich Weigand <uweigand@de.ibm.com>
434 * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
436 2009-07-07 Pierre Muller <muller@ics.u-strasbg.fr>
438 * breakpoint.c (set_raw_breakpoint): Remove static modifier.
440 2009-07-07 Tom Tromey <tromey@redhat.com>
442 * c-lang.c (convert_octal): Only allow 3 octal digits.
443 (print_wchar): Prefer 3-digit octal form. Fall back to hex if
445 * c-exp.y (c_parse_escape): Only allow 3 octal digits.
447 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
449 * python/python-value.c (valpy_getitem): Remove incorrect assert.
451 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
453 * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
455 2009-07-07 Sami Wagiaalla <swagiaal@redhat.com>
457 * cp-support.h (struct using_direct): Rename members inner and
458 outer to import_src, and import_dest respectively.
459 * cp-namespace.c (cp_add_using_directive): Update.
460 (cp_add_using): Update.
461 (cp_copy_usings): Update.
462 (cp_lookup_symbol_namespace): Update.
463 (cp_scan_for_anonymous_namespaces): Update.
464 * cp-support.c (make_symbol_overload_list_using): Update.
465 * cp-support.h (cp_add_using_directive, cp_add_using): Rename
466 arguments from inner and outer to src and dest respectively.
467 * cp-namespace.c (cp_add_using_directive): Ditto.
468 (cp_add_using): Ditto.
470 2009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
472 * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
473 * varobj.c (varobj_invalidate): Replace a while loop by for loop.
475 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
477 Fix hang in floating varobjs.
479 * varobj.c (varobj_invalidate): Advance to next
480 element when processing floating varobj.
482 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
484 * varobj.c: Remove unnecessary include.
486 2009-07-07 Tristan Gingold <gingold@adacore.com>
488 * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
489 Remove excServer.c target. Remove _all target.
490 * darwin.defs: Removed.
492 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
494 * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
496 2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
498 * source.c (find_and_open_source): Remove the `objfile' parameter.
499 Update the function comment.
500 (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
501 find_and_open_source callers.
503 2009-07-05 Pedro Alves <pedro@codesourcery.com>
505 * coff-pe-read.c (read_pe_exported_syms): Recognize
506 "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
509 2009-07-05 Pedro Alves <pedro@codesourcery.com>
511 * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
512 (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
515 2009-06-29 Tristan Gingold <gingold@adacore.com>
517 * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
518 (amd64_darwin_thread_state_num_regs)
519 (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
521 (_initialize_i386_darwin_tdep): Remove 64 bits parts.
522 (darwin_dwarf_signal_frame_p): Make public.
523 * amd64-darwin-tdep.c: New file with most chunks from
525 * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
526 (amd64_darwin_thread_state_reg_offset)
527 (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
528 * amd64-darwin-tdep.h: New file.
529 * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
531 (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
533 (i386_darwin_store_inferior_registers): Ditto.
534 (darwin_set_sstep): Ditto.
535 (darwin_complete_target): Ditto.
536 (amd64_darwin_sstep_at_sigreturn): Ditto.
537 * configure.tgt: Create a separate entry for x86_64-*-darwin.
538 Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
539 * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
540 i386-darwin-tdep.c i386-darwin-nat.c
541 (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
543 2009-07-02 Pedro Alves <pedro@codesourcery.com>
545 * linux-fork.c (forks_exist_p): Drop unnecessary extern.
546 (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
547 (linux_fork_detach): Ditto.
548 (delete_fork_command): Rename to ...
549 (delete_checkpoint_command): ... this.
550 (detach_fork_command): Rename to ...
551 (detach_checkpoint_command): ... this.
552 (info_forks_command): Rename to ...
553 (info_checkpoints_command): ... this.
554 (_initialize_linux_fork): Remove stale comments. Adjust.
556 2009-07-02 Pedro Alves <pedro@codesourcery.com>
558 * linux-nat.c (linux_child_follow_fork): If we're staying attached
559 to the child process, enable event reporting on it. Don't handle
560 checkpoints here. Instead, add the child fork to the lwp thread
561 and inferior lists without clobbering the previous inferior. Let
562 the thread_db layer learn about a new child process, even if
563 following the parent.
564 (linux_nat_switch_fork): Delete lwps of the current inferior only,
565 instead of clearing the whole list. Use thread_change_ptid to
566 give the core the illusion the new checkpoint is still the same
567 inferior. Clear the register cache.
568 (linux_handle_extended_wait): Handle checkpoints here.
569 (linux_multi_process): Turn on.
570 * linux-fork.c (struct fork_info) <pc>: Remove field.
571 (init_fork_list): Do not delete the checkpoint from the inferior
572 list (it is not there).
573 (fork_load_infrun_state): Don't switch inferior_ptid here. Pass
574 the new checkpoint's ptid to linux_nat_switch_fork.
575 (fork_save_infrun_state): Make static. Don't stop the pc field of
576 fork_info, it's gone.
577 (linux_fork_mourn_inferior): Don't delete the checkpoint from the
578 inferior list, it's not there.
579 (linux_fork_detach): Ditto.
580 (delete_fork_command): Replace mention of fork/checkpoint by
582 (detach_fork_command): Likewise. Don't delete the checkpoint from
584 (info_forks_command): Adjust.
585 (restore_detach_fork): Delete.
586 (checkpointing_pid): New.
587 (linux_fork_checkpointing_p): New.
588 (save_detach_fork): Delete.
589 (checkpoint_command): Delete temp_detach_fork. Don't remove
590 breakpoints, that's a nop. Store the pid of the process we're
591 checkpointing, and use make_cleanup_restore_integer to restore it.
592 Don't reinsert breakpoints here.
593 (process_command, fork_command): Delete.
594 (restart_command): Update comments to only mention checkpoints,
596 (_initialize_linux_fork): Delete "fork", "process", "info forks"
598 * linux-fork.h (fork_save_infrun_state, fork_list): Delete
600 (linux_fork_checkpointing_p): Declare.
601 * cli/cli-cmds.c (killlist): New.
602 * cli/cli-cmds.h (killlist): Declare.
603 * gdbcmd.h (killlist): Declare.
604 * inferior.c: Include "gdbthread.h".
605 (detach_inferior_command, kill_inferior_command)
606 (inferior_command): New.
607 (info_inferiors_command): Allow specifying a specific inferior id.
608 (_initialize_inferiors): Register "inferior", "kill inferior" and
609 "detach inferior" commands.
610 * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
611 * gdbthread.h (any_thread_of_process): Declare.
612 * thread.c (any_thread_of_process): New.
614 * NEWS: Mention multi-inferior debugging. Mention 'info
615 inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
617 (Removed commands): New section, mentioning that 'info forks',
618 'fork', 'process', 'delete fork' and 'detach fork' are now gone.
620 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
622 * gdbarch.sh (current_gdbarch): Remove global variable.
623 (find_arch_by_info): Remove, inline into ...
624 (gdbarch_find_by_info): ... this. Remove current_gdbarch swapping.
625 (deprecated_current_gdbarch_select_hack): Rename to ...
626 (deprecated_target_gdbarch_select_hack): ... this. Do not set
627 or access current_gdbarch.
628 * gdbarch.c, gdbarch.h: Regenerate.
630 * arch-utils.c (gdbarch_update_p): Update call.
631 (set_gdbarch_from_file): Likewise.
633 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
635 * defs.h (extract_signed_integer, extract_unsigned_integer,
636 extract_long_unsigned_integer, store_signed_integer,
637 store_unsigned_integer): Add BYTE_ORDER parameter.
638 * findvar.c (extract_signed_integer, extract_unsigned_integer,
639 extract_long_unsigned_integer, store_signed_integer,
640 store_unsigned_integer): Add BYTE_ORDER parameter. Use it
641 instead of current_gdbarch.
643 * gdbcore.h (read_memory_integer, safe_read_memory_integer,
644 read_memory_unsigned_integer, write_memory_signed_integer,
645 write_memory_unsigned_integer): Add BYTE_ORDER parameter.
646 * corefile.c (struct captured_read_memory_integer_arguments): Add
648 (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into
649 struct captured_read_memory_integer_arguments.
650 (do_captured_read_memory_integer): Pass it to read_memory_integer.
651 (read_memory_integer): Add BYTE_ORDER parameter. Pass it to
652 extract_signed_integer.
653 (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to
654 extract_unsigned_integer.
655 (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it
656 to store_signed_integer.
657 (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it
658 to store_unsigned_integer.
660 * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
661 * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
662 Pass it to extract_unsigned_integer.
665 Update calls to extract_signed_integer, extract_unsigned_integer,
666 extract_long_unsigned_integer, store_signed_integer,
667 store_unsigned_integer, read_memory_integer,
668 read_memory_unsigned_integer, safe_read_memory_integer,
669 write_memory_signed_integer, write_memory_unsigned_integer, and
670 get_target_memory_unsigned to pass byte order:
671 * ada-lang.c (ada_value_binop): Update.
672 * ada-valprint.c (char_at): Update.
673 * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
674 * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
675 alpha_extract_return_value, alpha_read_insn,
676 alpha_get_longjmp_target): Update.
677 * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
678 * amd64obsd-tdep.c (amd64obsd_supply_uthread,
679 amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
680 * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
681 amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
682 amd64_displaced_step_fixup): Update.
683 * arm-linux-tdep.c (arm_linux_sigreturn_init,
684 arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
685 * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
686 arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
687 arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
688 arm_return_value): Update.
689 * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
690 * auxv.c (default_auxv_parse): Update.
691 * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
692 avr_scan_prologue, avr_extract_return_value,
693 avr_frame_prev_register, avr_push_dummy_call): Update.
694 * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
695 bsd_uthread_wait, bsd_uthread_thread_alive,
696 bsd_uthread_extra_thread_info): Update.
697 * c-lang.c (c_printstr, print_wchar): Update.
698 * cp-valprint.c (cp_print_class_member): Update.
699 * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
700 cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
701 cris_extract_return_value, find_step_target, dip_prefix,
702 sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
703 move_mem_to_reg_movem_op, get_data_from_address): Update.
704 * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
705 * dwarf2-frame.c (execute_cfa_program): Update.
706 * dwarf2loc.c (find_location_expression): Update.
707 * dwarf2read.c (dwarf2_const_value): Update.
708 * expprint.c (print_subexp_standard): Update.
709 * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
710 unsigned_address_to_pointer, address_to_signed_pointer,
711 read_var_value): Update.
712 * frame.c (frame_unwind_register_signed,
713 frame_unwind_register_unsigned, get_frame_memory_signed,
714 get_frame_memory_unsigned): Update.
715 * frame-unwind.c (frame_unwind_got_constant): Update.
716 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
717 frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
719 * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
720 frv_extract_return_value, find_func_descr,
721 frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
722 * f-valprint.c (f_val_print): Update.
723 * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
725 * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
726 h8300_push_dummy_call, h8300_extract_return_value,
727 h8300h_extract_return_value, h8300_store_return_value,
728 h8300h_store_return_value): Update.
729 * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
730 * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
732 * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
733 hppa64_hpux_in_solib_call_trampoline,
734 hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
735 hppa_hpux_sigtramp_frame_unwind_cache,
736 hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
737 hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
738 hppa32_hpux_search_dummy_call_sequence,
739 hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
740 hppa_hpux_unwind_adjust_stub): Update.
741 * hppa-linux-tdep.c (insns_match_pattern,
742 hppa_linux_find_global_pointer): Update.
743 * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
744 hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
745 skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
746 hppa_pseudo_register_read, hppa_frame_prev_register_helper,
747 hppa_match_insns): Update.
748 * hpux-thread.c (hpux_thread_fetch_registers): Update.
749 * i386-tdep.c (i386bsd_sigcontext_addr): Update.
750 * i386-cygwin-tdep.c (core_process_module_section): Update.
751 * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
752 amd64_darwin_sstep_at_sigreturn): Update.
753 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
754 amd64_darwin_sigcontext_addr): Likewise.
755 * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
756 * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
757 * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
758 * i386obsd-nat.c (i386obsd_supply_pcb): Update.
759 * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
760 i386obsd_trapframe_cache): Update.
761 * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
762 i386_analyze_frame_setup, i386_analyze_prologue,
763 i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
764 i386_get_longjmp_target, i386_push_dummy_call,
765 i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
766 i386_fetch_pointer_argument): Update.
767 * i387-tdep.c (i387_supply_fsave): Update.
768 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
769 * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
770 examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
771 ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
772 ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
773 ia64_libunwind_frame_prev_register,
774 ia64_libunwind_sigtramp_frame_this_id,
775 ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
776 find_extant_func_descr, find_func_descr,
777 ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
778 ia64_unwind_pc): Update.
779 * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
780 iq2000_scan_prologue, iq2000_extract_return_value,
781 iq2000_push_dummy_call): Update.
782 * irix5nat.c (fill_gregset): Update.
783 * jv-lang.c (evaluate_subexp_java): Update.
784 * jv-valprint.c (java_value_print): Update.
785 * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
786 lm32_extract_return_value, lm32_store_return_value): Update.
787 * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
788 m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
789 m32c_m16c_pointer_to_address): Update.
790 * m32r-tdep.c (m32r_store_return_value, decode_prologue,
791 m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
793 * m68hc11-tdep.c (m68hc11_pseudo_register_read,
794 m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
795 m68hc11_push_dummy_call): Update.
796 * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
797 m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
799 * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
800 m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
801 m68k_get_longjmp_target): Update.
802 * m88k-tdep.c (m88k_fetch_instruction): Update.
803 * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
804 mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
805 * mi/mi-main.c (mi_cmd_data_write_memory): Update.
806 * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
807 mips64_linux_get_longjmp_target, mips64_fill_gregset,
808 mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
809 * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
810 * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
811 mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
812 mips_o32_push_dummy_call, mips_o64_push_dummy_call,
813 mips_single_step_through_delay, mips_skip_pic_trampoline_code,
814 mips_integer_to_address): Update.
815 * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
817 * monitor.c (monitor_supply_register, monitor_write_memory,
818 monitor_read_memory_single): Update.
819 * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
820 moxie_analyze_prologue): Update.
821 * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
822 mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
823 mt_push_dummy_call): Update.
824 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
825 read_objc_methlist_method, read_objc_object, read_objc_super,
826 read_objc_class, find_implementation_from_class): Update.
827 * ppc64-linux-tdep.c (ppc64_desc_entry_point,
828 ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
830 * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
831 ppcobsd_sigtramp_frame_cache): Update.
832 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
833 do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
834 ppc64_sysv_abi_return_value): Update.
835 * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
836 * procfs.c (procfs_auxv_parse): Update.
837 * p-valprint.c (pascal_val_print): Update.
838 * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
839 regcache_raw_write_signed, regcache_raw_write_unsigned,
840 regcache_cooked_read_signed, regcache_cooked_read_unsigned,
841 regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
842 * remote-m32r-sdi.c (m32r_fetch_register): Update.
843 * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
845 * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
846 rs6000_convert_from_func_ptr_addr, branch_dest,
847 rs6000_software_single_step): Update.
848 * rs6000-tdep.c (rs6000_in_function_epilogue_p,
849 ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
850 bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
851 rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
852 rs6000_frame_cache): Update.
853 * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
854 s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
855 s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
856 extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
857 * scm-exp.c (scm_lreadr): Update.
858 * scm-lang.c (scm_get_field, scm_unpack): Update.
859 * scm-valprint.c (scm_val_print): Update.
860 * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
861 score_fetch_inst): Update.
862 * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
863 sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
864 sh64_pseudo_register_read, sh64_pseudo_register_write,
865 sh64_frame_prev_register): Update:
866 * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
867 sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
868 sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
869 * solib-darwin.c (darwin_load_image_infos): Update.
870 * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
871 find_canonical_descriptor_in_load_object): Update.
872 * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
873 irix_open_symbol_file_object): Update.
874 * solib-som.c (som_solib_create_inferior_hook, link_map_start,
875 som_current_sos, som_open_symbol_file_object): Update.
876 * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
878 * solib-svr4.c (read_program_header, scan_dyntag_auxv,
879 solib_svr4_r_ldsomap): Update.
880 * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
881 * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
882 sparc64obsd_collect_uthread): Update.
883 * sparc64-tdep.c (sparc64_pseudo_register_read,
884 sparc64_pseudo_register_write, sparc64_supply_gregset,
885 sparc64_collect_gregset): Update.
886 * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
887 * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
888 sparc32obsd_collect_uthread): Update.
889 * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
890 sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
891 sparc_collect_rwindow): Update.
892 * spu-linux-nat.c (parse_spufs_run): Update.
893 * spu-tdep.c (spu_pseudo_register_read_spu,
894 spu_pseudo_register_write_spu, spu_pointer_to_address,
895 spu_analyze_prologue, spu_in_function_epilogue_p,
896 spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
897 spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
898 info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
899 info_spu_dma_command, info_spu_proxydma_command): Update.
900 * stack.c (print_frame_nameless_args, frame_info): Update.
901 * symfile.c (read_target_long_array, simple_read_overlay_table,
902 simple_read_overlay_region_table): Update.
903 * target.c (debug_print_register): Update.
904 * tramp-frame.c (tramp_frame_start): Update.
905 * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
906 v850_extract_return_value, v850_store_return_value,
907 * valarith.c (value_binop, value_bit_index): Update.
908 * valops.c (value_cast): Update.
909 * valprint.c (val_print_type_code_int, val_print_string,
910 read_string): Update.
911 * value.c (unpack_long, unpack_double, unpack_field_as_long,
912 modify_field, pack_long): Update.
913 * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
914 vax_skip_prologue): Update.
915 * xstormy16-tdep.c (xstormy16_push_dummy_call,
916 xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
917 xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
918 xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
919 * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
920 xtensa_pseudo_register_write, xtensa_frame_cache,
921 xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
924 * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
925 decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
926 BYTE_ORDER parameter.
927 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
929 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
930 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
931 * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it
932 instead of current_gdbarch.
933 (decimal_to_string, decimal_from_integral, decimal_from_floating,
934 decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
935 Pass it to match_endianness.
936 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
937 parameters. Pass them to match_endianness.
938 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
939 Pass them to match_endianness.
940 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
941 Pass them to match_endianness.
942 * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
943 BYTE_ORDER_Y output parameters.
944 (value_binop): Update call to value_args_as_decimal.
946 Update calls to decimal_to_string, decimal_from_string,
947 decimal_from_integral, decimal_from_floating, decimal_to_doublest,
948 decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
949 to pass/receive byte order:
950 * c-exp.y (parse_number): Update.
951 * printcmd.c (printf_command): Update.
952 * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
953 value_equal, value_less): Update.
954 * valops.c (value_cast, value_one): Update.
955 * valprint.c (print_decimal_floating): Update.
956 * value.c (unpack_long, unpack_double): Update.
957 * python/python-value.c (valpy_nonzero): Update.
960 * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
961 (printstr): Update calls to char_at.
962 (ada_val_print_array): Likewise.
963 * valprint.c (read_string): Add BYTE_ORDER parameter.
964 (val_print_string): Update call to read_string.
965 * c-lang.c (c_get_string): Likewise.
966 * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
967 * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
968 Use it instead of current_gdbarch.
969 * printcmd.c (printf_command): Update calls to target_wide_charset.
970 * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
971 Pass to target_wide_charset. Use it instead of current_gdbarch.
972 (classify_type): Add BYTE_ORDER parameter. Pass to
973 charset_for_string_type. Allow NULL encoding pointer.
974 (print_wchar): Add BYTE_ORDER parameter.
975 (c_emit_char): Update calls to classify_type and print_wchar.
976 (c_printchar, c_printstr): Likewise.
979 * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
980 * gdbarch.c, gdbarch.h: Regenerate.
981 * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
983 * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
984 * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
985 * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
986 (rs6000_skip_trampoline_code): Update call.
988 * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
989 dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
990 (alpha_read_insn): Add GDBARCH parameter.
991 * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
992 (alpha_register_to_value): Pass architecture to alpha_sts.
993 (alpha_extract_return_value): Likewise.
994 (alpha_value_to_register): Pass architecture to alpha_lds.
995 (alpha_store_return_value): Likewise.
996 (alpha_read_insn): Add GDBARCH parameter.
997 (alpha_skip_prologue): Pass architecture to alpha_read_insn.
998 (alpha_heuristic_proc_start): Likewise.
999 (alpha_heuristic_frame_unwind_cache): Likewise.
1000 (alpha_next_pc): Likewise.
1001 (alpha_sigtramp_frame_this_id): Pass architecture to
1002 tdep->dynamic_sigtramp_offset callback.
1003 (alpha_sigtramp_frame_sniffer): Pass architecture to
1004 tdep->pc_in_sigtramp callback.
1005 * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
1006 (alphafbsd_sigtramp_offset): Likewise.
1007 * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
1008 parameter. Pass to alpha_read_insn.
1009 (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to
1010 alpha_linux_sigtramp_offset_1.
1011 (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1012 alpha_linux_sigtramp_offset.
1013 (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
1014 and alpha_linux_sigtramp_offset.
1015 * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
1016 (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1017 alphanbsd_sigtramp_offset.
1018 * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
1019 (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
1021 (alphaobsd_sigcontext_addr): Pass architecture to
1022 alphaobsd_sigtramp_offset.
1023 * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
1026 * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
1027 (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
1028 (amd64_frame_cache): Likewise.
1030 * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
1031 (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
1032 thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
1033 * arm-wince-tdep.c: Include "frame.h".
1035 * avr-tdep.c (EXTRACT_INSN): Remove.
1036 (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
1037 (avr_skip_prologue): Pass architecture to avr_scan_prologue.
1038 (avr_frame_unwind_cache): Likewise.
1040 * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
1041 (find_step_target): Initialize it.
1042 (get_data_from_address): Add BYTE_ORDER parameter.
1043 (bdap_prefix): Pass byte order to get_data_from_address.
1044 (handle_prefix_assign_mode_for_aritm_op): Likewise.
1045 (three_operand_add_sub_cmp_and_or_op): Likewise.
1046 (handle_inc_and_index_mode_for_aritm_op): Likewise.
1048 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
1049 (frv_linux_sigcontext_reg_addr): Pass architecture to
1050 frv_linux_pc_in_sigtramp.
1051 (frv_linux_sigtramp_frame_sniffer): Likewise.
1053 * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
1054 (h8300_analyze_prologue): Add GDBARCH parameter. Pass to
1055 h8300_is_argument_spill.
1056 (h8300_frame_cache, h8300_skip_prologue): Pass architecture
1057 to h8300_analyze_prologue.
1059 * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1060 in_solib_call_trampoline callback.
1061 (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
1062 * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
1064 (hppa64_push_dummy_call): Pass architecture to
1065 hppa64_convert_code_addr_to_fptr.
1066 (hppa_match_insns): Add GDBARCH parameter.
1067 (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to
1069 (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
1070 (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to
1071 hppa_match_insns_relaxed.
1072 (hppa_stub_unwind_sniffer): Pass architecture to
1073 tdep->in_solib_call_trampoline callback.
1074 * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
1075 (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
1076 hppa_hpux_search_pattern.
1077 * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
1078 (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
1079 Pass to insns_match_pattern.
1080 (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
1081 hppa_linux_sigtramp_find_sigcontext.
1082 (hppa_linux_sigtramp_frame_sniffer): Likewise.
1083 (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
1084 (hppa64_hpux_in_solib_call_trampoline): Likewise.
1086 * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
1087 (i386_analyze_frame_setup): Add GDBARCH parameter.
1088 (i386_analyze_prologue): Add GDBARCH parameter. Pass to
1089 i386_follow_jump and i386_analyze_frame_setup.
1090 (i386_skip_prologue): Pass architecture to i386_analyze_prologue
1091 and i386_follow_jump.
1092 (i386_frame_cache): Pass architecture to i386_analyze_prologue.
1093 (i386_pe_skip_trampoline_code): Add FRAME parameter.
1094 * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
1095 * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
1096 frame to i386_pe_skip_trampoline_code.
1098 * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
1099 to sigcontext_register_address callback.
1100 * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
1101 (ia64_find_unwind_table): Pass architecture to
1102 ia64_find_global_pointer.
1103 (find_extant_func_descr): Add GDBARCH parameter.
1104 (find_func_descr): Pass architecture to find_extant_func_descr
1105 and ia64_find_global_pointer.
1106 (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
1107 tdep->sigcontext_register_address callback.
1108 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
1111 * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
1112 (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
1114 * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
1115 (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
1116 lm32_analyze_prologue.
1118 * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
1119 (m32r_skip_prologue): Pass architecture to decode_prologue.
1121 * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
1122 (m68hc11_scan_prologue): Pass architecture to
1123 m68hc11_analyze_instruction.
1125 * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
1126 (m68k_analyze_prologue): Pass architecture to
1127 m68k_analyze_frame_setup.
1129 * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
1130 (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order
1131 to m88k_fetch_instruction.
1132 (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
1133 (m88k_frame_cache): Likewise.
1135 * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
1136 (mep_analyze_prologue): Pass architecture to mep_get_insn.
1138 * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
1139 (mips32_next_pc): Pass architecture to mips_fetch_instruction.
1140 (deal_with_atomic_sequence): Likewise.
1141 (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
1142 (mips16_scan_prologue): Likewise.
1143 (mips32_scan_prologue): Likewise.
1144 (mips16_in_function_epilogue_p): Likewise.
1145 (mips32_in_function_epilogue_p): Likewise.
1146 (mips_about_to_return): Likewise.
1147 (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
1148 (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
1149 (mips_skip_prologue): Pass architecture to mips16_scan_prologue
1150 and mips32_scan_prologue.
1151 (mips_in_function_epilogue_p): Pass architecture to
1152 mips16_in_function_epilogue_p and
1153 mips32_in_function_epilogue_p.
1154 (heuristic_proc_start): Pass architecture to mips_fetch_instruction
1155 and mips_about_to_return.
1156 (mips_skip_mips16_trampoline_code): Pass architecture to
1157 mips_fetch_instruction.
1158 (fetch_mips_16): Add GDBARCH parameter.
1159 (mips16_next_pc): Pass architecture to fetch_mips_16.
1160 (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
1163 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
1164 read_objc_methlist_method, read_objc_object, read_objc_super,
1165 read_objc_class): Add GDBARCH parameter.
1166 (find_implementation_from_class): Add GDBARCH parameter, pass
1167 to read_objc_class, read_objc_methlist_nmethods, and
1168 read_objc_methlist_method.
1169 (find_implementation): Add GDBARCH parameter, pass to
1170 read_objc_object and find_implementation_from_class.
1171 (resolve_msgsend, resolve_msgsend_stret): Pass architecture
1172 to find_implementation.
1173 (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
1174 architecture to read_objc_super and find_implementation_from_class.
1176 * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
1177 (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
1178 ppc64_standard_linkage3_target): Pass architecture to
1179 ppc64_desc_entry_point.
1180 * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
1181 (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
1182 (rs6000_fetch_instruction): Add GDBARCH parameter.
1183 (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
1184 rs6000_fetch_instruction.
1185 (skip_prologue): Pass architecture to rs6000_fetch_instruction.
1187 * remote-mips.c (mips_store_word): Return old_contents as host
1188 integer value instead of target bytes.
1190 * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
1191 (s390_analyze_prologue): Initialize it.
1192 (extend_simple_arg): Add GDBARCH parameter.
1193 (s390_push_dummy_call): Pass architecture to extend_simple_arg.
1195 * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
1196 * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
1197 (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
1198 * scm-valprint.c (scm_scmval_print): Likewise.
1199 (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
1202 * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
1203 (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
1204 look_for_args_moves.
1205 (sh64_skip_prologue): Pass architecture to
1206 sh64_skip_prologue_hard_way.
1207 * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
1208 (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
1209 (sh_frame_cache): Likewise.
1211 * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
1212 (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
1213 Pass architecture to extract_mips_address.
1215 * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
1216 * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
1217 (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
1218 to sparc_fetch_wcookie.
1219 (sparc32_frame_prev_register): Likewise.
1220 * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
1221 * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
1222 * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
1224 * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
1225 (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
1226 (spu_virtual_frame_pointer): Likewise.
1227 (spu_frame_unwind_cache): Likewise.
1228 (info_spu_mailbox_list): Add BYTE_ORER parameter.
1229 (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
1230 (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
1231 (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
1232 to info_spu_dma_cmdlist.
1234 * symfile.c (read_target_long_array): Add GDBARCH parameter.
1235 (simple_read_overlay_table, simple_read_overlay_region_table,
1236 simple_overlay_update_1): Pass architecture to read_target_long_array.
1238 * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
1239 (v850_frame_cache): Pass architecture to v850_analyze_prologue.
1241 * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
1243 (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
1244 to xstormy16_analyze_prologue.
1245 (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
1246 (xstormy16_find_jmp_table_entry): Likewise.
1247 (xstormy16_skip_trampoline_code): Pass architecture to
1248 xstormy16_resolve_jmp_table_entry.
1249 (xstormy16_pointer_to_address): Likewise.
1250 (xstormy16_address_to_pointer): Pass architecture to
1251 xstormy16_find_jmp_table_entry.
1253 * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
1254 (call0_analyze_prologue): Add GDBARCH parameter, pass to
1256 (call0_frame_cache): Pass architecture to call0_analyze_prologue.
1257 (xtensa_skip_prologue): Likewise.
1259 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1261 * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
1262 (paddress): Add GDBARCH parameter.
1263 * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
1264 (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
1265 * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
1266 * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
1267 use it instead of current_gdbarch.
1269 Update calls to ui_out_field_core_addr to pass architecture:
1270 * ada-lang.c (print_one_exception): Update.
1271 * breakpoint.c (print_one_breakpoint_location,
1272 print_one_exception_catchpoint): Update.
1273 * disasm.c (dump_insns): Update.
1274 * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
1275 * mi/mi-main.c (mi_cmd_data_read_memory): Update.
1276 * mi/mi-symbol-cmds.c: Include "objfiles.h".
1277 (mi_cmd_symbol_list_lines): Update.
1278 * stack.c (print_frame_info, print_frame): Update.
1280 Update callers of paddress to pass architecture:
1281 * ada-tasks.c (info_task): Update.
1282 * ada-valprint.c (ada_val_print_1): Update.
1283 * annotate.c (annotate_source, annotate_frame_begin): Update.
1284 * breakpoint.c (insert_bp_location, describe_other_breakpoints,
1286 * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
1288 * corefile.c (memory_error): Update.
1289 * c-valprint.c (print_function_pointer_address, c_val_print): Update.
1290 * disasm.c (dis_asm_print_address): Update.
1291 * exec.c (print_section_info): Update.
1292 * f-valprint.c (f_val_print): Update.
1293 * infcmd.c: Include "arch-utils.h".
1294 (jump_command, program_info): Update.
1295 * linux-fork.c: Include "arch-utils.h".
1296 (info_forks_command): Update.
1297 * m2-valprint.c (print_function_pointer_address,
1298 print_unpacked_pointer, print_variable_at_address,
1299 m2_val_print): Update.
1300 * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
1302 * printcmd.c (print_address, print_address_demangle, address_info):
1304 * p-valprint.c (pascal_val_print): Update.
1305 * source.c: Include "arch-utils.h".
1306 (line_info): Update.
1307 * stack.c (frame_info, print_block_frame_labels): Update.
1308 * symfile.c (add_symbol_file_command, list_overlays_command): Update.
1309 * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
1310 print_symbol, print_partial_symbols, maintenance_info_psymtabs,
1311 maintenance_check_symtabs): Update.
1312 * symtab.c (find_pc_sect_symtab): Update.
1313 * target.c (deprecated_debug_xfer_memory): Update.
1314 * tracepoint.c (scope_info): Update.
1315 * tui/tui-stack.c (tui_make_status_line): Update.
1316 * valprint.c (val_print_string): Update.
1318 Update callers of paddr_nz to use paddress instead (keeping
1319 user-visible output identical):
1320 * alpha-tdep.c (alpha_heuristic_proc_start): Update.
1321 * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
1322 amd64_displaced_step_fixup): Update.
1323 * arch-utils.c (simple_displaced_step_copy_insn): Update.
1324 * auxv.c (fprint_target_auxv): Update.
1325 * breakpoint.c (insert_single_step_breakpoint): Update.
1326 * buildsym.c (finish_block): Update.
1327 * cli/cli-dump.c (restore_section_callback): Update.
1328 * fbsd-nat.c (fbsd_find_memory_regions): Update.
1329 * frame.c (frame_unwind_register_value): Update.
1330 * gcore.c (gcore_create_callback): Update.
1331 * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
1332 * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
1333 i386_record_lea_modrm_addr, i386_record_lea_modrm,
1334 i386_process_record): Update.
1335 * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
1336 ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
1337 ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
1338 * infrun.c (displaced_step_prepare, displaced_step_fixup,
1339 handle_inferior_event, insert_step_resume_breakpoint_at_sal,
1340 insert_longjmp_resume_breakpoint): Update.
1341 * linux-nat.c (linux_nat_find_memory_regions): Update.
1342 * linux-record.c (record_linux_system_call): Update.
1343 * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
1344 mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
1345 mips_o64_push_dummy_call): Update.
1346 * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
1347 * record.c (record_arch_list_add_mem, record_wait,
1348 record_xfer_partial): Update.
1349 * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
1350 mips_common_breakpoint): Update.
1351 * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
1352 * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
1353 * solib-som.c (som_current_sos): Update.
1354 * symfile.c (load_progress, generic_load): Update.
1355 * symfile-mem.c (add_vsyscall_page): Update.
1356 * valops.c (value_fetch_lazy): Update.
1357 * windows-tdep.c (windows_xfer_shared_library): Update.
1359 Update callers of paddr_nz to use paddress instead (changing
1360 user-visible output to make it more correct):
1361 * dwarf2loc.c (locexpr_describe_location): Update.
1362 * ia64-tdep.c (ia64_memory_insert_breakpoint,
1363 ia64_memory_remove_breakpoint): Update.
1364 * jv-valprint.c (java_value_print): Update.
1365 * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
1366 * monitor.c (monitor_read_memory): Update.
1368 Update callers of paddr to use paddress instead (changing
1369 user-visible output to make it more correct):
1370 * arm-tdep.c (arm_push_dummy_call): Update.
1371 * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
1372 create_breakpoint): Update.
1373 * darwin-nat-info.c (darwin_debug_regions): Update.
1374 * dcache.c (dcache_info): Update.
1375 * dsrec.c (load_srec, make_srec): Update.
1376 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
1377 dwarf2_frame_cache): Update.
1378 * gcore.c (gcore_copy_callback): Update.
1379 * gnu-nat.c (gnu_xfer_memory): Update.
1380 * mips-linux-nat.c (mips_show_dr): Update.
1381 * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
1382 monitor_remove_breakpoint): Update.
1383 * remote.c (compare_sections_command): Update.
1384 * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
1385 m32r_remove_breakpoint, m32r_insert_watchpoint,
1386 m32r_remove_watchpoint): Update.
1387 * sol-thread.c (info_cb): Update.
1388 * symfile.c (load_progress): Update.
1390 Update callers of paddress or paddr_nz to use hex_string instead
1391 (changes output of internal/error/debug messages only):
1392 * dwarf2read.c (dump_die_shallow): Update.
1393 * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
1394 get_frame_func, create_new_frame): Update.
1395 * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
1396 * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
1397 ia64_get_dyn_info_list): Update.
1398 * maint.c (maintenance_translate_address): Update.
1399 * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
1400 * target.c (target_flash_erase): Update.
1402 Update callers of paddr/paddr_nz to use phex/phex_nz instead,
1403 using an appropriate address size. Remove use of strlen_paddr.
1404 * exec.c (exec_files_info): Update.
1405 * i386-nat.c (i386_show_dr): Update.
1406 * remote.c (remote_flash_erase): Update.
1407 * m32r-rom.c (m32r_load_section): Update.
1408 * monitor.c (monitor_vsprintf, monitor_store_register): Update.
1409 * remote.c (remote_check_symbols, remote_search_memory): Update.
1410 * remote-mips.c (mips_request, mips_common_breakpoint): Update.
1411 * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
1412 * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
1413 * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
1414 sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
1415 sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
1416 sh_dsp_show_regs): Update.
1417 * xcoffsolib.c (sharedlibrary_command): Update.
1420 * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
1421 Use hex_string_custom instead of paddr.
1422 (print_bfd_section_info): Pass address size.
1423 (print_objfile_section_info): Likewise.
1425 * annotate.h (annotate_source): Add GDBARCH parameter.
1426 (annotate_frame_begin): Likewise.
1427 * annotate.c (annotate_source): Add GDBARCH parameter.
1428 (annotate_frame_begin): Likewise.
1429 * source.c (identify_source_line): Update call to annotate_source.
1430 * stack.c (print_frame_info, print_frame): Update call to
1431 annotate_frame_begin.
1433 * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
1434 (create_breakpoint, create_ada_exception_breakpoint): Update call.
1436 * stack.c (print_block_frame_labels): Add GDBARCH parameter.
1437 (print_frame_label_vars): Update call.
1439 * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
1440 (dump_psymtab): Update call to print_partial_symbols.
1441 (struct print_symbol_args): Add GDBARCH member.
1442 (dump_symtab_1): Set print_symbol_args architecture member.
1443 (print_symbol): Use it.
1445 * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
1447 * windows-tdep.c (windows_xfer_shared_library): Likewise.
1448 * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
1449 (core_process_module_section): Pass architecture from cpms_data to
1450 windows_xfer_shared_library.
1451 (windows_core_xfer_shared_libraries): Initialize cmps_data
1452 architecture member.
1453 * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
1454 to windows_xfer_shared_library.
1456 * defs.h (print_address): Add GDBARCH parameter.
1457 * printcmd.c (print_address): Add GDBARCH parameter.
1458 (print_scalar_formatted, do_examine): Update call.
1459 * findcmd.c (find_command): Update call.
1460 * tracepoint.c: Include "arch-utils.h".
1461 (trace_find_line_command): Update call.
1462 * tui/tui-disasm.c (tui_disassemble): Update call.
1464 * value.h (print_address_demangle): Add GDBARCH parameter.
1465 * printcmd.c (print_address_demangle): Add GDBARCH parameter.
1466 * c-valprint.c (print_function_pointer_address, c_val_print):
1468 * f-valprint.c (f_val_print): Update call.
1469 * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
1470 * jv-valprint.c (java_val_print): Update call.
1471 * m2-valprint.c (print_function_pointer_address, m2_val_print):
1473 * p-valprint.c (pascal_val_print): Update call.
1475 * disasm.c (gdb_disassemble_info): Install architecture into
1476 di.application_data field.
1478 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1480 * disasm.h (gdb_disassembly): Add GDBARCH parameter.
1481 (gdb_print_insn): Likewise.
1482 * disasm.c (dump_insns): Add GDBARCH parameter. Use it instead
1484 (do_mixed_source_and_assembly): Add GDBARCH parameter. Pass to
1486 (do_assembly_only): Likewise.
1487 (gdb_disassembly): Add GDBARCH parameter. Use it instead of
1488 current_gdbarch. Pass to subroutines.
1489 (gdb_print_insn): Add GDBARCH parameter. Use it instead of
1492 * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
1493 (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
1494 (do_gdb_disassembly): Add GDBARCH argument. Store into args.
1495 (print_frame_info): Pass architecture to do_gdb_disassembly.
1497 * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
1499 * mi/mi-cmd-disas.c: Include "arch-utils.h"
1500 (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
1502 * cli/cli-cmds.c: Include "arch-utils.h".
1503 (print_disassembly): Add GDBARCH parameter. Pass to gdb_disassembly
1504 and tui_show_assembly.
1505 (disassemble_current_function): Pass architecture to
1506 tui_get_low_disassembly_address and print_disassembly.
1507 (disassemble_command): Pass architecture to
1508 tui_get_low_disassembly_address and print_disassembly.
1510 * tui/tui.c (tui_show_assembly): Add GDBARCH parameter. Pass to
1511 tui_update_source_windows_with_addr.
1513 * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
1514 (struct tui_source_info): Likewise.
1515 * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
1517 * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
1518 Pass to gdb_print_insn.
1519 (tui_find_disassembly_address): Add GDBARCH parameter. Pass to
1521 (tui_set_disassem_content): Add GDBARCH parameter. Install into
1522 source_info.gdbarch. Pass to tui_disassemble.
1523 (tui_show_disassem): Add GDBARCH parameter. Pass to
1524 tui_update_source_window.
1525 (tui_show_disassem_and_update_source): Add GDBARCH parameter. Pass to
1526 tui_show_disassem and tui_update_source_window.
1528 (tui_get_begin_asm_address): Return locator architecture in addition
1529 to locator PC value.
1531 (tui_get_low_disassembly_address): Add GDBARCH parameter. Pass to
1532 tui_get_low_disassembly_address.
1534 (tui_vertical_disassem_scroll): Pass architecture to subroutines.
1536 * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
1537 (tui_show_disassem): Likewise.
1538 (tui_show_disassem_and_update_source): Likewise.
1539 (tui_get_begin_asm_address): Return architecture and PC value.
1541 * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
1542 (tui_show_assembly): Add GDBARCH parameter.
1544 * tui/tui-layout.c (extract_display_start_addr): Return current window
1545 architecture in addition to current PC value.
1547 (tui_set_layout): Update calls to tui_get_low_disassembly_address and
1548 extract_display_start_addr. Pass architecture to
1549 tui_update_source_windows_with_addr.
1551 * tui/tui-source.c: Include "objfiles.h".
1552 (tui_set_source_content): Initialize window architecture.
1553 (tui_show_symtab_source): Add GDBARCH parameter. Pass to
1554 tui_update_source_window_as_is
1556 * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
1558 * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
1559 Install locator architecture.
1560 (tui_set_locator_filename): Update call.
1561 (tui_show_frame_info): Pass architecture to tui_set_locator_info
1564 * tui/tui-win.c (make_visible_with_new_height): Pass architecture
1565 to tui_update_source_window.
1567 * tui/tui-winsource.c: Include "objfiles.h".
1568 (tui_display_main): Update call to tui_get_begin_asm_address.
1569 Pass architecture to tui_update_source_windows_with_addr.
1570 (tui_update_source_window): Add GDBARCH parameter. Pass to
1571 tui_update_source_window_as_is.
1572 (tui_update_source_window_as_is): Add GDBARCH parameter.
1573 Pass to tui_set_disassem_content.
1574 (tui_update_source_windows_with_addr): Add GDBARCH parameter.
1575 Pass to subroutines.
1576 (tui_update_source_windows_with_line): Pass objfile architecture
1578 (tui_horizontal_source_scroll): Pass architecture to
1579 tui_update_source_window_as_is.
1581 * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
1583 (tui_update_source_window_as_is): Likewise.
1584 (tui_update_source_windows_with_addr): Likewise.
1586 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1588 * breakpoint.h (struct breakpoint): New member GDBARCH.
1589 * breakpoint.c: Include "arch-utils.h".
1590 (set_raw_breakpoint_without_location): Add GDBARCH parameter.
1591 Use it to set breakpoint architecture.
1592 (set_raw_breakpoint): Add GDBARCH parameter.
1593 (create_internal_breakpoint): Likewise.
1594 (create_catchpoint): Likewise.
1595 (create_fork_vfork_event_catchpoint): Likewise.
1596 (create_breakpoint): Likewise.
1597 (create_breakpoints): Likewise.
1598 (break_command_really): Likewise.
1599 (create_ada_exception_breakpoint): Likewise.
1600 Update local callers to pass architecture:
1601 (create_internal_breakpoint): Update.
1602 (create_overlay_event_breakpoint): Update.
1603 (create_longjmp_master_breakpoint): Update.
1604 (create_thread_event_breakpoint): Update.
1605 (create_solib_event_breakpoint): Update.
1606 (create_catchpoint): Update.
1607 (create_fork_vfork_event_catchpoint): Update.
1608 (set_momentary_breakpoint): Update.
1609 (clone_momentary_breakpoint): Update.
1610 (create_breakpoint): Update.
1611 (create_breakpoints): Update.
1612 (break_command_really): Update.
1613 (break_command_1): Update.
1614 (set_breakpoint): Update.
1615 (watch_command_1): Update.
1616 (catch_fork_command_1): Update.
1617 (catch_exec_commnd_1): Update.
1618 (handle_gnu_v3_exceptions): Update.
1619 (create_ada_exception_breakpoint): Update.
1620 (catch_ada_exception_command): Update.
1621 (catch_assert_command): Update.
1622 (trace_command): Update.
1624 * breakpoint.h (struct bp_location): New member GDBARCH.
1625 * breakpoint.c (get_sal_arch): New function.
1626 (set_raw_breakpoint): Set location architecture.
1627 (add_location_to_breakpoint): Likewise.
1628 (clone_momentary_breakpoint): Likewise.
1629 (watch_command_1): Likewise.
1630 (update_watchpoint): Likewise.
1631 (bp_loc_is_permanent): Use location architecture instead of
1633 (adjust_breakpoint_address): Add GDBARCH parameter; use it
1634 instead of current_gdbarch.
1635 Update callers of adjust_breakpoint_address to pass
1636 breakpoint location architecture:
1637 (set_raw_breakpoint): Update.
1638 (watch_command_1): Update.
1640 * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
1642 (add_local_symbols): Add GDBARCH parameter. Pass to collect_symbol.
1643 (encode_actions): Pass tracepoint architecture to add_local_symbols
1644 (encode_actions): Use tracepoint architecture instead of
1645 current_gdbarch. Pass it to add_local_symbols and collect_symbol.
1647 * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
1648 of print_one callback with last_loc.
1649 * breakpoint.c (print_one_breakpoint_location): Replace last_addr
1650 parameter with last_loc.
1651 (print_one_breakpoint): Likewise.
1652 (do_captured_breakpoint_query): Update call.
1653 (breakpoint_1): Pass last_loc instead of last_addr to
1654 print_one_breakpoint. Pass last location architecture instead of
1655 current_gdbarch to set_next_address.
1656 Update all implementations of the print_one callback:
1657 * breakpoint.c (print_one_catch_fork): Update.
1658 (print_one_catch_vfork): Update.
1659 (print_one_catch_exec): Update.
1660 (print_one_exception_catchpoint): Update.
1661 * ada-lang.c (print_one_exception): Update.
1662 (print_one_catch_exception): Update.
1663 (print_one_catch_exception_unhandled): Update.
1664 (print_one_catch_assert): Update.
1666 * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
1667 parameter. Use it instead of gdbarch_addr_bit (current_gdbarch).
1668 (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
1669 to print_one_breakpoint_location.
1670 (breakpoint_address_bits): New function.
1671 (do_captured_breakpoint_query): Compute number of address bits to print
1672 and pass it to print_one_breakpoint.
1673 (breakpoint_1): Likewise. Use it instead of current_gdbarch.
1675 * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
1676 * breakpoint.c (create_thread_event_breakpoint): Likewise.
1677 Update callers to create_thread_event_breakpoint:
1678 * aix-thread.c (pd_enable): Update.
1679 * linux-thread-db.c (enable_thread_event): Update.
1681 * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
1682 * breakpoint.c (create_solib_event_breakpoint): Likewise.
1683 Update callers to create_solib_event_breakpoint:
1684 * solib-frv.c (enable_break, enable_break2): Update.
1685 * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
1686 * solib-som.c (som_solib_create_inferior_hook): Update.
1687 * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
1688 * solib-svr4.c (enable_break): Update.
1690 * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
1691 * breakpoint.c (insert_single_step_breakpoint): Likewise.
1692 Update callers to insert_single_step_breakpoint:
1693 * alpha-tdep.c (alpha_software_single_step): Update.
1694 * arm-linux-tdep.c (arm_linux_software_single_step): Update.
1695 * arm-tdep.c (arm_software_single_step): Update.
1696 * cris-tdep.c (cris_software_single_step): Update.
1697 * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
1698 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
1699 * sparc-tdep.c (sparc_software_single_step): Update.
1700 * spu-tdep.c (spu_software_single_step): Update.
1701 * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
1702 Pass it to insert_single_step_breakpoint.
1703 (mips_software_single_step): Pass architecture to
1704 deal_with_atomic_sequence and insert_single_step_breakpoint.
1706 * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
1707 (deprecated_remove_raw_breakpoint): Likewise.
1708 * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
1709 (deprecated_remove_raw_breakpoint): Likewise.
1710 Update callers to deprecated_insert_raw_breakpoint and
1711 deprecated_remove_raw_breakpoint:
1712 * breakpoint.c (single_step_gdbarch): New static variable.
1713 (insert_single_step_breakpoint): Pass GDBARCH parameter to
1714 deprecated_insert_raw_breakpoint. Store it in single_step_gdbarch.
1715 (remove_single_step_breakpoints): Pass architecture stored in
1716 single_step_gdbarch to deprecated_remove_raw_breakpoint.
1717 * rs6000-nat.c (exec_one_dummy_insn): Update.
1718 * solib-irix.c (enable_break, disable_break): Update.
1719 * procfs.c (procfs_mourn_inferior): Update.
1720 (remove_dbx_link_breakpoint): Update.
1722 * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
1723 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
1724 * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
1725 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
1726 Update callers to set_breakpoint, set_momentary_breakpoint and
1727 set_momentary_breakpoint_at_pc:
1728 * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
1729 (until_break_command): Update.
1730 * infcall.c (call_function_by_hand): Update.
1731 * infcmd.c (finish_backward, finish_forward): Update.
1732 * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
1733 parameter. Pass it to set_momentary_breakpoint.
1734 (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
1735 Pass it to set_momentary_breakpoint_at_pc.
1736 (handle_inferior_event): Update.
1737 (insert_step_resume_breakpoint_at_frame): Update.
1738 (insert_step_resume_breakpoint_at_caller): Update..
1739 * mi/mi-cmd-break.c: Include "arch-utils.h".
1740 (mi_cmd_break_insert): Update.
1742 * target.h (struct target_ops): Add GDBARCH parameter to
1743 to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
1744 and to_remove_hw_breakpoint members.
1745 (target_insert_breakpoint, target_remove_breakpoint,
1746 target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
1747 parameter, pass to target routine.
1748 (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
1750 * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
1751 debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
1752 GDBARCH parameter, pass to target routine.
1753 (update_current_target): Update function signature.
1754 * breakpoint.c (insert_bp_location, remove_breakpoint,
1755 deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
1756 Pass architecture to target_ routines.
1757 Update all implementations of the target breakpoint routines to take
1758 GDBARCH parameter and use it instead of GDBARCH as appropriate:
1759 * corelow.c (ignore): Update.
1760 * exec.c (ignore): Update.
1761 * mem-break.c (memory_insert_breakpoint): Update.
1762 (memory_remove_breakpoint): Update.
1763 * monitor.c (monitor_insert_breakpoint): Update.
1764 (monitor_remove_breakpoint): Update.
1765 * record.c (record_insert_breakpoint): Update.
1766 (record_beneath_to_insert_breakpoint): Update.
1767 (record_remove_breakpoint): Update.
1768 (record_beneath_to_remove_breakpoint): Update.
1769 * remote.c (remote_insert_breakpoint): Update.
1770 (remote_remove_breakpoint): Update.
1771 (remote_insert_hw_breakpoint): Update.
1772 (remote_remove_hw_breakpoint): Update.
1773 * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
1774 (m32r_remove_breakpoint): Update.
1775 * remote-mips.c (mips_insert_breakpoint): Update.
1776 (mips_remove_breakpoint): Update.
1777 * i386-nat.c (i386_insert_hw_breakpoint): Update.
1778 (i386_remove_hw_breakpoint): Update.
1779 * nto-procfs.c (procfs_insert_breakpoint): Update.
1780 (procfs_remove_breakpoint): Update.
1781 (procfs_insert_hw_breakpoint): Update.
1782 (procfs_remove_hw_breakpoint): Update.
1784 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1786 * frame.h (frame_unwind_arch): New.
1787 (frame_unwind_caller_arch): Likewise.
1788 * frame-unwind.h (frame_prev_arch_ftype): New type.
1789 (struct frame_unwind): New member prev_arch.
1790 * frame.c (struct frame_info): New member prev_arch.
1791 (frame_unwind_arch): New function.
1792 (frame_unwind_caller_arch): Likewise..
1793 (get_frame_arch): Reimplement in terms of frame_unwind_arch.
1794 * sentinel-frame.c (sentinel_frame_prev_arch): New function.
1795 (sentinel_frame_unwinder): Install it.
1797 * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
1799 (frame_unwind_register_value): Likewise.
1800 (frame_unwind_register_signed): Likewise.
1801 (frame_unwind_register_unsigned): Likewise.
1802 * frame-unwind.c (frame_unwind_got_optimized): Likewise.
1803 (frame_unwind_got_register): Likewise.
1804 (frame_unwind_got_constant): Likewise.
1805 (frame_unwind_got_bytes): Likewise.
1806 (frame_unwind_got_address): Likewise.
1808 * frame.h (enum frame_type): New value ARCH_FRAME.
1809 * frame.c (fprint_frame_type): Handle ARCH_FRAME.
1810 * stack.c (print_frame_info): Likewise.
1812 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1814 * target.h (struct target_ops): New member to_thread_architecture.
1815 (target_thread_architecture): New macro.
1816 * target.c (update_current_target): Inherit to_thread_architecture.
1817 (default_thread_architecture): New function.
1818 (debug_to_thread_architecture): New function.
1819 (setup_target_debug): Handle to_thread_architecture.
1821 * regcache.h (get_thread_arch_regcache): New.
1822 * regcache.c (struct regcache_list): New data type.
1823 (current_regcache): Hold regcache list instead of single regcache.
1824 (current_thread_ptid, current_thread_arch): New static variables.
1825 (get_thread_arch_regcache): New function.
1826 (get_thread_regcache): Use it. Call target_thread_architecture.
1827 (regcache_thread_ptid_changed): Update to current_regcache changes.
1828 (registers_changed): Likewise. Reset current_thread_arch and
1829 current_thread_ptid.
1831 * remote.c (remote_wait): Access target registers in target_gdbarch.
1832 * linux-nat.c (linux_nat_do_thread_registers): Likewise.
1833 * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
1834 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
1835 * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
1836 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
1837 * solib-svr4.c (enable_break): Likewise.
1838 (svr4_relocate_main_executable): Likewise.
1840 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1842 * python/python-internal.h (struct language_defn): Declare.
1843 (python_gdbarch, python_language): Likewise.
1844 (ensure_python_env): Add prototype.
1845 (make_cleanup_py_restore_gil): Remove prototype.
1847 * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
1848 (python_gdbarch, python_language): New global variables.
1849 (struct python_env): New data type.
1850 (ensure_python_env, restore_python_env): New functions.
1851 (eval_python_from_control_command): Call ensure_python_env to
1852 install current architecture and language.
1853 (python_command, gdbpy_new_objfile): Likewise.
1854 * python/python-cmd.c: Include "arch-utils.h" and "language.h".
1855 (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
1857 * python/python-type.c (clean_up_objfile_types): Likewise.
1858 * python/python-objfile.c: Include "language.h".
1859 (clean_up_objfile): Call ensure_python_env.
1860 * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
1861 (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
1862 * varobj.c (varobj_ensure_python_env): New helper function.
1863 (varobj_get_display_hint, update_dynamic_varobj_children,
1864 install_default_visualizer, varobj_set_visualizer, free_variable,
1865 value_get_print_value): Call it.
1866 (value_get_print_value): Add varobj argument instead of pretty
1867 printer argument. Update all callers.
1869 * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
1872 * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
1873 (call_internal_function): Likewise.
1874 * value.c (call_internal_function): Likewise. Pass to handler.
1875 * eval.c (evaluate_subexp_standard): Update call.
1876 * python/python-function.c: Include "language.h".
1877 (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
1878 make_cleanup_python_env.
1880 * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
1881 builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
1882 valpy_str): Use python_gdbarch and python_language instead of
1883 current_gdbarch and current_language.
1884 * python/python-type.c (typy_lookup_typename): Likewise.
1886 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1888 * arch-utils.c (selected_byte_order): Return target_byte_order_user.
1889 (show_endian): Use target_byte_order_user if specified; otherwise
1890 use get_current_arch () instead of current_gdbarch.
1891 (show_architecture): Use set_architecture_string if specified;
1892 otherwise use get_current_arch () instead of current_gdbarch.
1893 (get_current_arch): New function.
1894 * arch-utils.h (get_current_arch): Add prototype.
1896 * osabi.c (show_osabi): Use get_current_arch () instead of
1899 * findcmd.c: Include "arch-utils.h".
1900 (parse_find_args): Add BIG_P argument. Use it instead of byte order
1902 (find_command): Use get_current_arch () instead of current_gdbarch.
1903 Pass byte order to parse_find_args.
1905 * maint.c: Include "arch-utils.h".
1906 (maintenance_print_architecture): Use get_current_arch () instead
1909 * reggroups.c: Include "arch-utils.h".
1910 (maintenance_print_reggroups): Use get_current_arch () instead
1913 * symfile.c: Include "arch-utils.h".
1914 (overlay_load_command): Use get_current_arch () instead of
1917 * value.c: Include "arch-utils.h".
1918 (show_convenience): Use get_current_arch () instead of
1921 * tui/tui-regs.c: Include "arch-utils.h".
1922 (tui_reg_next_command): Use get_current_arch () instead of
1925 * mi/mi-main.c: Include "arch-utils.h".
1926 (mi_cmd_data_read_memory): Use get_current_arch () instead of
1929 * parse.c: Include "arch-utils.h".
1930 (parse_exp_in_context): Use get_current_arch () instead of
1933 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
1935 * gdbtypes.c (make_pointer_type, make_reference_type,
1936 smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
1937 Use type architecture instead of current_gdbarch.
1939 * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
1940 Add GDBARCH paramter.
1941 * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
1942 Add GDBARCH parameter. Use it instead of current_gdbarch.
1943 * c-typeprint.c (c_type_print_modifier): Update call.
1944 * parse.c (push_type_address_space): Likewise.
1946 * findvar.c (extract_typed_address, store_typed_address): Use type
1947 architecture instead of current_gdbarch.
1949 * value.c (value_as_address, unpack_field_as_long): Use type architecture
1950 instead of current_gdbarch.
1952 * doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
1953 instead of current_gdbarch.
1954 (floatformat_from_type): Pass type architecture.
1956 * infcall.c (find_function_addr): Use type architecture instead
1959 * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
1960 value_bit_index): Use type architecture instead of current_gdbarch.
1961 * valops.c (value_cast, value_slice): Likewise.
1963 * value.h (modify_field): Add TYPE argument.
1964 * value.c (modify_field): Add TYPE argument. Use type architecture
1965 instead of current_gdbarch.
1966 (set_internalvar_component): Likewise.
1967 * eval.c (evaluate_struct_tuple): Update call.
1968 * valops.c (value_assign): Likewise.
1969 * ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
1970 (make_array_descriptor): Update calls.
1971 (move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
1973 (ada_value_assign, value_assign_to_component): Update calls.
1974 (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
1975 value_assign_to_component): Use type arch instead of current_gdbarch.
1977 * printcmd.c (float_type_from_length): Remove GDBARCH argument,
1978 use type architecture instead.
1979 (print_scalar_formatted, printf_command): Update calls. Use type
1980 architecture instead of current_gdbarch.
1981 * valprint.c (val_print_type_code_int): Use type architecture
1982 instead of current_gdbarch.
1983 * varobj.c (value_get_print_value): Likewise.
1984 * python/python-prettyprint.c (print_string_repr): Add GDBARCH
1985 argument. Use it instead of current_gdbarch.
1986 (apply_val_pretty_printer): Update call.
1988 * ada-valprint.c (ada_val_print_1): Use type architecture instead
1990 * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
1991 Use it instead of current_gdbarch.
1992 (c_val_print): Update calls passing type architecture.
1993 * f-valprint.c (f_val_print): Use type architecture instead of
1995 * jv-valprint (java_value_print): Likewise.
1996 * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
1997 Use it instead of current_gdbarch.
1998 (print_unpacked_pointer): Update calls passing type architecture.
1999 * scm-valprint.c (scm_scmval_print): Use type architecture instead of
2002 * gnu-v3-abi.c (get_class_arch): Remove.
2003 (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
2004 special-case check for Java classes.
2005 (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
2006 gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
2007 Use get_type_arch instead of get_class_arch.
2009 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2011 * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
2012 (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
2013 (alloc_type_arch): Add prototype.
2014 (alloc_type_copy): Likewise.
2015 (get_type_arch): Likewise.
2016 (arch_type): Likewise.
2017 (arch_integer_type): Likewise.
2018 (arch_character_type): Likewise.
2019 (arch_boolean_type): Likewise.
2020 (init_float_type): Remove, replace by ...
2021 (arch_float_type): ... this.
2022 (init_complex_type): Remove, replace by ...
2023 (arch_complex_type): ... this.
2024 (init_flags_type): Remove, replace by ...
2025 (arch_flags_type): ... this.
2026 (init_composite_type): Remove, replace by ...
2027 (arch_composite_type): ... this.
2029 * gdbtypes.c (alloc_type): No longer support NULL objfile.
2030 (init_type): Likewise.
2031 (alloc_type_arch): New function.
2032 (alloc_type_copy): New function.
2033 (get_type_arch): New function.
2035 (smash_type): Preserve type ownership information.
2036 (make_pointer_type, make_reference_type, make_function_type,
2037 smash_to_memberptr_type, smash_to_method_type): No longer
2038 preserve OBJFILE across smash_type calls.
2039 (make_pointer_type, make_reference_type, make_function_type,
2040 lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
2041 create_range_type, create_array_type, create_set_type, copy_type):
2042 Use alloc_type_copy when allocating types.
2043 (check_typedef): Use alloc_type_arch.
2044 (copy_type_recursive): Likewise. Preserve type ownership data
2046 (recursive_dump_type): Dump type ownership data.
2047 (alloc_type_instance): Update type ownership check.
2048 (copy_type, copy_type_recursive): Likewise.
2050 (arch_type): New function.
2051 (arch_integer_type): Likewise.
2052 (arch_character_type): Likewise.
2053 (arch_boolean_type): Likewise.
2054 (init_float_type): Remove, replace by ...
2055 (arch_float_type): ... this.
2056 (init_complex_type): Remove, replace by ...
2057 (arch_complex_type): ... this.
2058 (init_flags_type): Remove, replace by ...
2059 (arch_flags_type): ... this.
2060 (append_flags_type_flag): Move down.
2061 (init_composite_type): Remove, replace by ...
2062 (arch_composite_type): ... this.
2063 (append_composite_type_field_aligned,
2064 append_composite_type_field): Move down.
2066 * gdbarch.c (gdbtypes_post_init): Allocate all types
2067 using per-architecture routines.
2068 * ada-lang.c (ada_language_arch_info): Likewise.
2069 * f-lang.c (build_fortran_types): Likewise.
2070 * jv-lang.c (build_java_types): Likewise.
2071 * m2-lang.c (build_m2_types): Likewise.
2072 * scm-lang.c (build_scm_types): Likewise.
2074 * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
2075 (packed_array_type): Likewise.
2076 (ada_template_to_fixed_record_type_1): Likewise.
2077 (template_to_static_fixed_type): Likewise.
2078 (to_record_with_fixed_variant_part): Likewise.
2079 (to_fixed_variant_branch_type): Likewise.
2080 (to_fixed_array_type): Likewise.
2081 (to_fixed_range_type): Likewise.
2082 (empty_record): Use type instead of objfile argument.
2083 Use alloc_type_copy.
2084 (to_fixed_variant_branch_type): Update call to empty_record.
2085 * jv-lang.c (type_from_class): Use alloc_type_arch.
2087 * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
2088 * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
2089 i386_mmx_type, i386_sse_type): Likewise.
2090 * ia64-tdep.c (ia64_ext_type): Likewise.
2091 * m32c-tdep.c (make_types): Likewise.
2092 * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
2093 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2094 rs6000_builtin_type_vec128): Likewise.
2095 * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
2096 * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
2097 sparc64_fprs_type): Likewise.
2098 * spu-tdep.c (spu_builtin_type_vec128): Likewise.
2099 * xtensa-tdep.c (xtensa_register_type): Likewise.
2100 * linux-tdep.c (linux_get_siginfo_type): Likewise.
2101 * target-descriptions.c (tdesc_gdb_type): Likewise.
2102 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2104 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2106 * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
2107 i386_mxcsr_type members.
2108 (i386_eflags_type): Make into function.
2109 (i386_mxcsr_type): Likewise.
2110 * i386-tdep.c (i386_eflags_type): Make into function.
2111 (i386_mxcsr_type): Likewise.
2112 (i386_register_type): Update uses.
2113 (i386_init_types): Remove.
2114 (_initialize_i386_tdep): Do not call it.
2115 * amd64-tdep.c (amd64_register_type): Update uses.
2117 * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
2118 * m68k-tdep.c (m68k_ps_type): Make into function.
2119 (m68k_register_type): Update use.
2120 (m68k_init_types): Remove.
2121 (_initialize_m68k_tdep): Do not call it.
2123 * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
2124 sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
2125 sparc64_fprs_type members.
2126 * sparc-tdep.c (sparc_psr_type): Make into function.
2127 (sparc_fsr_type): Likewise.
2128 (sparc32_register_type): Update uses.
2129 (sparc_init_types): Remove.
2130 (_initialize_sparc_tdep): Do not call it.
2131 * sparc64-tdep.c (sparc64_pstate_type): Make into function.
2132 (sparc64_fsr_type): Likewise.
2133 (sparc64_fprs_type): Likewise.
2134 (sparc64_register_type): Update uses.
2135 (sparc64_init_types): Remove.
2136 (_initialize_sparc64_tdep): Likewise.
2138 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2140 * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
2141 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2142 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2143 (init_float_type, init_complex_type): Add prototypes.
2144 * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
2145 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2146 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2147 (_initialize_gdbtypes): Do not initialize them.
2148 (build_flt): Rename to ...
2149 (init_float_type): ... this. Make global.
2150 (build_complex): Rename to ...
2151 (init_complex_type): ... this. Make global. Remove BIT argument.
2152 (gdbtypes_post_init): Update calls.
2154 * ada-lang.c (ada_language_arch_info): Use init_float_type.
2155 * jv-lang.c (build_java_types): Likewise.
2156 * m2-lang.c (build_m2_types): Likewise.
2157 * f-lang.c (build_fortran_types): Use init_float_type and
2160 * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
2161 of using builtin_type_ieee_single, builtin_type_ieee_double, or
2162 builtin_type_arm_ext.
2164 * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
2165 * ia64-tdep.c (builtin_type_ia64_ext): Remove.
2166 (_initialize_ia64_tdep): Do not initialize it.
2167 (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
2169 (ia64_ext_type): New function.
2170 (ia64_register_reggroup_p, ia64_convert_register_p,
2171 ia64_register_to_value, ia64_value_to_register,
2172 ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
2173 instead of builtin_type_ia64_ext.
2175 * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
2176 (i387_ext_type): Add prototype.
2177 * i386-tdep.c (i387_ext_type): New function.
2178 (i386_extract_return_value, i386_store_return_value,
2179 i386_register_type): Use it instead of builtin_type_i387_ext.
2180 * amd64-tdep.c (amd64_register_type): Likewise.
2181 * i387-tdep.c (print_i387_value, i387_register_to_value,
2182 i387_value_to_register): Likewise.
2183 (print_i387_value, print_i387_ext): Add GDBARCH argument.
2184 (print_i387_ext, i387_print_float_info): Pass to subroutines.
2186 * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
2187 * m68k-tdep.c (m68881_ext_type): New function.
2188 (m68k_register_type, m68k_convert_register_p): Use it instead
2189 of builtin_type_m68881_ext.
2191 * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
2192 * arm-tdep.c (arm_ext_type): New function.
2193 (arm_register_type): Use it instead of builtin_type_arm_ext.
2195 * alpha-tdep.c (alpha_register_type): Use builtin types
2196 instead of builtin_type_ieee_double.
2198 * mips-tdep.c (mips_float_register_type, mips_double_register_type):
2200 (mips_register_type): Use builtin types instead of
2201 builtin_type_ieee_single and builtin_type_ieee_double.
2202 (mips_print_fp_register): Use builtin types instead of
2203 mips_float_register_type and mips_double_register_type.
2205 * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
2206 Use builtin types instead of builtin_type_ieee_single and
2207 builtin_type_ieee_double.
2209 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2211 * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2212 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2213 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2214 builtin_type_int128, builtin_type_uint128): Remove.
2215 (struct builtin_type): New members builtin_int0, builtin_int8,
2216 builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
2217 builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
2218 and builtin_uint128.
2219 * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2220 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2221 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2222 builtin_type_int128, builtin_type_uint128): Remove.
2223 (_initialize_gdbtypes): Do not initialize them.
2224 (gdbtypes_post_init): Initialize fixed-size integer types.
2226 * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
2227 GDBARCH argument. Return platform-specific type.
2228 (dwarf2_read_address, execute_stack_op): Update calls.
2230 * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
2231 instead of global builtin_int_... variables.
2232 * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
2233 * printcmd.c (do_examine): Likewise.
2234 * jv-exp.y (parse_number): Likewise.
2236 * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
2237 alpha_store_return_value): Likewise.
2238 * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
2239 * amd64-tdep.c (amd64_register_type): Likewise.
2240 * arm-tdep.c (arm_register_type): Likewise.
2241 * avr-tdep.c (avr_register_type): Likewise.
2242 * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
2243 * frv-tdep.c (frv_register_type): Likewise.
2244 * h8300-tdep.c h8300_register_type): Likewise.
2245 * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
2246 hppa64_register_type): Likewise.
2247 * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
2248 * iq2000-tdep.c (iq2000_register_type): Likewise.
2249 * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
2250 * m32r-tdep.c (m32r_register_type): Likewise.
2251 * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
2252 m68hc11_pseudo_register_write): Likewise.
2253 * m68k-tdep.c (m68k_register_type): Likewise.
2254 * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
2255 * mep-tdep.c (mep_register_type): Likewise.
2256 * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
2257 mips_print_fp_register): Likewise.
2258 * moxie-tdep.c (moxie_register_type): Likewise.
2259 * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
2260 * rs6000-tdep.c (rs6000_builtin_type_vec64,
2261 rs6000_builtin_type_vec128): Likewise.
2262 * score-tdep.c (score_register_type): Likewise.
2263 * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
2265 * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
2267 * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
2268 * v850-tdep.c (v850_register_type): Likewise.
2269 * xstormy16-tdep.c (xstormy16_register_type): Likewise.
2270 * xtensa-tdep.c (xtensa_register_type): Likewise.
2272 * mt-tdep.c (struct gdbarch_tdep): New data structure.
2273 (mt_gdbarch_init): Alloc TDEP structures.
2274 (mt_register_type): Cache coprocessor type in TDEP instead of
2275 static global variable.
2277 * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
2278 * xtensa-tdep.c (type_entries): Remove.
2279 (xtensa_register_type): Cache fixed-size types in TDEP instead
2280 of in global variable.
2282 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2284 * gdbtypes.h (builtin_type_true_char): Remove.
2285 (builtin_type_true_unsigned_char): Likewise.
2286 (struct builtin_type): Add builtin_true_char and
2287 builtin_true_unsigned_char members.
2288 * gdbtypes.c (builtin_type_true_char): Remove.
2289 (builtin_type_true_unsigned_char): Likewise.
2290 (_initialize_gdbtypes): Do not initialize them.
2291 (gdbtypes_post_init): Initialize builtin_true_char and
2292 builtin_true_unsigned_char members of builtin_type.
2294 * printcmd.c (print_scalar_formatted): Use builtin_type
2295 members instead of builtin_type_true_char and
2296 builtin_type_true_unsigned_char.
2297 * ada-valprint.c (ada_val_print_1): Likewise.
2299 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2301 * gdbtypes.h (builtin_type_void): Remove.
2302 * gdbtypes.c (builtin_type_void): Remove.
2303 (_initialize_gdbtypes): Do not initialize it.
2305 (safe_parse_type): Add GDBARCH argument. Use it to construct
2307 (check_stub_method): Update call.
2309 * infcall.c (call_function_by_hand): Use platform-specific type
2310 instead of builtin_type_void.
2311 * valops.c (value_cast): Use input void type instead of
2314 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2316 * ada-lang.c (assign_component): Use platform-specific integer type
2317 instead of builtin_type_int32 type.
2318 (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
2320 * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
2321 instead of builtin_type_int8 type.
2322 * valarith.c (value_x_unop): Likewise.
2323 * python/python-value.c (valpy_absolute): Avoid reference to
2324 builtin_type_int8 type.
2326 * eval.c (evaluate_subexp_standard): Use platform-specific integer
2327 type instead of builtin_type_int8 as EVAL_SKIP return value type.
2328 * ada-lang.c (ada_evaluate_subexp): Likewise.
2329 * jv-lang.c (evaluate_subexp_java): Likewise.
2330 * m2-lang.c (evaluate_subexp_modula2): Likewise.
2331 * scm-lang.c (evaluate_exp): Likewise.
2333 * value.h (value_bitstring): Add INDEX_TYPE argument.
2334 * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
2335 of builtin_type_int32 as base range type.
2336 * eval.c (evaluate_subexp_standard): Update value_bitstring call.
2338 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2340 * gdbtypes.c (lookup_array_range_type): Add prototype.
2341 (lookup_string_range_type): Likewise.
2342 * gdbtypes.c (lookup_array_range_type): New function.
2343 (lookup_string_range_type): Likewise.
2345 * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
2346 * parse.c (follow_types): Likewise.
2347 * jv-lang.c (java_array_type): Likewise.
2348 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2349 * mt-tdep.c (mt_register_type): Likewise.
2350 * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
2351 * sh64-tdep.c (sh64_build_float_register_type): Likewise.
2352 * value.c (allocate_repeat_value): Likewise.
2353 * valops.c (value_array, value_cstring): Likewise.
2354 * valops.c (value_string): Use lookup_string_range_type.
2356 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2358 * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
2359 redundant check for NULL TYPE_TARGET_TYPE.
2360 * m2-valprint.c (m2_print_long_set): Likewise.
2361 * p-valprint.c (pascal_type_print_base): Likewise.
2363 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2365 * printcmd.c (next_gdbarch): New static variable.
2366 (set_next_address, do_examine, x_command): Set it.
2367 (decode_format): Use 'a' size to indicate width of an address.
2368 (do_examine): Add GDBARCH argument. Handle 'a' size.
2369 (x_command): Pass architecture to do_examine.
2370 Error if called without argument the first time.
2371 (do_one_display): Pass architecture to do_examine.
2373 (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
2374 examine_g_type): Remove.
2375 (_initialize_printcmd): Do not initialize them.
2376 (do_examine): Use builin_type_int... instead of examine_..._type.
2378 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2380 * gdbtypes.h (struct builtin_type): Add internal_fn member.
2381 * gdbtypes.c (gdbtypes_post_init): Initialize it.
2382 * value.c (internal_fn_type): Remove.
2383 (_initialize_values): Do not initialize it.
2385 * value.c (struct internalvar): Add enum internalvar_kind type and
2386 kind member. Restructure union internalvar_data type. Remove type,
2387 canonical, and make_value members.
2388 (init_if_undefined_command): Update for data structure changes.
2389 (create_internalvar): Likewise.
2390 (create_internalvar_type_lazy): Likewise.
2391 (get_internalvar_integer): Likewise.
2392 (get_internalvar_function): Likewise.
2393 (set_internalvar_component): Likewise.
2394 (set_internalvar): Likewise.
2395 (set_internalvar_integer): Likewise.
2396 (set_internalvar_function): Likewise.
2397 (clear_internalvar): Likewise.
2398 (add_internal_function): Likewise.
2399 (preserve_one_internalvar): New function.
2400 (preserve_values): Call it.
2402 * value.h (value_of_internalvar): Add GDBARCH parameter.
2403 (internalvar_make_value): Likewise.
2404 * value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
2405 make_value callback. Use it to generate per-architecture result value
2406 types for internal variables with no pre-defined type. Update for data
2408 (show_convenience): Pass architecture to value_of_internalvar.
2409 * eval.c (evaluate_subexp_standard): Likewise.
2410 * infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
2411 instead of current frame architecture. Return per-architecture type.
2413 * value.h (set_internalvar_string): Add prototype.
2414 * value.c (set_internalvar_string): New function.
2415 * tracepoint.c (set_traceframe_context): Use it.
2417 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
2419 * jv-lang.h (java_int_type, java_byte_type, java_short_type,
2420 java_long_type, java_boolean_type, java_char_type, java_float_type,
2421 java_double_type, java_void_type): Remove.
2422 (struct builtin_java_type): New data type.
2423 (builtin_java_type): Add prototype.
2424 (java_primitive_type): Add GDBARCH argument.
2425 (java_primitive_type_from_name): Likewise.
2426 (type_from_class): Likewise.
2428 * jv-lang.c (java_int_type, java_byte_type, java_short_type,
2429 java_long_type, java_boolean_type, java_char_type, java_float_type,
2430 java_double_type, java_void_type): Remove.
2432 (build_java_types, builtin_java_type): New functions.
2433 (java_type_data): New static variable.
2434 (_initialize_java_language): Initialize it. No longer initialize
2436 (java_language_arch_info): Use per-architecture types.
2438 (java_primitive_type): Add GDBARCH argument. Return per-architecture
2439 type instead of refering to global variable.
2440 (java_primitive_type_from_name): Add GDBARCH argument.
2441 (java_primitive_type_name): New function.
2442 (java_demangled_signature_length): Use it instead of
2443 java_primitive_type_from_name.
2444 (java_demangled_signature_copy): Likewise.
2446 (type_from_class): Add GDBARCH argument. Pass to java_link_class_type,
2447 java_primitive_type, and recursive type_from_class call.
2448 (java_link_class_type): Add GDBARCH argument. Pass to type_from_class
2449 calls. Use per-architecture types instead of global types.
2451 * jv-exp.y (parse_java_type): New define.
2452 Use per-architecture types instead of global types througout.
2454 * jv-valprint.c (java_value_print): Pass architecture to
2455 type_from_class and java_primitive_type_from_name. Use per-
2456 architecture types instead of global types.
2458 2009-07-01 Doug Evans <dje@google.com>
2460 * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
2461 support for i386-linux, amd64-linux, and i386-win32 builds of
2464 2009-07-01 Nick Roberts <nickrob@snap.net.nz>
2466 * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
2468 2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
2470 * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
2471 (check//%): Construct FORCE_PARALLEL for the sub-make. Extend the
2474 2009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
2477 * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
2478 cfa_how and cfa_exp into regs and adjust users.
2480 2009-06-30 Daniel Jacobowitz <dan@codesourcery.com>
2482 * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
2484 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2486 * mi/mi-cmd-stack.c (parse_print_values): New.
2487 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
2489 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
2491 * varobj.c (varobj_get_type): Use type_to_string.
2493 2009-06-29 Pedro Alves <pedro@codesourcery.com>
2495 * infrun.c (handle_inferior_event): Context switch to the new
2496 thread when resuming for a new_thread_event.
2498 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2500 * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
2501 * ada-lang.c (convert_actual): Remove stale prototype.
2502 (ensure_lval, make_array_descriptor, ada_convert_actual):
2503 Add GDBARCH argument and pass through to subroutine calls.
2504 (ensure_lval): Use GDBARCH instead of current_gdbarch.
2505 * infcall.c (value_arg_coerce): Update ada_convert_actual call.
2507 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2509 * ada-lang.c (resolve): Use per-architecture void type instead
2510 of platform-independent one.
2511 (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
2512 (ada_resolve_function): Reimplement fallback logic to avoid
2513 explicit reference to builtin_type_void.
2515 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2517 * ada-valprint.c (ada_print_scalar): Accept NULL type argument
2518 to indicate scalar should be printed as default integer.
2519 (print_optional_low_bound): Pass NULL to ada_print_scalar to
2520 indicate default integer output.
2521 * ada-typeprint.c (print_range, print_range_bound): Likewise.
2522 (print_choices): Likewise. Thus, accept NULL as val_type.
2523 * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
2524 to look up controlling discriminant name.
2526 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2528 * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
2529 Fall back to orig_type as index type if symbol lookup fails.
2530 Allocate result types from ORIG_TYPE's objfile.
2531 (ada_array_bound_from_type, to_fixed_array_type,
2532 ada_evaluate_subexp): Pass original index type to
2533 to_fixed_range_type. Do not pass objfile.
2535 * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
2536 Fall back to orig_type as index type if symbol lookup fails.
2537 (print_array_type, ada_print_type): Pass original index type
2538 to print_range_type_named.
2540 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2542 * ada-lang.c (ada_index_type): Update comment.
2544 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2546 * ada-lang.c (ada_index_type): Make static. Add NAME argument.
2547 Throw error on invalid input arguments. Return NULL if unable
2548 to determine index type.
2550 (ada_array_bound_from_type): Remove TYPEP argument.
2551 (ada_array_bound): Make static. Return LONGEST instead of value.
2552 Update for ada_array_bound_from_type change.
2553 (ada_array_length): Return LONGEST instead of value.
2554 Update for ada_array_bound_from_type change.
2555 (make_array_descriptor): Update for ada_array_bound change.
2557 (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
2558 OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
2559 ada_array_bound, ada_array_length, ada_index_type changes.
2560 Always use ada_index_type to compute result type; fall back
2561 to architecture-specific integer type if ada_index_type fails.
2563 * ada-lang.h (ada_index_type): Remove prototype.
2564 (ada_array_bound): Likewise.
2566 2009-06-29 Pedro Alves <pedro@codesourcery.com>
2568 * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
2571 2009-06-29 Tom Tromey <tromey@redhat.com>
2573 * README: Mention parallel check.
2575 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com>
2577 * dwarf2read.c (read_import_statement): Properly set import location
2579 * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
2580 inner, char* outer arguments. Updated callers.
2582 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2584 * value.h (value_subscript, value_subscripted_rvalue,
2585 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2586 of value as type of the index argument.
2587 (value_ptrsub): Remove.
2588 * valarith.c (value_subscript, value_subscripted_rvalue,
2589 value_bitstring_subscript, value_ptradd): Use LONGEST instead
2590 of value as type of the index argument.
2591 (value_ptrsub): Remove.
2593 * wrapper.h (gdb_value_subscript): Use LONGEST instead of
2594 value as type of the index argument.
2595 * wrapper.c (gdb_value_subscript): Likewise.
2597 Update calls to gdb_value_subscript, value_subscript,
2598 value_subscripted_rvalue, value_bitstring_subscript and
2599 value_ptradd to use LONGEST instead of value as index
2600 argument type. Use value_ptradd instead of value_ptrsub.
2601 * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
2602 ada_tag_name_2): Update.
2603 * ada-tasks.c (read_atcb): Update.
2604 * eval.c (evaluate_subexp_standard): Update.
2605 * valarith.c (value_subscript): Update.
2606 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
2607 * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
2608 gnuv3_method_ptr_to_value): Update.
2609 * jv-lang.c (evaluate_subexp_java): Update.
2610 * m2-lang.c (evaluate_subexp_modula2): Update.
2611 * python/python-value.c (valpy_getitem, valpy_binop): Update.
2612 * wrapper.c (gdb_value_subscript): Update.
2613 * varobj.c (c_describe_child): Update.
2615 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2617 * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
2618 * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
2619 (lookup_function_type): Update call.
2620 * stabsread.c (read_type): Likewise.
2621 * dwarf2read.c (read_subroutine_type): Use lookup_function_type
2622 instead of make_function_type.
2623 * jv-lang.c (type_from_class): Likewise. Do not allocate types
2624 on the fake "dynamics" obstack.
2626 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2628 * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
2629 nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
2630 and nodebug_tls_symbol members.
2631 (struct objfile_type): New data structure.
2632 (objfile_type): Add prototype.
2633 * gdbtypes.c (gdbtypes_post_init): Remove initialization code
2634 for types no longer in struct builtin_type.
2635 (objfile_type_data): New static variable.
2636 (_initialize_gdbtypes): Initialize it.
2637 (objfile_type): New function.
2639 * gdbtypes.h (builtin_type_error): Remove.
2640 * gdbtypes.c (build_complex): Do not use builtin_type_error.
2641 * symtab.c (builtin_type_error): Remove.
2642 (_initialize_symtab): Remove initialization.
2644 * stabsread.c (dbx_lookup_type, define_symbol, error_type,
2645 rs6000_builtin_type, read_range_type): Use per-objfile types
2646 instead of global or per-architecture builtin types.
2647 * coffread.c (decode_type): Likewise.
2648 * dwarf2read.c (read_array_type, read_tag_string_type,
2649 new_symbol, die_type): Likewise.
2650 * mdebugread.c (parse_symbol, basic_type, upgrade_type,
2651 parse_procedure, psymtab_to_symtab_1): Likewise.
2652 * xcoffread.c (process_xcoff_symbol): Likewise.
2653 * parse.c (write_exp_msymbol): Likewise.
2655 * stabsread.c (rs6000_builtin_type_data): New static variable.
2656 (_initialize_stabsread): Initialize it.
2657 (rs6000_builtin_type): Add OBJFILE argument. Allocate builtin
2658 types per-objfile instead of globally.
2660 * stabsread.c (dbx_lookup_type): Add OBJFILE argument. Use it
2661 instead of current_objfile; pass it to rs6000_builtin_type.
2662 (dbx_alloc_type, read_type, read_range_type): Update calls.
2663 (cleanup_undefined_types_noname): Add OBJFILE argument and
2664 pass it to dbx_lookup_type.
2665 (cleanup_undefined_types): Add OBJFILE argument and pass it
2666 to cleanup_undefined_types_noname.
2667 * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
2668 * buildsym.c (end_symtab): Update call.
2670 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2672 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2673 target_gdbarch instead of current_gdbarch.
2675 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
2677 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
2678 (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
2681 * configure.tgt: Add comment.
2683 2009-06-28 Paul Pluzhnikov <ppluzhnikov@google.com>
2685 * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
2687 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2688 Jan Kratochvil <jan.kratochvil@redhat.com>
2690 * NEWS: Document inlined function support.
2691 * Makefile.in (SFILES): Add inline-frame.c.
2692 (COMMON_OBS): Add inline-frame.o.
2693 * block.c (contained_in): Rewrite to use lexical nesting.
2694 (block_linkage_function): Skip inlined function blocks.
2695 (block_inlined_p): New.
2696 * block.h (struct block): Update comment.
2697 (block_inlined_p): New prototype.
2698 * blockframe.c (get_frame_block): Handle inlined functions.
2699 (get_frame_function): Do not use block_linkage_function.
2700 (block_innermost_frame): Use get_frame_block and contained_in.
2701 * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
2702 Skip over inlined functions. Simplify epilogue check.
2703 (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
2705 (set_momentary_breakpoint): Only accept non-inlined frames.
2706 (watch_command_1): Use frame_unwind_caller_pc and
2707 frame_unwind_caller_id instead of get_prev_frame.
2708 (until_break_command): Likewise. Use get_stack_frame_id.
2709 * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
2710 * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
2711 * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
2712 (read_func_scope, new_symbol): Likewise. Handle arguments specially
2713 for inlined functions without call site information.
2714 (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
2715 (die_specification): Treat DW_AT_abstract_origin as a specification.
2716 (read_type_die): Handle DW_TAG_inlined_subroutine.
2717 * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
2718 * frame.c (fprint_frame_id): Print inline depth.
2719 (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
2720 (skip_inlined_frames, get_stack_frame_id): New.
2721 (frame_unwind_caller_id): Use skip_inlined_frames.
2722 (frame_id_inlined_p): New.
2723 (frame_id_eq): Make the logic match the comments. Add inline_depth
2725 (frame_id_inner): Handle inlined functions.
2726 (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
2727 (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
2728 (get_prev_frame_1): Check for inline frames. Split out frame
2729 allocation to get_prev_frame_raw.
2730 (get_prev_frame_raw): New function.
2731 (get_prev_frame): Handle inline frames.
2732 (get_frame_pc): Use frame_unwind_pc.
2733 (get_frame_address_in_block): Skip inlined frames on both sides.
2734 (pc_notcurrent): Delete.
2735 (find_frame_sal): Rewrite to handle inline call sites. Use
2736 get_frame_address_in_block.
2737 (deprecated_update_frame_pc_hack): Make static.
2738 * frame.h: Update comments.
2739 (struct frame_id): Add inline_depth.
2740 (enum frame_type): Add INLINE_FRAME.
2741 (frame_id_inlined_p, get_stack_frame_id): New prototypes.
2742 * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
2743 * infcmd.c (set_step_frame): New function.
2744 (step_once): Use set_step_frame. Handle inlined functions.
2745 (until_next_command): Use set_step_frame.
2746 (finish_backward), finish_forward): Use get_stack_frame_id.
2747 (finish_command): Support inlined functions.
2748 * inferior.h (set_step_info): New prototype.
2749 * infrun.c (RESUME_ALL): Use minus_one_ptid.
2750 (clear_proceed_status): Clear step_stack_frame_id.
2751 (init_wait_for_inferior): Call clear_inline_frame_state.
2752 (init_execution_control_state): Make static.
2753 (set_step_info): New function.
2754 (init_thread_stepping_state): Do not set the symtab or line here.
2755 (stepped_in_from): New function.
2756 (handle_inferior_event): Handle inlined functions. Use set_step_info.
2757 (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
2758 (struct inferior_status): Add step_stack_frame_id.
2759 (save_inferior_status, restore_inferior_status): Save and restore
2760 step_stack_frame_id.
2761 * inline-frame.c, inline-frame.h: New files.
2762 * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
2763 * regcache.c (regcache_write_pc): Call reinit_frame_cache.
2764 * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
2765 * stack.c (frame_show_address): New.
2766 (print_frame_info, print_frame): Use it.
2767 (find_frame_funname): Use get_frame_function. Handle inlined blocks.
2768 (frame_info): Mark inlined functions.
2769 (backtrace_command_1): Use get_current_user_frame.
2770 (print_frame_local_vars, print_frame_label_vars): Update comments.
2771 (return_command): Refuse inlined functions.
2772 * symtab.c (lookup_symbol_aux_local): Stop at inlined function
2774 (find_function_start_sal): Avoid inlined functions.
2775 (completion_list_add_fields): New function.
2776 (default_make_symbol_completion_list): Use it. Use block_static_block
2777 and block_global_block. Check for inlined functions.
2778 (skip_prologue_using_sal): Avoid line number comparison across
2780 * symtab.h (struct symbol): Add is_inlined.
2781 (SYMBOL_INLINED): New.
2782 * target.c (target_resume): Call clear_inline_frame_state.
2783 * valops.c (value_of_variable): Check block_inlined_p.
2785 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
2787 * frame.c (frame_unwind_id): Renamed to ...
2788 (frame_unwind_caller_id): ... this. All callers updated.
2789 (frame_pc_unwind): Renamed to ...
2790 (frame_unwind_caller_pc): ... this. All callers updated.
2791 * frame.h: Document frame_unwind_caller_WHAT functions.
2792 (frame_unwind_id): Renamed to ...
2793 (frame_unwind_caller_id): ... this.
2794 (frame_pc_unwind): Renamed to ...
2795 (frame_unwind_caller_pc): ... this.
2796 * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
2797 * stack.c (parse_frame_specification_1): Do not rely on
2800 2009-06-27 Michael Snyder <msnyder@vmware.com>
2802 * infrun.c (handle_inferior_event): Improve handling of
2803 reverse-stepping into and over shared library functions.
2805 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
2807 * linespec.c (find_method): Add new not_found_ptr parameter to
2808 bring in line with symtab_from_filename, decode_variable.
2809 (decode_compound): Likewise. Also propagate not_found_ptr to
2811 (decode_line_1): Propagate not_found_ptr to decode_compound.
2812 (cplusplus_error): Now throws NOT_FOUND_ERROR.
2814 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
2816 * MAINTAINERS (Write After Approval): Add self.
2818 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2820 * valops.c (value_one): Reimplement broken decimal-float case.
2822 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2824 * eval.c (evaluate_subexp_standard): Use expression architecture
2825 instead of current_gdbarch.
2827 * infrun.c (handle_inferior_event): Avoid unncessary reference
2828 to current_gdbarch and get_current_frame ().
2830 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2832 * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
2833 (enum bptype): Add bp_longjmp_master.
2835 * breakpoint.c (create_longjmp_master_breakpoint): New function.
2836 (update_breakpoints_after_exec): Handle bp_longjmp_master
2837 breakpoints. Call create_longjmp_master_breakpoint.
2838 (print_it_typical, bpstat_stop_status, bpstat_what,
2839 print_one_breakpoint_location, allocate_bp_location, mention,
2840 delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
2841 (breakpoint_re_set): Call create_longjmp_master_breakpoint.
2842 (create_longjmp_breakpoint): Delete.
2843 (set_longjmp_breakpoint): Add THREAD argument. Reimplement
2844 to install momentary clones of bp_longjmp_master breakpoints.
2846 * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
2848 2009-06-23 Cary Coutant <ccoutant@google.com>
2850 * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
2851 Set basic_block to 0 after a special opcode.
2853 2009-06-23 Jan Kratochvil <jan.kratochvil@redhat.com>
2855 Fix a regression by the mmap patch from 2009-06-16.
2856 * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
2857 calls before deleting the OBJFILE obstack. Extend the comment.
2859 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2861 * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
2862 (get_java_object_header_size): Add GDBARCH parameter.
2863 * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
2864 Use it instead of current_gdbarch.
2865 (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
2866 get_java_object_header_size.
2867 * jv-valprint.c (java_value_print): Likewise.
2869 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
2871 * dwarf2read.c (process_die): Handle import statements
2872 (DW_TAG_imported_declaration, case DW_TAG_imported_module)
2873 (read_import_statement): New.
2874 (read_func_scope): Update using_directives to point to current context
2875 (read_lexical_block_scope): Ditto.
2876 * cp-support.h: Added prototype for cp_add_using.
2877 * cp-namespace.c: Removed local context_stack.
2878 (cp_initialize_namespace): Deleted.
2879 (cp_finalize_namespace): Deleted.
2880 (cp_add_using_directive): Use using_directives instead of using_list.
2881 (cp_add_using): No longer static.
2882 * buildsym.h: Created global using_direct variable.
2883 Created using_direct variable in context_stack.
2884 * buildsym.c (finish_block): Set using directives for the block under
2886 (start_symtab): Removed call to cp_initialize_namespace().
2887 (end_symtab): Removed call to cp_finalize_namespace().
2888 (push_context): Save and reset using_directives.
2889 * block.c (block_using): Return using directives for given
2890 block instead of static block.
2892 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
2894 * target-descriptions.h (struct type): Do not declare.
2895 (struct tdesc_type): Declare.
2896 (tdesc_named_type): Change return type to struct tdesc_type *.
2897 (tdesc_record_type): Remove.
2898 (tdesc_create_vector): Add prototype.
2899 (tdesc_create_union): Likewise.
2900 (tdesc_add_field): Likewise.
2902 * target-descriptions.c (struct tdesc_reg): Replace gdb_type
2903 member by tdesc_type member.
2904 (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
2905 (struct tdesc_type, tdesc_type_p): Likewise.
2906 (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
2907 (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
2908 (struct tdesc_arch_data): Replace registers member by arch_regs.
2910 (tdesc_predefined_types): Change to array of pre-defined
2911 struct tdesc_type structures. Add "code_ptr" and "data_ptr".
2912 (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
2913 (tdesc_gdb_type): New function.
2915 (target_find_description): Update for data structure changes.
2916 (tdesc_data_cleanup): Likewise.
2917 (tdesc_numbered_register): Likewise.
2918 (tdesc_use_registers): Likewise.
2919 (tdesc_create_reg): Likewise.
2921 (tdesc_find_arch_register): New function.
2922 (tdesc_find_register): Use it.
2923 (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
2924 tdesc_type on demand; cache generated types in tdesc_arch_reg.
2926 (tdesc_free_type): New function.
2927 (tdesc_free_feature): Call it.
2929 (tdesc_create_vector): New function.
2930 (tdesc_create_union): Likewise.
2931 (tdesc_add_field): Likewise.
2932 (tdesc_record_type): Remove.
2934 (tdesc_type_id): Remove.
2935 (maint_print_c_tdesc_cmd): Update for data structure changes. Update
2936 generated code to create tdesc_type structures instead of GDB types.
2938 * xml-tdesc.c: Do not include "gdbtypes.h".
2939 (struct tdesc_parsing_data): Change type of current_union to
2940 struct tdesc_type *.
2941 (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
2942 (tdesc_start_union): Call tdesc_create_union.
2943 (tdesc_start_field): Call tdesc_add_field.
2944 (tdesc_start_vector): Call tdesc_create_vector.
2945 (tdesc_end_union): Remove.
2946 (feature_children): Remove reference to tdesc_end_union.
2948 * features/arm-with-iwmmxt.c: Regenerate.
2949 * features/mips-linux.c: Regenerate.
2950 * features/mips64-linux.c: Regenerate.
2951 * features/rs6000/powerpc-32.c: Regenerate.
2952 * features/rs6000/powerpc-32l.c: Regenerate.
2953 * features/rs6000/powerpc-403.c: Regenerate.
2954 * features/rs6000/powerpc-403gc.c: Regenerate.
2955 * features/rs6000/powerpc-505.c: Regenerate.
2956 * features/rs6000/powerpc-601.c: Regenerate.
2957 * features/rs6000/powerpc-602.c: Regenerate.
2958 * features/rs6000/powerpc-603.c: Regenerate.
2959 * features/rs6000/powerpc-604.c: Regenerate.
2960 * features/rs6000/powerpc-64.c: Regenerate.
2961 * features/rs6000/powerpc-64l.c: Regenerate.
2962 * features/rs6000/powerpc-7400.c: Regenerate.
2963 * features/rs6000/powerpc-750.c: Regenerate.
2964 * features/rs6000/powerpc-860.c: Regenerate.
2965 * features/rs6000/powerpc-altivec32.c: Regenerate.
2966 * features/rs6000/powerpc-altivec32l.c: Regenerate.
2967 * features/rs6000/powerpc-altivec64.c: Regenerate.
2968 * features/rs6000/powerpc-altivec64l.c: Regenerate.
2969 * features/rs6000/powerpc-e500.c: Regenerate.
2970 * features/rs6000/powerpc-e500l.c: Regenerate.
2971 * features/rs6000/powerpc-isa205-32l.c: Regenerate.
2972 * features/rs6000/powerpc-isa205-64l.c: Regenerate.
2973 * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
2974 * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
2975 * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
2976 * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
2977 * features/rs6000/powerpc-vsx32.c: Regenerate.
2978 * features/rs6000/powerpc-vsx32l.c: Regenerate.
2979 * features/rs6000/powerpc-vsx64.c: Regenerate.
2980 * features/rs6000/powerpc-vsx64l.c: Regenerate.
2981 * features/rs6000/rs6000.c: Regenerate.
2983 2009-06-23 Joel Brobecker <brobecker@adacore.com>
2985 * ada-lang.c (decode_packed_array): If the value is a pointer to
2986 an array, then use value_ind to dereference it, not ada_value_ind.
2987 (ada_template_to_fixed_record_type_1): Handle the case where a
2988 dynamic field is an aligner type.
2989 (to_fixed_array_type): Add handling for packed array types.
2990 (ada_get_base_type): Do not follow the XVS type if the type is
2992 (ada_evaluate_subexp): Split a few statements up for clarity
2994 <OP_FUNCALL>: Add handling of the case of a packed array that
2995 has already been fixed.
2997 2009-06-23 Joel Brobecker <brobecker@adacore.com>
2999 * ada-lang.c (evaluate_subexp): Delete. Use the version from eval.c.
3000 (evaluate_subexp_type): Reimplement using evaluate_subexp.
3001 * value.h (evaluate_subexp): Add declaration.
3002 * eval.c (evaluate_subexp): Make non-static.
3003 * objc-lang.c (print_object_command): Use evaluate_subexp.
3005 2009-06-23 Paul Pluzhnikov <ppluzhnikov@google.com>
3007 Revert 2009-05-14 breakpoint commit (no longer needed).
3008 * breakpoint.h (breakpoint_re_set_objfile): Remove
3009 * breakpoint.c (breakpoint_re_set_objfile): Likewise
3010 (create_overlay_event_breakpoint): Remove objfile parameter,
3011 iterate over all objfiles.
3012 * objfiles.c (objfile_relocate): Update.
3013 * symfile.c (new_symfile_objfile): Likewise.
3015 2009-06-23 Tom Tromey <tromey@redhat.com>
3018 * c-lang.c (classify_type): Iterate over typedefs.
3019 * c-valprint.c (textual_element_type): Iterate over typedefs.
3021 2009-06-22 Tristan Gingold <gingold@adacore.com>
3023 * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
3026 2009-06-22 Jan Kratochvil <jan.kratochvil@redhat.com>
3029 * buildsym.c (block_compar): New function.
3030 (end_symtab): Replace the bubble sort by a qsort based code.
3032 2009-06-22 Sami Wagiaalla <swagiaal@redhat.com>
3034 * MAINTAINERS (Write After Approval): Add self.
3036 2009-06-22 Ulrich Weigand <uweigand@de.ibm.com>
3038 * spu-tdep.c (spu_get_longjmp_target): New function.
3039 (spu_gdbarch_init): Install it.
3041 2009-06-22 H.J. Lu <hongjiu.lu@intel.com>
3044 * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
3046 2009-06-21 Michael Snyder <msnyder@vmware.com>
3048 * inferior.h: Update ancient comment.
3050 2009-06-20 Aleksandar Ristovski <aristovski@qnx.com>
3051 Pedro Alves <pedro@codesourcery.com>
3053 * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
3055 (scan_dyntag): Skip if input bfd isn't elf flavoured.
3056 (locate_base): Call elf_locate_base even without an exec_bfd.
3058 2009-06-19 Samuel Bronson <naesten@gmail.com>
3061 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
3062 for prefix commands to avoid duplicates in the output.
3064 2009-06-19 Samuel Bronson <naesten@gmail.com>
3067 * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
3070 2009-06-19 Jerome Guitton <guitton@adacore.com>
3072 * breakpoint.c (expand_line_sal_maybe): When explicit_line,
3073 skip prologue on each sals.
3074 (skip_prologue_sal): Return explicit_line and explicit_pc
3077 2009-06-19 Tristan Gingold <gingold@adacore.com>
3079 * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
3082 2009-06-19 Tristan Gingold <gingold@adacore.com>
3083 * machoread.c (macho_symtab_read): Adjust for bfd changes.
3084 * darwin-nat.h (struct darwin_exception_msg): New type to describe
3086 (struct private_thread_info): New type to describe the state of the
3088 (DEF_VEC_I thread_t): Removed, replaced by ...
3089 (DEF_VEC_O darwin_thread_t): ... this new type.
3090 (struct darwin_inferior): Renamed to ...
3091 (struct private_inferior): ... this type. Fields added.
3092 (darwin_not_port): Moved into the private inferior structure.
3093 * darwin-nat.c: Add includes, improve comments.
3094 Rewrite to handle multiple threads and processes.
3095 (darwin_resume_to): New function and protype.
3096 (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
3097 (darwin_kill_inferior): Add ops argument.
3098 (darwin_pid_to_str): New function.
3099 (darwin_thread_alive): Ditto.
3100 (darwin_inf, darwin_not_port): Removed.
3101 (darwin_inf_fake_stop): New variable.
3102 (msgin, msgout, msg_state, exc_msg): Removed.
3103 (mach_check_error): Use warning instead of error.
3104 (darwin_ptrace): Adjust debug level.
3105 (cmp_thread_t): Fix names (typo).
3106 (darwin_check_new_threads): Argument is now an inferior,
3107 adjust for new structures, add no change check, ignore dead ports,
3108 handle first thread case.
3109 (find_inferior_task_it): New function.
3110 (find_inferior_notify_it): Ditto.
3111 (darwin_find_inferior_by_task): Ditto.
3112 (darwin_find_inferior_by_notify): Ditto.
3113 (darwin_find_thread): Ditto.
3114 (darwin_suspend_inferior): Ditto.
3115 (darwin_resume_inferior): Ditto.
3116 (catch_exception_raise_state): Removed.
3117 (catch_exception_raise_state_identity): Removed.
3118 (darwin_suspend_inferior_it): New function.
3119 (darwin_resume_inferior_it): Ditto.
3120 (darwin_dump_message): New function, extracted from darwin_wait.
3121 (darwin_decode_exception_message): New function.
3122 (darwin_encode_reply): New function.
3123 (catch_exception_raise): Removed.
3124 (darwin_send_reply): New function, extracted from darwin_resume.
3125 (darwin_resume_thread): New function, extracted from darwin_resume.
3126 (struct resume_inferior_threads_param): New type.
3127 (darwin_resume_inferior_threads_it): New function.
3128 (darwin_resume_inferior_threads): New function.
3129 (darwin_suspend_inferior_threads): New function.
3130 (darwin_resume): Mostly rewritten to handle multiple threads and
3132 (darwin_decode_message): New function extracted from darwin_wait.
3133 (cancel_breakpoint): New function.
3134 (darwin_wait): Mostly rewritten. Handle multiple threads.
3135 (darwin_mourn_inferior): Adjust for per process structures.
3136 (darwin_reply_to_all_pending_messages): New function.
3137 (darwin_stop_inferior): Adjust for per inferior structures.
3138 (darwin_attach_pid): Ditto.
3139 (darwin_init_thread_list): Ditto.
3140 (darwin_attach): Ditto.
3141 (darwin_detach): Ditto.
3142 (darwin_files_info): Now empty.
3143 (darwin_pid_to_str): Adjust returns string to match one expected by
3145 (darwin_read_write_inferior): Rename err variable to match other uses.
3146 Adjust debug message. Handle submaps.
3147 (darwin_xfer_memory): Adjust for per inferior structures.
3148 (set_enable_mach_exceptions): Ditto.
3149 (darwin_pid_to_exec_file): New function.
3150 (darwin_get_ada_task_ptid): Ditto.
3151 (darwin_supports_multi_process): Ditto.
3152 (_initialize_darwin_inferior): Remove useless assertion, adjust for
3153 per inferior structures. Add new target operations.
3155 2009-06-18 Hui Zhu <teawater@gmail.com>
3156 Michael Snyder <msnyder@vmware.com>
3158 * infrun.c (handle_inferior_event): Improve reverse stepping
3159 through function epilogue.
3161 * infrun.c (handle_inferior_event): Reverse-next through
3164 2009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
3166 * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
3169 2009-06-17 Tom Tromey <tromey@redhat.com>
3171 * dwarf2read.c (zlib_decompress_section): Use a cleanup.
3173 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3175 * gdbarch.sh (pointer_to_address): Change to type 'm'.
3176 (address_to_pointer): Likewise.
3177 * gdbarch.c, gdbarch.h: Regenerate.
3179 * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
3180 (signed_pointer_to_address): Likewise.
3181 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3182 * findvar.c (unsigned_pointer_to_address): Likewise.
3183 (signed_pointer_to_address): Likewise.
3184 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3186 * avr-tdep.c (avr_address_to_pointer): Likewise.
3187 (avr_pointer_to_address): Likewise.
3188 * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
3189 (iq2000_address_to_pointer): Likewise.
3190 * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
3191 (m32c_m16c_pointer_to_address): Likewise.
3192 * spu-tdep.c (spu_pointer_to_address): Likewise.
3193 * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
3194 (xstormy16_address_to_pointer): Likewise.
3196 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3198 * printcmd.c (print_scalar_formatted): Always truncate
3199 unsigned data types.
3201 * cli-dump.c (struct callback_data): Change type of load_offset
3203 (restore_binary_file): Update type casts.
3204 (restore_command): Parse load_offset as address, not long.
3206 * utils.c (string_to_core_addr): Do not sign-extend value.
3207 * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
3208 before comparing against requested frame address.
3210 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3212 * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
3213 * gdbarch.h, gdbarch.c: Regenerate.
3215 * gcore.c (default_gcore_target): Make return value const.
3216 Call gdbarch_gcore_bfd_target if present.
3217 (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
3219 * corelow.c (core_read_description): Call gdbarch_core_read_description
3220 on core_gdbarch instead of current_gdbarch.
3222 * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
3224 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3226 * gdbtypes.c (create_string_type): Receive character type as argument.
3227 * gdbtypes.h (create_string_type): Add character type argument.
3228 * dwarf2read.c (read_tag_string_type): Pass character type to
3231 * value.h (value_string): Add character type argument.
3232 * valops.c (value_string): Add character type argument. Pass it to
3233 create_string_type. Do not allocate space in inferior.
3234 * valarith.c (value_concat): Pass character type to value_string.
3236 * value.h (value_typed_string): Rename to ...
3237 (value_cstring): ... this.
3238 * valops.c (value_typed_string): Rename to ...
3239 (value_cstring): ... this.
3240 * c-lang.c (evaluate_subexp_c): Update.
3242 * python/python-value.c (builtin_type_pychar): New define.
3243 (convert_value_from_python): Call value_cstring instead
3244 of value_from_string.
3245 * value.c (value_from_string): Remove.
3246 * value.h (value_from_string): Remove.
3248 * eval.c (evaluate_subexp_standard): Pass character type to
3249 value_string. Pass expression architecture to value_nsstring
3250 and lookup_child_selector.
3251 * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
3252 (lookup_child_selector): Likewise.
3253 (value_nsstring): Likewise.
3254 * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
3255 Pass character type to value_string..
3256 (lookup_child_selector): Likewise.
3257 (value_nsstring): Add GDBARCH parameter, use it instead of
3258 objfile architecture. Pass architecture to lookup_objc_class
3259 and lookup_child_selector. Pass character type to value_string.
3260 (end_msglist): Pass architecture to lookup_objc_class.
3261 * objc-exp.y: Pass architecture to lookup_objc_class.
3263 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3265 * gdbtypes.h (struct language_defn): Add forward declaration.
3266 (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3267 (lookup_unsigned_typename): Likewise.
3268 (lookup_signed_typename): Likewise.
3269 * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3270 Use them instead of current_language and current_gdbarch.
3271 (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
3272 Pass them to lookup_typename.
3273 (lookup_signed_typename): Likewise.
3275 * c-exp.y: Pass parse_language and parse_gdbarch to
3276 lookup_unsigned_typename and lookup_signed_typename.
3277 * objc-exp.y: Likewise.
3278 * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
3280 * c-lang.c (evaluate_subexp_c): Pass expression language and
3281 gdbarch to lookup_typename.
3282 * printcmd.c (printf_command): Pass current language and
3283 gdbarch to lookup_typename.
3284 * python/python-type.c (typy_lookup_typename): Likewise.
3285 Include "language.h".
3287 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3289 * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
3290 Use it instead of current_gdbarch. Pass architecture to
3291 sparc32_gregset_supplies_p.
3292 (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
3293 of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
3294 * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
3295 sparc64nbsd_fpregset_supplies_p): Likewise.
3296 * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
3297 Add GDBARCH parameter.
3298 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3299 (sparc_fetch_inferior_registers): Pass regcache architecture to
3300 sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
3301 (sparc_store_inferior_registers): Likewise.
3302 * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
3303 Add GDBARCH parameter.
3304 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
3306 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3308 * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
3310 * aix-thread.c (pd_enable): Likewise.
3311 * amd64-linux-nat.c (ps_get_thread_area): Likewise.
3312 * bsd-uthread.c (bsd_uthread_activate): Likewise.
3313 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
3314 * linux-thread-db.c (enable_thread_event): Likewise.
3315 * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
3316 * nto-procfs.c (procfs_open): Likewise.
3317 * procfs.c (invalidate_cache, procfs_insert_watchpoint,
3318 info_proc_mappings, info_mappings_callback): Likewise.
3319 * record.c (record_open): Likewise.
3320 * rs6000-nat.c (ARCH64): Likewise.
3321 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
3322 (darwin_bfd_open): Likewise.
3323 * memattr.c (mem_info_command): Likewise.
3325 * windows-nat.c (win32_resume): Use current regcache architecture
3326 instead of current_gdbarch.
3328 * dbug-rom.c (dbug_regname): Remove check against number of
3329 registers in current_gdbarch.
3330 * solib-pa64.c (read_dynamic_info): Remove unused variable.
3332 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3334 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
3335 use it instead of current_gdbarch.
3336 * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
3337 * arm-tdep.c (arm_skip_prologue): Pass architecture to
3338 deprecated_pc_in_call_dummy.
3340 * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
3341 Use it instead of current_gdbarch.
3342 * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
3343 * breakpoint.c (expand_line_sal_maybe): Pass architecture to
3344 skip_prologue_using_sal.
3345 * arm-tdep.c (skip_prologue_using_sal): Likewise.
3346 * lm32-tdep.c (lm32_skip_prologue): Likewise.
3347 * m32-tdep.c (m32c_skip_prologue): Likewise.
3348 * mips-tdep.c (mips_skip_prologue): Likewise.
3349 * moxie-tdep.c (moxie_skip_prologue): Likewise.
3350 * mt-tdep.c (mt_frame_unwind_cache): Likewise.
3351 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
3352 * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
3353 it to skip_prologue_using_sal. Update call sites ...
3354 (frv_skip_prologue, frv_frame_unwind_cache): ... here.
3356 * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
3357 (check_for_saved): Use it instead of current_gdbarch.
3358 (mn10300_analyze_prologue): Set it.
3360 * value.c (using_struct_return): Add GDBARCH parameter. Use it
3361 instead of current_gdbarch.
3362 * value.h (using_struct_return): Add GDBARCH parameter.
3363 * eval.c (evaluate_subexp_standard): Pass architecture to
3364 using_struct_return.
3365 * infcall.c (call_function_by_hand): Likewise.
3366 * stack.c (return_command): Likewise.
3367 * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
3369 * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
3371 * symtab.h (in_prologue): Add GDBARCH parameter.
3372 * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
3374 * eval.c (evaluate_subexp_standard): Use expression architecture
3375 instead of current_gdbarch.
3377 * c-lang.c (evaluate_subexp_c): Use expression architecture and
3378 language instead of current_gdbarch and current_language.
3380 * printcmd.c (do_one_display): Use expression architecture instead
3383 * infcmd.c (print_return_value): Use architecture of stop_regcache
3384 instead of current_gdbarch.
3385 (print_vector_info, print_float_info): Remove GDBARCH argument,
3386 use frame architecture instead.
3387 (vector_info, float_info): Update calls.
3389 * objc-lang.c (objc_skip_trampoline): Use frame architecture
3390 instead of current_gdbarch.
3392 * parse.c (write_dollar_variable): Use parse architecture instead
3395 * source.c (line_info): Use objfile architecture instead of
3398 * symtab.c (find_function_start_sal): Use gdbarch instead of
3400 (print_msymbol_info): Use objfile architecture instead of
3403 * valops.c (value_assign): Use frame architecture instead of
3406 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3408 * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
3410 * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
3411 calling record_line.
3412 (enter_linenos): Likewise.
3413 * dbxread.c (process_one_symbol): Likewise.
3414 * dwarf2read.c (dwarf_decode_lines): Likewise.
3415 * mdebugread.c (psymtab_to_symtab_1): Likewise.
3416 * xcoffread.c (enter_line_range): Likewise.
3418 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3420 * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
3421 architecture instead of current_gdbarch.
3422 (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
3423 (gen_expr): Pass expression to get_struct_ref.
3425 * symtab.h (struct symbol_ops): Add GDBARCH parameter to
3426 tracepoint_var_ref callback.
3427 * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
3428 symbol operation callback.
3429 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
3430 Use it instead of current_gdbarch.
3431 (locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
3432 dwarf2_tracepoint_var_ref.
3433 (loclist_tracepoint_var_ref): Likewise.
3435 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3437 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3438 Use it instead of address bits of current_gdbarch.
3439 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
3440 * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
3442 (arm_scan_prologue): Likewise.
3443 * m32c-tdep.c (m32c_analyze_prologue): Likewise.
3444 * mep-tdep.c (mep_analyze_prologue): Likewise.
3445 * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
3446 * s390-tdep.c (s390_analyze_prologue): Likewise.
3448 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3450 * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
3451 frame architecture instead of current_gdbarch.
3452 (mi_cmd_data_list_changed_registers): Likewise.
3453 (mi_cmd_data_list_register_values): Likewise. Pass selected
3454 frame to get_register.
3455 (get_register): Add FRAME argument, use it as frame to retrieve
3456 registers from (instead of selected frame). Use frame architecture
3457 instead of current_gdbarch.
3458 (mi_cmd_data_write_register_values): Use current regcache
3459 architecture instead of current_gdbarch.
3461 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3463 * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
3464 use frame architecture instead. Replace current_gdbarch uses.
3465 (tui_show_registers): Update call.
3466 (tui_get_register): Remove GDBARCH parameter; use frame architecture
3468 (tui_show_register_group): Update call.
3469 (tui_check_register_values): Likewise.
3470 (tui_register_format): Remove GDBARCH parameter; use frame
3471 architecture instead. Replace current_gdbarch uses.
3472 (tui_get_register): Update call.
3474 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3476 * gdbarch.sh (construct_inferior_arguments): Remove.
3477 * gdbarch.c, gdbarch.h: Regenerate.
3478 * infcmd.c (get_inferior_args): Call construct_inferior_arguments
3479 directly instead of gdbarch_construct_inferior_arguments.
3480 (construct_inferior_arguments): Remove GDBARCH argument.
3481 * inferior.h (construct_inferior_arguments): Likewise.
3483 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3485 * symfile.c (section_is_mapped): Use objfile architecture instead
3487 (TARGET_LONG_BYTES): Remove.
3488 (read_target_long_array): Add SIZE argument. Use it instead of
3490 (simple_read_overlay_table): Retrieve long size from objfile
3491 architecture; pass it to read_target_long_array.
3492 (simple_read_overlay_region_table): Likewise.
3493 (simple_overlay_update_1): Likewise.
3495 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3497 * infrun.c (cleanup_displaced_step_closure): Remove.
3498 (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
3499 (displaced_step_prepare): Use displaced_step_clear_cleanup instead
3500 of cleanup_displaced_step_closure.
3501 (handle_inferior_event, keep_going): Use thread architecture instead
3504 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
3506 * infrun.c (handle_inferior_event): Use current frame architecture
3507 or thread architecture instead of current_gdbarch. Pass to
3508 handle_step_into_function and handle_step_into_function_backward.
3509 (handle_step_into_function): Add GDBARCH parameter. Use it instead
3511 (handle_step_into_function_backward): Likewise.
3512 (insert_step_resume_breakpoint_at_frame): Use frame architecture
3513 instead of current_gdbarch.
3514 (insert_step_resume_breakpoint_at_caller): Likewise.
3516 2009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
3517 Pedro Alves <pedro@codesourcery.com>
3519 * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
3520 is pushed for watchpoint promotion to hardware watchpoint.
3522 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3524 * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
3525 (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
3526 (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
3527 (dwarf_ranges_section, dwarf_frame_section)
3528 (dwarf_eh_frame_section): Removed.
3529 (dwarf2_resize_section): Likewise.
3530 (dwarf2_read_section): Now static, use bfd_mmap() if possible.
3531 (dwarf2_get_section_info): New function.
3532 (munmap_section_buffer): Likewise.
3533 (dwarf2_per_objfile_cleanup): Likewise.
3534 (section_is_p): Signature change.
3535 * dwarf2-frame.c (dwarf2_build_frame_info): Use
3536 dwarf2_get_section_info instead of dwarf2_read_section.
3538 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
3540 * solib.c (symbol_add_stub): New FLAGS parameter.
3541 (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
3543 (solib_add): Defer breakpoint_re_set until after all solibs.
3544 * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
3545 * rs6000-nat.c (objfile_symbol_add): Adjust.
3546 * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
3547 (new_symfile_objfile): Likewise.
3548 (symbol_file_add_with_addrs_or_offsets): Likewise.
3549 (symbol_file_add_from_bfd): Likewise.
3550 (symbol_file_add): Likewise.
3551 * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
3552 * symfile-mem.c (symbol_file_add_from_memory): Adjust.
3553 * windows-nat.c (safe_symbol_file_add_stub): Adjust.
3554 * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
3556 2009-06-16 Keith Seitz <keiths@redhat.com>
3558 * linespec.c (collect_methods): Delete.
3559 (add_matching_methods): Reove destructor special case.
3560 (find_method): Call find_methods directly instead of
3562 * valops.c (value_struct_elt): Remove destructor
3564 (check_field): Likewise.
3565 (value_struct_elt_for_reference): Likewise.
3566 (destructor_name_p): Remove misleading comment about dtors
3567 being "special cases".
3568 * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
3569 * gdbtypes.c (get_destructor_fn_field): Likewise.
3571 2009-06-16 Pedro Alves <pedro@codesourcery.com>
3573 * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
3574 TARGET_OJECT_MEMORY reads to the topmost target, not to the
3575 flattened current_target.
3577 2009-06-16 Tristan Gingold <gingold@adacore.com>
3579 * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
3581 (avr_register_name): Add const to register_names.
3582 (avr_scan_arg_moves): Move inside avr_scan_prologue.
3583 (avr_scan_prologue): Add pc_end argument.
3584 Only read prologue bytes that can be read.
3585 Limit the scan to the known prologue length.
3586 Makes pattern variables static and const.
3588 (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
3590 (avr_breakpoint_from_pc): Constify avr_break_insn.
3591 (avr_extract_return_value): Fix function comment.
3592 (avr_frame_unwind_cache): Fix GNU style violations.
3593 Pass current_pc argument to avr_scan_prologue to stop prologue
3594 analysis to the current pc. This fixes the bug with the 'next'
3596 Correctly set the SP register of the previous frame (use call_length).
3597 (avr_frame_prev_register): Fix indentation.
3598 Correctly read PC from the stack on avr6 architectures.
3599 (avr_push_dummy_call): Fix indentation.
3600 (avr_gdbarch_init): Set call_length according to the architecture.
3602 2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
3604 * infcall.c (show_unwind_on_terminating_exception_p): New
3606 (call_function_by_hand): Create breakpoint and clean-up call for
3607 std::terminate.breakpoint. Add unwind_on_terminating_exception_p
3608 gate. Pop frame on breakpoint hit.
3609 (_initialize_infcall): Add add_setshow_boolean_cmd for
3610 unwind-on-terminating-exception.
3612 2009-06-12 Kevin Buettner <kevinb@redhat.com>
3614 * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
3615 `has_section_at_zero' flag from stripped objfile to separate,
3616 debug info only, objfile.
3618 2009-06-12 Pedro Alves <pedro@codesourcery.com>
3620 * exec.h (section_table_xfer_memory_partial): Improve description,
3621 mention SECTION_NAME.
3622 * exec.c (section_table_xfer_memory_partial): Remove stale
3625 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3627 * nto-tdep.h (nto_generic_supply_gpregset)
3628 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3629 * nto-tdep.c (nto_generic_supply_gpregset)
3630 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
3632 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3634 * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
3635 (i386nto_sigcontext_addr): Change the way context address is calculated.
3636 (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
3637 sc_sp_offset and set sc_reg_offset and sc_num_regs.
3639 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3641 * i386-nto-tdep.c (i386_nto_target): Remove definition.
3642 (init_i386nto_ops): Use macros to set fields to global
3643 current_nto_target directly.
3644 (i386nto_init_abi): Remove unused nto_set_target call.
3645 * nto-tdep.h (nto_set_target): Remove unused declaration.
3646 * nto-tdep.c (nto_set_target): Remove unused function.
3648 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3650 * breakpoint.c (break_command_really): Rename local variable
3651 breakpoint_chain to bkpt_chain.
3653 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
3655 Add support for XMM registers.
3656 * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
3657 (i386nto_register_area): Correctly calculate offsets and sizes for
3658 all supported registers.
3660 2009-06-11 Tom Tromey <tromey@redhat.com>
3662 * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
3663 'static' from local variable definitions.
3665 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3667 * symtab.c (append_expanded_sal): Remove unused local variables.
3669 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3671 * infrun.c (sched_multi): New global.
3672 (resume): If sched_multi is set, resume only threads of the
3674 (prepare_to_proceed): Don't switch over to wait_ptid if we're
3675 resuming a different inferior, and sched_multi is off.
3676 (show_schedule_multiple): New.
3677 (_initialize_infrun): Register new "set schedule-multiple" command.
3678 * inferior.h (sched_multi): Declare.
3679 * NEWS: Mention new "schedule-multiple" setting.
3681 2009-06-11 Pedro Alves <pedro@codesourcery.com>
3683 * varobj.c (varobj_create): Properly restore the selected frame.
3685 2009-06-05 Tom Tromey <tromey@redhat.com>
3687 * inferior.c (print_inferior): Make a table, not a list. Emit
3690 2009-06-10 Jonas Maebe <jonas.maebe@elis.ugent.be>
3692 * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
3693 darwin_wait (blocking wait).
3694 (darwin_kill_inferior): Likewise.
3696 2009-06-10 Pedro Alves <pedro@codesourcery.com>
3698 * infrun.c (handle_inferior_event): Update comment around trying
3699 to revert back to a stepping thread that has exited.
3701 2009-06-10 Cary Coutant <ccoutant@google.com>
3703 * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
3704 DW_LNE_set_discriminator.
3706 2009-06-10 Pierre Muller <muller@ics.u-strasbg.fr>
3708 * breakpoint.c: ARI fixes.
3709 (create_overlay_event_breakpoint): Avoid assignment inside if statement.
3710 (print_one_breakpoint_location): Likewise.
3711 (create_longjmp_breakpoint): Likewise.
3712 (tracepoint_save_command): Likewise
3713 (bpstat_find_step_resume_breakpoint): No operator at end of line.
3714 (bpstat_stop_status): Likewise.
3715 (describe_other_breakpoints): Likewise.
3716 (hw_watchpoint_used_count): Likewise.
3717 (expand_line_sal_maybe): Likewise.
3718 (break_command_really): Likewise.
3719 (delete_command): Likewise.
3720 (do_enable_breakpoint): Likewise.
3721 (delete_trace_command): Likewise.
3722 (catch_exception_command_1): Likewise and remove extra parentheses.
3724 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
3726 * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
3727 "ubreak" command that does not exist.
3729 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
3731 * cli/cli-decode.c (add_alias_cmd): Correct assertion.
3733 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3735 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
3737 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3740 * proc-utils.h (procfs_first_available): Don't declare here.
3741 * sol-thread.c: Include procfs.h instead of sys/procfs.h and
3743 * procfs.c: Include procfs.h.
3744 (procfs_target): Make it public. Don't register
3745 procfs_can_use_hw_breakpoint here.
3746 (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
3747 defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
3748 (procfs_can_use_hw_breakpoint): Remove check of
3749 TARGET_HAS_HARDWARE_WATCHPOINTS.
3750 (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
3752 (_initialize_procfs): Don't add the procfs target here.
3754 * i386-sol2-nat.c: Include target.h and procfs.h.
3755 (_initialize_amd64_sol2_nat): Install the procfs target here,
3756 customized with watchpoints support.
3757 * irix5-nat.c: Include target.h.
3758 (_initialize_core_irix5): Rename to ...
3759 (_initialize_irix5_nat): ... this. Install the procfs target
3760 here, customized with watchpoints support.
3761 * alpha-nat.c: Include procfs.h.
3762 (_initialize_core_alpha): Rename to...
3763 (_initialize_alpha_nat): ... this. Install the procfs target
3764 here, customized with watchpoints support.
3765 * sparc-sol2-nat.c: Include target.h and procfs.h.
3766 (_initialize_sparc_sol2_nat): New.
3768 * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
3769 * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
3770 * config/mips/irix5.mh (NAT_FILE): Delete.
3771 * config/mips/irix6.mh (NAT_FILE): Delete.
3772 * config/mips/nm-irix5.h: Delete.
3774 20009-06-07 Pedro Alves <pedro@codesourcery.com>
3776 * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
3777 to enum target_object. Cleanup comments.
3778 * auxv.h: Include "target.h". Cleanup comments to not mention
3779 NATIVE_XFER_AUXV anymore.
3781 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3783 * inferior.h (procfs_first_available): Move declaration to...
3784 * proc-utils.h: ... here.
3785 * sol-thread.c: Include procfs.h and proc-utils.h.
3787 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3789 * inferior.h (proc_iterate_over_mappings): Delete declaration.
3790 * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
3791 * procfs.c (proc_iterate_over_mappings): Delete.
3793 2009-06-07 Pedro Alves <pedro@codesourcery.com>
3795 * target.h (struct target_ops): Make to_has_all_memory,
3796 to_has_memory, to_has_stack, to_has_registers and to_has_execution
3797 methods instead of variables.
3798 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
3799 (target_has_registers_1, target_has_execution_1): Declare
3801 (target_has_all_memory): Rewrite to call target_has_all_memory_1.
3802 (target_has_memory): Rewrite to call target_has_memory_1.
3803 (target_has_stack): Rewrite to call target_has_all_stack_1.
3804 (target_has_registers): Rewrite to call target_has_registers_1.
3805 (target_has_execution): Rewrite to call target_has_execution_1.
3806 (default_child_has_all_memory, default_child_has_memory)
3807 (default_child_has_stack, default_child_has_registers)
3808 (default_child_has_execution): Declare.
3809 (target_mark_running, target_mark_exited): Delete declarations.
3810 * target.c (default_child_has_all_memory,
3811 default_child_has_memory, default_child_has_stack,
3812 default_child_has_registers, default_child_has_execution): New.
3813 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
3814 target_has_registers_1, target_has_execution_1): New.
3815 (add_target): Default the to_has_all_memory, to_has_all_memory,
3816 to_has_memory, to_has_stack, to_has_registers and to_has_execution
3817 callbacks to return 0.
3818 (update_current_target): Do not inherit to_has_all_memory,
3819 to_has_memory, to_has_stack, to_has_registers or to_has_execution.
3820 (target_mark_running, target_mark_exited): Delete.
3821 (memory_xfer_partial): Adjust.
3822 (target_read_memory, target_write_memory, target_search_memory):
3823 Dispatch to the the top-most target, not the flattened
3825 (target_info): Adjust.
3826 (init_dummy_target): Install return_zero as callback for
3827 to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
3829 (set_maintenance_target_async_permitted): Use have_live_inferiors
3830 instead of target_has_execution.
3831 * target-memory.c (target_write_memory_blocks): Dispatch memory
3832 writes to the the top-most target, not the flattened
3835 * breakpoint.c (insert_breakpoints): Don't check for
3836 target_has_execution here.
3837 (update_global_location_list): Check if there are live inferiors
3838 to debug instead of target_has_execution.
3839 * infcmd.c (kill_command, detach_command): Check if there are
3840 inferiors instead of target_has_execution.
3841 * inferior.h (have_live_inferiors): Declare.
3842 * inferior.c (have_live_inferiors): New.
3843 * infrun.c (normal_stop): Don't check for target_has_execution to
3844 finish the thread states.
3845 * thread.c (is_thread_state, is_stopped, is_exited, is_running)
3846 (any_running, is_executing): Remove checks for
3847 target_has_execution.
3848 * top.c (kill_or_detach): Don't try to kill core inferiors.
3849 (quit_target): Don't check for target_has_execution.
3851 * corelow.c (core_has_memory, core_has_stack, core_has_registers):
3853 (init_core_ops): Install core_has_memory, core_has_stack and
3855 * exec.c (exec_has_memory): New.
3856 (init_exec_ops): Install exec_has_memory.
3857 * remote.c (remote_add_inferior): Don't call target_mark_running.
3858 (remote_start_remote): Don't call target_mark_exited or call
3859 target_mark_running.
3860 (remote_open_1): Use have_inferiors instead of
3861 target_has_execution. Don't use target_mark_exited.
3862 (init_remote_ops): Install deafult_child_has_all_memory,
3863 default_child_has_memory, default_child_has_stack,
3864 default_child_has_registers, default_child_has_execution.
3865 * bsd-kvm.c (bsd_kvm_return_one): New.
3866 (bsd_kvm_add_target): Register bsd_kvm_return_one as
3867 to_has_memory, to_has_stack and to_has_registers callbacks.
3868 * remote-m32r-sdi.c (m32r_return_one): New.
3869 (init_m32r_ops): Register it.
3870 * inf-child.c (inf_child_target): Adjust to register
3871 default_child_has_all_memory, default_child_has_memory,
3872 default_child_has_stack, default_child_has_registers,
3873 default_child_has_execution callbacks.
3874 * gnu-nat.c (init_gnu_ops): Likewise.
3875 * go32-nat.c (init_go32_ops): Likewise.
3876 * hpux-thread.c (init_hpux_thread_ops): Likewise.
3877 * monitor.c (init_base_monitor_ops): Likewise.
3878 * nto-procfs.c (init_procfs_ops): Likewise.
3879 * remote-mips.c (_initialize_remote_mips): Likewise.
3880 * windows-nat.c (init_windows_ops): Likewise.
3881 * remote-sim.c (gdbsim_create_inferior): Don't use
3882 target_mark_running or target_mark_exited.
3883 (gdbsim_mourn_inferior): Don't call target_mark_exited.
3884 (init_gdbsim_ops): Adjust to register
3885 default_child_has_all_memory, default_child_has_memory,
3886 default_child_has_stack, default_child_has_registers,
3887 default_child_has_execution callbacks.
3889 * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
3890 there's no inferior selected, defer to a lower stratum.
3892 2009-06-05 Tom Tromey <tromey@redhat.com>
3894 * varobj.c (update_dynamic_varobj_children): Wrap error text in
3896 (install_visualizer): Likewise.
3897 (varobj_set_visualizer): Likewise.
3899 2009-06-05 Marc Khouzam <marc.khouzam@ericsson.com>
3901 * mi/mi-main.c (mi_cmd_exec_continue)
3902 (mi_cmd_exec_interrupt): Adjust parsing of thread group
3903 ids to current reality, where they don't have any 'p' prefix.
3905 2009-06-05 Aleksandar Ristovski <aristovski@qnx.com>
3907 * corelow.c (core_open): Check for core_gdbarch before calling
3908 gdbarch_target_signal_from_host.
3910 2009-06-05 Tom Tromey <tromey@redhat.com>
3912 * c-exp.y (parse_number): Don't use K&R definition.
3914 (yyerror): Likewise.
3916 2009-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3918 * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
3920 2009-06-04 Ulrich Weigand <uweigand@de.ibm.com>
3922 * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
3923 * ax-gdb.c (gen_var_ref): Likewise.
3924 * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
3925 * printcmd.c (address_info): Likewise.
3926 * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
3927 * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
3928 * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
3929 * dwarf2loc.h: Likewise.
3930 * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
3932 * symtab.h: (struct symbol_register_ops): New struct definition.
3933 (struct symbol): Make "ops" member a union of symbol_computed_ops and
3934 symbol_register_ops callback pointers.
3935 (SYMBOL_REGISTER_OPS): New macro.
3936 * tracepoint.c: Include "objfiles.h".
3937 (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
3938 callback to retrieve register numbers.
3939 * ax-gdb.c (gen_var_ref): Likewise.
3940 * findvar.c (read_var_value): Likewise.
3941 * printcmd.c (address_info): Likewise.
3943 * coffread.c (coff_reg_to_regnum): New function.
3944 (coff_register_funcs): New static variable.
3945 (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
3946 Install SYMBOL_REGISTER_OPS callbacks.
3947 * mdebugread.c (mdebug_reg_to_regnum): New function.
3948 (mdebug_register_funcs): New static variable.
3949 (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
3950 Install SYMBOL_REGISTER_OPS callbacks.
3951 * stabsread.c (stab_reg_to_regnum): New function.
3952 (stab_register_funcs): New static variable.
3953 (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
3954 Install SYMBOL_REGISTER_OPS callbacks.
3956 2009-06-03 Doug Evans <dje@google.com>
3958 * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
3959 after discarding its contents.
3961 2009-06-03 Pedro Alves <pedro@codesourcery.com>
3963 * target.c: Include "exec.h".
3964 (update_current_target): Don't inherit to_sections or
3966 (target_get_section_table): New.
3967 (target_section_by_addr): Fetch the section table from the passed
3969 (memory_xfer_partial): Handle unmapped overlay sections before
3970 anything else. Get the overlay mapped address here. Adjust to
3971 use section_table_xfer_memory_partial.
3972 (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
3973 instead of TARGET_OBJECT_MEMORY.
3974 (target_resize_to_sections): Delete.
3975 (remove_target_sections): Adjust to remove target sections from
3976 `current_target_sections', and use resize_section_table.
3977 * target.h (struct target_ops) <to_sections, to_sections_end>:
3979 <to_get_section_table>: New method.
3980 (xfer_memory, print_section_info): Delete declarations.
3981 (struct target_section_table): New type.
3982 (target_get_section_table): Declare.
3983 (target_resize_to_sections): Delete declaration.
3984 (remove_target_sections): Delete declaration.
3985 * bfd-target.c (target_bfd_xfer_partial): Get the section table
3987 (target_bfd_get_section_table): New.
3988 (target_bfd_xclose): Adjust.
3989 (target_bfd_reopen): Store the section table in the to_data field.
3990 * corelow.c (core_data): New.
3991 (core_close): Adjust to release core_data and its sections.
3992 (core_open): Allocate core_data, and build its target sections
3994 (deprecated_core_resize_section_table): New.
3995 (core_files_info): Pass core_data to print_section_info.
3996 (core_xfer_partial): Adjust to use
3997 section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
3998 (init_core_ops): Do not install a deprecated_xfer_memory callback
4000 * solib.c (update_solib_list): Add the shared library sections
4001 to the current target sections table.
4002 * exec.c (current_target_sections_1): New global.
4003 (current_target_sections): New global.
4004 (exec_close_1): New function, refactored from exec_close. Remove
4005 the exec_bfd's sections from the current target sections table.
4006 Adjust to not use to_sections.
4007 (exec_close): Remove all target sections. Call exec_close_1.
4008 (exec_file_clear): Use exec_close_1 instead of unpushing the
4010 (exec_file_attach): Likewise. Adjust to not use to_sections. Add
4011 exec_bfd's sections to the current target sections table. Don't
4012 push the exec_ops target here.
4013 (resize_section_table): New.
4014 (add_target_sections): New.
4015 (remove_target_sections): Moved here.
4016 (section_table_xfer_memory): Adjust to implement the xfer_partial
4017 interface, and rename to...
4018 (section_table_xfer_memory_partial): ... this, replacing the
4019 current function of that same name.
4020 (exec_get_section_table): New.
4021 (exec_xfer_partial): New.
4022 (xfer_memory): Delete.
4023 (print_section_info): Replace the target_ops parameter by a
4024 target_section_table parameter.
4025 (exec_files_info, set_section_command, exec_set_section_address):
4026 Adjust to use the current sections table.
4027 (init_exec_ops): Do not register a deprecated_xfer_memory
4028 callback. Register to_xfer_partial and to_get_section_table
4030 * infrun.c (handle_inferior_event): Update comments around
4032 * rs6000-nat.c (xcoff_relocate_core): Adjust to use
4033 deprecated_core_resize_section_table.
4034 * exec.h (resize_section_table): Declare.
4035 (section_table_xfer_memory_partial): Add const char * argument.
4036 (remove_target_sections): Declare here.
4037 (add_target_sections): Declare.
4038 (print_section_info): Declare here.
4039 * gdbcore.h (deprecated_core_resize_section_table): Declare.
4041 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4043 * value.h (struct internalvar): Remove.
4044 (get_internalvar_integer): Add prototype.
4045 (set_internalvar_integer): Add prototype.
4046 (clear_internalvar): Add prototype.
4048 * value.c (struct internalvar): Move here. Add type member. Remove
4049 endian member. Add union_internalvar member instead of value member.
4050 (init_if_undefined_command): Use intvar->type.
4051 (create_internalvar): Do not initialize value/endian, but type.
4052 (create_internalvar_type_lazy): Call create_internalvar.
4053 (value_of_internalvar): Handle host-side internalvar contents.
4054 (set_internalvar_component): Likewise.
4055 (set_internalvar): Likewise.
4056 (get_internalvar_integer): New function.
4057 (clear_internalvar): Likewise.
4058 (set_internalvar_integer): Likewise.
4059 (preserve_values): Handle host-side internalvar contents.
4061 * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
4062 set_internalvar_integer instead of set_internalvar.
4063 * findcmd.c (find_command): Likewise.
4064 * infrun.c (handle_inferior_event): Likewise.
4065 * source.c (forward_search_command, reverse_search_command): Likewise.
4066 * tracepoint.c (set_traceframe_num, set_tracepoint_num,
4067 set_traceframe_context): Likewise.
4069 * printcmd.c (x_command): Call clear_internalvar instead of
4071 * tracepoint.c (set_traceframe_context): Likewise.
4073 * breakpoint.c (get_number_trailer): Call get_internalvar_integer
4074 instead of value_of_internalvar.
4075 * linespec.c (decode_dollar): Likewise.
4077 * expprint.c (dump_subexp_body_standard): Use internalvar_name
4078 instead of accessing internalvar private elements.
4079 * valops.c (value_assign): Copy from original source instead of
4080 accessing internalvar private elements.
4082 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4084 * scm-lang.c (builtin_type_scm): Remove.
4085 (scm_lookup_name): Add GDBARCH parameter. Use it instead of
4086 objfile architecture. Use per-architecture builtin_scm_type instead
4087 of builtin_type_scm.
4088 (evaluate_exp): Pass expression architecture to scm_lookup_name.
4090 (scm_get_field): Add SIZE parameter. Use it instead of
4091 TYPE_LENGTH (builtin_type_scm).
4093 (build_scm_types): New function.
4094 (scm_type_data): New variable.
4095 (builtin_scm_type): New function.
4096 (_initialize_scheme_language): Do not initialize builtin_type_scm.
4097 Register build_scm_types as post-init function for scm_type_data.
4099 * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
4100 instead of builtin_type_scm.
4102 * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
4103 (scm_get_field): Add SIZE paramter.
4104 (scm_scmval_print): Remove prototype.
4105 (builtin_type_scm): Remove.
4106 (struct builtin_scm_type): Add structure definition.
4107 (builtin_scm_type): Add prototype.
4109 * scm-valprint.c (scm_inferior_print): Add TYPE parameter. Use it
4110 instead of builtin_core_addr type; do not use objfile architecture.
4111 (scm_scmlist_print): Add TYPE parameter. Use it to define SCM_SIZE.
4112 Pass type to scm_scmval_print.
4113 (scm_ipruk): Add TYPE parameter. Use it to define SCM_SIZE.
4114 (scm_scmval_print): Make static. Add TYPE parameter. Use it to
4115 define SCM_SIZE. Pass type to scm_ipruk and scm_scmlist_print.
4116 (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
4118 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4120 * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
4121 mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
4122 mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
4123 mdebug_type_unsigned_char, mdebug_type_unsigned_short,
4124 mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
4125 mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
4126 mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
4127 mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
4128 mdebug_type_complex, mdebug_type_double_complex,
4129 mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
4132 (basic_type_data): New global variable.
4133 (basic_type): New function.
4134 (parse_type): Remove static basic type map map_bt. Call basic_type
4135 to get basic types instead of using mdebug_type_ variables.
4137 (parse_symbol): Use builtin types instead of mdebug_type_ variables.
4138 (upgrade_type): Likewise.
4139 (parse_procedure): Likewise.
4140 (psymtab_to_symtab_1): Likewise.
4142 (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
4143 Initialize basic_type_data.
4145 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
4147 * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
4148 * dfp.c (promote_decimal): Remove.
4149 (decimal_binop): Convert LEN_RESULT to input parameter.
4150 Remove call to decimal_binop.
4151 (decimal_compare): Remove call to decimal_binop.
4153 * valarith.c (value_binop): Pass desired result type length
4156 2009-06-01 Tristan Gingold <gingold@adacore.com>
4158 * configure.tgt (avr): Set gdb_sim to use the simulator.
4160 2009-05-29 Doug Evans <dje@google.com>
4162 * infrun.c (prepare_to_proceed): Document. Assert !non_stop.
4163 If scheduler-locking is enabled, we're not going to be singlestepping
4164 any other previously stopped thread.
4166 2009-05-29 Pedro Alves <pedro@codesourcery.com>
4168 * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
4170 2009-05-29 Eli Zaretskii <eliz@gnu.org>
4172 * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
4173 for stabs and COFF debug info.
4175 2009-05-28 Pedro Alves <pedro@codesourcery.com>
4177 * infrun.c (handle_inferior_event): When thread hoping, switch
4178 inferior_ptid to the event thread before removing breakpoints from
4179 the target. If not stopping, also try to revert back to a thread
4180 that was doing a "next". Check if that thread still exists before
4182 (currently_stepping_thread): Delete and merge with ...
4183 (currently_stepping): ... this.
4184 (currently_stepping_callback): Rename to ...
4185 (currently_stepping_or_nexting_callback): ... this, and also
4186 return true if the thread was stepping over a call (has a
4187 step-resume breakpoint).
4189 2009-05-28 Tom Tromey <tromey@redhat.com>
4191 * python/python.c (gdbpy_parameter): Rename. Fix error message.
4192 (GdbMethods): Change "get_parameter" to "parameter".
4194 2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
4195 Paul Pluzhnikov <ppluzhnikov@google.com>
4197 * configure.ac (!have_libpython): Add python-prettyprint source
4199 * configure: Regenerate.
4200 * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
4203 2009-05-27 Vladimir Prus <vladimir@codesourcery.com>
4204 Tom Tromey <tromey@redhat.com>
4205 Thiago Jung Bauermann <bauerman@br.ibm.com>
4207 * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
4208 * varobj.h (varobj_set_visualizer): Declare.
4209 (varobj_get_display_hint): Likewise.
4210 (varobj_update_result_t) <children_changed, value_installed>: New
4212 * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
4213 * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
4214 mi_cmd_var_set_child_range): Declare.
4215 * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
4216 (mi_cmd_var_list_children): Emit display hint.
4217 (varobj_update_one): Emit display hint. Handle dynamic children.
4218 * python/python.c (GdbMethods): Add "default_visualizer".
4219 * python/python-internal.h (apply_varobj_pretty_printer,
4220 gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
4222 (gdbpy_default_visualizer): Likewise.
4223 * varobj.c: Include python.h, python-internal.h.
4224 (PyObject): New typedef.
4225 (struct varobj) <children_requested, pretty_printer>: New fields.
4226 (varobj_create): Call install_default_visualizer.
4227 (instantiate_pretty_printer): New function.
4228 (varobj_set_display_format): Update.
4229 (varobj_get_display_hint): New function.
4230 (update_dynamic_varobj_children): New function.
4231 (varobj_get_num_children): Handle dynamic children.
4232 (varobj_list_children): Likewise.
4233 (install_new_value): Likewise.
4234 (varobj_add_child): New function.
4235 (install_visualizer): Likewise.
4236 (install_default_visualizer): Likewise.
4237 (varobj_set_visualizer): Likewise.
4238 (varobj_update): Handle dynamic children.
4239 (create_child): Use create_child_with_value.
4240 (create_child_with_value): New function.
4241 (value_get_print_value): Call pretty printer. Add value_formatter
4243 (c_value_of_variable): Update.
4244 (varobj_invalidate): Always free all_rootvarobj.
4245 * python/python-prettyprint.c (apply_varobj_pretty_printer): New
4247 (gdbpy_get_varobj_pretty_printer): Likewise.
4248 (gdbpy_default_visualizer): Likewise.
4250 2009-05-27 Tom Tromey <tromey@redhat.com>
4251 Thiago Jung Bauermann <bauerman@br.ibm.com>
4252 Phil Muldoon <pmuldoon@redhat.com>
4253 Paul Pluzhnikov <ppluzhnikov@google.com>
4254 Vladimir Prus <vladimir@codesourcery.com>
4256 * python/python-value.c (value_object_to_value): New function.
4257 * python/python-internal.h: Include frameobject.h.
4258 (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
4260 (value_object_to_value): Declare.
4261 * printcmd.c (struct format_data) <raw>: New field.
4262 (last_format): Default to 0.
4263 (decode_format): Initialize val.raw. Handle /r flag.
4264 (print_command_1): Initialize fmt.raw and opts.raw.
4265 (output_command): Likewise.
4266 (x_command): Fix initialization of fmt.format. Initialize
4268 (display_command): Initialize fmt.raw.
4269 (do_one_display): Set opts.raw.
4270 * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
4271 gdbpy_display_hint_cst): New globals.
4272 (_initialize_python): Initialize them. Set gdb.pretty_printers.
4273 * cp-valprint.c: Include python.h.
4274 (cp_print_value): Call apply_val_pretty_printer.
4275 * python/python.h (apply_val_pretty_printer): Declare.
4276 * stack.c (print_this_frame_argument_p): Remove.
4277 (print_frame_args): Compute summary flag. Don't use
4278 print_this_frame_argument_p.
4279 * valprint.c: Include python.h.
4280 (user_print_options): Initialize new fields.
4281 (scalar_type_p): New function.
4282 (val_print): Handle 'raw' and 'summary' modes. Call
4283 apply_val_pretty_printer.
4284 (value_print): Handle 'raw' mode.
4285 * valprint.h (struct value_print_options) <raw, summary>: New
4287 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
4288 (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
4289 (python-prettyprint.o): New target.
4290 * python/python-prettyprint.c: New file.
4292 2009-05-27 Tom Tromey <tromey@redhat.com>
4293 Paul Pluzhnikov <ppluzhnikov@google.com>
4295 * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
4297 * cli/cli-dump.c (dump_value_to_file): Use value_address.
4298 * valprint.c (common_val_print): Likewise.
4299 * v850-tdep.c (v850_push_dummy_call): Use value_address.
4300 * tracepoint.c (encode_actions): Use value_address.
4301 * printcmd.c (print_formatted): Use value_address.
4302 (x_command): Likewise.
4303 * p-valprint.c (pascal_object_print_static_field): Use
4305 * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
4306 * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
4307 * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
4308 * jv-valprint.c (java_value_print): Use value_address.
4309 * infcall.c (find_function_addr): Use value_address.
4310 * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
4311 * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
4312 * frv-tdep.c (frv_push_dummy_call): Use value_address.
4313 * frame.c (frame_register_unwind): Use value_address.
4314 (frame_unwind_register_value): Likewise.
4315 * darwin-nat-info.c (info_mach_region_command): Use
4317 * cp-valprint.c (cp_print_static_field): Use value_address.
4318 * c-valprint.c (c_value_print): Use value_address.
4319 * breakpoint.c (update_watchpoint): Use value_address.
4320 (can_use_hardware_watchpoint): Likewise.
4321 * ada-valprint.c (ada_val_print_1): Use value_address.
4322 (ada_value_print): Likewise.
4323 * ada-tasks.c (read_fat_string_value): Use value_address.
4324 * jv-lang.c (java_link_class_type): Use set_value_address.
4325 (java_link_class_type): Likewise.
4326 (get_java_utf8_name): Use value_address.
4327 (type_from_class): Likewise.
4328 (java_link_class_type): Likewise.
4329 * findvar.c (value_of_register): Use set_value_address.
4330 (read_var_value): Likewise.
4331 (read_var_value): Likewise.
4332 * eval.c (evaluate_subexp_standard): Use set_value_address.
4333 (evaluate_subexp_standard): Use value_address.
4334 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
4335 * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
4336 (ada_value_primitive_packed_val): Likewise.
4337 (ensure_lval): Likewise.
4338 (thin_data_pntr): Use value_address.
4339 (desc_bounds): Likewise.
4340 (ada_value_primitive_packed_val): Likewise.
4341 (value_assign_to_component): Likewise.
4342 (ensure_lval): Likewise.
4343 (make_array_descriptor): Likewise.
4344 (ada_to_fixed_value): Likewise.
4345 (unwrap_value): Likewise.
4346 * value.c (deprecated_value_address_hack): Remove.
4347 (value_address): New function.
4348 (value_raw_address): Likewise.
4349 (set_value_address): Likewise.
4350 (value_fn_field): Use set_value_address.
4351 (value_from_contents_and_address): Likewise.
4352 (value_fn_field): Likewise.
4353 (allocate_value_lazy): Don't use VALUE_ADDRESS.
4354 (value_as_address): Use value_address.
4355 (value_static_field): Likewise.
4356 * valops.c (search_struct_field): Use set_value_address.
4357 (value_at): Likewise.
4358 (value_at_lazy): Likewise.
4359 (value_repeat): Likewise.
4360 (value_cast_structs): Use value_address.
4361 (value_cast): Likewise.
4362 (value_fetch_lazy): Likewise.
4363 (value_assign): Likewise.
4364 (value_repeat): Likewise.
4365 (address_of_variable): Likewise.
4366 (value_coerce_array): Likewise.
4367 (value_coerce_function): Likewise.
4368 (value_addr): Likewise.
4369 (search_struct_field): Likewise.
4370 (search_struct_method): Likewise.
4371 (find_method_list): Likewise.
4372 (value_struct_elt_for_reference): Likewise.
4373 (value_full_object): Likewise.
4374 * jv-valprint.c (java_value_print): Use set_value_address.
4375 * value.h (deprecated_value_address_hack): Remove.
4376 (VALUE_ADDRESS): Remove.
4377 (value_address): Declare.
4378 (value_raw_address): Declare.
4379 (set_value_address): Declare.
4381 2009-05-27 Tom Tromey <tromey@redhat.com>
4382 Thiago Jung Bauermann <bauerman@br.ibm.com>
4383 Phil Muldoon <pmuldoon@redhat.com>
4384 Paul Pluzhnikov <ppluzhnikov@google.com>
4386 * python/python.c (_initialize_python): Call
4387 gdbpy_initialize_types.
4388 (GdbMethods): Add "lookup_type".
4389 * python/python-value.c (value_object) <type>: New field.
4390 (valpy_dealloc): Decref type.
4391 (valpy_new): Initialize type.
4392 (valpy_get_type): New function.
4393 (value_to_value_object): Initialize type.
4394 (valpy_cast): New function.
4395 (value_object_getset): Add "type".
4396 (value_object_methods): Add "cast".
4397 * python/python-internal.h (type_to_type_object): Declare.
4398 (type_object_to_type): Likewise.
4399 (gdbpy_initialize_types): Likewise.
4400 (gdbpy_lookup_type): Declare.
4401 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
4402 (SUBDIR_PYTHON_SRCS): Add python-type.c.
4403 (python-type.o): New target.
4404 * python/python-type.c: New file.
4406 2009-05-27 Tom Tromey <tromey@redhat.com>
4407 Thiago Jung Bauermann <bauerman@br.ibm.com>
4408 Phil Muldoon <pmuldoon@redhat.com>
4410 * python/python.c: Include objfiles.h, observer.h.
4411 (gdbpy_auto_load): New global.
4412 (gdbpy_current_objfile): Likewise.
4413 (GDBPY_AUTO_FILENAME): New define.
4414 (gdbpy_new_objfile): New function.
4415 (gdbpy_get_current_objfile): Likewise.
4416 (gdbpy_objfiles): Likewise.
4417 (_initialize_python): Add "maint set auto-load". Call
4418 gdbpy_initialize_objfile. Attach objfile observer.
4419 (GdbMethods): New methods current_objfile, objfiles.
4420 * python/python-objfile.c: New file.
4421 * python/python-internal.h (objfile_to_objfile_object): Declare.
4422 (objfpy_get_printers): Likewise.
4423 (gdbpy_initialize_objfile): Likewise.
4424 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
4425 (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
4426 (python-objfile.o): New target.
4428 2009-05-27 Pedro Alves <pedro@codesourcery.com>
4430 * infrun.c (follow_exec): Clear the stop_requested flag.
4431 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
4434 2009-05-27 Aleksandar Ristovski <aristovski@qnx.com>
4436 * nto-procfs.c (get_regset): Pass correct pointer.
4438 2009-05-26 Doug Evans <dje@google.com>
4440 * dwarf2read.c (follow_die_ref): Add comment.
4441 (dwarf2_mark_helper): Tweak comment.
4442 (dwarf2_mark): Move description to its proper place.
4444 2009-05-25 Pierre Muller <muller@ics.u-strasbg.fr>
4446 * procfs.c (procfs_wait): Add options parameter.
4448 2009-05-24 Doug Evans <dje@google.com>
4450 Global renaming of find_thread_pid to find_thread_ptid.
4451 * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
4452 * thread.c (find_thread_ptid): Renamed from find_thread_pid.
4453 All callers updated.
4455 * infrun.c (follow_fork): Initialize new step_* locals
4456 to avoid "may be used uninitialized" warnings.
4458 2009-05-24 Pedro Alves <pedro@codesourcery.com>
4460 * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
4462 2009-05-24 Pedro Alves <pedro@codesourcery.com>
4464 * gdbthread.h (struct thread_info): New `pending_follow' field.
4465 * thread.c (new_thread): New function.
4466 (add_thread_silent): Use it.
4467 * breakpoint.c (internal_breakpoint_number): New global, moved
4469 (create_internal_breakpoint): ... this.
4470 (clone_momentary_breakpoint): New.
4471 * breakpoint.h (clone_momentary_breakpoint): Declare.
4472 * infrun.c (nullify_last_target_wait_ptid): Move declaration
4474 (pending_follow): Delete.
4475 (follow_fork): Handle pending follow fork event here. Moved the
4476 preserving of thread stepping state here.
4477 (resume): Don't handle pending follow fork events here. Only
4478 install the inferior's terminal modes if we're about to resume it.
4479 (proceed): Handle possible pending follow fork events here.
4480 (init_wait_for_inferior): No need to clear pending_follow anymore,
4482 (handle_inferior_event): Adjust to per-thread `pending_follow'.
4483 Call `follow_fork' to handle following the fork. If the
4484 follow-fork is cancelled, stop stepping.
4485 * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
4486 `pending_follow' events. Remove code that handled preserving the
4487 thread stepping state.
4488 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
4489 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
4491 2009-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
4493 * symfile.c (add_shared_symbol_files_command): Remove
4494 prototype and function.
4495 (_initialize _symfile): Move "add-shared-symbol-files"
4496 command and "assf" alias.
4497 * windows-nat.c (_initialize_windows_nat): to here.
4498 Change "add-shared-symbol-files" to alias.
4500 * config/i386/cygwin.mh: Remove NAT_FILE.
4501 * config/i386/mingw.mh: Remove NAT_FILE.
4502 * config/i386/mingw64.mh: Remove NAT_FILE.
4503 * config/i386/nm-cygwin.h: Remove file.
4504 * config/i386/nm-cygwin64.h: Remove file.
4506 2009-05-24 Hui Zhu <teawater@gmail.com>
4508 * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
4509 I386_LINUX_RECORD_IOCTL_*,
4510 I386_LINUX_RECORD_FCNTL_*) Removed.
4511 (i386_linux_init_abi): Change size of record from macros to
4514 2009-05-24 Hui Zhu <teawater@gmail.com>
4516 * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
4517 * linux-record.c (record_linux_system_call): Ditto.
4518 * linux-record.h (linux_record_tdep): Ditto.
4520 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4522 Replace the savestring calls by xstrdup calls where possible.
4523 * breakpoint.c (condition_command, set_raw_breakpoint)
4524 (create_catchpoint, update_breakpoint_locations): Replace the
4525 savestring calls by xstrdup calls where possible.
4526 * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
4527 (record_producer): Likewise.
4528 * coffread.c (coff_start_symtab, complete_symtab): Likewise.
4529 * corefile.c (set_gnutarget): Likewise.
4530 * dbxread.c (add_new_header_file): Likewise.
4531 * demangle.c (set_demangling_command, set_demangling_style): Likewise.
4532 * event-top.c (push_prompt, pop_prompt, command_line_handler)
4533 (set_async_prompt): Likewise.
4534 * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
4536 * language.c (set_language_command, _initialize_language): Likewise.
4537 * linespec.c (decode_line_2): Likewise.
4538 * rs6000-nat.c (add_vmap): Likewise.
4539 * top.c (set_prompt, init_history, init_main): Likewise.
4540 * tracepoint.c (stringify_collection_list): Likewise.
4541 * varobj.c (varobj_create): Remove variable expr_len. Replace the
4542 savestring calls by xstrdup calls where possible.
4543 (value_of_root, c_name_of_variable, c_describe_child): Replace the
4544 savestring calls by xstrdup calls where possible.
4545 * xcoffread.c (complete_symtab): Likewise.
4546 * cli/cli-script.c (build_command_line, define_command): Likewise.
4547 * cli/cli-setshow.c (do_setshow_command): Likewise.
4549 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
4551 Remove already unreachable code.
4552 * varobj.c (varobj_get_handle): Fix comment when error is called.
4553 All callers updated.
4555 2009-05-23 Eli Zaretskii <eliz@gnu.org>
4557 * README (`configure' options): Document GDB-specific options to
4560 * symtab.c (skip_prologue_using_lineinfo): New function.
4561 (find_function_start_sal): Use it to get to the first line of
4562 function's body that has an entry in the lineinfo table.
4564 * symmisc.c (dump_symtab): Switch the current language to
4565 the language of the symtab we are dumping only if the symtab's
4566 language is neither language_auto nor language_unknown.
4568 * coffread.c (coff_symtab_read): Set language_minimal as the
4569 language for the "_globals_" pseudo-file.
4570 (process_coff_symbol): Set the symbol's language to the language
4573 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4575 * target.h (struct section_table): Rename to ...
4576 (struct target_section): ... this.
4577 * exec.c: Adjust all references.
4578 * exec.h: Adjust all references.
4579 * nto-tdep.c: Adjust all references.
4580 * nto-tdep.h: Adjust all references.
4581 * ppc-linux-tdep.c: Adjust all references.
4582 * rs6000-nat.c: Adjust all references.
4583 * s390-tdep.c: Adjust all references.
4584 * solib-darwin.c: Adjust all references.
4585 * solib-frv.c: Adjust all references.
4586 * solib-irix.c: Adjust all references.
4587 * solib-null.c: Adjust all references.
4588 * solib-osf.c: Adjust all references.
4589 * solib-pa64.c: Adjust all references.
4590 * solib-som.c: Adjust all references.
4591 * solib-sunos.c: Adjust all references.
4592 * solib-svr4.c: Adjust all references.
4593 * solib-target.c: Adjust all references.
4594 * solib.c: Adjust all references.
4595 * solist.h: Adjust all references.
4596 * symfile.c: Adjust all references.
4597 * symfile.h: Adjust all references.
4598 * target.c: Adjust all references.
4600 2009-05-22 Hui Zhu <teawater@gmail.com>
4602 Add sys_fcntl argument interfaces to linux_record_tdep.
4604 * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
4605 fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
4607 * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
4608 I386_LINUX_RECORD_FCNTL_F_GETLK64,
4609 I386_LINUX_RECORD_FCNTL_F_SETLK64,
4610 I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
4611 of I386 Linux sys_fcntl arguments.
4612 (i386_linux_init_abi): Set macros values to linux_record_tdep.
4613 * linux-record.c (record_linux_system_call): Change to use
4614 the interface in linux_record_tdep in sys_fcntl and
4617 * linux-record.c (record_linux_system_call): Fix the process
4618 record build error about type in CYGWIN.
4620 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4622 * inflow.c (kill_command): Delete left over static declaration.
4624 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4626 * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
4628 (struct section_closure): Delete.
4629 (add_to_section_table): Delete.
4630 (build_target_sections_from_bfd): Delete.
4631 (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
4632 (target_bfd_reopen): Use build_section_table.
4633 * exec.c (xfer_memory): Move most code except for overlay
4634 debugging support from here...
4635 (section_table_xfer_memory): ... to this new function.
4636 (section_table_xfer_memory_partial): New.
4637 * exec.h (section_table_xfer_memory_partial): Declare.
4638 * bfd-target.h (build_target_sections_from_bfd): Delete
4641 2009-05-22 Pedro Alves <pedro@codesourcery.com>
4643 * remote.c (compare_sections_command): Don't declare exec_bfd.
4644 * tracepoint.c: Include "gdbcore.h".
4645 (remote_set_transparent_ranges): Don't declare exec_bfd.
4647 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4649 * aix-thread.c (init_aix_thread_ops): Whitespace.
4651 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4653 * dec-thread.c (dec_thread_wait): Add options parameter. Use it
4654 to call the to_wait method in the target beneath.
4655 * remote-m32r-sdi.c (m32r_wait): Add options parameter.
4657 2009-05-21 Joel Brobecker <brobecker@adacore.com>
4659 * aix-thread.c (aix_thread_wait): Add options parameter. Use it
4660 to call the to_wait method in the target_beneath.
4662 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4664 * linux-nat.c (linux_nat_terminal_inferior)
4665 (linux_nat_terminal_ours): Don't check sync_execution.
4666 * remote.c (remote_terminal_inferior, remote_terminal_ours):
4667 Don't check sync_execution. Update comments.
4668 * target.c (target_terminal_inferior): New.
4669 * target.h (target_terminal_inferior): Delete macro, and declare
4671 * event-top.c (async_disable_stdin): Make idempotent. Don't give
4672 the target the terminal here.
4673 * inflow.c (terminal_ours_1): Don't return early without setting
4676 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4678 * target.h (TARGET_WNOHANG): New.
4679 * target.c (target_wait): Add `options' argument. Adjust.
4680 (struct target_ops) <to_wait>: Add `options' argument.
4681 (target_wait): Add `options' argument.
4682 * infrun.c (wait_for_inferior): Pass 0 as options to
4683 target_wait (blocking wait).
4684 (fetch_inferior_event): Pass TARGET_WNOHANG as options to
4686 * fork-child.c (startup_inferior): Pass 0 as options to
4687 target_wait (blocking wait).
4688 * linux-nat.c (linux_nat_create_inferior): Remove async masking.
4689 (linux_nat_wait_1): Add `target_options' argument. Use it instead
4690 of checking on target_can_async_p.
4691 (linux_nat_wait): Add `target_options' argument. Adjust.
4692 * remote.c (remote_wait_ns): Add `options' argument. Adjust to
4693 check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
4694 (remote_wait_as): Add `options' argument. Adjust to check on
4695 TARGET_WNOWAIT instead of checking on remote_is_async_p. If doing
4696 a blocking wait, keep waiting until an interesting event comes
4698 (remote_wait): Add `options' argument. Don't loop here if the
4699 target is in async mode, and a blocking wait has been requested.
4701 * top.c (deprecated_target_wait_hook): Add `options' argument.
4702 * linux-thread-db.c (thread_db_wait): Add `options' argument, and
4703 pass it down to the layer beneath.
4704 * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
4705 * record.c (record_beneath_to_wait): Add `options' argument.
4706 (record_wait): Add `options' argument, and pass it down to the
4708 * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
4709 * darwin-nat.c (darwin_wait): Likewise.
4710 * defs.h (deprecated_target_wait_hook): Likewise.
4711 * gnu-nat.c (gnu_wait): Add `options' argument.
4712 * go32-nat.c (go32_wait): Likewise.
4713 * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
4714 pass it down to the layer beneath.
4715 * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
4716 * monitor.c (monitor_wait): Likewise.
4717 * nto-procfs.c (procfs_wait): Likewise.
4718 * remote-mips.c (mips_wait): Add `options' argument.
4719 * remote-sim.c (gdbsim_wait): Likewise.
4720 * rs6000-nat.c (rs6000_wait): Add `options' argument.
4721 * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
4722 it down to the layer beneath.
4723 * spu-linux-nat.c (spu_child_wait): Add `options' argument.
4724 * windows-nat.c (windows_wait): Likewise.
4725 * tui/tui-hooks.c (tui_target_wait_hook): Likewise. Adjust.
4727 2009-05-21 Pedro Alves <pedro@codesourcery.com>
4729 * mi/mi-interp.c (mi_on_resume): Account for whole process
4732 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4734 * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
4736 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4738 * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
4740 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4742 Fix parsing DW_AT_const_value using DW_FORM_string.
4743 * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
4745 2009-05-20 Joel Brobecker <brobecker@adacore.com>
4747 * aix-thread.c (giter_count): Do not count the main thread.
4748 (giter_accum): Do not include the main thread.
4750 2009-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4752 Remove the PROT parameter from openp.
4753 * source.c (openp): Remove the parameter PROT. Assertion check MODE.
4754 defs.h (openp): Update the prototype.
4755 Update all the openp callers.
4757 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4759 * inflow.c (kill_command): Moved to infcmd.c.
4760 (_initialize_inflow): Don't add the "kill" command or clear
4762 * infcmd.c (kill_command): Moved here from inflow.c.
4763 (_initialize_infcmd): Add the "kill" command here.
4765 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4767 * fork-child.c: Don't include frame.h. Include terminal.h.
4768 (fork_inferior): Call new_tty_postfork after forking adn adding
4769 the child to the inferior list.
4770 * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
4772 * inflow.c (struct terminal_info): Remove const qualifier from
4773 `run_terminal' field.
4774 (inferior_thisrun_terminal): Tweak comment.
4775 (inflow_inferior_exit): Release the `run_terminal' field.
4776 (copy_terminal_info): New function.
4777 (new_tty_postfork): New function.
4778 * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
4779 (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
4780 * inf-ptrace.c: Include terminal.h.
4781 (inf_ptrace_follow_fork): Copy the parent's terminal info to the
4783 * linux-nat.c: Include terminal.h.
4784 (linux_child_follow_fork): Copy the parent's terminal info to the
4786 * inf-ttrace.c: Include terminal.h.
4787 (inf_ttrace_follow_fork): Copy the parent's terminal info to the
4790 2009-05-19 Pedro Alves <pedro@codesourcery.com>
4792 * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
4793 (update_global_location_list): Use gdbarch_has_global_breakpoints
4794 instead of gdbarch_has_global_solist and
4795 target_supports_multi_process.
4796 * dicos-tdep.c (dicos_init_abi): Set
4797 gdbarch_has_global_breakpoints.
4798 * gdbarch.sh (has_global_solist): Update comment.
4799 (has_global_breakpoints): New.
4800 * remote.c (remote_start_remote): Use
4801 gdbarch_has_global_breakpoints instead of
4802 gdbarch_has_global_solist.
4803 * target.c (target_detach): Use gdbarch_has_global_breakpoints
4804 instead of gdbarch_has_global_solist.
4805 * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
4806 of target_supports_multi_process.
4808 2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
4810 * objc-lang.c (find_methods): Plug a small memory leak.
4812 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4814 * solib-svr4.c: Include observer.h.
4815 (debug_base, debug_loader_offset_p, debug_loader_offset)
4816 (debug_loader_name, main_lm_addr): Move these globals...
4817 (struct svr4_info): ... into this new structure.
4818 (svr4_info_p): New typedef.
4819 (svr4_info): New global.
4820 (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
4822 (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
4823 (solib_svr4_r_ldsomap): Add svr4_info argument. Adjust to
4825 (open_symbol_file_object): Adjust to per-inferior svr4.
4826 (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
4828 (enable_break): Add svr4_info argument. Adjust to per-inferior
4830 (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
4831 Adjust to per-inferior svr4.
4832 (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
4835 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4837 * linux-nat.h (linux_proc_get_tgid): Declare.
4838 * linux-nat.c (linux_proc_get_tgid): New.
4839 * linux-thread-db.c (struct thread_db_info): New field
4840 `need_stale_parent_threads_check'.
4841 (add_thread_db_info): Set it.
4842 (find_new_threads_callback): Ignore stale fork parent threads.
4843 (thread_db_resume): New.
4844 (init_thread_db_ops): Install thread_db_resume.
4846 2009-05-18 Pedro Alves <pedro@codesourcery.com>
4848 * fork-child.c (fork_inferior): Only reset the thread list if this
4849 is the first inferior.
4850 (startup_inferior): If the target support multi-process, tell it
4851 to resume only the new process.
4852 * linux-nat.c (num_lwps): Delete global.
4853 (purge_lwp_list): New function.
4854 (num_lwps): New function.
4855 (add_lwp, delete_lwp): Adjust.
4857 (iterate_over_lwps): Add filter argument. Handle it.
4858 (linux_nat_attach): Remove FIXME note.
4859 (linux_nat_detach): Adjust to iterate over threads of the inferior
4860 we're detaching from. Adjust to num_lwps being a function. Don't
4861 assume the head of the lwp list is the main thread of the process
4862 we're detaching from. Don't destroy the LWP list.
4863 (resume_callback): Add debug output.
4864 (linux_nat_resume): Handle resuming a single inferior. Allow a
4865 wildcard resume in non-stop mode.
4866 (linux_handle_extended_wait): Don't assume inferior_ptid is the
4867 correct inferior of the parent LWP.
4868 (status_callback): Also check lp->waitstatus.
4869 (select_event_lwp): Add new filter parameter. Handle it.
4870 (linux_nat_filter_event): Adjust to num_lwps being a function.
4871 (linux_nat_wait_1): When adding the first lwp of the inferior, use
4872 an is_lwp check instead of checking for the number of lwps.
4873 (linux_nat_wait_1): Handle waiting for a specific tgid. Handle
4874 pending process exit statuses.
4875 (linux_nat_mourn_inferior): Don't destroy all the LWP info.
4876 Instead delete LWPs of the inferior that we're mourning. Don't
4877 unregister from the event loop here.
4878 (linux_nat_pid_to_str): Use `num_lwps'.
4879 (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
4881 (linux_nat_is_async_p): Check if async was masked out.
4882 (linux_multi_process): New global.
4883 (linux_nat_supports_multi_process): New.
4884 (linux_nat_stop_lwp): Remove LWP filtering. It is done by the
4886 (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
4888 (linux_nat_close): New.
4889 (linux_nat_add_target): Register linux_nat_close and
4890 linux_nat_supports_multi_process.
4891 * linux-nat.h (iterate_over_lwps): Add filter argument.
4892 * linux-thread-db.c (thread_db_handle): Delete.
4893 (proc_handle, thread_agent, td_init_p, td_ta_new_p)
4894 (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
4895 (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
4896 (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
4897 (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
4898 longer globals, moved to...
4899 (struct thread_db_info): ... this new structure.
4900 (thread_db_list): New.
4901 (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
4903 (have_threads_callback): Filter out threads of all inferiors but
4904 the one specified by the ARGS argument.
4905 (have_threads): Add ptid argument specifying the inferior we're
4906 interested in. Handle it.
4907 (struct thread_get_info_inout): New.
4908 (thread_get_info_callback, thread_from_lwp): Adjust to use it.
4909 (thread_db_attach_lwp): Check that inferior of the passed in
4910 thread is using thread-db. Adjust.
4911 (enable_thread_event): Remove thread_agent parameter. Instead,
4912 get it from the per-inferior thread-db info.
4913 (dladdr_to_soname): Move higher up.
4914 (enable_thread_event_reporting): Adjust to use per-inferior
4916 (try_thread_db_load_1): Replace `handle' parameter by a
4917 thread_db_info parameter. Adjust to use per-inferior thread-db
4919 (try_thread_db_load): Adjust to use per-inferior thread-db info.
4920 (thread_db_load, disable_thread_event_reporting): Ditto.
4921 (check_for_thread_db): Remove conditional reporting of which
4922 libthread_db is in use.
4923 (thread_db_new_objfile): Add comment about inferior_ptid.
4924 (attach_thread): Adjust to use per-inferior thread-db info.
4925 (thread_db_detach): Adjust to use per-inferior thread-db info.
4926 Remove thread event breakpoints of the current inferior. Only
4927 unpush the thread-db target if there are no more processes using
4929 (check_event): Adjust to use per-inferior thread-db info.
4930 (thread_db_wait): Adjust to use per-inferior thread-db info. Only
4931 unpush the thread-db target if there are no more processes using
4933 (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
4934 info. Mark breakpoints of the current inferior out before
4935 deleting them. Only unpush the thread-db target if there are no
4936 more processes using it.
4937 (find_new_threads_callback): Adjust to use per-inferior thread_db
4939 (thread_db_find_new_threads_1): Add new ptid argument. Adjust to
4940 use per-inferior thread-db info.
4941 (thread_db_find_new_threads): Adjust to use per-inferior thread-db
4943 (thread_db_get_thread_local_address): Adjust.
4944 (thread_db_get_ada_task_ptid): Adjust.
4945 * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
4946 if there no more processes left to debug.
4947 * thread.c (set_running, set_executing): Handle resuming all
4948 threads of a single inferior.
4949 * mi/mi-interp.c (mi_output_running_pid): New.
4950 (mi_inferior_count): New.
4951 (mi_on_resume): For backwards compatibility, if resuming all
4952 threads of an inferior, and there is only one inferior, output
4955 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4957 * ada-lang.c (ada_find_any_type): Move check for primitive types ...
4958 (to_fixed_range_type): ... to here.
4960 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4962 * ada-lang.c (desc_data_type): Remove, replace by ...
4963 (desc_data_target_type): ... this.
4964 (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
4965 (ada_is_array_descriptor_type): Likewise.
4966 (ada_type_of_array): Likewise.
4967 (ada_coerce_to_simple_array_type): Likewise.
4968 (ada_array_element_type): Likewise.
4970 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4972 * ada-valprint.c (ada_val_print_1): Use val_print_string to print
4973 result of ada_vax_float_print_function inferior call.
4975 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4977 * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
4978 avoid creating a dummy value.
4980 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4982 * p-valprint.c (pascal_val_print): Use extract_typed_address
4983 to extract reference value.
4985 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
4987 * doublest.c (NAN): Remove unused define.
4988 (extract_floating_by_length, deprecated_extract_floating): Remove.
4989 (store_floating_by_length, deprecated_store_floating): Remove.
4990 (extract_typed_floating): Do not call extract_floating_by_length.
4991 (store_typed_floating): Do not call store_floating_by_length.
4992 (convert_typed_floating): Remove redundant assertions.
4993 * doublest.h (deprecated_extract_floating): Remove.
4994 (deprecated_store_floating): Remove.
4995 * sh64-tdep.c (sh64_register_convert_to_raw): Call
4996 extract_typed_floating instead of deprecated_extract_floating.
4998 2009-05-18 Jon Beniston <jon@beniston.com>
5000 * MAINTAINERS: Add lm32 target.
5001 * Makefile.in: Add lm32 dependencies.
5002 * NEWS: Indicate lm32 is a new target.
5003 * configure.tgt: Add lm32 targets.
5004 * lm32-tdep.c: New file.
5006 2009-05-18 Pedro Alves <pedro@codesourcery.com>
5008 * corelow.c (core_open): Flush the register cache before doing
5009 anything with registers.
5011 2009-05-18 Pedro Alves <pedro@codesourcery.com>
5013 * inflow.h (our_process_group): Remove declaration.
5014 (inferior_process_group): Delete global variable declaration.
5015 (inferior_process_group): New function declaration.
5016 * inflow.c: Include observer.h.
5017 (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
5019 (struct terminal_info): New struct.
5020 (our_terminal_info): New global.
5021 (inferior_process_group): New function.
5022 (inferior_thisrun_terminal): Extend description comment.
5023 (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
5025 (terminal_init_inferior_with_pgrp): Adjust to per-inferior
5027 (terminal_inferior): Ditto.
5028 (terminal_ours_1): Ditto.
5029 (inflow_new_inferior, inflow_inferior_exit): New functions.
5030 (child_terminal_info): Adjust to per-inferior terminal settings.
5031 (osig_set): New global.
5032 (set_sigint_trap): Adjust to per-inferior terminal settings. Set
5033 or clear `osig_set' accordingly.
5034 (clear_sigint_trap): Check `osig_set' to decide wheater to restore
5035 SIGINT handler, instead of checking the current inferior (which
5037 (_initialize_inflow): Attach inflow_new_inferior and
5038 inflow_inferior_exit to the "new_inferior" and "inferior_exit"
5039 notifications, respectively.
5040 * inferior.h (struct terminal_info): Forward declare.
5041 (struct inferior): Add `terminal_info' field.
5042 * inferior.c (delete_inferior_1): Notify the inferior_exit
5043 observers before removing the inferior from the lists and deleting
5045 * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
5046 a function instead of a variable. Adjust.
5047 * procfs.c (procfs_stop): Ditto.
5049 2009-05-17 Pedro Alves <pedro@codesourcery.com>
5051 * infrun.c (handle_inferior_event): When handling a
5052 TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
5054 * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
5055 from the child if vforking.
5056 * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
5057 breakpoints from the child here.
5059 2009-05-17 Pedro Alves <pedro@codesourcery.com>
5061 * infrun.c (pending_follow): Remove execd_pathname member.
5062 (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
5063 (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
5064 event, don't copy `execd_pathname' to pending_follow, use the
5065 event copy instead. Release `execd_pathname' once done with
5068 * infrun.c (pending_follow): Remove mention of exec events.
5070 2009-05-17 Hui Zhu <teawater@gmail.com>
5072 * i386-tdep.c (i386_process_record): Make it extern.
5073 (i386_gdbarch_init): Don't call set_gdbarch_process_record
5075 * i386-tdep.h (i386_process_record): Declare.
5076 * i386-linux-tdep.c (i386_linux_init_abi): Call
5077 set_gdbarch_process_record.
5079 2009-05-17 Vladimir Prus <vladimir@codesourcery.com>
5081 Always report varobj as changed when in_scope attribute changes.
5083 * varobj.c (install_new_value): If non-NULL-ness of value
5086 2009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
5088 * NEWS: Mention set/show libthread-db-search-path.
5089 * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
5090 (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
5091 * linux-thread-db.c (libthread_db_search_path): New setting.
5092 (thread_db_handle): New variable (replaces using_thread_db).
5093 (try_thread_db_load_1): New function.
5094 (try_thread_db_load, thread_db_load_search): Likewise.
5095 (dladdr_to_soname): Likewise.
5096 (thread_db_load): Iterate over possibly multiple libthread_db's.
5097 (check_for_thread_db): Attempt to load new libthread_db.
5098 (thread_db_detach, thread_db_wait): Unload libthread_db.
5099 (thread_db_mourn_inferior): Likewise.
5100 (_initialize_thread_db): Add new libthread-db-search-path option.
5101 Defer loading of libthread_db to check_for_thread_db.
5102 * solib.c (libpthread_name_p): New function.
5103 (libpthread_solib_p): Call it.
5104 * solib.h (libpthread_name_p): New prototype.
5106 2009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
5108 * MAINTAINERS: Update my email address.
5110 2009-05-14 Paul Pluzhnikov <ppluzhnikov@google.com>
5112 * breakpoint.h: Add breakpoint_re_set_objfile prototype.
5113 * breakpoint.c (create_overlay_event_breakpoint): Renamed
5114 from create_overlay_event_breakpoint_1, old
5115 create_overlay_event_breakpoint deleted.
5116 (breakpoint_re_set_objfile): Don't rescan all objfiles
5118 (breakpoint_re_set): New function.
5119 * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
5120 instead of breakpoint_re_set.
5121 * objfiles.c (objfile_relocate): Likewise.
5123 2009-05-14 Joel Brobecker <brobecker@adacore.com>
5125 * gdbarch.sh: Add comment documenting the target_gdbarch global.
5126 gdbarch.h does NOT need to be regenerated as the corresponding
5127 change has already been made in a previous commit.
5129 2009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
5131 Remove all i386 debug register low level macros in config nm files.
5132 (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
5133 (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
5134 (I386_USE_GENERIC_WATCHPOIINTS): Remove.
5136 * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
5137 (struct i386_dr_low_type): New type.
5138 (i386_dr_low): New global variable.
5139 * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
5140 (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
5141 i386_dr_low struct variable fields.
5142 (i386_remove_aligned_watchpoint): Likewise.
5143 (i386_stopped_data_address): Likewise.
5144 (i386_stopped_by_hwbp): Likewise.
5145 (show_debug_regs_command_added): New static variable.
5146 (add_show_debug_regs_command): New static function.
5147 (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
5148 (i386_set_debug_register_length): New function.
5149 (_initialize_i386_nat): Delete.
5151 * amd64-linux-nat.c: Include "i386-nat.h".
5152 (amd64_linux_dr_set_control): Change to static.
5153 (amd64_linux_dr_get_status): Change to static.
5154 (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
5155 (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
5157 * go32-nat.c: Include "i386-nat.h".
5158 (go32_set_addr): Change to static.
5159 (go32_set_dr7): Change to static. Change arg type to unisgned long.
5160 (go32_get_dr6): Change to static. Change return type to unisnged long.
5161 (init_go32_ops): Set i386_dr_low variable fields.
5162 * i386-linux-nat.c: Include "i386-nat.h".
5163 (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
5164 (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
5165 (_initialize_i386_linux_nat): Set i386_dr_low variable fields.
5166 * i386bsd-nat.h: Declare functions used for
5167 i386_dr_low fields in i386fbsd-nat.c.
5168 * i386fbsd-nat.c: Include "i386-nat.h".
5169 (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
5170 * windows-nat.c: Include "i386-nat.h".
5171 (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
5173 (cygwin_get_dr6): Change return type to unisnged long.
5174 (cygwin_set_dr7): Change arg type to unisgned long.
5175 (init_windows_ops): Set i386_dr_low function fields.
5177 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
5178 i386_set_debug_register_length.
5179 * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
5181 * config/i386/nm-cygwin.h: Remove all I386_* macros.
5182 * config/i386/nm-cygwin64.h: Likewise.
5183 * config/i386/nm-fbsd.h: Likewise.
5184 * config/i386/nm-linux.h: Likewise.
5185 * config/i386/nm-i386.h: Remove completely.
5186 * config/i386/nm-go32.h: Remove completely.
5187 * config/i386/nm-linux64.h: Remove completely.
5188 * config/i386/go32.mh (NAT_FILE): Remove entry.
5189 * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
5191 2009-05-14 Jon Beniston <jon@beniston.com>
5193 * MAINTAINERS: Add Jon Beniston to write after approval list.
5195 2009-05-13 Paul Pluzhnikov <ppluzhnikov@google.com>
5197 * objc-lang.c (objc_objfile_data): New variable.
5198 (find_methods): Skip objfiles without Obj-C methods.
5199 (_initialize_objc_lang): New function.
5201 2009-05-13 Joel Brobecker <brobecker@adacore.com>
5203 * c-lang.c (print_wchar): Remove unnecessary cast.
5205 2009-05-12 Jim Blandy <jimb@red-bean.com>
5207 * MAINTAINERS: Remove self as m32c target maintainer.
5209 2009-05-12 Pedro Alves <pedro@codesourcery.com>
5211 * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
5212 * command.h (deprecated_add_set_cmd): Delete declaration.
5213 * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
5214 'set debug gnu-nat' and 'show debug gnu-nat'.
5215 * i386-nat.c (_initialize_i386_nat): Replace 'maint
5216 show-debug-registers' with 'maint set show-debug-registers' and
5217 'maint show show-debug-registers'.
5218 * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
5219 show-debug-registers' with 'maint set show-debug-registers' and
5220 'maint show show-debug-registers'.
5222 2009-05-12 Joel Brobecker <brobecker@adacore.com>
5224 * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
5225 pushing it on the output obstack.
5227 2009-05-11 Joel Brobecker <brobecker@adacore.com>
5229 Fix internal error on breaking at a multi-locations caller source line.
5230 * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
5231 command with no parameters.
5233 2009-05-11 Pedro Alves <pedro@codesourcery.com>
5235 * linux-nat.c (enum sigchld_state): Delete.
5236 (linux_nat_async_events_state): Delete.
5237 (struct waitpid_result): Delete.
5238 (waitpid_queue): Delete.
5239 (queued_waitpid_1): Delete.
5240 (async_file_flush): New.
5241 (queued_waitpid, push_waitpid): Delete.
5242 (async_file_mark): New.
5243 (drain_queued_events): Delete.
5244 (my_waitpid): Remove locally queued events handling.
5245 (linux_test_for_tracefork): Upjust.
5246 (linux_child_follow_fork): Ditto.
5247 (sync_sigchld_action): Delete.
5248 (blocked_mask): Reinstate.
5249 (async_sigchld_action): Rename to...
5250 (sigchld_action): ... this.
5251 (block_child_signals): New.
5252 (restore_child_signals_mask): New.
5253 (lin_lwp_attach_lwp): Adjust.
5254 (linux_nat_create_inferior): Ditto.
5255 (linux_nat_attach): Also use lp->status in async mode.
5256 (get_pending_status): Don't use queued_waitpid.
5257 (linux_nat_detach): Don't drain locally queued events.
5258 (linux_nat_resume): Allow pending wait statuses stored lp->status
5259 in async mode. If returning early due to a pending event,
5260 re-register the event source.
5261 (stop_wait_callback): Allow pending wait statuses stored
5262 lp->status in async mode.
5263 (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
5264 (linux_nat_wait): Rename to ...
5265 (linux_nat_wait_1): ... this. Allow pending wait statuses stored
5266 lp->status in async mode. Always add WNOHANG to the waitpid
5267 options in async mode.
5268 (linux_nat_wait): New.
5269 (kill_callback): Don't drain locally queued events.
5270 (sigchld_handler): Rewrite.
5271 (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
5272 refer to "set target-async".
5273 (linux_nat_async_mask): If in non-stop, and re-enabling async
5274 mode, re-register the target event source in the event loop.
5275 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
5276 (get_pending_events, async_sigchld_handler)
5277 (linux_nat_async_events): Delete.
5278 (handle_target_event): New.
5279 (linux_nat_async_file_handler): Delete.
5280 (linux_async_pipe): New.
5281 (linux_nat_async): Only re-register in the event loop if not
5282 registered yet. Always notify the event-loop once if enabling the
5284 (linux_nat_stop_lwp): Rewrite to handle pending events stored in
5285 lp->status, not in the locally queued event list.
5286 (linux_nat_stop): Don't mask out async event handling.
5287 (linux_nat_setup_async): Delete.
5288 (_initialize_linux_nat): Adjust.
5289 (lin_thread_get_thread_signals): blocked_mask is global again.
5292 2009-05-11 Pierre Muller <muller@ics.u-strasbg.fr>
5294 Unify target macros.
5296 * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
5297 (target_stoppped_by_watchpoint): New macro.
5298 (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
5299 (target_have_steppable_watchpoint): New macro.
5300 (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
5301 (target_have_continuable_watchpoint): New macro.
5302 (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
5303 (target_can_use_hardware_watchpoint): New macro.
5304 (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
5305 (target_region_ok_for_hw_watchpoint): New macro.
5307 * breakpoint.c (update_watchpoint): Use new macros.
5308 (bpstat_alloc): Likewise.
5309 (create_breakpoint): Likewise.
5310 (watch_command_1): Likewise.
5311 (can_use_hardware_watchpoint): Likewise.
5312 (do_enable_breakpoint): Likewise.
5313 * infrun.c (handle_inferior_event): Adapt to new macros.
5314 * mips-tdep.c (mips_gdbarch_init): Update comments.
5315 * procfs.c (procfs_set_watchpoint): Update comment.
5316 (procfs_insert_watchpoint): Adapt to new macros.
5317 * remote-m32r-sdi.c (m32r_stop):
5318 * remote-mips.c (mips_remove_breakpoint):
5319 * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
5320 (debug_to_stopped_by_watchpoint): Likewise.
5323 2009-05-10 Pierre Muller <muller@ics.u-strasbg.fr>
5325 * src/gdb/target.h: Remove all tests for already defined
5326 macros. All macros defined here should not be set in config
5329 2009-05-08 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5331 * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
5332 (have_ptrace_getsetfpregs): Likewise.
5333 fetch_all_gp_regs): New function.
5334 (fetch_gp_regs): New function.
5335 (fetch_all_fp_regs): Likewise.
5336 (fetch_fp_regs): New function.
5337 (fetch_ppc_registers): Using the new methods to fetch general-
5338 purpose and floating-pointer registers.
5339 (store_all_gp_regs): New function.
5340 (store_gp_regs): Likewise.
5341 (store_all_fp_regs): New function.
5342 (store_fp_regs): Likewise.
5343 (store_ppc_registers): Using the new methods to store general-
5344 purpose and floating-pointer registers.
5346 2009-05-08 Doug Evans <dje@google.com>
5348 * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
5350 2009-05-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5352 * MAINTAINERS (Write After Approval): Add self.
5354 2009-05-07 Joel Brobecker <brobecker@adacore.com>
5356 * gdbarch.h (target_gdbarch): Add comment documenting this global.
5358 2009-05-06 Joel Brobecker <brobecker@adacore.com>
5360 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
5362 * configure: Regenerate.
5364 2009-05-06 Joel Brobecker <brobecker@adacore.com>
5366 * utils.c: Add include of gdb_usleep.h.
5367 (defaulted_query): Detect false EOF conditions that happen
5368 on terminals opened with the O_NONBLOCK flag when there is
5371 2009-05-06 Pedro Alves <pedro@codesourcery.com>
5373 * inferior.c (add_inferior): Move observer_notify_new_inferior
5375 (add_inferior_silent): ... here.
5377 2009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
5378 Pedro Alves <pedro@codesourcery.com>
5380 * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
5381 (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
5383 (procfs_stopped_by_watchpoint): Made static, ptid argument
5385 (_initialize_procfs): Register new watchpoint related target
5387 * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
5388 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
5389 (HAVE_CONTINUABLE_WATCHPOINT): Delete.
5390 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5391 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5393 * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
5394 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
5395 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5396 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5398 * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
5399 (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
5400 (target_insert_watchpoint, target_remove_watchpoint): Delete.
5401 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
5404 2009-05-06 Hui Zhu <teawater@gmail.com>
5406 * i386-tdep.c (i386_process_record): Change bzero to memset.
5408 2009-05-06 Hui Zhu <teawater@gmail.com>
5410 * NEWS: Add item for process record and replay.
5412 2009-05-05 Maxim Grigoriev <maxim2405@gmail.com>
5414 * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
5416 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5418 * inferior.h (read_pc, write_pc): Remove.
5419 * regcache.c (read_pc, write_pc): Remove.
5421 * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
5423 (handle_inferior_event): Use regcache_read_pc instead of read_pc
5424 when determining value of stop_pc. Replace subsequent uses of
5425 read_pc by inspecting already-retrieved stop_pc value.
5426 (keep_going): Use regcache_read_pc instead of read_pc.
5428 * breakpoint.c (watchpoint_check): Use current frame architecture
5429 and PC instead of current_gdbarch and read_pc ().
5430 * tracepoint.c (set_traceframe_context): Replace PC argument
5431 with FRAME argument.
5432 (trace_start_command, finish_tfind_command): Update calls.
5433 (finish_tfind_command): Compare frame IDs to identify transitions
5435 (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
5436 * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
5437 of gdbarch. Use regcache_read_pc and regcache_write_pc instead
5438 of read_pc and write_pc.
5439 (store_register): Make regcache argument non-const. Update call
5440 to exec_one_dummy_insn.
5442 * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
5443 * infcmd.c (post_create_inferior): Likewise.
5444 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
5445 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
5446 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
5447 * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
5448 * linux-fork.c (fork_load_infrun_state): Likewise.
5449 * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
5450 * record.c (record_wait): Likewise.
5451 * procfs.c (procfs_wait): Likewise.
5452 * remote-mips.c (common_open, mips_wait): Likewise.
5453 * remote-m32r-sdi.c (m32r_resume): Likewise.
5455 * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
5456 * monitor.c (monitor_create_inferior, monitor_load): Likewise.
5457 * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
5458 * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
5459 * remote-mips.c (mips_create_inferior, mips_load): Likewise.
5461 * solib-darwin.c: Include "regcache.h".
5462 * solib-pa64.c: Include "regcache.h".
5463 * solib-svr4.c: Include "regcache.h.".
5465 * symfile.c: Do not mention read_pc or write_pc in comments.
5466 * dink32-rom.c: Likewise.
5467 * m32r-rom.c: Likewise.
5468 * mips-tdep.c: Likewise.
5470 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
5472 * fork-child.c (startup_inferior): Move setting stop_pc ...
5473 * infcmd.c (post_create_inferior): ... to here.
5475 2009-05-04 Michael Snyder <msnyder@vmware.com>
5477 * NEWS: Add item for reverse debugging commands.
5479 2009-05-04 Pedro Alves <pedro@codesourcery.com>
5481 * go32-nat.c (go32_stop): Delete.
5482 (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
5483 (go32_create_inferior): Don't call go32_stop or
5485 (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
5487 (init_go32_ops): Don't register go32_stop.
5489 2009-05-02 Eli Zaretskii <eliz@gnu.org>
5491 * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
5494 * infcall.c (find_function_addr): Avoid compiler warnings for
5497 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5499 * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
5500 (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
5502 2009-05-01 Doug Evans <dje@google.com>
5504 * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
5507 2009-05-01 Eli Zaretskii <eliz@gnu.org>
5509 * record.c (_initialize_record): Reformat and clarify doc strings
5510 for stop-at-limit and insn-number-max.
5512 * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
5514 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5516 Make specifiable the make_function_type type memory ownership.
5517 * gdbtypes.c (make_function_type): New parameter `objfile', use it
5518 explicitely instead of TYPE-initialized removed local variable
5519 `objfile'. Describe `objfile' it in the function comment.
5520 (lookup_function_type): Update make_function_type callers.
5521 * gdbtypes.h (make_function_type): Update the prototype.
5522 * jv-lang.c (java_link_class_type): Update make_function_type callers.
5523 * dwarf2read.c (read_subroutine_type): Likewise.
5524 * stabsread.c (read_type): Likewise.
5526 2009-05-01 Eli Zaretskii <eliz@gnu.org>
5528 * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
5529 printing a bogus "Thread <main>".
5530 (go32_thread_alive): Don't return 1 for null_ptid.
5532 * i386-tdep.c (i386_go32_init_abi): Override the number of
5533 registers due to non-support of SSE.
5535 2009-04-30 Anthony Green <green@moxielogic.com>
5537 * configure.tgt: Link the moxie simulator in with gdb.
5539 2009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
5541 * elfread.c (elf_symtab_read): Don't assume .data and .rodata
5544 2009-04-30 Hui Zhu <teawater@gmail.com>
5545 Michael Snyder <msnyder@vmware.com>
5547 I386 Linux process record and replay support.
5549 * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
5550 This struct has the argument for the function
5551 "record_linux_system_call".
5552 (i386_linux_intx80_sysenter_record): New function. Parse the
5553 system call instruction and call function
5554 "record_linux_system_call" to record execute log.
5555 (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
5556 Set "i386_linux_intx80_sysenter_record" to
5557 "i386_intx80_record" and "i386_sysenter_record".
5559 2009-04-30 Hui Zhu <teawater@gmail.com>
5560 Michael Snyder <msnyder@vmware.com>
5562 I386 architecture process record and replay support.
5564 * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
5565 PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
5567 (aflag, dflag, override, modrm, mod, reg, rm, ot,
5568 i386_record_pc): New variables. Ditto.
5569 (i386_record_modrm, i386_record_lea_modrm_addr,
5570 i386_record_lea_modrm): New functions. Ditto.
5571 (i386_process_record): New function. Parse the instruction in
5572 address "addr" and record the values of registers and memory
5573 that will be changed by this instruction.
5574 (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
5575 "process_record" interface.
5576 * i386-tdep.h (gdbarch_tdep): New function pointers
5577 "i386_intx80_record" and "i386_sysenter_record" that point to
5578 the function that can record "intx80" and "sysenter" execute
5581 2009-04-30 Hui Zhu <teawater@gmail.com>
5582 Michael Snyder <msnyder@vmware.com>
5584 * infrun.c (use_displaced_stepping): Return false if process
5585 record and replay target is used.
5586 (proceed): Call function "record_not_record_set" if pocess
5587 record and replay target is used.
5589 2009-04-30 Hui Zhu <teawater@gmail.com>
5590 Michael Snyder <msnyder@vmware.com>
5592 Linux process record and replay support.
5594 * Makefile.in (ALLDEPFILES): Add linux-record.c.
5595 (ALL_TARGET_OBS): Add linux-record.o.
5596 * configure.tgt (x86_64-*-linux*): Add linux-record.o.
5597 (i[34567]86-*-linux*): Add linux-record.o.
5598 * linux-record.c, linux-record.h: New file.
5600 2009-04-30 Hui Zhu <teawater@gmail.com>
5601 Michael Snyder <msnyder@vmware.com>
5603 Process record and replay target.
5605 * Makefile.in (SFILES): Add record.c.
5606 (COMMON_OBS): Add record.o.
5607 * record.c, record.h: New file.
5609 2009-04-30 Hui Zhu <teawater@gmail.com>
5610 Michael Snyder <msnyder@vmware.com>
5612 * target.h (strata): New stratum "record_stratum".
5614 2009-04-30 Hui Zhu <teawater@gmail.com>
5615 Michael Snyder <msnyder@vmware.com>
5617 GDBARCH interface for process record and replay.
5619 * gdbarch.sh (process_record): This interface point to the
5620 function that records the inferior execute log.
5622 2009-04-29 Doug Evans <dje@google.com>
5624 * i386-nat.c (child_post_startup_inferior): Delete, unused.
5626 2009-04-29 Pedro Alves <pedro@codesourcery.com>
5628 * breakpoint.c (print_exception_catchpoint): Access `b' directly
5629 instead of `b->loc->owner'.
5630 (print_mention_exception_catchpoint): Ditto.
5632 2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
5634 * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
5636 2009-04-27 Tom Tromey <tromey@redhat.com>
5638 * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
5640 2009-04-27 Jerome Guitton <guitton@adacore.com>
5642 * symtab.c (append_exact_match_to_sals): New function, extracted
5643 from expand_line_sal.
5644 (expand_line_sal): Use append_exact_match_to_sals to append exact
5645 matches. If none found, append all best items.
5647 2009-04-27 Jerome Guitton <guitton@adacore.com>
5649 * main.c (captured_main): Move gdbinit lookups after gdb_init.
5651 2009-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
5654 * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
5655 (read_func_scope): Call inherit_abstract_dies.
5657 2009-04-25 Eli Zaretskii <eliz@gnu.org>
5659 * Makefile.in (ALLDEPFILES): Remove duplicate entries for
5660 sparc-sol2-nat.c and sparc-sol2-tdep.c.
5662 * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
5664 2009-04-24 Pierre Muller <muller@ics.u-strasbg.fr>
5666 ARI change: Use "/* ARI: rule */" pattern.
5667 * utils.c: Update ARI patterns.
5668 * gdb_dirent.h: Likewise.
5670 2009-04-23 Anthony Green <green@moxielogic.com>
5672 * MAINTAINERS: Add moxie target.
5673 * configure.tgt: Add moxie-*-elf target.
5674 * moxie-tdep.c: New file.
5675 * moxie-tdep.h: New file.
5677 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5679 * ada-lang.c: Remove an extra empty line. No code change.
5681 2009-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5683 Fix double free on error inserting the breakpoint instruction.
5684 * breakpoint.c (create_breakpoints): Move the
5685 update_global_location_list call to ...
5686 (break_command_really): ... here together with the second local call
5687 both unified after all the cleanups.
5689 2009-04-23 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
5690 Tom Tromey <tromey@redhat.com>
5692 * configure, config.in: Regenerate.
5693 * configure.ac: Support for relocatable GDB datadir. Use
5694 GDB_AC_WITH_DIR. Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
5695 * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
5696 * top.c (init_main): Add "set data-directory".
5697 * defs.h (gdb_datadir): Declare.
5698 * main.c (gdb_datadir): New global.
5699 (captured_main): Initialize gdb_datadir. Use relocate_directory.
5700 (relocate_path): New function.
5701 (relocate_directory): Likewise.
5702 (get_init_files): Use relocate_path.
5703 (README): Mention --with-gdb-datadir.
5705 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5707 * ada-tasks (task_command_1): Call target_find_new_threads.
5709 2009-04-23 Joel Brobecker <brobecker@adacore.com>
5711 * stack.c (do_gdb_disassembly): Print the exception message if an
5712 error was thrown while trying to perform the disassembly.
5714 2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
5716 * varobj.c (free_variable): Replace free_current_contents by xfree.
5718 2009-04-22 Kazu Hirata <kazu@codesourcery.com>
5720 * arm-linux-nat.c (fetch_register, store_register): Use
5721 ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
5722 * arm-linux-tdep.c (arm_linux_supply_gregset,
5723 arm_linux_collect_gregset): Likewise.
5724 * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
5725 * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
5727 2009-04-22 Hui Zhu <teawater@gmail.com>
5729 * stack.c (_initialize_stack): Set the default of
5730 disassemble-next-line to off.
5732 2009-04-21 Tom Tromey <tromey@redhat.com>
5734 * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
5735 * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
5737 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
5739 * configure.ac: Add quotes to not lose brackets in help text.
5740 * configure: Rebuild.
5742 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
5744 * configure.ac: Don't postprocess Makefile in config.status.
5745 Substitute GDB_NM_FILE. Don't substitute nm_h.
5746 * Makefile.in (GDB_NM_FILE): Substitute.
5747 (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
5748 * configure: Regenerate.
5749 * gnulib/Makefile.in: Regenerate.
5751 2009-04-21 Joseph Myers <joseph@codesourcery.com>
5753 * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
5754 --with-htmldir): New.
5755 * configure: Regenerate.
5757 2009-04-21 Tom Tromey <tromey@redhat.com>
5759 * configure: Rebuild.
5760 * configure.ac: Use lower case for start of help strings. Clean
5761 up --with-sysroot help.
5763 2009-04-21 Tom Tromey <tromey@redhat.com>
5765 * configure: Rebuild.
5766 * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
5767 * configure.ac: Use AC_HELP_STRING. Use upper case for variables
5770 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
5772 ARI fix: remove "%p".
5773 * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
5774 (ia64_sigtramp_frame_this_id): Ditto.
5775 (ia64_libunwind_frame_this_id): Ditto.
5776 (ia64_libunwind_sigtramp_frame_this_id): Ditto.
5777 * symmisc.c (maintenance_info_psymtabs): Ditto.
5779 2009-04-21 Joseph Myers <joseph@codesourcery.com>
5781 * configure.ac (--with-relocated-sources): New.
5782 * configure, config.in: Regenerate.
5783 * source.c (add_substitute_path_rule): Remove static.
5784 * source.h (add_substitute_path_rule): Declare.
5785 * main.c: Include "source.h".
5786 (captured_main): Add substitution rule if RELOC_SRCDIR.
5788 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
5790 * gnu-nat.h (proc_debug): Add missing continuation line in macro.
5792 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5794 * NEWS: Mention MIPS/Linux hardware watchpoint support.
5796 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5798 * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
5799 (maint_show_dr, super_close): New variables.
5800 (super_fetch_registers, super_store_registers): Make static.
5801 (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
5802 (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
5803 (pt_watch_style): Define new enum.
5804 (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
5806 (watch_readback_valid, watch_readback, current_watches, watch_mirror):
5808 (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
5809 (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
5810 (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
5811 (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
5812 (type_to_irw, fill_mask, try_one_watch)
5813 (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
5814 (mips_linux_new_thread, populate_regs_from_watches)
5815 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
5816 (mips_linux_close): New functions.
5817 (_initialize_mips_linux_nat): Register watchpoint functions with
5818 the target_ops. Add show-debug-regs maintenance command.
5820 2009-04-20 David Daney <ddaney@caviumnetworks.com>
5822 * infrun.c (handle_inferior_event): Move gegisters_changed call down.
5824 2009-04-19 Pedro Alves <pedro@codesourcery.com>
5826 * NEWS: Mention gdbserver support for x86 Windows CE.
5828 2009-04-19 Eli Zaretskii <eliz@gnu.org>
5830 * config/djgpp/fnchange.lst: Fix typos.
5832 Set default host and target charsets in the DJGPP port.
5834 * config/djgpp/config.sed (am_cv_langinfo_codeset)
5835 (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
5836 in all configure scripts that define ac_cv_env_CPP_value.
5838 * go32-nat.c (dos_codepage, nl_langinfo): New functions.
5841 * config/djgpp/nl_types.h: New file.
5843 * config/djgpp/langinfo.h: New file.
5845 * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
5847 2009-04-18 Carlos O'Donell <carlos@codesourcery.com>
5849 * Makefile.in (MAKEHTML): Set to makeinfo --html.
5850 (MAKEHTMLFLAGS): Set to empty.
5852 2009-04-18 Eli Zaretskii <eliz@gnu.org>
5854 * NEWS: Mention all new set/show commands added since GDB 6.8 was
5857 * go32-nat.c (go32_sysinfo): Check if the call to
5858 __dpmi_get_capabilities fills the buffer with information, and
5859 don't use the buffer if not.
5861 2009-04-17 Tom Tromey <tromey@redhat.com>
5863 * charset.c (_initialize_charset): Add special case for "646".
5865 2009-04-17 Carlos O'Donell <carlos@codesourcery.com>
5867 * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
5868 * configure: Regenerate.
5869 * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
5870 configure substitutions.
5871 (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
5873 2009-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
5875 ARI fix: Do not use %p, replace by call to host_address_to_string
5877 * darwin-nat.c (darwin_xfer_partial): Apply change.
5878 * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
5879 * gnu-nat.h (proc_debug): Ditto.
5880 * symmisc.c (maintenance_info_symtabs): Ditto.
5881 (maintenance_info_psymtabs): Ditto.
5882 * windows-nat.c (handle_load_dll): Ditto.
5883 (handle_unload_dll, info_w32_command, handle_exception): Ditto.
5884 * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
5886 2009-04-17 Joseph Myers <joseph@codesourcery.com>
5888 * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
5889 --enable-64-bit-bfd.
5890 (sparc-*-linux*): Likewise.
5892 2009-04-17 Eli Zaretskii <eliz@gnu.org>
5894 * go32-nat.c (go32_sysinfo): Update list of Windows versions of
5897 2009-04-16 Pedro Alves <pedro@codesourcery.com>
5899 * remote.c (remote_query_attached): Fix pasto in packet_ok result
5902 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5904 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
5905 Revert the previous change. Might not be correct, actually.
5907 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5909 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
5910 (ada_get_current_task, ada_print_exception_breakpoint_nontask)
5911 (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
5912 Remove declaration. These are non-existent functions.
5914 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5916 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
5917 Fix a compilation warning on mips-irix due to casting from
5918 a pointer of different size.
5920 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5922 * ada-lang.c (symtab_for_sym): Delete.
5923 (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
5925 2009-04-16 Joel Brobecker <brobecker@adacore.com>
5927 * ada-lang.c (extract_string): Delete.
5928 (ada_main_name): Reimplement using target_read_string instead of
5931 2009-04-16 Andreas Schwab <schwab@linux-m68k.org>
5933 * m68klinux-nat.c: Remove obsolete comment.
5934 (fetch_register, store_register): Don't call
5935 gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
5936 which are always nops here.
5938 2009-04-14 Tom Tromey <tromey@redhat.com>
5940 * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
5941 (c_printstr): Likewise.
5942 * charset.c: Include gdb_wait.h.
5943 (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
5944 (find_charset_names): Use pexecute. Handle libiconv's output.
5946 (_initialize_charset): Use xstrdup.
5947 * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar
5949 (INTERMEDIATE_ENCODING): New define.
5950 * configure, config.in: Rebuild.
5951 * configure.ac: Check for btowc.
5953 2009-04-15 Tom Tromey <tromey@redhat.com>
5955 * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
5957 2009-04-15 Eli Zaretskii <eliz@gnu.org>
5959 * utils.c (parse_escape): Initialize target_char to pacify GCC.
5961 2009-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
5963 * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
5965 2009-04-14 Pierre Muller <muller@ics.u-strasbg.fr>
5967 ARI fix: sprintf rule.
5968 * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
5969 * ada-lang.c (add_angle_brackets): Use xstrprintf.
5970 (ada_decode): Replace sprintf by xsnprintf.
5971 (find_old_style_renaming_symbol): Ditto.
5972 (ada_to_fixed_type_1, ada_enum_name): Ditto.
5975 2009-04-14 Joel Brobecker <brobecker@adacore.com>
5977 * target.c (target_mourn_inferior): Call bfd_cache_close_all
5978 after having executed the target mourn_inferior routine.
5980 2009-04-14 Eli Zaretskii <eliz@gnu.org>
5982 * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
5985 2009-04-13 David Daney <ddaney@caviumnetworks.com>
5987 * infrun.c (maybe_software_singlestep): New function.
5988 (resume): Call maybe_software_singlestep.
5989 (handle_inferior_event): Same.
5991 2009-04-13 Tom Tromey <tromey@redhat.com>
5993 * python/python-frame.c (frapy_richcompare): Return
5994 Py_NotImplemented, not an error. Handle Py_NE as well.
5996 2009-04-13 Eli Zaretskii <eliz@gnu.org>
5998 * charset.c (EILSEQ): Define if not defined by system headers.
6000 2009-04-11 Eli Zaretskii <eliz@gnu.org>
6002 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
6003 to be consistent with renaming config.intl.in into config_intl.in.
6005 * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
6006 consistent with the change from 2008-11-09.
6008 2009-04-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6010 * gdbtypes.c: Remove excessive parentheses at the return keywords.
6011 * varobj.c (varobj_invalidate): Fix indentation.
6012 * varobj.c (varobj_invalidate): Fix formatting text width.
6014 2009-04-08 Vladimir Prus <vladimir@codesourcery.com>
6016 Implement -exec-jump.
6018 * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
6019 * mi/mi-main.c (mi_cmd_exec_jump): New.
6020 * mi/mi-cmds.c (mi_cmds): Register exec-jump.
6022 2009-04-07 Doug Evans <dje@google.com>
6024 * symfile.c (symbol_file_clear): Fix indentation.
6026 2009-04-06 Mark Kettenis <kettenis@gnu.org>
6028 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
6030 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6032 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
6033 (ppc_linux_auxv_parse): New function.
6034 (ppc_linux_read_description): Use ppc_linux_target_wordsize.
6035 (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
6037 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
6039 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
6040 BFD to contents of SPU name note.
6041 (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
6042 with "from_tty" argument 1 instead of 0.
6044 2009-04-02 Jan Kratochvil <jan.kratochvil@redhat.com>
6047 (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
6048 Create the symbol in local scope.
6049 * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
6051 2009-04-02 Keith Seitz <keiths@redhat.com>
6053 * stabsread.c (read_member_functions): GCC may emit an extra space
6054 at the end of the names "__base_ctor" and "__base_dtor"; so ignore
6055 whitespace when looking for these functions.
6057 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6059 Change the default value for "set print frame-arguments" to scalars.
6061 * stack.c (print_frame_arguments): Set initial value to "scalars".
6063 2009-04-01 Aleksandar Ristovski <aristovski@qnx.com>
6065 * mips-tdep.c (mips_numeric_register_alieses): New definition.
6066 (mips_gdbarch_init): Add user registers from
6067 mips_numeric_register_aliases.
6069 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6071 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
6073 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6075 * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
6076 this is the last one.
6078 2009-04-01 Pedro Alves <pedro@codesourcery.com>
6080 * remote.c (append_resumption): New.
6081 (remote_vcont_resume): Use it.
6083 2009-04-01 Joel Brobecker <brobecker@adacore.com>
6085 * windows-nat.c (+windows_get_ada_task_ptid): New function.
6086 (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
6088 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
6089 Keith Seitz <keiths@redhat.com>
6090 Jan Kratochvil <jan.kratochvil@redhat.com>
6093 * Makefile.in (dbxread.o): Update.
6094 * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
6095 * dwarf2read.c (GDB_FORM_cached_string): New.
6096 (read_partial_die): Use dwarf2_canonicalize_name.
6097 (dwarf2_linkage_name): Use dwarf2_name.
6098 (dwarf2_canonicalize_name): New.
6099 (dwarf2_name): Use dwarf2_canonicalize_name.
6100 (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
6101 * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
6102 * symtab.c (lookup_symbol_in_language): Canonicalize input before
6104 * cp-name-parser.y: operator() requires two parameters,
6105 according to libiberty.
6106 * minsyms.c (lookup_minimal_symbol): Canonicalize input
6110 2009-03-31 Joel Brobecker <brobecker@adacore.com>
6112 Provide support for (Ada) task-specific breakpoints.
6114 * ada-lang.h (ada_get_task_number): Add declaration.
6115 (breakpoint_ada_task_match): Delete declaration.
6116 * ada-tasks.c (ada_get_task_number): Make non-static.
6117 * breakpoint.h (struct breakpoint): Add field "task".
6118 * breakpoint.c (print_one_breakpoint_location): Add handling of
6119 task-specific breakpoints.
6120 (create_breakpoint, create_breakpoints, find_condition_and_thread):
6121 New parameter "task".
6122 (break_command_really): Update calls to find_condition_and_thread
6123 and create_breakpoints.
6124 (breakpoint_re_set_one): Update call to find_condition_and_thread.
6127 2009-03-31 Joel Brobecker <brobecker@adacore.com>
6129 * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
6131 2009-03-31 Pedro Alves <pedro@codesourcery.com>
6133 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
6134 if the thread's ptid without a thread id field is in the list
6135 before calling thread_change_ptid.
6136 (extended_remote_attach_1): In non-stop mode, do not rely on
6137 querying the current thread, instead, query the thread list, and
6138 select the first thread of the process.
6139 * gdbthread.h (first_thread_of_process): Declare.
6140 * thread.c (first_thread_of_process): Define.
6142 2009-03-30 Stan Shebs <stan@codesourcery.com>
6144 Make tracepoints into a type of breakpoint.
6145 * breakpoint.h (enum bptype): Add bp_tracepoint.
6146 (struct breakpoint): Add fields step_count, pass_count, actions.
6147 (get_tracepoint, get_tracepoint_by_number): Declare.
6148 (all_tracepoints): Declare.
6149 * breakpoint.c: Include tracepoint.h, readline.h.
6150 (ALL_TRACEPOINTS): Move here from tracepoint.c.
6151 (tracepoint_count): Ditto.
6152 (should_be_inserted): GDB does not insert tracepoints itself.
6153 (print_it_typical): Add tracepoint case.
6154 (bpstat_what): Ditto.
6155 (print_one_breakpoint_location): Ditto, and add printing for
6156 pass count, step count, and action list.
6157 (user_settable_breakpoint): Add tracepoint case.
6158 (allocate_bp_location): Ditto.
6159 (set_breakpoint_location_function): Ditto.
6160 (disable_breakpoints_in_shlibs): Ditto.
6162 (break_command_really): Add argument traceflag, use to choose
6163 basic breakpoint type.
6164 (break_command_1): Pass extra argument.
6165 (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
6166 (breakpoint_re_set_one): Add tracepoint case.
6167 (disable_command, enable_command): Ditto.
6168 (set_tracepoint_count): Move here from tracepoint.c.
6169 (trace_command): Move here from tracepoint.c and use
6170 break_command_really.
6171 (tracepoints_info): Move here from tracepoint.c and call
6173 (enable_trace_command): Move here from tracepoint.c and call
6175 (disable_trace_command): Move here from tracepoint.c and call
6177 (delete_trace_command): Move here from tracepoint.c and call
6179 (trace_pass_command): Move here from tracepoint.c.
6180 (get_tracepoint_by_number): Ditto.
6181 (tracepoint_save_command): Ditto.
6182 (get_tracepoint): New function.
6183 (all_tracepoints): New function.
6184 (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
6185 deprecate "enable trace" and "disable trace" commands.
6186 * tracepoint.h (struct tracepoint): Remove.
6187 (tracepoint_chain): Remove decl.
6188 (deprecated_create_tracepoint_hook): Remove decl.
6189 (deprecated_delete_tracepoint_hook): Remove decl.
6190 (deprecated_modify_tracepoint_hook): Remove decl.
6191 (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
6192 (free_actions): Update signature.
6193 (validate_actionline): Update signature.
6194 (end_actions_pseudocommand): Declare.
6195 (while_stepping_pseudocommand): Declare.
6196 * tracepoint.c: Include breakpoint.h.
6197 (tracepoint_chain, tracepoint_count): Remove.
6198 (free_actions, make_cleanup_free_actions): Update signature.
6199 (trace_command, set_raw_tracepoint): Remove.
6200 (trace_mention): Remove.
6201 (tracepoints_info): Remove.
6202 (tracepoint_operation, map_args_over_tracepoints): Remove.
6203 (get_tracepoint_by_number): Remove.
6204 (enable_trace_command, disable_trace_command): Remove.
6205 (delete_trace_command, trace_pass_command): Remove.
6206 (trace_actions_command, read_actions): Update signature.
6207 (validate_actionline): Update signature, use bp loc.
6208 (encode_actions): Ditto.
6209 (download_tracepoint): New function, body of trace_start_command.
6210 (trace_start_command): Call it, use all_tracepoints.
6211 (tracepoint_save_command): Remove.
6212 (tracepoint_dump_command): Use get_tracepoint.
6213 (end_actions_pseudocommand): Make globally visible.
6214 (while_stepping_pseudocommand): Ditto.
6215 (_initialize_tracepoint): Move command definitions to breakpoint.c.
6217 2009-03-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
6219 Expose frames to Python.
6220 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
6221 (SUBDIR_PYTHON_SRCS): Add python-frame.c.
6222 (python-frame.o): New target.
6223 * python/python-frame.c: New file.
6224 * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
6225 gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
6226 gdbpy_initialize_frames): New prototypes.
6227 * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
6228 (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
6230 * stack.c (find_frame_funname): New function, factored out of
6232 (print_frame): Call find_frame_funname.
6233 * stack.h (find_frame_funname): Add prototype.
6235 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6237 Remove unused value_object attribute `owned_by_gdb'.
6238 * python/python-value.c (value_object): Remove owned_by_gdb
6240 (valpy_dealloc): Remove reference to self->owned_by_gdb.
6241 (valpy_new): Likewise.
6242 (value_to_value_object): Likewise.
6244 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
6246 Change gdb.Value.address from a method to an attribute.
6247 * python/python-value.c (value_object): Add `address' element.
6248 (valpy_dealloc): Decrement reference to self->address if set.
6249 (valpy_new): Initialize val_obj->address.
6250 (valpy_address): Rename to ...
6251 (valpy_get_address): ... this. Change signature from method to
6252 attribute. Update self->address if not set.
6253 (value_to_value_object): Initialize val_obj->address.
6254 (value_object_getset): Add `address' element.
6255 (value_object_methods): Remove `address' element.
6257 2009-03-29 Andreas Schwab <schwab@linux-m68k.org>
6259 * observer.sh: Set LANG/LC_ALL to C, not c.
6261 2009-03-28 Kevin Buettner <kevinb@redhat.com>
6263 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
6266 2009-03-28 Pedro Alves <pedro@codesourcery.com>
6268 * remote.c (remote_stop_ns): If multi-process extensions are off,
6269 and GDB is requesting the whole process to stop, sent "vCont;t",
6272 2009-03-28 Pedro Alves <pedro@codesourcery.com>
6274 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
6277 2009-03-27 Eli Zaretskii <eliz@gnu.org>
6279 * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
6281 2009-03-26 Doug Evans <dje@google.com>
6283 * thread.c (do_restore_current_thread_cleanup): Redo test for
6284 whether to restore old->inferior_ptid.
6286 2009-03-26 Tom Tromey <tromey@redhat.com>
6288 * breakpoint.c (resolve_sal_pc): Preserve original line number
6289 when skipping prologue.
6291 2009-03-26 Doug Evans <dje@google.com>
6293 * thread.c (inferior_thread) Remove "extern" in definition.
6295 2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
6297 Add gdb.Value.is_optimized_out attribute.
6298 * python/python-value.c (valpy_get_is_optimized_out): New
6300 (value_object_getset): New variable.
6301 (value_object_type): Initialize tp_getset element.
6303 2009-03-26 Joel Brobecker <brobecker@adacore.com>
6305 Recognize missing DW_AT_location as <value optimized out>.
6307 (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
6308 Call add_symbol_to_list.
6310 2009-03-25 Tom Tromey <tromey@redhat.com>
6312 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
6313 * stack.c (print_this_frame_argument_p): Use check_typedef.
6315 2009-03-25 Tom Tromey <tromey@redhat.com>
6317 * configure: Rebuild.
6318 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
6319 Rearrange flags setting. Add comments.
6321 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6323 * config/i386/nm-i386.h: Remove code within
6324 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
6325 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
6327 * config/i386/nm-cygwin64.h: Ditto.
6328 * config/i386/nm-fbsd.h: Ditto.
6329 * config/i386/nm-go32.h: Ditto.
6330 * config/i386/nm-linux.h: Ditto.
6331 * config/i386/nm-linux64.h: Ditto.
6333 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6335 ARI fix: "xasprintf" rule.
6336 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
6338 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6340 * remote.c (remote_start_remote): In non-stop mode, call
6341 init_wait_for_inferior before adding threads and inferiors.
6343 2009-03-25 Joel Brobecker <brobecker@adacore.com>
6345 * breakpoint.c (breakpoint_thread_match): Split a large condition
6346 into several smaller conditions. No behavior change.
6348 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6350 * infrun.c (infrun_thread_thread_exit): New.
6351 (_initialize_infrun): Attach it to the thread_exit observer.
6352 * thread.c (delete_thread_1): Always call the observer, passing it
6354 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
6355 SILENT, return immediately.
6357 2009-03-25 Pedro Alves <pedro@codesourcery.com>
6359 * infrun.c (normal_stop): Use has_stack_frames instead of
6361 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
6362 when there is no thread selected.
6363 (mi_cmd_execute): Don't special case commands that can run without
6364 a valid selected thread.
6365 * top.c (execute_command): Don't special case commands that can
6366 run without a valid selected thread. Use has_stack_frames.
6367 * infcmd.c (ensure_valid_thread): New.
6368 (continue_1, step_1, jump_command, signal_command): Use it.
6369 (detach_command): Error out if there's no selected thread/inferior.
6370 * thread.c (print_thread_info): Allow having no thread selected.
6371 (switch_to_thread): Don't read the PC if there is no current thread.
6372 (do_restore_current_thread_cleanup): Don't record the current
6373 frame if there is no current thread.
6374 (make_cleanup_restore_current_thread): Don't read frame info if
6375 there is no selected thread.
6376 (_initialize_thread): Don't mark commands as
6377 "no_selected_thread_ok".
6378 * frame.c (get_current_frame): Error out if there is no valid
6380 (has_stack_frames): Return false if there is no valid
6382 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
6383 "no_selected_thread_ok".
6384 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
6385 (get_cmd_no_selected_thread_ok): Delete.
6386 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
6387 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
6389 * stack.c (get_selected_block): Use has_stack_frames.
6391 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
6393 Fix size of FPSCR in Power 7 processors.
6394 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
6395 (PPC_FEATURE_HAS_DFP): New #define.
6396 (ppc_linux_read_description): Check for DFP feature instead of
6397 ISA 2.05 to decide on size of the FPSCR.
6399 2009-03-25 Kevin Buettner <kevinb@redhat.com>
6401 * mn10300-tdep.c (trad-frame.h): Don't include.
6402 (prologue-value.h): Include.
6403 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
6404 (struct mn10300_prologue): Define.
6405 (push_reg, translate_rreg, check_for_saved): New functions.
6406 (mn10300_analyze_prologue): Rewrite, using prologue-value
6407 machinery. Handle more instructions than before. Permit
6408 instructions to occur in any order.
6409 (mn10300_skip_prologue): Find the extents of the function
6410 in question; mn10300_analyze_prologue no longer does this.
6411 (mn10300_analyze_frame_prologue): New function.
6412 (mn10300_frame_base): New function.
6413 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
6415 (mn10300_frame_prev_register): Likewise.
6416 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
6417 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
6419 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
6421 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6423 Fix completer problem for filename completion on the first try.
6425 * gdb/completer.h (gdb_completion_word_break_characters): New function.
6426 * gdb/completer.c: Include gdb_assert.h.
6427 (complete_line_internal_reason): New enum.
6428 (complete_line_internal): Change last argument type to
6429 complete_line_internal_reason.
6430 Modify function to handle the different complete_line_internal_reason
6432 (complete_line): Adapt to change in complete_line_internal.
6433 (command_completer): Ditto.
6434 (gdb_completion_word_break_characters): Implement new function.
6435 * top.c (init_main): Set rl_completion_word_break_hook to
6436 gdb_completion_word_break_characters.
6439 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
6441 ARI fix: "strlen d_name" rule.
6442 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
6445 2009-03-24 Tom Tromey <tromey@redhat.com>
6446 Pedro Alves <pedro@codesourcery.com>
6448 * configure, config.in: Rebuild.
6449 * configure.ac: Check for libiconvlist.
6450 * charset.c: Check HAVE_LIBICONVLIST.
6451 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
6452 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
6453 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
6455 (INTERNAL_CFLAGS_BASE): Update.
6456 (INTERNAL_LDFLAGS): Update.
6459 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6461 * configure.ac: Initialize the variable $PREFER_CURSES.
6462 * configure: Regenerated.
6464 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6466 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
6467 * configure: Regenerated.
6469 2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
6471 ARI fix: "strerror" rule.
6472 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
6473 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
6475 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6477 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
6478 before looking up the fields inside our struct type.
6480 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6482 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
6483 trying to resolve the type qualification.
6485 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6487 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
6488 we try to apply the attribute on the real type, rather than
6489 its associated typedef.
6491 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6493 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
6494 to make sure we try to get the modulus of the actual type, not the
6497 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6499 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
6500 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
6501 to get the real type, not the associated typedef.
6503 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6505 * ada-lang.c (ada_get_field_index): Add handling of the case
6506 when TYPE is a typedef of a struct.
6508 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6510 Add gdb_usleep as a portable version of usleep based on gdb_select.
6511 * gdb_usleep.h, gdb_usleep.c: New files.
6512 * Makefile.in (SFILES): Add gdb_usleep.c.
6513 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
6514 (COMMON_OBS): Add gdb_usleep.o.
6515 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
6516 by call to gdb_usleep.
6518 2009-03-23 Joel Brobecker <brobecker@adacore.com>
6520 * buildsym.c (end_symtab): If we ignore the subfiles, then
6521 unlink the associated symtabs if they were already allocated.
6523 2009-03-23 Jerome Guitton <guitton@adacore.com>
6525 Provide a way to force building of GDB with libcurses.
6526 * configure.ac: Add --with-curses.
6527 * configure: Regenerated.
6529 2009-03-23 Tom Tromey <tromey@redhat.com>
6531 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
6534 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
6536 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
6537 solib_contains_address_p instead of searching.
6539 2009-03-23 Tom Tromey <tromey@redhat.com>
6541 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
6542 (iconv): Make 'inbuf' argument const.
6543 (convert_between_encodings): Use ICONV_CONST.
6544 (wchar_iterate): Likewise.
6546 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6548 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
6549 dynamically loaded function.
6550 (LookupPrivilegeValueA): Ditto.
6551 (OpenProcessToken): Ditto.
6552 (AdjustTokenPrivileges): Rename and define placeholder for address of
6553 dynamically loaded function.
6554 (LookupPrivilegeValueA): Ditto.
6555 (OpenProcessToken): Ditto.
6556 (set_process_privilege): Remove check for loaded functions.
6557 (bad_OpenProcessToken): Define.
6558 (_initialize_loadable): Load token functions from advapi here, setting
6559 OpenProcessToken function to a dummy static function which always return
6560 error if OS doesn't support this functionality.
6562 2009-03-22 Nicolas Roche <roche@adacore.com>
6563 Christopher Faylor <me+cygwin@cgf.cx>
6565 * win32-nat.c (ctrl_c_handler): New function.
6566 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
6567 is run in a separate console.
6569 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
6571 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
6572 for dynamically loaded function.
6573 (DebugBreakProcess): Ditto.
6574 (DebugSetProcessKillOnExit): Ditto.
6575 (EnumProcessModules): Ditto.
6576 (GetModuleFileNameExA): Ditto.
6577 (GetModuleInformation): Ditto.
6578 (DebugActiveProcessStop): Rename and define placeholder for address of
6579 dynamically loaded function.
6580 (DebugBreakProcess): Ditto.
6581 (DebugSetProcessKillOnExit): Ditto.
6582 (EnumProcessModules): Ditto.
6583 (GetModuleFileNameExA): Ditto.
6584 (GetModuleInformation): Ditto.
6585 (psapi_loaded): Delete.
6586 (get_module_name): Don't check psapi_loaded, just rely on the fact that
6587 dynamically loaded functions will return failure if they weren't
6589 (has_detach_ability): Delete.
6590 (windows_attach): Remove call to has_detach_ability (). Just rely on
6591 functions being callable.
6592 (bad_DebugActiveProcessStop): Define.
6593 (bad_DebugBreakProcess): Ditto.
6594 (bad_DebugSetProcessKillOnExit): Ditto.
6595 (bad_EnumProcessModules): Ditto.
6596 (bad_GetModuleFileNameExA): Ditto.
6597 (bad_GetModuleInformation): Ditto.
6598 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
6599 dynamic storage here, setting nonexistent functions to dummy static
6600 functions which always return error.
6602 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6604 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
6605 to the about_to_proceed observer notification.
6606 (mi_about_to_proceed): New.
6607 (mi_on_resume): Only output ^running and the prompt here if the
6608 target was proceeded.
6609 * breakpoint.c (breakpoint_proceeded): New static.
6610 (breakpoint_about_to_proceed): New.
6611 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
6612 the about_to_proceed observer notification.
6613 * inferior.h (breakpoint_proceeded): Delete declaration.
6614 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
6615 Notify the about_to_proceed observers.
6616 (struct inferior_status): Delete breakpoint_proceeded member.
6617 (save_inferior_status): Don't save it.
6618 (restore_inferior_status): Don't restore it.
6619 * mi-main.h (mi_proceeded): Declare.
6620 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
6623 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6625 * gdbthread.h (struct thread_info): Add in_infcall member.
6626 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
6627 Remove reverences to suppress_resume_observer. Refresh
6628 `call_thread' after returning from `proceed'.
6629 * infcmd.c (suppress_resume_observer): Delete.
6630 * inferior.h (suppress_resume_observer): Delete declaration.
6631 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
6633 * thread.c (set_running): Remove references to
6634 suppress_resume_observer.
6635 * infrun.c (struct inferior_status): Add in_infcall member.
6636 (save_inferior_status): Save it.
6637 (restore_inferior_status): Restore it.
6639 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6641 * infcall.c (run_inferior_call): Remove references to
6642 suppress_stop_observer.
6643 * infcmd.c (suppress_stop_observer): Delete.
6644 (finish_command_continuation): Remove NOTE. Don't clear
6645 suppress_stop_observer anymore.
6646 (finish_command_continuation_free_arg): Likewise.
6647 (finish_forward): Remove references to suppress_stop_observer.
6648 Call normal_stop observer if we haven't already.
6649 * inferior.h (suppress_stop_observer): Delete.
6650 * infrun.c (normal_stop): When deciding to suppress the
6651 normal_stop observer, check for proceed_to_finish instead of
6652 suppress_stop_observer.
6654 2009-03-22 Pedro Alves <pedro@codesourcery.com>
6656 * symfile.c (symfile_relocate_debug_section): Remove check for
6659 2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6660 Jim Blandy <jimb@red-bean.com>
6661 Thiago Jung Bauermann <bauerman@br.ibm.com>
6662 Tom Tromey <tromey@redhat.com>
6664 Miscellaneous fixes to the Python code.
6665 * python/python-cmd.c (cmdpy_init): Accept keyword
6667 * python/python-value.c (valpy_string): Accept keyword
6669 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
6670 Do not call value_to_value_object on NULL RES_VAL.
6671 (value_object_methods): Change `string' entry to also accept
6673 (convert_value_from_python): Return a copy of the value if obj is
6675 (value_object_methods): Mark the `string' method as accepting
6676 keywords, and show method "prototype" in the doc string.
6677 * python/python.c (get_parameter): Don't return inside a
6680 2009-03-20 Tom Tromey <tromey@redhat.com>
6682 Add support for convenience functions in Python.
6683 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
6684 (SUBDIR_PYTHON_SRCS): Add python-function.c.
6685 (python-function.o): New target.
6686 * eval.c: Include "python/python.h" and <ctype.h>.
6687 (evaluate_subexp_standard): Handle values of type
6688 TYPE_CODE_INTERNAL_FUNCTION.
6689 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
6690 * parse.c (write_exp_string): Remove duplicate word in comment.
6691 * python/python-function.c: New file.
6692 * python/python-internal.h (gdbpy_initialize_functions): Add
6694 * python/python.c (_initialize_python): Call
6695 gdbpy_initialize_functions.
6696 * valprint.c (value_check_printable): Handle values of type
6697 TYPE_CODE_INTERNAL_FUNCTION.
6698 * value.c: Include "cli/cli-decode.h".
6699 (internal_function): New struct.
6700 (functionlist, internal_fn_type): New static variables.
6701 (lookup_only_internalvar,
6702 lookup_internalvar): Add const qualifier to name argument.
6703 (create_internalvar): Likewise. Initialize new field.
6704 (set_internal_var): Fix typo in comment. Don't allow assignment
6705 to canonical variable.
6706 (value_create_internal_function, value_internal_function_name,
6707 call_internal_function, function_command, function_destroyer,
6708 add_internal_function): New functions.
6709 (_initialize_values): Create `function' placeholder command.
6710 Initialize internal_fn_type.
6711 * value.h (lookup_only_internalvar, create_internalvar,
6712 lookup_internalvar): Add const qualifier to name argument.
6713 (internal_function_fn, add_internal_function, call_internal_function,
6714 value_internal_function_name): Add prototypes.
6715 (struct internalvar) <canonical>: New field.
6717 2009-03-20 Tom Tromey <tromey@redhat.com>
6719 * c-lang.c (evaluate_subexp_c): Call check_typedef.
6721 2009-03-20 Tom Tromey <tromey@redhat.com>
6722 Julian Brown <julian@codesourcery.com>
6724 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
6725 PR i18n/9401, PR exp/9613:
6727 * value.h (value_typed_string): Declare.
6728 (val_print_string): Update.
6729 * valprint.h (print_char_chars): Update.
6730 * valprint.c (print_char_chars): Add type argument. Update.
6731 (val_print_string): Likewise.
6732 * valops.c (value_typed_string): New function.
6733 * utils.c (host_char_to_target): New function.
6734 (parse_escape): Use host_char_to_target, host_hex_value. Update.
6736 (no_control_char_error): Remove.
6737 * typeprint.c (print_type_scalar): Update.
6738 * scm-valprint.c (scm_scmval_print): Update.
6739 * scm-lang.h (scm_printchar, scm_printstr): Update.
6740 * scm-lang.c (scm_printchar): Add type argument.
6741 (scm_printstr): Likewise.
6742 * printcmd.c (print_formatted): Update.
6743 (print_scalar_formatted): Update.
6744 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
6745 Handle '%lc' and '%ls'.
6746 * parser-defs.h (struct typed_stoken): New type.
6747 (struct stoken_vector): Likewise.
6748 (write_exp_string_vector): Declare.
6749 * parse.c (write_exp_string_vector): New function.
6750 * p-valprint.c (pascal_val_print): Update.
6751 * p-lang.h (is_pascal_string_type, pascal_printchar,
6752 pascal_printstr): Update.
6753 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
6754 Add 'char_type' argument.
6755 (pascal_emit_char): Add type argument.
6756 (pascal_printchar): Likewise.
6757 (pascal_printstr): Likewise.
6758 * objc-lang.c (objc_emit_char): Add type argument.
6759 (objc_printchar): Likewise.
6760 (objc_printstr): Likewise.
6761 * macroexp.c (get_character_constant): Handle unicode characters.
6763 (get_string_literal): Handle unicode strings. Use
6765 * m2-valprint.c (print_unpacked_pointer): Update.
6766 (m2_print_array_contents): Update.
6767 (m2_val_print): Update.
6768 * m2-lang.c (m2_emit_char): Add type argument.
6769 (m2_printchar): Likewise.
6770 (m2_printstr): Likewise.
6771 * language.h (struct language_defn) <la_printchar>: Add type
6773 <la_printstr, la_emitchar>: Likewise.
6774 (LA_PRINT_CHAR): Likewise.
6775 (LA_PRINT_STRING): Likewise.
6776 (LA_EMIT_CHAR): Likewise.
6777 * language.c (unk_lang_emit_char): Add type argument.
6778 (unk_lang_printchar): Likewise.
6779 (unk_lang_printstr): Likewise.
6780 * jv-valprint.c (java_val_print): Update.
6781 * jv-lang.c (java_emit_char): Add type argument.
6782 * f-valprint.c (f_val_print): Update.
6783 * f-lang.c (f_emit_char): Add type argument.
6784 (f_printchar): Likewise.
6785 (f_printstr): Likewise.
6786 * expprint.c (print_subexp_standard): Update.
6787 * charset.h (target_wide_charset): Declare.
6788 (c_target_char_has_backslash_escape, c_parse_backslash,
6789 host_char_print_literally, host_char_to_target,
6790 target_char_to_host, target_char_to_control_char): Remove.
6791 (enum transliterations): New type.
6792 (convert_between_encodings): Declare.
6793 (HOST_ESCAPE_CHAR): New define.
6794 (host_letter_to_control_character, host_hex_value): Declare.
6795 (enum wchar_iterate_result): New enum.
6796 (struct wchar_iterator): Declare.
6797 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
6798 wchar_push_back): Declare.
6799 * charset-list.h: New file.
6800 * c-valprint.c (textual_name): New function.
6801 (textual_element_type): Handle wide character types.
6802 (c_val_print): Pass original type to textual_element_type. Handle
6803 wide character types.
6804 (c_value_print): Use textual_element_type. Pass original type of
6806 * c-lang.h (enum c_string_type): New type.
6807 (c_printchar, c_printstr): Update.
6808 * c-lang.c (classify_type): New function.
6809 (print_wchar): Likewise.
6810 (c_emit_char): Add type argument. Handle wide characters.
6811 (c_printchar): Likewise.
6812 (c_printstr): Add type argument. Handle wide and multibyte
6814 (convert_ucn): New function.
6815 (emit_numeric_character): Likewise.
6816 (convert_octal): Likewise.
6817 (convert_hex): Likewise.
6818 (ADVANCE): New macro.
6819 (convert_escape): New function.
6820 (parse_one_string): Likewise.
6821 (evaluate_subexp_c): Likewise.
6822 (exp_descriptor_c): New global.
6823 (c_language_defn): Use exp_descriptor_c.
6824 (cplus_language_defn): Likewise.
6825 (asm_language_defn): Likewise.
6826 (minimal_language_defn): Likewise.
6827 (charset_for_string_type): New function.
6828 * c-exp.y (%union): Add 'svec' and 'tsval'.
6830 (exp): Add CHAR production.
6831 (string_exp): Rewrite.
6832 (exp) <string_exp>: Rewrite.
6833 (tempbuf): Now global.
6834 (tempbuf_init): New global.
6835 (parse_string_or_char): New function.
6836 (yylex) <tempbuf>: Now global.
6837 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
6839 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
6840 (c_parse_escape): New function.
6841 * auxv.c (fprint_target_auxv): Update.
6842 * ada-valprint.c (ada_emit_char): Add type argument.
6843 (ada_printchar): Likewise.
6844 (ada_print_scalar): Update.
6845 (printstr): Add type argument. Update calls to ada_emit_char.
6846 (ada_printstr): Add type argument.
6847 (ada_val_print_array): Update.
6848 (ada_val_print_1): Likewise.
6849 * ada-lang.c (emit_char): Add type argument.
6850 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
6852 * gdb_locale.h: Include langinfo.h.
6853 * charset.c (_initialize_charset): Set default host charset from
6854 the locale. Don't register charsets. Add target-wide-charset
6855 commands. Call find_charset_names.
6856 (struct charset, struct translation): Remove.
6857 (GDB_DEFAULT_HOST_CHARSET): Remove.
6858 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
6859 (target_wide_charset_name): New global.
6860 (show_host_charset_name): Handle "auto".
6861 (show_target_wide_charset_name): New function.
6862 (host_charset_enum, target_charset_enum): Remove.
6863 (charset_enum): New global.
6864 (all_charsets, register_charset, lookup_charset, all_translations,
6865 register_translation, lookup_translation): Remove.
6866 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
6867 (iso_8859_print_literally, iso_8859_to_control,
6868 iso_8859_family_charset): Remove.
6869 (ebcdic_print_literally, ebcdic_to_control,
6870 ebcdic_family_charset): Remove.
6871 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
6872 register_iconv_charsets): Remove.
6873 (target_wide_charset_be_name, target_wide_charset_le_name): New
6875 (identity_either_char_to_other): Remove.
6876 (set_be_le_names, validate): New functions.
6877 (backslashable, backslashed, represented): Remove.
6878 (default_c_target_char_has_backslash_escape): Remove.
6879 (default_c_parse_backslash, iconv_convert): Remove.
6880 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
6881 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
6882 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
6883 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
6884 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
6885 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
6886 (table_convert_char, table_translation, simple_table_translation):
6888 (current_host_charset, current_target_charset,
6889 c_target_char_has_backslash_escape_func,
6890 c_target_char_has_backslash_escape_baton): Remove.
6891 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
6892 (host_char_to_target_func, host_char_to_target_baton): Remove.
6893 (target_char_to_host_func, target_char_to_host_baton): Remove.
6894 (cached_iconv_host_to_target, cached_iconv_target_to_host):
6896 (lookup_charset_or_error, check_valid_host_charset): Remove.
6897 (set_host_and_target_charsets): Remove.
6898 (set_host_charset, set_target_charset): Remove.
6899 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
6900 (set_target_wide_charset_sfunc): New function.
6901 (show_charset): Print target wide character set.
6902 (host_charset, target_charset): Rewrite.
6903 (target_wide_charset): New function.
6904 (c_target_char_has_backslash_escape): Remove.
6905 (c_parse_backslash): Remove.
6906 (host_letter_to_control_character): New function.
6907 (host_char_print_literally): Remove.
6908 (host_hex_value): New function.
6909 (target_char_to_control_char): Remove.
6910 (cleanup_iconv): New function.
6911 (convert_between_encodings): New function.
6912 (target_char_to_host): Remove.
6913 (struct wchar_iterator): Define.
6914 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
6915 wchar_push_back): New functions.
6916 (do_cleanup_iterator): New function.
6917 (char_ptr): New typedef.
6918 (charsets): New global.
6919 (add_one, find_charset_names): New functions.
6920 (default_charset_names): New global.
6921 (auto_host_charset_name): Likewise.
6922 * aclocal.m4, config.in, configure: Rebuild.
6923 * configure.ac: Call AM_LANGINFO_CODESET.
6924 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
6925 (AM_ICONV): Invoke earlier.
6926 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
6927 LIBICONV_LIBDIR. Check for libiconv in build tree.
6928 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
6929 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
6930 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
6931 * gdb_obstack.h (obstack_grow_wstr): New define.
6932 * gdb_wchar.h: New file.
6933 * defs.h: Include it.
6935 2009-03-20 Tom Tromey <tromey@redhat.com>
6936 Jan Kratochvil <jan.kratochvil@redhat.com>
6938 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
6939 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
6941 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
6943 * ada-typeprint.c (print_array_type): Do the NULL check
6946 2009-03-19 Tom Tromey <tromey@redhat.com>
6948 * utils.c (do_obstack_free): New function.
6949 (make_cleanup_obstack_free): Likewise.
6950 * defs.h (make_cleanup_obstack_free): Declare.
6952 2009-03-18 Doug Evans <dje@google.com>
6954 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
6955 int, not a long long.
6956 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
6958 * expprint.c (dump_raw_expression): Print note if non-NULL.
6960 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
6963 2009-03-18 Nathan Sidwell <nathan@codesourcery.com>
6965 * Makefile.in: Update license to GPLv3.
6966 * ada-exp.y: Update license to GPLv3.
6967 * ada-lex.l: Update license to GPLv3.
6968 * c-exp.y: Update license to GPLv3.
6969 * cp-name-parser.y: Update license to GPLv3.
6970 * darwin-nat-info.c: Update license to GPLv3.
6971 * f-exp.y: Update license to GPLv3.
6972 * gdb_thread_db.h: Update license to GPLv3.
6973 * hppanbsd-nat.c: Update license to GPLv3.
6974 * hppanbsd-tdep.c: Update license to GPLv3.
6975 * hppaobsd-tdep.c: Update license to GPLv3.
6976 * jv-exp.y: Update license to GPLv3.
6977 * m2-exp.y: Update license to GPLv3.
6978 * objc-exp.y: Update license to GPLv3.
6979 * p-exp.y: Update license to GPLv3.
6980 * reply_mig_hack.awk: Update license to GPLv3.
6981 * reverse.c: Update license to GPLv3.
6982 * xtensa-xtregs.c: Update license to GPLv3.
6984 2009-03-18 Pedro Alves <pedro@codesourcery.com>
6986 * remote.c (remote_close): Don't call generic_mourn_inferior.
6987 (remote_mourn_1): Call generic_mourn_inferior after closing the
6990 2009-03-18 Pedro Alves <pedro@codesourcery.com>
6992 * remote.c (remote_start_remote): Add missing call to
6993 init_wait_for_inferior in non-stop mode.
6995 2009-03-18 Pedro Alves <pedro@codesourcery.com>
6997 * breakpoint.c (bpstat_should_step): Only consider software
6998 watchpoints that have a location.
7000 2009-03-17 Joel Brobecker <brobecker@adacore.com>
7002 Add a target_ops parameter to the to_kill method in struct target_ops.
7004 * target.h (struct target_ops): Add a "target_ops *" parameter to
7006 (target_kill): Remove macro. Add declaration.
7007 * target.c (debug_to_kill): Delete, no longer necessary.
7008 (target_kill): New function.
7009 (update_current_target): Stop inheriting the to_kill method.
7010 Do not de_fault it to no_process either.
7011 (setup_target_debug): Do not set current_target.to_kill.
7012 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
7013 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
7014 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
7017 2009-03-17 Doug Evans <dje@google.com>
7019 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
7020 glibc 2.3.2 and earlier.
7022 2009-03-17 Joel Brobecker <brobecker@adacore.com>
7024 * frame.c (get_prev_frame_1): Do not perform the inner_frame
7025 sanity check if this_frame is not NORMAL.
7026 (frame_id_inner): Update the description of this function.
7028 2009-03-17 Hui Zhu <teawater@gmail.com>
7030 * stack.c: Change the introduce of "disassemble-next-line".
7032 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7034 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
7037 2009-03-17 Hui Zhu <teawater@gmail.com>
7039 * stack.c: Include valprint.h.
7040 (disassemble_next_line): New enum.
7041 (show_disassemble_next_line): New function. Show the current
7042 value of disassemble-next-line.
7043 (gdb_disassembly_stub_args): New struct for argument passing
7044 between function do_gdb_disassembly and function
7045 gdb_disassembly_stub.
7046 (gdb_disassembly_stub): New function. Helper for
7048 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
7049 the exception from the gdb_disassembly because it will be
7050 broken by filter sometime.
7051 (print_frame_info): If disassemble-next-line is set to auto
7052 or on and doesn't have the line debug messages for $pc,
7053 output the next instruction.
7054 If disassemble-next-line is set to on and there is line debug
7055 messages, output assembly codes for next line.
7056 (_initialize_stack): Make the "set disassemble-next-line"
7057 command an auto-boolean command. Change its class to
7058 class_stack. Place it in the top level set list. Extend help
7059 to describe the auto mode.
7061 2009-03-17 Pedro Alves <pedro@codesourcery.com>
7063 * infrun.c (normal_stop): Don't overwrite old_chain.
7065 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7067 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
7068 which is undefined, by call to regcache_invalidate, which should
7069 do what the original author wanted to do.
7071 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7073 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
7074 (mips_create_inferior): Likewise.
7076 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7078 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
7080 2009-03-16 Joel Brobecker <brobecker@adacore.com>
7082 * darwin-nat.c (darwin_resume): Fix a compiler warning when
7083 building on x86_64-darwin.
7085 2009-03-16 Tristan Gingold <gingold@adacore.com>
7087 * configure.tgt: Add handling for x86_64-darwin.
7089 2009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
7091 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
7093 2009-03-15 Joel Brobecker <brobecker@adacore.com>
7095 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
7096 Use the ops parameter to get to the target beneath, rather than
7097 using the current_target global. Using the current_target global
7098 was an unintended accident.
7100 2009-03-15 Joel Brobecker <brobecker@adacore.com>
7102 Fix an error happening while loading symbols from a core file
7105 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
7106 to detect whether we're debugging a core file or not.
7108 2009-03-15 Joel Brobecker <brobecker@adacore.com>
7110 Modernize the aix-thread later by getting rid of the base_target
7111 global. This brings back to life the AIX port which was otherwise
7112 crashing all the time.
7114 * aix-thread.c (base_target): Delete.
7115 (pd_enable): Do not set base_target.
7116 (aix_thread_attach): Use find_target_beneath instead of base_target.
7117 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7118 (aix_thread_fetch_registers, aix_thread_store_registers),
7119 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7120 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
7121 (aix_thread_kill): Delete. Does not seem necessary.
7122 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
7124 2009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7126 * stack.c (return_command <retval_exp>): New variables retval_expr
7127 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
7128 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
7129 if RETURN_TYPE is NULL.
7131 2009-03-14 Pedro Alves <pedro@codesourcery.com>
7133 * remote.c (PACKET_qAttached): New.
7134 (remote_query_attached): New.
7135 (remote_add_inferior): Add new `attached' argument. Handle it.
7136 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
7137 -1 to remote_add_inferior in new parameter.
7138 (extended_remote_attach_1): Adjust to pass 1 to
7139 remote_add_inferior in the new parameter.
7140 (extended_remote_create_inferior_1): Adjust to pass 0 to
7141 remote_add_inferior in the new parameter.
7142 (_initialize_remote): Add "set/show remote query-attached-packet"
7145 2009-03-13 Tom Tromey <tromey@redhat.com>
7147 * symtab.c (lookup_symbol_in_language): Use a cleanup.
7149 2009-03-13 Doug Evans <dje@google.com>
7151 * exceptions.h: Clean up some comments on catch_exceptions usage.
7152 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
7155 2009-02-17 Joel Brobecker <brobecker@adacore.com>
7157 The following patch helps getting rid of a warning inside solib-som.c.
7159 * source.c (source_full_path_of): Constify parameter filename.
7160 * defs.h (source_full_path_of): Update declaration accordingly.
7162 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7164 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
7165 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
7166 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
7168 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7170 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
7171 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
7173 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7175 * ada-tasks.c (ada_task_is_alive): Move up and make static.
7176 * ada-lang.h (ada_task_is_alive): Remove declaration.
7178 2009-03-12 Jerome Guitton <guitton@adacore.com>
7180 * ada-lang.c (ada_delta): Change the type of numerators and
7181 denominators to DOUBLEST, as they may not fit into a long.
7182 (scaling_factor): Ditto.
7184 2009-03-12 Jerome Guitton <guitton@adacore.com>
7186 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
7188 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7190 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
7191 types, if we are unable to determine the actual symbol type
7192 from its tag, then use the static approximation instead.
7194 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7196 Fix crash printing packed record with packed array.
7198 * ada-lang.c (ada_modulus_from_name): New function.
7199 (ada_modulus): In the case where the type length is bigger than
7200 the size of the type used to hold the bounds, try determining
7201 the modulus from the type name.
7202 (ada_value_primitive_packed_val): Fix bug in the computation of
7203 ntarg causing an out-of-buffer invalid access.
7205 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7207 Fix segfault when printing short_integer'last.
7209 * ada-lang.c (ada_find_any_type): Search in the primitive types
7210 if a symbol could not be found.
7212 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7214 * ada-tasks.c (task_states,long_task_states): Add new states
7215 Activating and Acceptor_Delay_Sleep. Update the description
7216 of state Acceptor_Sleep.
7218 2009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
7220 Fix a build failure on Darwin following some changes in
7221 the profile of some target_ops methods.
7223 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
7225 (darwin_stop_inferior, darwin_detach): Likewise.
7227 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7229 Include token in ^running notification for CLI commands.
7231 * mi/mi-main.c (mi_execute_command): Set current_token here.
7232 (mi_cmd_execute): Do not set current_token here.
7234 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
7238 * mi/mi-main.c (mi_print_timing_maybe): New.
7239 (captured_mi_execute_command): Simplify. Output timings to
7241 (mi_execute_async_cli_command): Do not print timings.
7242 * mi/mi-main.h (mi_print_timing_maybe): Declare.
7243 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
7245 2009-03-12 Jerome Guitton <guitton@adacore.com>
7247 * xcoffread.c (process_linenos): Check if the line in the
7248 include table refers to the main source file and, if so,
7249 add them to the main subfile.
7251 2009-03-12 Joel Brobecker <brobecker@adacore.com>
7253 Fix a build failure on AIX introduced after a change in the profile
7254 of some of the "methods" in the target_ops structure.
7255 * aix-thread.c: Add missing target_ops parameter throughout.
7257 Implement Ada task switching on AIX.
7258 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
7259 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
7261 2009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
7263 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
7264 value_mark and value_free_to_mark.
7265 * objfiles.c (free_objfile): Call objfile_free_data before
7268 2009-03-10 Hui Zhu <teawater@gmail.com>
7270 * disasm.c (gdb_disassembly): Remove unused argument
7272 * disasm.h (gdb_disassembly): Ditto.
7273 * cli/cli-cmds.c (print_disassembly): Ditto.
7274 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
7276 2009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
7278 * solib.c (solib_contains_address_p): New function.
7279 (solib_name_from_address): Use it.
7280 * printcmd.c (display_uses_solib_p): Use it.
7281 * solib.h (solib_contains_address_p): Declare it.
7283 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7285 * varobj.c (free_variable): Call value_free.
7287 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7290 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
7291 Move the variable `macinfo_type' out of the loop. Create a new
7292 processing pass before the current one to pre-create `current_file'.
7293 New complaint on misplaced zero/non-zero definitions/includes.
7294 Skip first DW_MACINFO_start_file with `at_commandline' set.
7296 2008-03-09 Vladimir Prus <vladimir@codesourcery.com>
7298 * solib.c (reload_shared_libraries): Give
7299 inferior a chance to reset solib breakpoint.
7302 2009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
7304 * windows-nat.c (dr): Redefine to use largest possible integer which
7306 (cygwin_set_dr): Avoid coercion.
7308 2009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
7310 * windows-nat.c (windows_create_inferior): Implement --tty handling on
7313 2009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
7315 Rename solib_address to solib_name_from_address.
7316 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
7317 (disable_breakpoints_in_unloaded_shlib): Update.
7318 * printcmd.c (display_uses_solib_p): Likewise.
7319 * stack.c (print_frame): Likewise.
7323 2009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
7325 * printcmd.c (do_one_display): Reparse exp_string.
7326 (display_uses_solib_p): New function.
7327 (clear_dangling_display_expressions): New function.
7328 (_initialize_printcmd): Add observer.
7329 * solib.c (no_shared_libraries): Swap order of calls to
7330 clear_solib and objfile_purge_solibs.
7332 2009-03-05 Joel Brobecker <brobecker@adacore.com>
7334 Implement the target-specific part of Ada tasking support
7337 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
7338 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
7340 2009-03-05 Joel Brobecker <brobecker@adacore.com>
7342 Get rid of the global "base_target" and use "find_target_beneath"
7343 to find the underlying target.
7344 * dec-thread.c (base_target): Delete.
7345 (enable_dec_thread): Remove assignement to base_target.
7346 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
7347 (dec_thread_fetch_registers, dec_thread_store_registers)
7348 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
7349 Update the function profile if necessary.
7350 Use find_target_beneath to call the same method but from
7351 the underlying target, removing the need for "base_target".
7353 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
7354 Fix a copy/paste error in a few debug traces...
7356 * solib-osf.c (init_so): Use a simpler method for computing
7357 the size of lm_info structure. This also gets rid of warning
7358 emitted by the compiler.
7360 2009-03-05 Pedro Alves <pedro@codesourcery.com>
7362 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
7363 duplicates of permanent breakpoints.
7365 2009-03-04 Pedro Alves <pedro@codesourcery.com>
7367 * inferior.h (notice_new_inferior): Declare.
7368 * infcmd.c (notice_new_inferior): New.
7369 * remote.c (remote_add_inferior, remote_add_thread): New.
7370 (notice_new_inferiors): Rename to...
7371 (remote_notice_new_inferior): ... this. Add RUNNING argument.
7372 Use remote_add_thread instead of add_thread, passing it the
7373 RUNNING argument. Add an inferior with remote_add_inferior. If
7374 we just learned about an inferior, call notice_new_inferior.
7375 (record_currthread): Adjust.
7376 (remote_threads_info): Adjust to use remote_notice_new_inferior.
7377 (remote_start_remote, extended_remote_attach_1): Use
7378 remote_add_inferior.
7379 (process_stop_reply): Adjust. Call remote_notice_new_inferior
7380 after handling expedited registers and watchpoint state.
7381 (extended_remote_create_inferior_1): Use remote_add_inferior.
7383 2009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
7385 * infcmd.c (registers_info): Remove register number case.
7387 2009-03-03 Pedro Alves <pedro@codesourcery.com>
7389 * top.c (quit_target): Check for target_has_execution before
7390 killing or detaching from inferiors.
7392 2009-03-02 Joel Brobecker <brobecker@adacore.com>
7394 Remove some unused routines.
7396 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
7398 * ada-lang.c (ada_task_list_iterator_ftype)
7399 (iterate_over_live_ada_tasks): Delete.
7400 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
7403 2009-03-01 Doug Evans <dje@google.com>
7405 * symtab.c: Remove trailing whitespace throughout the file.
7406 (expand_line_sal): Fix some typos and whitespace.
7408 * Makefile.in (clean): rm -f $(DEPDIR)/*.
7410 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
7411 (init.c): signals/ -> common/.
7412 (signals.o): Update.
7413 * target.h (target_signal_to_string,target_signal_to_string)
7414 (target_signal_from_name,target_signal_to_host_p)
7415 (target_signal_from_host,target_signal_to_host): Move to ...
7416 * common/gdb_signals.h: ... here. New file.
7417 * common/signals.c: Moved here from signals/signals.c.
7418 #include gdb_signals.h, remove #include of target.h in gdb case.
7419 (target_signal_from_command,default_target_signal_to_host)
7420 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
7422 Include thread ID in target_wait debugging output.
7423 * infrun.c (print_target_wait_results): New function.
7424 (wait_for_inferior,fetch_inferior_event): Call it.
7426 2009-02-27 Pedro Alves <pedro@codesourcery.com>
7428 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
7429 with a ptid_t field.
7430 * linux-thread-db.c (thread_get_info_callback): Build the ptid
7431 using the pid stored in proc_handle.ptid.
7432 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
7433 (check_for_thread_db, thread_db_detach, check_event)
7434 (thread_db_mourn_inferior, find_new_threads_callback)
7435 (thread_db_find_new_threads_1): Adjust.
7436 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
7437 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
7439 2009-02-27 Phil Muldoon <pmuldoon@redhat.com>
7441 * valprint.c (read_string): Rework clean-up logic. Use
7442 free_current_contents to clean-up buffer.
7444 2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
7446 * MAINTAINERS: Update e-mail address.
7448 2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
7450 * python/python-utils.c (python_string_to_unicode): Always return
7452 (python_string_to_target_string): Decrement transient python
7454 (python_string_to_host_string): Likewise.
7456 2007-02-26 Pedro Alves <pedro@codesourcery.com>
7458 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
7459 call to super_fetch_registers.
7460 (mips64_linux_store_registers): Pass `ops' to call to
7461 super_store_registers.
7463 2009-02-25 Doug Evans <dje@google.com>
7465 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
7468 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
7469 disabled_shlib_breaks, unused.
7471 * printcmd.c (build_address_symbolic): Fix comment.
7473 2009-02-25 Hui Zhu <teawater@gmail.com>
7475 * cli/cli-script.c (define_command): Add _() to query.
7476 * gnu-nat.c (inf_validate_task_sc): Ditto.
7477 * infcmd.c (kill_if_already_running): Ditto.
7478 (jump_command): Ditto.
7479 (attach_command): Ditto.
7480 * inflow.c (kill_command): Ditto.
7481 * infrun.c (handle_command): Ditto.
7482 * maint.c (maintenance_dump_me): Ditto.
7483 * memattr.c (mem_delete_command): Ditto.
7484 * monitor.c (monitor_interrupt_query): Ditto.
7485 * nto-procfs.c (interrupt_query): Ditto.
7486 * printcmd.c (undisplay_command): Ditto.
7487 * remote-mips.c (mips_kill): Ditto.
7488 * remote.c (interrupt_query): Ditto.
7489 * solib-irix.c (irix_open_symbol_file_object): Ditto.
7490 * solib-osf.c (osf_open_symbol_file_object): Ditto.
7491 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
7492 * solib-som.c (som_open_symbol_file_object): Ditto.
7493 * solib-svr4.c (open_symbol_file_object): Ditto.
7494 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
7495 * target.c (kill_or_be_killed): Ditto.
7496 * tracepoint.c (delete_trace_command): Ditto.
7497 * top.c (quit_confirm): Add _() to s that will be used
7500 2009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
7502 Fix windows-nat.c compilation failure.
7504 * windows-nat.c (windows_thread_alive): Fix forward declaration.
7505 (get_windows_debug_event): Add ops parameter to call to windows_resume.
7507 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7509 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
7511 2009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
7513 * symtab.c (find_line_symtab): Initialize exact to avoid
7516 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7518 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
7519 `ops' to recursive call.
7521 2009-02-23 Pedro Alves <pedro@codesourcery.com>
7523 * corelow.c (get_core_registers): Adjust.
7524 (core_file_thread_alive): Rename to...
7525 (core_thread_alive): ... this.
7526 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
7527 (init_core_ops): Adjust.
7528 (coreops_suppress_target): Delete.
7529 (_initialize_corelow): Unconditionally add core_ops.
7530 * procfs.c: Include "inf-child.h".
7531 (procfs_ops): Delete.
7532 (init_procfs_ops): Delete. Reimplement as...
7533 (procfs_target): ... this, inheriting from inf-child.
7534 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
7535 (procfs_prepare_to_store): Delete.
7536 (procfs_store_registers, procfs_resume): Adjust.
7537 (procfs_open): Delete.
7538 (procfs_suppress_run): Delete.
7539 (procfs_can_run): Delete.
7540 (procfs_mourn_inferior): Adjust.
7541 (procfs_init_inferior): Add target_ops parameter. Adjust.
7542 (procfs_create_inferior): Don't pass procfs_init_inferior to
7543 fork_inferior. Instead call it after fork_inferior returns.
7544 (procfs_find_new_threads): Adjust.
7545 (_initialize_procfs): Adjust to use procfs_target instead of
7547 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
7548 (lwp_to_thread): Use target_thread_alive.
7549 (sol_thread_open): Delete.
7550 (sol_thread_attach): Delete.
7551 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7552 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
7553 to use find_target_beneath.
7554 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
7555 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
7556 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
7557 (check_for_thread_db): New.
7558 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
7559 (sol_thread_new_objfile): Call check_for_thread_db.
7560 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
7561 (sol_thread_can_run): Delete.
7562 (sol_thread_alive): Adjust to use find_target_beneath.
7563 (sol_thread_stop): Delete.
7564 (rw_common): Use target_write_memory or target_read_memory.
7565 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
7566 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
7567 (solaris_pid_to_str): Remove check for libthread_db initialization
7569 (sol_find_new_threads): Remove check for libthread_db
7570 initialization failing, or for an invalid inferior_ptid. Adjust
7571 to use find_target_beneath.
7572 (sol_core_open, sol_core_close, sol_core_detach,
7573 sol_core_files_info, sol_find_memory_regions,
7574 sol_make_note_section, ignore): Delete.
7575 (init_sol_thread_ops): Make it a thread_stratum target. Remove
7576 unneeded callback settings.
7577 (init_sol_core_ops): Delete.
7578 (_initialize_sol_thread): No longer call init_sol_core_ops, set
7579 procfs_suppress_run, or hack with core_ops.
7581 * target.h (struct target_ops): Add a target_ops * parameter to
7582 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
7583 and to_find_new_threads.
7584 (target_fetch_registers, target_store_registers)
7585 (target_thread_alive, target_find_new_threads): Redeclare as
7588 * target.c (update_current_target): Do not inherit or de_fault
7589 to_resume, to_fetch_registers, to_store_registers,
7590 to_thread_alive, to_find_new_threads.
7591 (target_resume): Adjust.
7592 (target_thread_alive, target_find_new_threads): New.
7593 (debug_to_resume, debug_to_fetch_registers): Delete.
7594 (target_fetch_registers): New.
7595 (debug_to_store_registers): Delete.
7596 (target_store_registers): New.
7597 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
7598 (setup_target_debug): Adjust.
7600 * gdbcore.h (core_ops): Delete declaration.
7602 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
7603 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
7604 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
7605 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
7606 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
7607 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
7608 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
7609 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
7610 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
7611 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
7612 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
7613 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
7614 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
7615 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
7617 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
7618 * gdbarch.h, gdbarch.c: Regenerate.
7620 * sol2-tdep.c: Include "inferior.h".
7621 (sol2_core_pid_to_str): New.
7622 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
7624 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
7625 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
7626 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
7627 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
7629 2009-02-22 Doug Evans <dje@google.com>
7631 * exec.c (exec_file_attach): Fix comment.
7633 2009-02-22 Pedro Alves <pedro@codesourcery.com>
7635 Silence a few -Wmissing-prototypes warnings.
7638 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
7640 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
7641 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
7642 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
7643 (_initialize_amd64nbsd_tdep): ... this.
7644 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
7645 (_initialize_arm_linux_tdep): Declare.
7646 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
7647 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
7648 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
7649 * avr-tdep.c (avr_return_value): Make it static.
7650 (avr_frame_unwind_cache): Ditto.
7651 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
7652 (bsd_uthread_solib_loaded): Ditto.
7653 (bsd_uthread_solib_unloaded): Ditto.
7654 (bsd_uthread_target): Ditto.
7655 (_initialize_bsd_uthread): Declare.
7656 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
7657 (cris_frame_unwind_cache): Ditto.
7658 * frv-tdep.c (frv_return_value): Ditto.
7659 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
7660 (h8300h_use_struct_convention): Ditto.
7661 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
7663 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
7665 * hppabsd-tdep.c: Include hppabsd-tdep.h.
7666 (hppabsd_find_global_pointer): Make it static.
7667 * hppabsd-tdep.h: New.
7668 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
7669 (hppabsd_init_abi): Remove declaration.
7670 (_initialize_hppabsd_tdep): Remove declaration.
7671 (_initialize_hppanbsd_tdep): Declare.
7672 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
7673 (hppabsd_init_abi): Delete declaration.
7674 (hppaobsd_init_abi): Make it static.
7675 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
7676 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
7677 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
7678 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
7679 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
7680 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
7681 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
7682 (_initialize_m32c_tdep): Declare.
7683 * m32r-rom.c (_initialize_m32r_rom): Declare.
7684 * m32r-tdep.c (m32r_skip_prologue): Make it static.
7685 (m32r_return_value): Ditto.
7686 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
7687 (m68hc11_return_value): Ditto.
7688 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
7689 * m88k-tdep.c (m88k_frame_cache): Make it static.
7690 * mep-tdep.c (mep_gdb_print_insn): Ditto.
7691 (mep_return_value): Ditto.
7692 (_initialize_mep_tdep): Declare.
7693 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
7694 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
7695 (mips_linux_syscall_next_pc): Ditto.
7696 (_initialize_mips_linux_tdep): Declare.
7697 * mips-tdep.c (mips_single_step_through_delay): Make it static.
7698 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
7699 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
7700 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
7701 * mt-tdep.c (_initialize_mt_tdep): Declare.
7702 * nbsd-tdep.c: Include nbsd-tdep.h.
7703 * nto-tdep.c (find_load_phdr): Make it static.
7704 (_initialize_nto_tdep): Declare.
7705 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
7707 (_initialize_ppc_linux_tdep): Declare.
7708 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
7709 (m32r_insert_watchpoint, m32r_remove_watchpoint)
7710 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
7712 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
7713 * rs6000-nat.c: Include xcoffread.h.
7714 (find_toc_address): Don't extern declare get_toc_offset. Adjust
7715 to call xcoff_get_to_offset.
7716 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
7717 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
7718 (rs6000_skip_trampoline_code): Make static.
7719 * s390-tdep.c (s390_regset_from_core_section): Ditto.
7720 * sh-tdep.c (sh_register_reggroup_p): Ditto.
7721 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
7722 (_initialize_shnbsd_tdep): Declare.
7723 * solib-frv.c (displacement_from_map): Make static.
7724 (_initialize_frv_solib): Declare.
7725 * solib-irix.c (fetch_lm_info): Make static.
7726 (_initialize_irix_solib): Declare.
7727 * solib-som.c: Include solib-som.h.
7728 (som_solib_select): Line break.
7729 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
7730 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
7731 (_initialize_sparcnbsd_tdep): ... this.
7732 * spu-tdep.c (spu_software_single_step): Make it static.
7733 (_initialize_spu_tdep): Declare.
7734 * vax-tdep.c (vax_frame_cache): Make it static.
7735 * xcoffread.c: Include xcoffread.h.
7736 (get_toc_offset): Rename to ...
7737 (xcoff_get_toc_offset): ... this.
7738 (_initialize_xcoffread): Declare.
7740 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
7741 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
7743 (_initialize_xtensa_tdep): Declare.
7745 2008-02-21 Pedro Alves <pedro@codesorcery.com>
7747 Silence a few -Wmissing-prototypes warnings.
7750 * amd64-nat.c: Include "amd64-nat.h".
7751 * fork-child.c (_initialize_fork_child): Ditto.
7752 * gcore.c (_initialize_gcore): Ditto.
7753 * inf-ptrace.c: Include "inf-ptrace.h".
7754 (inf_ptrace_store_registers): Make it static.
7755 * linux-nat.c (linux_nat_terminal_ours): Make it static.
7756 (_initialize_linux_nat): Declare before definition.
7757 * linux-tdep.c: Include "linux-tdep.h".
7758 * linux-thread-db.c (_initialize_thread_db): Declare before
7760 * proc-service.c (_initialize_proc_service): Ditto.
7761 * remote.c (remote_send_printf): Make it static.
7762 * solib.c: Include "solib.h".
7763 * symfile-mem.c (_initialize_symfile_mem): Declare before
7765 * ada-lang.c (ada_la_decode, ada_match_name)
7766 (ada_suppress_symbol_printing, ada_is_array_type)
7767 (ada_value_ptr_subscript, ada_array_length)
7768 (ada_to_static_fixed_value): Make them static.
7769 (_initialize_ada_language): Declare before definition.
7770 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
7771 (ada_task_list_changed, ada_new_objfile_observer): Make them
7773 (_initialize_tasks): Declare before definition.
7774 * addrmap.c (_initialize_addrmap): Declare before definition.
7775 * auxv.c (default_auxv_parse): Make it static.
7776 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
7778 * breakpoint.c (remove_sal): Add line break.
7779 (expand_line_sal_maybe): Make it static.
7780 * cp-name-parser.y: Include "cp-support.h".
7781 * cp-valprint.c (cp_find_class_member): Make it static.
7782 * eval.c (value_f90_subarray): Ditto.
7783 * exceptions.c (print_any_exception): Ditto.
7784 * findcmd.c (_initialize_mem_search): Declare before definition.
7785 * frame.c (frame_observer_target_changed): Make it static.
7786 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
7787 * inf-child.c: Include "inf-child.h".
7788 * inferior.h (valid_inferior_id): Rename to ...
7789 (valid_gdb_inferior_id): ... this.
7790 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
7792 * jv-lang.c (java_language_arch_info): Make it static.
7793 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
7794 * osdata.c (info_osdata_command): Make it static.
7795 * regcache.c (regcache_observer_target_changed): Make it static.
7796 * reverse.c (_initialize_reverse): Declare before definition.
7797 * stabsread.c (cleanup_undefined_types_noname)
7798 (cleanup_undefined_types_1): Make them static.
7799 * symfile.c (place_section): Make it static.
7800 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
7801 * target-descriptions.c (_initialize_target_descriptions): Declare
7803 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
7804 (find_default_is_async_p, find_default_supports_non_stop): Make
7806 (target_supports_non_stop): Add prototype.
7807 (dummy_pid_to_str): Make it static.
7808 * utils.c (_initialize_utils): Declare before definition.
7809 * ada-exp.y (_initialize_ada_exp): Declare before definition.
7810 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
7811 * target.h (struct target_ops): Add a prototype to the
7812 to_can_execute_reverse callback.
7813 * macroscope.c (_initialize_macroscope): Declare before definition.
7814 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
7815 * python/python.c (_initialize_python): Declare before definition.
7816 * tui/tui-command.c: Include "tui/tui-command.h".
7817 * tui/tui-data.c (init_content_element, init_win_info): Make them
7819 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
7820 * tui/tui-interp.c (_initialize_tui_interp): Declare before
7822 * tui/tui-layout.c: Include "tui/tui-layout.h".
7823 (_initialize_tui_layout): Declare before definition.
7824 * tui/tui-regs.c: Include "tui/tui-regs.h".
7825 (tui_display_reg_element_at_line): Make it static.
7826 (_initialize_tui_regs): Declare before definition.
7827 * tui/tui-stack.c (_initialize_tui_stack): Declare before
7829 * tui/tui-win.c: Include "tui/tui-win.h".
7830 (_initialize_tui_win): Declare before definition.
7831 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
7832 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
7833 (tui_get_cmd_list): Add a prototype.
7834 * tui/tui-windata.c: Include tui-windata.h.
7835 * tui/tui-wingeneral.c (box_win): Make it static.
7836 * cli/cli-logging.c (show_logging_command): Make it static.
7837 (_initialize_cli_logging): Declare before definition.
7838 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
7841 2009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
7843 Extend use of i386_use_watchpoints to all i386 native files
7844 using hardware watchpoints.
7845 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
7846 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
7847 * windows-nat.c (init_windows_ops): Ditto.
7848 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
7849 * config/i386/nm-cygwin64.h: Ditto.
7850 * config/i386/nm-fbsd.h: Ditto.
7851 * config/i386/nm-go32.h: Ditto.
7853 2009-02-19 Joel Brobecker <brobecker@adacore.com>
7855 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
7857 2009-02-18 Vladimir Prus <vladimir@codesourcery.com>
7859 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
7860 (mi_interpreter_init): Register the above.
7861 * solib.c (clear_solib): Notify solib unload.
7862 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
7863 disable breakpoints on a.out targets.
7865 2009-02-17 Vladimir Prus <vladimir@codesourcery.com>
7867 * observer.c (observer_test_first_notification_function)
7868 (observer_test_second_notification_function)
7869 (observer_test_third_notification_function): Adjust prototype.
7871 2009-02-17 Pedro Alves <pedro@codesourcery.com>
7873 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
7874 (ALL_TARGET_OBS): Add dicos-tdep.o.
7875 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
7876 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
7878 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
7880 * dicos-tdep.h, dicos-tdep.c: New.
7881 * amd64-dicos-tdep.c: New.
7882 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
7883 inferior.h. Include dicos-tdep.h.
7884 (i386_dicos_init_abi): Call dicos_init_abi.
7885 (i386_dicos_bfd_has_symbol_p): Delete.
7886 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
7888 * NEWS: Mention x86-64 DICOS target support.
7890 2009-02-16 Doug Evans <dje@google.com>
7892 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
7893 All callers updated.
7894 (amd64_get_insn_details): Handle more 3-byte opcode insns.
7895 (amd64_breakpoint_p): Delete.
7896 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
7897 don't back up pc to the start of the int3.
7898 * i386-tdep.c: #include opcode/i386.h.
7899 (i386_skip_prefixes): New function.
7900 (i386_absolute_jmp_p): Constify argument.
7901 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
7902 (i386_breakpoint_p): Delete.
7903 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
7904 When fixing up after stepping an int3, don't back up pc to the start
7907 2009-02-16 Pedro Alves <pedro@codesourcery.com>
7909 * corelow.c (core_close): Don't hardcode the core's pid.
7910 (core_open): Find core threads before calling
7911 post_create_inferior.
7912 (add_to_thread_list, get_core_register_section): Take into account
7913 systems where the regset section names encode the pid of the
7916 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
7917 * gdbarch.h, gdbarch.c: Regenerate.
7919 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
7920 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
7921 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
7922 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
7924 2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
7926 Include frame information for *stopped due to CLI commands.
7928 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
7929 * infcmd.c (finish_command_continuation): Pass '1' for
7930 'print_frame' parameter to the observer.
7931 * infrun.c (normal_stop): Don't print mi-specific information
7932 here. Pass 'stop_print_frame' to the 'print_frame' parameter
7934 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
7935 If we need to print frame, and current uiout is not the MI one,
7938 2009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
7940 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
7941 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
7943 2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7946 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
7947 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
7949 2009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
7951 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
7952 for DW_ATE_signed_char and DW_ATE_unsigned_char
7953 for pascal language.
7955 2009-02-11 Jim Meyering <meyering@redhat.com>
7956 Jan Kratochvil <jan.kratochvil@redhat.com>
7958 Avoid NULL dereference.
7959 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
7960 New variable func_type.
7962 2009-02-11 Pedro Alves <pedro@codesourcery.com>
7964 * gdbarch.c: Regenerate.
7966 2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
7968 * p-lang.c (is_pascal_string_type): Fix comment.
7969 Determine exact size of char elements for GPC
7971 (pascal_printstr): Handle char width of 2 or 4.
7972 * p-valprint.c (pascal_val_print): Handle char
7975 2009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
7977 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
7978 inside the loop. Only call addrmap_set_empty if the compilation unit
7979 had DW_AT_high_pc and DW_AT_low_pc. Update call to
7980 scan_partial_symbols.
7981 (scan_partial_symbols): Take NEED_PC argument and pass it along with
7983 (add_partial_namespace): Take NEED_PC argument and pass it through.
7984 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
7987 2009-02-07 Pedro Alves <pedro@codesourcery.com>
7989 * NEWS: Mention inspecting extra signal information, $_siginfo,
7990 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
7992 2009-02-07 Pedro Alves <pedro@codesourcery.com>
7994 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
7997 2009-02-06 Pedro Alves <pedro@codesourcery.com>
7999 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
8000 (compat_timer_t, compat_clock_t, struct compat_timeval)
8001 (compat_sigval_t, compat_siginfo_t): New types.
8002 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
8003 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
8004 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
8005 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8006 (amd64_linux_siginfo_fixup): New.
8007 * linux-nat.c (linux_nat_siginfo_fixup): New.
8008 (siginfo_fixup): New.
8009 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
8010 siginfo layout expected by ptrace and the siginfo layout of the
8012 (linux_nat_set_siginfo_fixup): New.
8013 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
8015 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8017 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
8018 * infrun.c (siginfo_value_read, siginfo_value_write): New.
8019 (siginfo_value_funcs): New.
8020 (siginfo_make_value): New.
8021 (_initialize_infrun): Create the $_siginfo convenience variable.
8022 * gdbtypes.h (append_composite_type_field_aligned): Declare.
8023 * gdbtypes.c (append_composite_type_field): Rename to...
8024 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
8025 argument. Handle it.
8026 (append_composite_type_field): Rewrite on top of
8027 append_composite_type_field_aligned.
8028 * value.h (internalvar_make_value): New typedef.
8029 (struct internalvar) <make_value>: New field.
8030 (create_internalvar_type_lazy): Declare.
8031 * value.c (create_internalvar): Clear make_value.
8032 (create_internalvar_type_lazy): New.
8033 (value_of_internalvar): If make_value is set use it.
8034 (preserve_values): Skip internal variables that don't have a
8036 * gdbarch.sh (get_siginfo_type): New.
8037 * gdbarch.h, gdbarch.c: Regenerate.
8039 * linux-tdep.h, linux-tdep.c: New.
8040 * amd64-linux-tdep.c: Include "linux-tdep.h".
8041 (amd64_linux_init_abi): Register linux_get_siginfo_type and
8042 linux_get_siginfo_mapper.
8043 * i386-linux-tdep.c: Include "linux-tdep.h".
8044 (i386_linux_init_abi): Register linux_get_siginfo_type and
8045 linux_get_siginfo_mapper.
8046 * arm-linux-tdep.c: Include "linux-tdep.h".
8047 (i386_linux_init_abi): Register linux_get_siginfo_type and
8048 linux_get_siginfo_mapper.
8050 * linux-nat.c (linux_xfer_siginfo): New.
8051 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8052 * remote.c (PACKET_qXfer_siginfo_read)
8053 (PACKET_qXfer_siginfo_write): New.
8054 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
8055 "qXfer:siginfo:write" features.
8056 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8057 (_initialize_remote): Add "set/show remote read-siginfo-object"
8058 and "set/show remote write-siginfo-object" commands.
8060 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
8061 (HFILES_NO_SRCDIR): Add linux-tdep.h.
8062 (ALLDEPFILES): Add linux-tdep.c.
8064 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
8065 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
8068 2009-02-06 Jim Blandy <jimb@codesourcery.com>
8069 Daniel Jacobowitz <dan@codesourcery.com>
8070 Vladimir Prus <vladimir@codesourcery.com>
8071 Pedro Alves <pedro@codesourcery.com>
8073 * defs.h (enum lval_type): New value: lval_computed.
8074 * value.h (struct lval_funcs): New type.
8075 (allocate_computed_value, value_computed_funcs)
8076 (value_computed_closure): New declarations.
8077 * value.c (struct value): Add a structure to the location union
8078 for computed lvalues, containing 'funcs' and 'closure' members.
8079 (allocate_computed_value, value_computed_funcs)
8080 (value_computed_closure): New functions.
8081 (value_free): For computed lvalues, call the closure's
8082 'free_closure' function before freeing the value itself.
8083 (value_copy): If we're copying an lval_computed value, call the
8084 closure's 'copy_closure' function.
8085 (set_value_component_location): If the original value is a
8086 computed lvalue, then call the closure's 'copy_closure' function.
8087 (value_of_internalvar): If an internal variable's value is a
8088 computed lvalue, make retrieving its value produce an equivalent
8090 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
8091 their read function.
8092 (value_assign): Assign to computed lvalues by calling their write
8095 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8097 * linux-nat.c (linux_nat_wait): Adjust.
8098 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
8099 * linux-nat.h (thread_db_init): Delete declaration.
8100 * linux-thread-db.c (target_beneath): Delete.
8101 (thread_db_init): Delete.
8102 (thread_db_detach): Use find_target_beneath.
8103 (thread_db_wait): Adjust interface. Use find_target_beneath.
8104 (thread_db_mourn_inferior): Use find_target_beneath.
8105 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
8106 (thread_db_async_mask): Delete.
8107 (thread_db_pid_to_str): Adjust interface. Use
8108 find_target_beneath.
8109 (thread_db_get_thread_local_address): Adjust interface. Use
8110 find_target_beneath.
8111 (init_thread_db_ops): Delete references to delete functions.
8112 * target.c (update_current_target): Don't inherit or default
8113 to_wait. Don't inherit to_pid_to_str and
8114 to_get_thread_local_address.
8115 (target_translate_tls_address): Look for a pushed target that
8116 implements to_get_thread_local_address, and use it instead of
8117 checking for target_get_thread_local_address_p.
8118 (target_wait, target_pid_to_str): Reimplement as functions.
8119 (dummy_pid_to_str): New.
8120 (init_dummy_target): Register it.
8121 (debug_to_wait): Delete.
8122 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
8123 to_get_thread_local_address accept a pointer to struct target_ops.
8124 (target_wait): Delete macro, and declare as function.
8125 (target_pid_to_str): Likewise.
8126 (target_get_thread_local_address)
8127 (target_get_thread_local_address_p): Delete.
8128 (noprocess): Add NORETURN and ATTR_NORETURN tags.
8129 * inf-ptrace.c (inf_ptrace_wait): Adjust.
8130 (inf_ptrace_pid_to_str): New.
8131 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
8132 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
8133 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
8134 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
8136 * corelow.c (core_pid_to_str): Adjust.
8137 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
8138 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
8139 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
8140 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
8141 * hpux-thread.c (hpux_thread_wait): Adjust.
8142 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
8143 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
8144 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
8145 * procfs.c (procfs_pid_to_str): Adjust.
8146 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
8147 * remote-mips.c (mips_wait): Adjust.
8148 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
8149 * remote.c (remote_wait, remote_pid_to_str)
8150 (remote_get_thread_local_address): Adjust.
8151 * rs6000-nat.c (rs6000_wait): Adjust.
8152 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
8153 (sol_thread_wait, solaris_pid_to_str): Adjust.
8154 * spu-linux-nat.c (spu_child_wait): Adjust.
8155 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
8157 2009-02-06 Tom Tromey <tromey@redhat.com>
8159 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
8160 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
8161 (python-cmd.o): New target.
8162 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
8163 completer prototype.
8164 (add_cmd): Initialize destroyer member of cmd_list_element. Use
8165 make_symbol_completion_list_fn as completer.
8166 (delete_cmd): Call destroyer if one is set.
8167 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
8168 completer member. Add destroyer member.
8169 (set_cmd_completer): Add self parameter to
8170 completer prototype.
8171 * command.h (set_cmd_completer): Add cmd parameter to
8172 completer prototype.
8173 * completer.c (noop_completer, filename_completer,
8174 location_completer, expression_completer, command_completer): Adapt
8175 to new completer prototype.
8176 (complete_line_internal): Pass new parameter to completer function.
8177 * completer.h (noop_completer, filename_completer,
8178 location_completer, expression_completer, command_completer): Adapt
8179 prototypes to new completer prototype.
8180 * interps.c (interpreter_completer): Adapt to new completer
8182 * python/python-cmd.c: New file.
8183 * python/python-internal.h (gdbpy_initialize_commands): Add
8185 (gdbpy_doc_cst): Add forward declaration.
8186 * python/python.c (gdbpy_doc_cst): Declare.
8187 (_initialize_python): Call gdbpy_initialize_commands. Initialize
8189 * symtab.c (make_symbol_completion_list_fn): New function.
8190 * symtab.h (make_symbol_completion_list_fn): Add prototype.
8192 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8194 * target.c (target_get_osdata): Check for equal or higher than
8195 process_stratum, not dummy_stratum.
8197 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8199 * remote.c (extended_remote_can_run): Delete.
8200 (init_remote_ops): Don't register it.
8201 * target.c (target_get_osdata): Don't check for target_can_run.
8202 Instead any target that has already been pushed, otherwise
8203 fallback to the default run target.
8205 2009-02-06 Pedro Alves <pedro@codesourcery.com>
8207 * target.c (target_create_inferior, target_detach)
8208 (target_mourn_inferior, target_attach, target_close): Do target
8210 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
8211 (debug_to_mourn_inferior, debug_to_close): Delete.
8212 (setup_target_debug): Adjust.
8214 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8216 * target.h (target_stopped_data_address_p): Delete declaration,
8217 and don't define as macro.
8218 * target.c (target_stopped_data_address_p): Delete.
8220 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8221 Tom Tromey <tromey@redhat.com>
8223 * python/python-utils.c (target_string_to_unicode): New function.
8224 * python/python-internal.h (target_string_to_unicode): New prototype.
8225 * python/python-value.c (valpy_string): New function.
8226 (value_object_methods): Add `string' entry.
8228 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8230 * target.h (target_tid_to_str): Delete.
8231 * thread.c (print_thread_info, thread_apply_all_command)
8232 (thread_apply_command, thread_command, do_captured_thread_select):
8233 Use target_pid_to_str instead of target_tid_to_str.
8234 * linux-fork.c (delete_fork_command): Likewise.
8236 2009-02-05 Pedro Alves <pedro@codesourcery.com>
8238 * frame.c (has_stack_frames): Make public.
8239 (get_prev_frame): Don't allow a NULL this_frame anymore.
8240 * frame.h (has_stack_frames): Declare.
8241 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
8242 to get_prev_frame, instead start at get_current_frame.
8243 (varobj_create): Check has_stack_frames before getting any frame;
8244 eliminate one usage of deprecated_safe_get_selected_frame.
8246 2009-02-05 Tom Tromey <tromey@redhat.com>
8247 Thiago Jung Bauermann <bauerman@br.ibm.com>
8249 * python/python.c (GdbMethods): Move to bottom of file.
8250 (get_parameter, execute_gdb_command, gdbpy_write,
8251 gdbpy_flush): Remove forward declarations.
8252 (eval_python_from_control_command): Fix error checking of function
8253 PyRun_SimpleString. Fix error string.
8254 (python_command): Likewise.
8255 (execute_gdb_command): Added from_tty argument.
8257 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
8259 * language.h (language_dfn): Add la_get_string member.
8260 (LA_GET_STRING): New macro.
8261 (default_get_string): New prototype.
8262 * language.c (default_get_string): New function.
8263 (unknown_language_defn, auto_language_defn, local_language_defn): Use
8264 default_get_string for la_get_string.
8265 * c-lang.c (c_get_string): New function.
8266 (c_language_defn, cplus_language_defn, asm_language_defn): Use
8267 c_get_string for la_get_string.
8268 (minimal_language_defn): Likewise
8269 * ada-lang.c (ada_language_defn): Likewise.
8270 * f-lang.c (f_language_defn): Use default_get_string for
8272 * jv-lang.c (java_language_defn): Likewise.
8273 * m2-lang.c (m2_language_defn): Likewise.
8274 * objc-lang.c (objc_language_defn): Likewise.
8275 * p-lang.c (p_language_defn): Likewise.
8276 * scm-lang.c (scm_language_defn): Likewise.
8277 * typeprint.c (type_to_string): New function.
8278 * value.h (type_to_string): New prototype.
8279 * valprint.c (val_print_string): Factor out code for reading string
8280 from the inferior into its own function. Put 2 spaces after period
8282 (read_string): New function.
8283 * valprint.h (read_string): New prototype.
8285 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
8286 Tom Tromey <tromey@redhat.com>
8288 PR breakpoints/8079:
8289 * breakpoint.c (print_one_breakpoint): Use exp_string field
8290 to display expression of watchpoints.
8291 (mention): Likewise.
8292 (watch_command_1): Remove trailing whitespace from expression.
8293 * printcmd.c (struct display) <exp_string>: New field.
8294 (display_command): Set exp_string.
8295 (free_display): Free exp_string.
8296 (clear_displays): Use free_display.
8297 (do_one_display): Print exp_string.
8298 (display_info): Likewise.
8300 2009-02-04 Tom Tromey <tromey@redhat.com>
8301 Thiago Jung Bauermann <bauerman@br.ibm.com>
8302 Phil Muldoon <pmuldoon@redhat.com>
8304 * python/python-internal.h (gdbpy_get_value_from_history): Rename
8305 prototype to gdbpy_history.
8306 (gdbpy_is_string): Declare.
8307 (python_string_to_host_string): Declare.
8308 * python/python-utils.c (gdbpy_is_string): New function.
8309 (unicode_to_encoded_string): New function.
8310 (unicode_to_target_string): Use it.
8311 (python_string_to_host_string): New function.
8312 * python/python-value.c (valpy_address): New function.
8313 (convert_value_from_python): Use gdbpy_is_string. Change to throw
8314 Python exception instead of a GDB exception on error. Properly check
8316 (valpy_getitem): Convert field name to host string. Handle array
8317 accesses. Adapt to new behaviour of convert_value_from_python.
8318 (valpy_new): Adapt to new behaviour of convert_value_from_python.
8319 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
8320 VALPY_BITXOR, VALPY_BITOR>: New constants.
8321 (valpy_binop): Update. Adapt to new behaviour of
8322 convert_value_from_python.
8323 (valpy_invert): New function.
8324 (valpy_lsh): Likewise.
8325 (valpy_rsh): Likewise.
8326 (valpy_and): Likewise.
8327 (valpy_or): Likewise.
8328 (valpy_xor): Likewise.
8329 (valpy_richcompare): Call convert_value_from_python instead of doing
8331 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
8332 (gdbpy_get_value_from_history): Rename
8333 function to gdbpy_history.
8334 (gdbpy_initialize_values): Don't set tp_new.
8335 (value_object_type): Add valpy_new.
8336 (value_object_methods): Add `address' entry.
8337 (value_object_as_number): Update for new methods.
8338 * python/python.c (GdbMethods): Rename entry from
8339 `get_value_from_history' to `history'.
8341 2009-02-04 Jerome Guitton <guitton@adacore.com>
8343 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
8344 of type to guard against a crash.
8346 2009-02-04 Jerome Guitton <guitton@adacore.com>
8348 * value.c (value_from_contents_and_address): Always return
8349 a lval_memory value, even if address is null.
8351 2009-02-04 Tristan Gingold <gingold@adacore.com>
8353 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
8354 (amd64_darwin_sigcontext_addr): Ditto.
8355 (darwin_dwarf_signal_frame_p): Ditto.
8356 (i386_darwin_init_abi): Handle signal frames, use the const for
8358 (x86_darwin_init_abi_64): Ditto.
8360 2009-02-04 Tristan Gingold <gingold@adacore.com>
8362 * i386-tdep.c (i386_sigtramp_p): Make it public.
8363 * i386-tdep.h (i386_sigtramp_p): Declare.
8365 2009-02-04 Tristan Gingold <gingold@adacore.com>
8367 * machoread.c (macho_symfile_read): Read minsymtab also from
8369 (macho_symfile_read): Try to read dwarf2 frame info from main
8370 object file, but not from OSO files.
8371 (macho_symfile_offsets): Update section names for latest BFD
8373 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
8374 (x86_darwin_init_abi_64): Ditto.
8375 * solib-darwin.c: New file.
8376 * solib-darwin.h: New file.
8377 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
8379 2009-02-04 Tristan Gingold <gingold@adacore.com>
8381 * solist.h (struct target_so_ops): Comment fallback behavior for
8384 2009-02-03 Tom Tromey <tromey@redhat.com>
8386 * completer.c (add_struct_fields): Check type_name against NULL
8389 2009-02-03 Joel Brobecker <brobecker@adacore.com>
8391 * MAINTAINERS: Update Elena's email address.
8393 2009-02-02 Joel Brobecker <brobecker@adacore.com>
8395 * breakpoint (update_watchpoint): Minor comment adjustment.
8397 2009-02-02 Tom Tromey <tromey@redhat.com>
8400 * completer.c (count_struct_fields): Count method names.
8401 (add_struct_fields): Add matching method names.
8403 2009-02-02 Doug Evans <dje@google.com>
8405 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
8406 doing any further tcl/tk configury. Don't configure gdbtk if
8407 tcl or tk check fails.
8408 * aclocal.m4: Regenerate.
8409 * configure: Regenerate.
8411 2009-02-02 Tom Tromey <tromey@redhat.com>
8414 * valops.c (find_overload_match): Follow typedefs before taking
8415 address of object argument.
8417 2009-02-01 Doug Evans <dje@google.com>
8419 * target.h (target_waitstatus_to_string): Declare.
8420 * target.c (target_waitstatus_to_string): New function. Copied from
8421 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
8422 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
8423 TARGET_WAITKIND_NO_HISTORY.
8424 (debug_to_wait): Call it.
8425 * infrun.c (wait_for_inferior): If debug_infrun, print result of
8427 (fetch_inferior_event): Ditto.
8429 2009-01-30 Tom Tromey <tromey@redhat.com>
8431 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
8433 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8436 * thread.c (do_captured_list_thread_ids): Report the current
8439 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
8441 * breakpoint.c (create_breakpoint, create_breakpoints)
8442 (break_command_really, set_breakpoint): New parameter enabled.
8443 (create_breakpoint, break_command_really): Make breakpoint
8444 disabled if so requested.
8445 * breakpoint.h (set_breakpoint): New parameter enabled.
8446 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
8448 2009-01-28 Doug Evans <dje@google.com>
8450 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
8451 (amd64_displaced_step_fixup): Declare.
8452 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
8453 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
8454 and make static global.
8455 (amd64_arch_regmap_len): New static global.
8456 (amd64_arch_reg_to_regnum): New function.
8457 (struct amd64_insn): New struct.
8458 (struct displaced_step_closure): New struct.
8459 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
8460 (rex_prefix_p,skip_prefixes)
8461 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
8462 (amd64_insn_length,amd64_get_unused_input_int_reg)
8463 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
8464 (amd64_displaced_step_copy_insn)
8465 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
8466 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
8467 (amd64_displaced_step_fixup): New functions.
8468 * amd64-linux-tdep.c: #include arch-utils.h.
8469 (amd64_linux_init_abi): Install displaced stepping support.
8471 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
8472 Jerome Guitton <guitton@adacore.com>
8474 * configure, config.in: Regenerated.
8475 * configure.ac: Add --with-system-gdbinit.
8476 * main.c (get_init_files): New.
8477 (captured_main): Use get_init_files. Load system gdbinit before
8479 (print_gdb_help): Print location of init files.
8481 2009-01-28 Pedro Alves <pedro@codesourcery.com>
8483 * corefile.c (generic_search): Delete disabled code.
8484 * gdbcore.h (generic_search): Delete declaration.
8486 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8488 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
8489 parent to the child.
8490 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
8491 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
8492 remove_breakpoints to remove breakpoints from the parent.
8494 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8496 PR backtrace/9458, PR backtrace/8864:
8497 * frame.c (create_new_frame): Update the frame's cached PC before
8498 finding its unwinder. Use frame_id_build to build the new frame's
8500 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
8501 array values from the ``args'' array values.
8503 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8505 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
8506 (create_array_type, create_set_type, init_flags_type)
8507 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
8508 with a call to XZALLOC or XCALLOC, and pairs of calls to
8509 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
8511 2009-01-26 Pedro Alves <pedro@codesourcery.com>
8513 Add "maint set|show internal-error|internal-warning quit|corefile
8514 ask|yes|no" commands.
8517 * utils.c (internal_problem_ask, internal_problem_yes)
8518 (internal_problem_no, internal_problem_modes): New.
8519 (struct internal_problem): Remove FIXME. Make should_quit and
8520 should_dump_core types to char *.
8521 (internal_vproblem, internal_error_problem)
8522 (internal_warning_problem): Adjust.
8523 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
8525 (add_internal_problem_command): New.
8526 (_initialize_utils): New.
8528 2009-01-25 Pedro Alves <pedro@codesourcery.com>
8530 * infcmd.c (program_info): Use paddress instead of casting stop_pc
8533 2009-01-24 Pedro Alves <pedro@codesourcery.com>
8535 * infrun.c (normal_stop): Don't call
8536 deprecated_update_frame_pc_hack.
8537 * frame.c (deprecated_update_frame_pc_hack)
8538 (deprecated_update_frame_base_hack): Delete, and ...
8539 (create_new_frame): ... inline here.
8540 * frame.h (deprecated_update_frame_pc_hack)
8541 (deprecated_update_frame_base_hack): Delete declarations.
8543 2009-01-23 Pedro Alves <pedro@codesourcery.com>
8545 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
8546 * cli/cli-setshow.c (do_setshow_command): Handle it.
8547 * command.h (enum var_types): Add var_zuinteger.
8548 (add_setshow_zuinteger_cmd): Declare.
8550 * valprint.c (_initialize_valprint): Change the set input-radix
8551 and set output-radix commands to zuinteger type.
8553 2009-01-23 Pedro Alves <pedro@codesourcery.com>
8556 * infrun.c (normal_stop): Tag threads as stopped, and run the
8557 hook-stop before printing the stack frame.
8559 2009-01-22 Pedro Alves <pedro@codesourcery.com>
8562 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
8565 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
8567 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
8570 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
8573 * infcmd.c (signal_command): Do not specify a resume PC.
8575 2009-01-19 Doug Evans <dje@google.com>
8577 * dummy-frame.c (dummy_frame): Replace regcache member with
8579 (dummy_frame_push): Replace caller_regcache arg with caller_state.
8580 All callers updated.
8581 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
8582 (dummy_frame_pop): Rewrite. Verify requested frame is in the
8583 dummy frame stack. Restore program state.
8584 (cleanup_dummy_frames): Rewrite.
8585 (dummy_frame_sniffer): Update. Make static.
8586 * dummy-frame.h (regcache,frame_info): Delete forward decls.
8587 (inferior_thread_state): New forward decl.
8588 (dummy_frame_push): Update prototype.
8589 * frame.c (frame_pop): dummy_frame_pop now does all the work for
8591 * infcall.c (breakpoint_auto_delete_contents): Delete.
8592 (get_function_name,run_inferior_call): New fns.
8593 (call_function_by_hand): Simplify by moving some code to
8594 get_function_name, run_inferior_call. Inferior function call wrapped
8595 in TRY_CATCH so there's less need for cleanups and all exits from
8596 proceed are handled similarily. Detect program exit.
8597 Detect program stopping in a different thread.
8598 Make error messages more consistent.
8599 * inferior.h (inferior_thread_state): Declare (opaque type).
8600 (save_inferior_thread_state,restore_inferior_thread_state,
8601 make_cleanup_restore_inferior_thread_state,
8602 discard_inferior_thread_state, get_inferior_thread_state_regcache):
8604 (save_inferior_status): Update prototype.
8605 * infrun.c: (normal_stop): When stopped for the completion of an
8606 inferior function call, verify the expected stack frame kind.
8607 (inferior_thread_state): New struct.
8608 (save_inferior_thread_state,restore_inferior_thread_state,
8609 do_restore_inferior_thread_state_cleanup,
8610 make_cleanup_restore_inferior_thread_state,
8611 discard_inferior_thread_state,
8612 get_inferior_thread_state_regcache): New functions.
8613 (inferior_status): Move stop_signal, stop_pc, registers to
8614 inferior_thread_state. Remove restore_stack_info.
8615 (save_inferior_status): Remove arg restore_stack_info.
8616 All callers updated. Remove saving of state now saved by
8617 save_inferior_thread_state.
8618 (restore_inferior_status): Remove restoration of state now done by
8619 restore_inferior_thread_state.
8620 (discard_inferior_status): Remove freeing of registers, now done by
8621 discard_inferior_thread_state.
8623 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8625 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
8626 at a time, times NUM_TO_SCROLL.
8627 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
8628 fetch the selected frame if there is no stack.
8630 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8633 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
8635 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
8636 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
8637 is thrown while handling an event, finish the thread state.
8638 (normal_stop): Use finish_thread_state cleanup.
8639 * infcmd.c (run_command_1): If an error is thrown while starting
8640 the inferior, finish the thread state.
8642 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8644 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
8645 skip breakpoints without a location (pending breakpoints).
8647 2009-01-18 Pedro Alves <pedro@codesourcery.com>
8650 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
8652 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
8654 * thread.c (thread_command): Move call to annotate_thread_changed
8656 (do_captured_thread_select): ... here, to avoid printing an
8657 annotation if the thread change generates an exception.
8659 2009-01-16 Joel Brobecker <brobecker@adacore.com>
8661 * NEWS: Document x86_64/MinGW as a new native configuration.
8663 2009-01-16 Joel Brobecker <brobecker@adacore.com>
8665 * NEWS: Move the documentation of "info os processes" to
8666 the appropriate section (documenting the new commands).
8668 2009-01-15 Doug Evans <dje@google.com>
8670 * target.h (target_signal_to_string): Make return type const char *.
8671 (target_signal_to_name): Ditto.
8672 (target_signal_from_name): Make arg const char *.
8673 * infrun.c (sig_print_info): Update.
8674 * signals/signals.c (signals): Make array and struct members const.
8675 (target_signal_to_string): Make return type const char *.
8676 (target_signal_to_name): Ditto.
8677 (target_signal_from_name): Make arg const char *.
8679 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8680 Tristan Gingold <gingold@adacore.com>
8682 * solist.h (struct target_so_ops): New member bfd_open.
8683 (solib_find): Add prototype.
8684 (solib_bfd_fopen): Add prototype.
8685 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
8686 from solib_bfd_open.
8687 (solib_bfd_open): Use ops->bfd_open override if present. Call
8688 solib_find and solib_bfd_open otherwise.
8690 * objfiles.h (OBJF_KEEPBFD): New define.
8691 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
8692 objfile flag is set.
8693 * solib.c (symbol_add_stub): Do not allocate second BFD for
8694 shared library; use OBJF_KEEPBFD flag on solib objfile.
8696 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8698 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
8700 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
8702 * value.h (address_of_variable): Add prototype.
8703 (locate_var_value): Remove prototype.
8705 * findvar.c (read_var_value): Do not attempt to default frame
8707 (locate_var_value): Remove function.
8708 * valops.c (value_of_variable): Retrieve selected frame for
8709 symbols that require a frame when called with NULL block.
8710 * valops.c (address_of_variable): New function.
8712 * eval.c (evaluate_subexp_for_address): Call address_of_variable
8713 instead of calling locate_var_value.
8714 (evaluate_subexp_with_coercion): Likewise.
8716 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
8718 * NEWS: Document "define" for prefixed commands.
8719 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
8720 show_user_1 for prefix commands.
8721 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
8722 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
8723 commands. Return the containing command list.
8724 (define_command, document_command): Update to handle prefix commands.
8725 (show_user_1): Add prefix and name arguments. Handle prefix
8727 * cli/cli-script.h (show_user_1): Update prototype.
8729 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
8731 * ser-mingw.c (console_select_thread): Add return to make
8733 (pipe_select_thread): Likewise.
8734 (file_select_thread): Likewise.
8736 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8738 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
8741 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8743 * remote.c (extended_remote_mourn_1): Invalidate our notion of
8744 current general thread.
8746 2009-01-14 Pedro Alves <pedro@codesourcery.com>
8748 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
8749 without a live selected thread.
8751 2009-01-14 Joel Brobecker <brobecker@adacore.com>
8753 Update the copyright notice of some of the files I missed
8754 in the previous copyright update.
8756 2009-01-14 Joel Brobecker <brobecker@adacore.com>
8758 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
8759 base address instead of casting it to DWORD.
8761 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
8763 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
8764 for NULL frame pointers.
8766 2009-01-13 Mark Kettenis <kettenis@gnu.org>
8768 * utils.c (host_address_to_string): Reimplement in a way that
8769 avoids the cast of the address to long.
8771 2009-01-13 Joel Brobecker <brobecker@adacore.com>
8773 * mdebugread.c (parse_symbol): Save the symbol private data
8774 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
8775 (psymtab_to_symtab_1): Likewise.
8776 (parse_procedure): Declare variable "e" only in the scope
8777 where it is used. Extract the symbol private data using
8780 2009-01-13 Jim Blandy <jimb@codesourcery.com>
8782 Abstract out common code for copying value locations.
8784 * value.h (set_value_component_location): New declaration.
8785 * value.c (set_value_component_location): New function.
8786 (value_primitive_field): Use it.
8787 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
8788 * valops.c (search_struct_field, value_slice): Same.
8789 * ada-lang.c (coerce_unspec_val_to_type)
8790 (ada_value_primitive_packed_val): Same.
8792 2009-01-13 Joel Brobecker <brobecker@adacore.com>
8794 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
8796 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
8798 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
8800 * i386-cygwin-tdep.c: Ditto.
8801 * i386-windows-nat.c: Ditto.
8802 * windows-nat.h: Ditto.
8803 * windows-tdep.c: Ditto.
8804 * windows-tdep.h: Ditto.
8805 * windows-nat.c: Ditto.
8806 (cygwin_load_start): Redefine as CORE_ADDR.
8807 (cygwin_load_end): Ditto.
8808 (windows_make_so): Coerce result of address arithmetic to uintptr_t
8809 before coercing to CORE_ADDR to avoid a compiler warning.
8810 (handle_exception): Define addr as CORE_ADDR and coerce
8811 ExceptionAddress to uintptr_t before assigining to avoid a compiler
8813 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
8816 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8818 Fix linking with --enable-targets=all:
8819 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
8820 (HFILES_NO_SRCDIR): Add windows-tdep.h.
8821 (ALLDEPFILES): Add windows-tdep.c.
8823 2009-01-11 Chris Faylor <me.gdb@cgf.cx>
8825 * win32-nat.h: Delete.
8826 * windows-nat.h: Rename from win32-nat.h.
8827 * win32-nat.c: Delete.
8828 * windows-nat.c: Rename from win32-nat.c.
8829 * win32-termcap.c: Delete.
8830 * windows-termcap.c: Rename from win32-termcap.c.
8831 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
8832 * configure.ac: Handle rename from win32-termcap.c ->
8834 * configure: Regenerate.
8835 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
8836 -> windows-termcap.c.
8837 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
8839 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
8840 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
8842 (win32_make_so): Handle cygwin compiler warning due to change of
8843 load_addr from DWORD to LPVOID.
8844 (handle_load_dll): Use %p in format string to properly print address
8845 and avoid a compiler warning.
8846 (DEBUG_EXCEPTION_SIMPLE): Ditto.
8847 (handle_exception): Ditto.
8848 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
8849 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
8851 * config/i386/mingw.mh: Ditto.
8852 * config/i386/mingw64.mh: Ditto.
8854 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8856 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
8857 arrayprint_recurse_level to a parameter. Update all the callers. New
8858 comment at autovariables.
8860 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
8862 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
8865 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8867 * target.c (target_xfer_partial): Use host_address_to_string to
8868 print the address of readbuf and writebuf. Cast the address of
8869 elements inside the myaddr buffer into intptr_t.
8870 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
8871 Cast the address of elements inside the myaddr buffer into
8874 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8876 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
8877 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
8878 * configure.host, configure.tgt: Add handling for x86_64/windows.
8879 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
8880 and amd64-windows-tdep.c.
8882 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8884 * win32-tdep.h, win32-tdep.c: New files.
8885 * i386-cygwin-tdep.h: Delete.
8886 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
8888 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
8889 * win32-nat.c: Likewise.
8890 * configure.tgt: Add win32-tdep.o to the list of target object
8891 files for i386-cygwin and i386-mingw targets.
8893 2009-01-11 Joel Brobecker <brobecker@adacore.com>
8895 * win32-nat.h: New file.
8896 * win32-nat.c (mappings): Initialize to NULL.
8897 (win32_set_context_register_offsets): New function.
8898 * i386-windows-nat.c: New file.
8899 (mappings): Moved here from win32-nat.c.
8900 (_initialize_i386_windows_nat): New function.
8901 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
8902 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
8904 2009-01-09 Andreas Schwab <schwab@suse.de>
8906 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
8908 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
8910 * gdbtypes.c (append_composite_type_field): Correct the location of
8913 2009-01-09 Pedro Alves <pedro@codesourcery.com>
8915 * defs.h (deprecated_error_hook): Delete declaration.
8916 * interps.c (clear_interpreter_hooks): Adjust.
8917 * remote-sim.c (gdb_os_error): Don't try to call
8918 deprecated_error_hook. No need to call exit anymore.
8919 * top.c (deprecated_error_hook): Delete.
8921 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8923 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
8924 to print the address of the gdbarch pointer.
8926 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8928 * gdbarch.sh: Fix all the compilation errors on amd64-windows
8929 due to casting a pointer to a long when printing a function
8930 address. Instead, use host_address_to_string to convert our
8931 address to a string.
8932 * gdbarch.c: Regenerate.
8934 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8936 * event-top.c (async_disconnect, async_stop_sig): use "raise"
8937 instead of "kill" to raise a signal.
8939 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8941 * win32-nat.c (get_module_name): Change the type of parameter
8942 "base_address" to LPVOID. Remove unnecessary cast.
8943 (struct lm_info): Change type of load_addr to LPVOID.
8944 (win32_make_so): Change the type of parameter "load_addr"
8945 to LPVOID. Remove some unnecessary casts.
8946 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
8947 (win32_xfer_shared_libraries): Add missing cast.
8949 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8951 * win32-nat.c (has_detach_ability, set_process_privilege):
8952 Cast the result of GetProcAddress to (void *) to avoid
8953 a compilation warning.
8955 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8957 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
8960 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8962 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
8963 definition of local variable "done".
8964 (info_w32_command, handle_exception): Remove unnecessary cast.
8966 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8968 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
8969 DebugSetProcessKillOnExit. Update all uses in this file.
8970 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
8971 Update all uses in this file.
8973 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8975 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
8976 and use it when pushing the target.
8977 (win32_attach, win32_create_inferior): Update call to
8978 do_initial_win32_stuff.
8979 (win32_detach, win32_mourn_inferior): Use our ops parameter
8980 instead of the global win32_ops to unpush the target.
8982 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8984 * ser-mingw.c (ser_windows_open): Use proper type when casting
8985 in call to _open_osfhandle.
8987 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
8989 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
8991 2009-01-09 Joel Brobecker <brobecker@adacore.com>
8993 * CONTRIBUTE: Minor reformatting.
8995 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
8997 * MAINTAINERS: Add myself to Write After Approval.
8998 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
9001 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
9003 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
9004 Call exit to make it obvious to GCC.
9006 2009-01-08 Tom Tromey <tromey@redhat.com>
9008 PR breakpoints/9350:
9009 * varobj.c (varobj_invalidate): Unconditionally free
9011 * symfile.c (syms_from_objfile): Free local_addr when returning
9013 * exec.c (exec_file_attach): Do cleanups before returning.
9014 (exec_file_command): Likewise.
9015 * corefile.c (reopen_exec_file): Do cleanups before returning.
9016 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
9018 (do_vec_free): New function.
9019 (update_global_location_list): Make a cleanup for old_locations.
9020 Do cleanups before returning. Remove unused variable 'e'.
9021 (find_condition_and_thread): Free result of parsing the
9023 (print_it_typical): Do cleanups before returning.
9024 (breakpoint_re_set_one): Always free sals.sals.
9026 2009-01-08 Joel Brobecker <brobecker@adacore.com>
9027 Emi Suzuki <emi-suzuki@tjsys.co.jp>
9029 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
9032 2009-01-07 Doug Evans <dje@google.com>
9034 * top.c (gdb_prompt_string): Delete, unused.
9036 2009-01-07 Pedro Alves <pedro@codesourcery.com>
9038 Delete ONE_PROCESS_WRITETEXT leftovers.
9040 * breakpoint.c (insert_bp_location): Delete process_warning
9042 (insert_breakpoint_locations): Adjust.
9043 (reattach_breakpoints): Adjust.
9044 * infrun.c (normal_stop): Drop "It might be running in another
9047 2009-01-07 Stan Shebs <stan@codesourcery.com>
9049 * config/pa/linux.mh (XDEPFILES): Remove.
9051 2009-01-07 Doug Evans <dje@google.com>
9053 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
9055 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9057 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
9058 spacing, a regression from 2008-04-22.
9060 2009-01-07 Joel Brobecker <brobecker@adacore.com>
9062 * utils.c (gdb_print_host_address): Adjust implementation to
9063 reuse host_address_to_string. Move comment explaining the conversion
9064 from host address to string from here...
9065 (host_address_to_string): ... to there.
9067 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
9069 * MAINTAINERS: Add myself for write after approval privileges.
9071 2009-01-06 Tom Tromey <tromey@redhat.com>
9073 * value.c (set_internalvar): Use value_free, not xfree.
9075 2009-01-06 Jim Blandy <jimb@red-bean.com>
9077 Check return values of functions declared with warn_unused_result
9078 attribute in GLIBC 2.8.
9079 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
9080 * inflow.c (check_syscall): New function.
9081 (new_tty): Use check_syscall to check return values from open and dup.
9082 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
9083 * main.c (captured_main): Call cwd after setting up gdb_stderr;
9084 check for errors from getcwd.
9085 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
9086 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
9087 (stdio_file_fputs): Same.
9088 * utils.c (internal_vproblem): abort if last-ditch error message
9091 * top.c (gdb_init): Don't set the current directory here; that's
9092 already been done in captured_main.
9094 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
9096 * ser-tcp.c: Adjust includes.
9097 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
9098 (tcp_auto_retry, tcp_retry_limit): Declare.
9099 (TIMEOUT): Remove, in favor of tcp_retry_limit.
9100 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
9101 (wait_for_connect): New function.
9102 (net_open): Use it. Add auto-retry logic.
9103 (set_tcp_cmd, show_tcp_cmd): New functions.
9104 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
9105 and "set/show tcp connect-timeout" commands.
9106 * NEWS: Document new commands.
9108 2009-01-05 Tom Tromey <tromey@redhat.com>
9110 * python/python-internal.h (Py_ssize_t): Define as int.
9112 2009-01-05 Jim Blandy <jimb@red-bean.com>
9114 * MAINTAINERS: Fix my e-mail address as steering committee member.
9116 2009-01-03 Joel Brobecker <brobecker@adacore.com>
9118 Updated copyright notices for most files.
9120 2009-01-03 Joel Brobecker <brobecker@adacore.com>
9122 * top.c (print_gdb_version): Update copyright year.
9124 2009-01-03 Joel Brobecker <brobecker@adacore.com>
9126 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
9128 2009-01-01 Pedro Alves <pedro@codesourcery.com>
9130 PR breakpoints/9681:
9131 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
9132 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
9133 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
9134 retrow all other exceptions.
9136 For older changes see ChangeLog-2008.
9142 version-control: never