* gdbarch.sh (target_gdbarch): New global variable.
[external/binutils.git] / gdb / ChangeLog
1 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * gdbarch.sh (target_gdbarch): New global variable.
4         (deprecated_current_gdbarch_select_hack): Set it.
5         * gdbarch.c, gdbarch.h: Regenerate.
6
7         * arch-utils.c (gdbarch_update_p): Use target_gdbarch instead
8         of current_gdbarch.
9         * target-descriptions.c (target_find_description): Likewise.
10         * arm-tdep.c (arm_update_current_architecture): Likewise.
11         (show_fp_model, arm_show_abi, arm_show_fallback_mode, 
12         arm_show_force_mode): Likewise.
13         * mips-tdep.c (show_mask_address, show_mipsfpu_command,
14         show_mips_abi): Likewise.
15         * mep-tdep.c (me_module_register_set, current_me_module): Likewise.
16
17         * target.c (target_translate_tls_address): Use target_gdbarch
18         instead of current_gdbarch.
19         * remote.c (struct packet_reg): Likewise.
20         (get_remote_arch_state, packet_reg_from_regnum,
21         packet_reg_from_pnum, remote_check_symbols, remote_wait,
22         remote_address_masked, remote_insert_breakpoint,
23         remote_insert_hw_breakpoint, remote_read_description): Likewise.
24         * remote-m32r-sdi.c (m32r_resume, m32r_wait): Likewise.
25         * remote-mips.c (mips_open, mips_common_breakpoint): Likewise.
26         * cris-tdep.c (cris_can_use_hardware_watchpoint): Likewise.
27
28         * solib.c (solib_open, solib_map_sections, solib_read_symbols,
29         solib_add, info_sharedlibrary_command, solib_address, 
30         solib_create_inferior_hook, in_solib_dynsym_resolve_code,
31         solib_global_lookup): Likewise.
32         * solib-frv.c (enable_break2, frv_relocate_main_executable): Likewise.
33         * solib-irix.c (irix_current_sos, irix_open_symbol_file_object):
34         Likewise.
35         * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
36         * solib-svr4.c (exec_entry_point, enable_break, svr4_free_so,
37         set_solib_svr4_fetch_link_map_offsets, svr4_fetch_link_map_offsets):
38         Likewise.
39         * nto-tdep.c (nto_find_and_open_solib, nto_init_solib_absolute_prefix,
40         nto_truncate_ptr): Likewise.
41         * mips-linux-tdep.c (mips_linux_in_dynsym_stub): Likewise.
42
43 2008-08-26  Luis Machado  <luisgpm@br.ibm.com>
44
45         * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
46         (ppc_linux_vmx_regset_sections): New structure.
47         (ppc_linux_fp_regset_sections): New structure.
48         (ppc_linux_init_abi): Select core-file regset  based on target
49         features.
50
51 2008-08-26  Ulrich Weigand  <uweigand@de.ibm.com>
52
53         * target.c (debug_print_register): Use regcache_raw_collect
54         instead of regcache_cooked_read.  Only handle raw registers.
55
56 2008-08-25  Pedro Alves  <pedro@codesourcery.com>
57
58         * cp-name-parser.y: Include config.h before system headers.
59
60 2008-08-25  Ulrich Weigand  <uweigand@de.ibm.com>
61
62         * m88k-tdep.c: Update for unwinder changes.
63
64 2008-08-24  Tom Tromey  <tromey@redhat.com>
65
66         * s390-tdep.c (s390_address_class_type_flags): Use
67         TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1.
68         (s390_address_class_type_flags_to_name): Likewise.
69         (s390_address_class_name_to_type_flags): Likewise.
70
71 2008-08-24  Tom Tromey  <tromey@redhat.com>
72
73         * rs6000-tdep.c (rs6000_builtin_type_vec128): Don't use
74         TYPE_FLAGS.
75         * features/rs6000/powerpc-vsx32l.c
76         (initialize_tdesc_powerpc_vsx32l): Update.
77         * features/rs6000/powerpc-vsx32.c
78         (initialize_tdesc_powerpc_vsx32): Update.
79         * features/rs6000/powerpc-vsx64.c
80         (initialize_tdesc_powerpc_vsx64): Update.
81         * features/rs6000/powerpc-vsx64l.c
82         (initialize_tdesc_powerpc_vsx64l): Update.
83         * target-descriptions.c (maint_print_c_tdesc_cmd): Emit
84         TYPE_VECTOR, not TYPE_FLAGS.
85
86 2008-08-24  Tom Tromey  <tromey@redhat.com>
87
88         * xml-tdesc.c (tdesc_end_union): Update.
89         * stabsread.c (define_symbol): Update.
90         (read_type): Update.
91         (read_struct_type): Update.
92         (read_enum_type): Update.
93         * spu-tdep.c (spu_builtin_type_vec128): Update.
94         * sh-tdep.c (sh_push_dummy_call_fpu): Update.
95         (sh_push_dummy_call_nofpu): Update.
96         * mdebugread.c (parse_symbol): Update.
97         (parse_symbol): Update.
98         (parse_symbol): Update.
99         (upgrade_type): Update.
100         * jv-lang.c (java_lookup_class): Update.
101         * iq2000-tdep.c (iq2000_pointer_to_address): Update.
102         * i386-tdep.c (i386_mmx_type): Update.
103         (i386_sse_type): Update.
104         * gdbtypes.h (enum type_flag_value): New enum.
105         (enum type_instance_flag_value): New enum.
106         (TYPE_FLAG_UNSIGNED, TYPE_FLAG_NOSIGN, TYPE_FLAG_STUB,
107         TYPE_FLAG_TARGET_STUB, TYPE_FLAG_STATIC, TYPE_FLAG_PROTOTYPED,
108         TYPE_FLAG_INCOMPLETE, TYPE_FLAG_VARARGS, TYPE_FLAG_VECTOR,
109         TYPE_FLAG_FIXED_INSTANCE, TYPE_FLAG_STUB_SUPPORTED,
110         TYPE_FLAG_NOTTEXT): Now enum constants.
111         (TYPE_FLAG_CONST, TYPE_FLAG_VOLATILE, TYPE_FLAG_CODE_SPACE,
112         TYPE_FLAG_DATA_SPACE, TYPE_FLAG_ADDRESS_CLASS_1,
113         TYPE_FLAG_ADDRESS_CLASS_2): Remove.
114         (TYPE_INSTANCE_FLAG_CONST, TYPE_INSTANCE_FLAG_VOLATILE,
115         TYPE_INSTANCE_FLAG_CODE_SPACE, TYPE_INSTANCE_FLAG_DATA_SPACE,
116         TYPE_INSTANCE_FLAG_ADDRESS_CLASS_1,
117         TYPE_INSTANCE_FLAG_ADDRESS_CLASS_2): New constants.
118         (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB, TYPE_TARGET_STUB,
119         TYPE_STATIC, TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_VARARGS,
120         TYPE_VECTOR, TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED,
121         TYPE_NOTTEXT): Update.
122         (TYPE_FLAG_ADDRESS_CLASS_ALL): Remove.
123         (TYPE_INSTANCE_FLAG_ADDRESS_CLASS_ALL): New define.
124         (TYPE_VOLATILE, TYPE_CODE_SPACE, TYPE_DATA_SPACE,
125         TYPE_ADDRESS_CLASS_1, TYPE_ADDRESS_CLASS_2,
126         TYPE_ADDRESS_CLASS_ALL): Update.
127         (struct main_type) <flags>: Remove.
128         <flag_unsigned, flag_nosign, flag_stub, flag_target_stub,
129         flag_static, flag_prototyped, flag_incomplete, flag_varargs,
130         flag_vector, flag_stub_supported, flag_nottext,
131         flag_fixed_instance>: New fields.
132         <nfields, vptr_fieldno>: Move earlier.
133         (TYPE_FLAGS): Remove.
134         * gdbtypes.c (make_pointer_type): Update.
135         (address_space_name_to_int): Update.
136         (address_space_int_to_name): Update.
137         (make_type_with_address_space): Update.
138         (make_cv_type): Update.
139         (create_range_type): Update.
140         (get_discrete_bounds): Update.
141         (create_set_type): Update.
142         (make_vector_type): Update.
143         (smash_to_method_type): Update.
144         (check_typedef): Update.
145         (check_stub_method): Update.
146         (init_type): Individually assign flag fields.
147         (recursive_dump_type): Don't print entire TYPE_FLAGS field.  Do
148         print TYPE_FIXED_INSTANCE, TYPE_STUB_SUPPORTED, and TYPE_NOTTEXT.
149         (copy_type_recursive): Copy the entire main type.  Don't use
150         TYPE_FLAGS.
151         * features/rs6000/powerpc-altivec64l.c
152         (initialize_tdesc_powerpc_altivec64l): Update.
153         * features/rs6000/powerpc-altivec64.c
154         (initialize_tdesc_powerpc_altivec64): Update.
155         * features/rs6000/powerpc-altivec32l.c
156         (initialize_tdesc_powerpc_altivec32l): Update.
157         * features/rs6000/powerpc-altivec32.c
158         (initialize_tdesc_powerpc_altivec32): Update.
159         * features/rs6000/powerpc-7400.c (initialize_tdesc_powerpc_7400):
160         Update.
161         * features/arm-with-iwmmxt.c (initialize_tdesc_arm_with_iwmmxt):
162         Update.
163         * dwarf2read.c (read_structure_type): Update.
164         (read_enumeration_type): Likewise.
165         (process_enumeration_scope): Likewise.
166         (read_tag_pointer_type): Likewise.
167         (read_subroutine_type): Likewise.
168         (read_subroutine_type): Likewise.
169         (read_base_type): Likewise.
170         * coffread.c (coff_read_enum_type): Update.
171         * ada-valprint.c (adjust_type_signedness): Update.
172         * ada-typeprint.c (print_record_field_types): Update.
173         * ada-lang.c (packed_array_type): Update.
174         (empty_record): Don't reset TYPE_FLAGS.
175         (ada_template_to_fixed_record_type_1): Update.
176         (ada_template_to_fixed_record_type_1): Likewise.
177         (template_to_static_fixed_type): Likewise.
178         (to_record_with_fixed_variant_part): Likewise.
179         (to_fixed_record_type): Likewise.
180         (to_fixed_array_type): Likewise.
181         (to_static_fixed_type): Likewise.
182
183 2008-08-23  Jim Blandy  <jimb@redhat.com>
184
185         PR macros/607:
186         * symmisc.c (print_symbol_bcache_statistics): Include statistics
187         for the macro bcache.
188
189 2008-08-23  Tom Tromey  <tromey@redhat.com>
190
191         * macrotab.h (struct macro_definition) <kind>: Shrink to one bit.
192         (argc): Now 31 bits.
193
194 2008-08-22  Tom Tromey  <tromey@redhat.com>
195
196         * NEWS: Move macro entries back under "New commands".
197
198 2008-08-22  Ulrich Weigand  <uweigand@de.ibm.com>
199
200         * breakpoint.c (create_overlay_event_breakpoint): Rename to ...
201         (create_overlay_event_breakpoint_1): ... this.  Add OBJFILE parameter.
202         (create_overlay_event_breakpoint): Loop over all objfiles to install
203         multiple instances of the overlay event breakpoint if present.
204
205 2008-08-22  Ulrich Weigand  <uweigand@de.ibm.com>
206
207         * spu-tdep.c (spu_overlay_new_objfile): Only consider SPU objfiles.
208         (info_spu_event_command): Command only supported on SPU architecture.
209         (info_spu_signal_command): Likewise.
210         (info_spu_mailbox_command): Likewise.
211         (info_spu_dma_command): Likewise.
212         (info_spu_proxydma_command): Likewise.
213
214 2008-08-22  Ulrich Weigand  <uweigand@de.ibm.com>
215
216         * infrun.c (adjust_pc_after_break): Do not call get_thread_regcache
217         if the thread has already exited.
218
219 2008-08-22  Pedro Alves  <pedro@codesourcery.com>
220
221         * infrun.c (proceed): Move back setting previous_inferior_ptid
222         from here ...
223         (wait_for_inferior): ... to here.
224         (fetch_inferior_event): ... and here.
225
226 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
227
228         * gdbarch.sh: Include "regcache.h" into gdbarch.c.
229         (deprecated_current_gdbarch_select_hack): Call registers_changed
230         instead of reinit_frame_cache.
231         * gdbarch.c: Regenerate.
232
233 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
234
235         * elfread.c (elf_symtab_read): Do not relocate thread-local symbols.
236
237 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
238
239         * xcoffread.c (SYMNAME_ALLOC): Correct syntax.
240
241 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
242
243         * findvar.c (locate_var_value): Do not call get_frame_arch
244         with a NULL frame argument.
245
246 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
247
248         * frame.h (frame_map_regnum_to_name): Remove prototype.
249         (frame_map_name_to_regnum): Remove prototype.
250         * frame.c (frame_map_regnum_to_name): Remove.
251         (frame_map_name_to_regnum): Remove.
252         (frame_unwind_register_value): Use user_reg_map_regnum_to_name
253         instead of frame_map_regnum_to_name.
254         * ax-gdb.c: Include "user-regs.h".
255         (gen_expr): Use user_reg_map_name_to_regnum instead of
256         frame_map_name_to_regnum.
257         * eval.c:  Include "user-regs.h".
258         (evaluate_subexp_standard): Use user_reg_map_name_to_regnum
259         instead of frame_map_name_to_regnum.
260         * infcmd.c (registers_info): Likewise.
261         * parse.c: Include "user-regs.h".
262         (write_dollar_variable): Use user_reg_map_name_to_regnum
263         instead of frame_map_name_to_regnum.
264         * tracepoint.c: Include "user-regs.h".
265         (encode_actions): Use user_reg_map_name_to_regnum
266         instead of frame_map_name_to_regnum.
267         * valops.c: Include "user-regs.h".
268         (value_fetch_lazy): Use user_reg_map_regnum_to_name instead
269         of frame_map_regnum_to_name.
270
271 2008-08-21  Ulrich Weigand  <uweigand@de.ibm.com>
272
273         * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Read
274         and manually relocate .opd contents from BFD instead of reading
275         them from target memory.
276
277 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
278
279         * dwarf2read.c (processing_current_prefix): Delete static
280         variable.
281         (process_full_comp_unit): Do not set processing_current_prefix.
282         (dwarf2_full_name): New function.
283         (read_func_scope): Do not set processing_current_prefix.  Use
284         determine_prefix.
285         (read_structure_type): Do not set processing_current_prefix.  Remove
286         unused inner cleanup.
287         (process_structure_scope): Do not set processing_current_prefix.
288         (read_enumeration_type): Use dwarf2_full_name.
289         (determine_class_name): Return a const char *.  Put the result
290         on the objfile obstack.  Use dwarf2_full_name.
291         (read_namespace_type): New function.
292         (read_namespace): Do not create the type here.  Use
293         determine_prefix.
294         (read_typedef): Use dwarf2_full_name.  Do not pass the name
295         to init_type.
296         (read_base_type): Do not pass the name to init_type.  Handle
297         TYPE_FLAG_NOSIGN.
298         (read_unspecified_type): Do not pass the name to init_type.
299         (new_symbol): Use dwarf2_full_name instead of
300         processing_current_prefix.
301         (read_type_die): Do not set processing_current_prefix.  Handle
302         DW_TAG_namespace.
303         (determine_prefix): Handle specifications.  Return the result
304         on the objfile obstack.  Handle unions correctly.
305
306 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
307
308         * buildsym.c (add_symbol_to_list): Do not call
309         cp_scan_for_anonymous_namespaces here.
310         (finish_block): Do not call cp_set_block_scope here.
311         * cp-namespace.c (processing_has_namespace_info)
312         (processing_current_prefix): Delete.
313         (cp_initialize_namespace): Do not initialize
314         processing_has_namespace_info.
315         (cp_scan_for_anonymous_namespaces): Use SYMBOL_DEMANGLED_NAME.  Do
316         not check processing_has_namespace_info.
317         (cp_set_block_scope): Take prefix and namespace info flag as
318         arguments.  Honor namespaces regardless of a demangled name.
319         * cp-support.h (processing_has_namespace_info)
320         (processing_current_prefix): Delete declarations.
321         (cp_set_block_scope): Update prototype.
322         * dwarf2read.c (processing_has_namespace_info)
323         (processing_current_prefix): New static variables.
324         (read_file_scope): Initialize processing_has_namespace_info.
325         (read_func_scope): Call cp_set_block_scope for C++.
326         (new_symbol): Call cp_scan_for_anonymous_namespaces for C++.
327         * symtab.c (symbol_demangled_name): Accept a const argument.
328         * symtab.h (symbol_demangled_name): Update prototype.
329
330 2008-08-21  Daniel Jacobowitz  <dan@codesourcery.com>
331
332         * ax-gdb.c (gen_var_ref): Use SYMBOL_LINKAGE_NAME.
333         * blockframe.c (find_pc_partial_function): Likewise.
334         * buildsym.c (find_symbol_in_list): Likewise.
335         * c-valprint.c (c_val_print): Likewise.
336         * coffread.c (patch_opaque_types, process_coff_symbol): Likewise.
337         (coff_read_enum_type): Likewise.  Use SYMBOL_SET_LINKAGE_NAME.
338         * cp-support.c (cp_remove_params): Renamed from remove_params and
339         made global.
340         (overload_list_add_symbol): Update call to remove_params.
341         * cp-support.h (cp_remove_params): Declare.
342         * dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME.
343         (dwarf2_const_value): Use SYMBOL_PRINT_NAME.
344         * expprint.c (dump_subexp_body_standard): Likewise.
345         * f-valprint.c (info_common_command, there_is_a_visible_common_named):
346         Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME
347         for messages.
348         * findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME.
349         * gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
350         * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
351         (hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find
352         symbols and SYMBOL_PRINT_NAME for messages.
353         * jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME.
354         * linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME.
355         * mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and
356         SYMBOL_SET_LINKAGE_NAME.
357         (mylookup_symbol): Use SYMBOL_LINKAGE_NAME.
358         * minsyms.c (add_minsym_to_demangled_hash_table): Use
359         SYMBOL_SEARCH_NAME.
360         (lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or
361         SYMBOL_MATCHES_SEARCH_NAME, depending on the pass.
362         * objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME.
363         * printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME.
364         (address_info): Use SYMBOL_PRINT_NAME for messages and
365         SYMBOL_LINKAGE_NAME for lookups.
366         * sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages.
367         * stabsread.c (patch_block_stabs, define_symbol)
368         (read_type, read_enum_type, common_block_end)
369         (cleanup_undefined_types_1, scan_file_globals): Use
370         SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS,
371         and SYMBOL_PRINT_NAME.
372         * stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME.
373         (print_frame, frame_info): Use SYMBOL_PRINT_NAME for output.  Use
374         cp_remove_params instead of cplus_demangle.
375         (print_block_frame_labels, print_frame_arg_vars): Use
376         SYMBOL_LINKAGE_NAME.
377         * symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and
378         SYMBOL_LINKAGE_NAME.
379         (dump_symtab_1, print_symbol, print_partial_symbols)
380         (maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME.
381         * symtab.h (DEPRECATED_SYMBOL_NAME): Delete.
382         (SYMBOL_SET_LINKAGE_NAME): New.
383         (SYMBOL_SET_NAMES): Add a comment.
384         * tracepoint.c (set_traceframe_context, validate_actionline)
385         (collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for
386         lookups and SYMBOL_PRINT_NAME for output.
387         * typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME.
388         * xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.
389
390 2008-08-21  Pedro Alves  <pedro@codesourcery.com>
391
392         * arm-tdep.c (arm_pc_is_thumb): Use obj_section_addr.
393         * hppa-hpux-tdep.c (hppa_hpux_find_dummy_bpaddr): Likewise.
394         * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Use
395         obj_section_addr and obj_section_endaddr.
396         * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Likewise.
397         * hppabsd-tdep.c (hppabsd_find_global_pointer): Likewise.
398         * ia64-tdep.c (ia64_find_global_pointer): Likewise.
399         (find_extant_func_descr): Likewise.
400         * solib-frv.c (frv_relocate_main_executable): Use
401         obj_section_addr.
402         * xstormy16-tdep.c (xstormy16_find_jmp_table_entry): Use
403         obj_section_addr and obj_section_endaddr.
404
405 2008-08-21  Paul N. Hilfinger  <hilfinger@adacore.com>
406
407         * NEWS: Amplify last entry on boolean types in Ada.
408
409 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
410
411         * dwarf2read.c (die_specification, dwarf2_extension, follow_die_ref):
412         Make the dwarf2_cu * parameter output as well as input.  Update it if
413         we follow a reference to another CU.
414         (read_func_scope, determine_class_name, namespace_name, dwarf2_attr)
415         (die_type, die_containing_type): Update calls to changed functions.
416         Use the returned CU along with the returned DIE.
417         (read_namespace): Use dwarf2_attr instead of dwarf2_extension.
418
419 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
420
421         * dwarf2read.c (queue_comp_unit): Take an objfile argument.  Read
422         in the DIEs here.
423         (process_queue): Do not read in the DIEs here.
424         (psymtab_to_symtab_1): Update call to queue_comp_unit.
425         (read_full_die): Do not call queue_comp_unit from here.
426         (maybe_queue_comp_unit): New function.
427         (follow_die_ref): Use it.
428
429 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
430
431         * dwarf2read.c (struct attribute): Move earlier.
432         (struct die_info): Change attrs to a trailing array.
433         (dwarf_alloc_die): Take the number of attributes.  Allocate space
434         for them.
435         (read_full_die): Update call to dwarf_alloc_die.  Do not manually
436         allocate attributes.
437
438 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
439
440         * dwarf2read.c (REF_HASH_SIZE): Delete.
441         (struct dwarf2_cu): Replace die_ref_table with die_hash.
442         (struct die_info): Remove next_ref.
443         (store_in_ref_table): Remove offset argument.  Rewrite to use
444         htab_find_slot_with_hash.
445         (die_hash, die_eq): New.
446         (read_comp_unit): Allocate the die_hash.
447         (read_die_and_children): Update call to store_die_ref.
448         (follow_die_ref): Rewrite to use htab_find_with_hash.
449
450 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
451
452         * dwarf2read.c (free_die_list, copy_die): Delete.
453         (dwarf_alloc_die): Take a CU argument.  Allocate the new DIE
454         on the obstack.
455         (read_full_die): Update call to dwarf_alloc_die.  Allocate
456         attributes on the CU obstack.
457         (free_one_comp_unit): Do not call free_die_list.
458
459 2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
460
461         * dwarf2read.c (read_die_and_children): Ignore NULL DIEs.
462         (read_die_and_siblings): Likewise.  Do not add padding DIEs to the
463         sibling list.
464         (read_full_die): Do not allocate DIEs for abbrev 0.
465         (follow_die_ref): Correct error message.
466
467 2008-08-20  Pedro Alves  <pedro@codesourcery.com>
468
469         * linespec.c (symtab_from_filename): Also throw NOT_FOUND_ERROR if
470         there are no symbols loaded, instead of throwing a generic error.
471         (decode_variable): Likewise.
472
473 2008-08-20  Pedro Alves  <pedro@codesourcery.com>
474
475         * objfiles.h (struct obj_section): Remove addr and endaddr fields.
476         (obj_section_offset, obj_section_addr, obj_section_endaddr): New
477         macros.
478         * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr
479         and offset.  Use size_t instead of unsigned long.
480         (build_objfile_section_table): Use size_t instead of unsigned
481         long.
482         (objfile_relocate): Don't relocate s->addr and s->endaddr, they're
483         gone.
484         (find_pc_sect_section): Use obj_section_addr and
485         obj_section_endaddr.
486         * symfile.c (symfile.c): Remove code that maps sections
487         offsets in "addr" to the object's sections.
488         * blockframe.c (find_pc_partial_function): Use obj_section_endaddr.
489         * gcore.c (gcore_create_callback): Use obj_section_addr and
490         obj_section_endaddr.
491         * maint.c (print_objfile_section_info): Likewise.
492         * printcmd.c (sym_info): Use obj_section_addr and
493         obj_section_endaddr.
494         * symtab.c (fixup_section): Likewise.
495
496 2008-08-20  Mark Kettenis  <kettenis@gnu.org>
497
498         * sparc-tdep.c: Make some comments catch up with reality.
499
500 2008-08-20  Vladimir Prus  <vladimir@codesourcery.com>
501
502         * NEWS: Mention 'set target-async'
503
504 2008-08-19  Vladimir Prus  <vladimir@codesourcery.com>
505
506         * infrun.c (resume): If the thread is placed to the deferred step
507         queue, mark it as running.
508
509 2008-08-19  Vladimir Prus  <vladimir@codesourcery.com>
510
511         Make sure target supports non-stop.
512         * infcmd.c (run_command_1, attach_command): If non-stop mode
513         is requested, verify the target supports it.
514         * linux-nat.c (linux_nat_supports_non_stop): New.
515         (linux_nat_add_target): Register the above.
516         * target.c (find_default_supports_non_stop)
517         (target_supports_non_stop): New.
518         (init_dummy_target): Register find_default_supports_non_stop.
519         * target.h (struct target_ops): New field to_supports_non_stop.
520         (target_supports_non_stop): New.
521
522 2008-08-19  Pedro Alves  <pedro@codesourcery.com>
523             Vladimir Prus  <vladimir@codesourcery.com>
524
525         * target.c (target_async_permitted, target_async_permitted_1)
526         (set_maintenance_target_async_permitted)
527         (show_maintenance_target_async_permitted): New.
528         (initialize_targets): Register 'set target-async'.
529         * target.h (target_async_permitted): Declare.
530         * linux-nat.c (linux_nat_async_enabled)
531         (linux_nat_async_permitted, set_maintenance_linux_async_permitted)
532         (show_maintenance_linux_async_permitted): Remove.
533         (sigchld_handler, linux_nat_is_async_p, linux_nat_can_async_p)
534         (get_pending_events, linux_nat_async): Use target_async_permitted.
535         (linux_nat_set_async_mode): Remove, moving the only used bits
536         into...
537         (linux_nat_setup_async): This.
538         (_initialize_linux_nat): Do not register 'maint set linux-async'.
539         Use linux_nat_setup_async.
540         * remote.c (remote_async_permitted, remote_async_permitted_set)
541         (set_maintenance_remote_async_permitted)
542         (show_maintenance_remote_async_permitted): Remove.
543         (remote_open_1, remote_terminal_inferior, remote_can_async_p)
544         (remote_is_async_p): Use target_async_permitted.
545         (_initialize_remote): Don't register 'main set remote-async'.
546         * mi/mi-cmds.c (mi_cmds): Register -list-target-features.
547         * mi/mi-cmds.h (mi_cmd_list_target_features): New.
548         * mi/mi-main.c (mi_cmd_list_target_features): New.
549
550 2008-08-19  Vladimir Prus  <vladimir@codesourcery.com>
551
552         * target.c (maybe_kill_then_attach)
553         (maybe_kill_then_create_inferior): Remove.
554         (update_current_target): Do not default to_attach,
555         to_create_inferiour, to_is_async_p.
556
557 2008-08-19  Paul N. Hilfinger  <hilfinger@adacore.com>
558         
559         Changes for supporting boolean types in debugging data.
560         * ada-lang.c (discrete_type_high_bound,discrete_type_low_bound): Change 
561         API to return LONGEST values rather than struct values.
562         (ada_evaluate_subexp): Change to use new API of discrete_type_low_bound
563         and discrete_type_high_bound.
564         (to_fixed_range_type): Create a range type in cases where 
565         argument is base type and its limits are representable as ints.
566         (ada_is_modular_type): Correct so that base type must be integral.
567         * ada-lex.l (TRUEKEYWORD,FALSEKEYWORD): Make 'true' and 'false' 
568         keywords when they appear alone, since we are phasing out 
569         direct representation of these identifiers in debugging data.
570         * ada-exp.y: Define 'true' and 'false' as primaries.
571         (type_boolean): New function.
572         (type_int,type_long,type_long_long,type_floattype_double)
573         (type_long_double): Remove uses of current_gdbarch for consistency
574         with type_boolean.
575         (write_int): Change comment to indicate that it might write boolean 
576         constant as well.
577         * ada-typeprint.c (ada_print_type): Print '(false, true)' for boolean
578         type, since will no longer be represented as enumerated type in 
579         debugging data.
580         * ada-valprint.c (print_optional_low_bound): Handle boolean case
581         as well.
582         * NEWS: Note support boolean types.
583         
584 2008-08-18  Pedro Alves  <pedro@codesourcery.com>
585
586         * bsd-uthread.c (bsd_uthread_close): New.
587         (bsd_uthread_deactivate): Don't cleanup here, just unpush the
588         target.
589         (bsd_uthread_solib_loaded): Fix typo.
590         (bsd_uthread_target): Register bsd_uthread_close.
591
592 2008-08-18  Pedro Alves  <pedro@codesourcery.com>
593
594         * corelow.c (core_open): Assume there was no upper layer left
595         behind from a previous inferior.
596         * target.c (pop_all_targets): Rename to ...
597         (pop_all_targets_above): ... this.  Add a target stratum
598         parameter.  Use it instead of hardcoding the dummy_stratum.
599         (pop_all_targets): New, defer to pop_all_targets_above.
600         (target_preopen): Use pop_all_targets_above.
601         * target.h (pop_all_targets_above): Declare.
602
603 2008-08-18  Pedro Alves  <pedro@codesourcery.com>
604
605         * gdbthread.h (thread_change_ptid): Declare.
606         * infrun.c (infrun_thread_ptid_changed): New.
607         (_initialize_infrun): Attach infrun_thread_ptid_changed to the
608         thread_ptid_changed observer.
609         * regcache.c (regcache_thread_ptid_changed): New.
610         (_initialize_regcache): Attach regcache_thread_ptid_changed to the
611         thread_ptid_changed observer.
612         * thread.c (thread_change_ptid): New.
613
614 2008-08-18  Tom Tromey  <tromey@redhat.com>
615
616         * symfile.c (reread_symbols): Update.
617         * solib-sunos.c (allocate_rt_common_objfile): Update.
618         * objfiles.c (allocate_objfile): Update.
619         * objfiles.h (struct objfile) <md, mmfd, deprecated_obj_private>:
620         Remove.
621
622 2008-08-18  Tom Tromey  <tromey@redhat.com>
623
624         * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's
625         obstack.
626
627 2008-08-18  Daniel Jacobowitz  <dan@codesourcery.com>
628
629         * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
630         lr_register.
631         (rs6000_in_function_epilogue_p): Check for bctr.
632         (skip_prologue): Initialize lr_register.  Set lr_reg to a register
633         number.  Set gpr_mask and used_bl.  Continue scanning while some
634         expected registers are not saved.  Set lr_register if LR is not
635         stored.
636         (rs6000_frame_cache): Handle gpr_mask and lr_register.
637
638 2008-08-17  Tom Tromey  <tromey@redhat.com>
639
640         PR gdb/1535:
641         * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): New macros.
642         (ep_find_event_name_end): Remove.
643         (catch_fork_temporary, catch_vfork_temporary,
644         catch_fork_permanent, catch_vfork_permanent): New constants.
645         (catch_vfork, catch_fork): Remove.
646         (catch_fork_command_1): Add 'command' argument.  Remove
647         'fork_kind' and 'tempflag'.  Handle NULL 'arg'.  Update switch for
648         all cases.
649         (catch_exec_command_1): Add 'command' argument; remove
650         'tempflag'.  Handle NULL 'arg'.
651         (catch_load_command_1): Likewise.
652         (catch_unload_command_1): Likewise.
653         (catch_ada_exception_command): Likewise.
654         (catch_assert_command): Likewise.
655         (catch_catch_command): New function.
656         (catch_throw_command): Likewise.
657         (catch_command_1): Remove.
658         (catch_command): Just call error.
659         (tcatch_command): Likewise.
660         (catch_cmdlist): New global.
661         (tcatch_cmdlist): Likewise.
662         (add_catch_command): New function.
663         (_initialize_breakpoint): Create "catch" and "tcatch" as prefix
664         commands.  Create all catch sub-commands.
665
666 2008-08-17  Pedro Alves  <pedro@codesourcery.com>
667
668         * gdbthread.h: Add comments.
669         * stack.c (get_selected_block): Return 0 on an exited thread.
670         * top.c (execute_command): Check for is_stopped, not !is_running.
671         * event-top.c (command_handler): Likewise.
672
673 2008-08-16  Pedro Alves  <pedro@codesourcery.com>
674
675         * mi/mi-main.c (mi_cmd_exec_next, mi_cmd_exec_next_instruction)
676         (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
677         (mi_cmd_exec_finish): Remove "return".
678
679 2008-08-16  Pedro Alves  <pedro@codesourcery.com>
680
681         * target.h (pop_all_targets): Declare.
682         * target.c (pop_all_targets): New.
683         * top.c (quit_target): Pop all targets instead of just closing the
684         current.
685
686 2008-08-16  Vladimir Prus  <vladimir@codesourcery.com>
687             Thiago Jung Bauermann  <bauerman@br.ibm.com>
688
689         * cli-script.c (read_next_line): Add parse_commands argument.
690         (recurse_read_control_structure): Adapt to new read_next_line
691         signature.
692         (read_command_lines): Add parse_commands argument.
693         (define_command): Adapt to new read_command_lines signature.
694         (document_command): Likewise.
695         * breakpoint.c (commands_command): Likewise.
696         * defs.h (read_command_lines): Adjust function prototype.
697
698 2008-08-16  Paul N. Hilfinger  <hilfinger@adacore.com>
699
700         * ada-lang.c (pos_atr): Account for the possibility that the 
701         argument may be a reference.
702
703 2008-08-16  Paul N. Hilfinger  <hilfingr@adacore.com>
704
705         * xcoffread.c (scan_xcoff_symtab): Do not include global symbols
706         ('F' format) for @FIX names generated by the loader, retaining only
707         the minimal symbols (and no partial symbol tables) for these names.
708         Fixes warning messages about symbols that are found in partial 
709         symbol tables, but not full symbol tables.
710
711 2008-08-16  Pedro Alves  <pedro@codesourcery.com>
712
713         * infrun.c (fetch_inferior_event): Only call normal_stop if not
714         stopping quietly.
715
716 2008-08-15  Luis Machado  <luisgpm@br.ibm.com>
717
718         * rs6000-tdep: Include "features/rs6000/powerpc-vsx32.c".
719         Include "features/rs6000/powerpc-vsx64.c".
720         (ppc_supply_vsxregset): New function.
721         (ppc_collect_vsxregset): New function.
722         (IS_VSX_PSEUDOREG): New macro.
723         (IS_EFP_PSEUDOREG): New macro.
724         (vsx_register_p): New function.
725         (ppc_vsx_support_p): New function.
726         (rs6000_builtin_type_vec128): New function.
727         (rs6000_register_name): Hide upper halves of vs0~vs31.  Return
728         correct names for VSX registers and EFPR registers.
729         (rs6000_pseudo_register_type): Return correct types for VSX
730         and EFPR registers.
731         (rs6000_pseudo_register_reggroup_p): Return correct group for
732         VSX and EFPR registers.
733         (ppc_pseudo_register_read): Rename to dfp_pseudo_register_read.
734         (ppc_pseudo_register_write): Rename to dfp_pseudo_register_write.
735         (vsx_pseudo_register_read): New function.
736         (vsx_pseudo_register_write): New function.
737         (efpr_pseudo_register_read): New function.
738         (efpr_pseudo_register_write): New function.
739         (rs6000_pseudo_register_read): Call new VSX and EFPR read functions.
740         (rs6000_pseudo_register_write): Call new VSX and EFPR write functions.
741         (rs6000_gdbarch_init): Declare have_vsx.
742         Initialize new upper half VSX registers.
743         Initialize VSX-related and EFPR-related pseudo-registers variables.
744         Adjust the number of pseudo registers accordingly.
745
746         * ppc-linux-nat.c: Define PTRACE_GETVSXREGS, PTRACE_SETVSXREGS
747         and SIZEOF_VSRREGS.
748         (gdb_vsxregset_t): New type.
749         (have_ptrace_getsetvsxregs): New variable.
750         (fetch_vsx_register): New function.
751         (fetch_register): Handle VSX registers.
752         (fetch_vsx_registers): New function.
753         (fetch_ppc_registers): Handle VSX registers.
754         (store_ppc_registers): Handle VSX registers.
755         (store_vsx_register): New function.
756         (store_register): Handle VSX registers.
757         (store_vsx_registers): New function.
758         (ppc_linux_read_description): Handle VSX-enabled inferiors.
759         (gdb_vsxregset_t): New type.
760         (supply_vsxregset): New function.
761         (fill_vsxregset): New function.
762
763         * ppc-tdep.h (vsx_register_p): New prototype.
764         (vsx_support_p): New prototype.
765         (ppc_vsr0_regnum): New variable.
766         (ppc_vsr0_upper_regnum): Likewise.
767         (ppc_efpr0_regnum): Likewise.
768         (ppc_builtin_type_vec128): New type.
769         (ppc_num_vsrs): New constant.
770         (ppc_num_vshrs): New constant.
771         (ppc_num_efprs): Likewise.
772         Define POWERPC_VEC_VSX PPC_VSR0_UPPER_REGNUM and PPC_VSR31_UPPER_REGNUM.
773         (ppc_supply_vsxregset): New prototype.
774         (ppc_collect_vsxregset): New prototype.
775
776         * ppc-linux-tdep.c: Include "features/rs6000/powerpc-vsx32l.c"
777         Include "features/rs6000/powerpc-vsx64l.c".
778         (_initialize_ppc_linux_tdep): Initialize VSX-enabled targets.
779         (ppc_linux_regset_sections): Add new ".reg-ppc-vsx" field.
780         (ppc32_linux_vsxregset): New 32-bit VSX-enabled regset.
781         (ppc_linux_regset_from_core_section): Handle VSX core section.
782         (ppc_linux_core_read_description): Support VSX-enabled core files.
783
784         * ppc-linux-tdep.h: Declare *tdesc_powerpc_vsx32l
785         Declare tdesc_powerpc_vsx64l
786
787         * corelow.c (get_core_register_section): Support VSX-enabled
788         core files.
789
790         * features/rs6000/power-vsx.xml: New VSX descriptions.
791         * features/rs6000/powerpc-vsx32.xml: New file.
792         * features/rs6000/powerpc-vsx32l.xml: New file.
793         * features/rs6000/powerpc-vsx64.xml: New file.
794         * features/rs6000/powerpc-vsx64l.xml: New file.
795         * features/rs6000/powerpc-vsx32.c: New file (generated).
796         * features/rs6000/powerpc-vsx32l.c: New file (generated).
797         * features/rs6000/powerpc-vsx64.c: New file (generated).
798         * features/rs6000/powerpc-vsx64l.c: New file (generated).
799         * features/Makefile: Updated with new descriptions.
800         * regformats/rs6000/powerpc-vsx32l.dat: New file (generated).
801         * regformats/rs6000/powerpc-vsx64l.dat: New file (generated).
802
803 2008-08-15  Vladimir Prus  <vladimir@codesourcery.com>
804
805         * ia64-linux.nat (_initialize_ia64_linux_nat): Don't
806         call linux_target twice.
807
808 2008-08-14  Aleksandar Ristovski  <aristovski@qnx.com>
809
810         * nto-tdep.c (lm_info): Updated struct lm_info definition from
811         solib-svr4.c
812         (LM_ADDR): Use l_addr if available; if not, use link map and set 
813         l_addr.
814
815 2008-08-14  Tom Tromey  <tromey@redhat.com>
816
817         * macrocmd.c (macro_define_command): Check for NULL argument.
818         (macro_undef_command): Likewise.
819
820 2008-08-14  Pedro Alves  <pedro@codesourcery.com>
821
822         * infcmd.c (continue_1): Add an ERROR_NO_INFERIOR call.
823
824 2008-08-13  Pedro Alves  <pedro@codesourcery.com>
825
826         * breakpoint.c (always_inserted_auto, always_inserted_on)
827         (always_inserted_off, always_inserted_enums): New.
828         (always_inserted_mode): Change type to char* and point to
829         always_inserted_auto.
830         (show_always_inserted_mode): In auto mode, also show the current
831         effect of the option.
832         (breakpoints_always_inserted_mode): Adjust for the new auto mode.
833         (_initialize_breakpoint): Make the "set breakpoints
834         always-inserted" command an enum command.  Extend help to describe
835         the auto mode.
836
837 2008-08-13  Ulrich Weigand  <uweigand@de.ibm.com>
838
839         * spu-tdep.c (info_spu_dma_command): Respect TSQV (tag status
840         query valid) bit.  Ignore bits outside the condition field.
841         (info_spu_proxydma_command): Ignore bits outside the field.
842
843 2008-08-12  Michael Snyder  <msnyder@vmware.com>
844
845         * MAINTAINERS: Update my email address.
846
847 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
848
849         * ppc-linux-nat.c (ppc_linux_get_hwcap): Really get AT_HWCAP.
850
851 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
852
853         Add no-ack mode to the remote protocol --- optionally stop ACKing
854         packets and responses when we have a reliable communication
855         medium.
856
857         Based on Apple's GDB, by Jason Molenda <jmolenda@apple.com>
858
859         * remote.c (struct remote_state): Add noack_mode field.
860         (PACKET_QStartNoAckMode): New.
861         (remote_start_remote): Don't any outstanding packet here.
862         (remote_open_1): Clear noack_mode.  Ack any outstanding packet
863         here.  Activate noack mode if requested.
864         (remote_protocol_features): Add QStartNoAckMode.
865         (remote_open_1):
866         (putpkt_binary): Don't send ack in noack mode.
867         (read_frame): Don't recompute the checksum in noack mode.
868         (getpkt_sane): Skip sending ack if in noack mode.
869         (_initialize_remote): Add set/show remote noack mode.
870         * NEWS:  Note the new features.
871
872 2008-08-11  Kevin Buettner  <kevinb@redhat.com>
873
874         * rs6000-tdep.c (BL_MASK, BL_INSTRUCTION, BL_DISPLACEMENT_MASK):
875         New macros.
876         (rs6000_skip_main_prologue): New function.
877         (rs6000_gdb_arch_init): Register rs6000_skip_main_prologue.
878
879 2008-08-11  Sandra Loosemore  <sandra@codesourcery.com>
880
881         * MAINTAINERS (Write After Approval):  Add self.
882
883 2008-08-11  Stan Shebs  <stan@codesourcery.com>
884
885         ARM BE8 support.
886         * disasm.c (gdb_disassemble_info): Set endian_code.
887         * gdbarch.sh (gdbarch_info): New field byte_order_for_code.
888         * gdbarch.h, gdbarch.c: Regenerate.
889         * arch-utils.c (initialize_current_architecture): Set the
890         default byte_order_for_code.
891         (gdbarch_info_init): Ditto.
892         (gdbarch_info_fill): Ditto.
893         * arm-tdep.c (SWAP_INT, SWAP_SHORT): New macros.
894         (thumb_analyze_prologue): Swap halfword if code endianness is
895         different from general endianness.
896         (arm_skip_prologue): Similarly.
897         (arm_scan_prologue): Ditto.
898         (thumb_get_next_pc): Ditto.
899         (arm_get_next_pc): Ditto.
900         (arm_gdbarch_init): Set byte_order_for_code from BE8 flag,
901         choose correct endianness for breakpoints.
902
903 2008-08-10  Pedro Alves  <pedro@codesourcery.com>
904
905         * bsd-kvm.c: Include "gdbthread.h".
906         (bsd_kvm_ptid): New.
907         (bsd_kvm_open): Add a main thread.
908         (bsd_kvm_close): Delete it.
909         (bsd_kvm_thread_alive): New.
910         (bsd_kvm_pid_to_str): New.
911         (bsd_kvm_add_target): Register bsd_kvm_thread_alive and
912         bsd_kvm_pid_to_str.
913         (bsd_kvm_add_target): Initialize bsd_kvm_ptid.
914
915 2008-08-09  Pedro Alves  <pedro@codesourcery.com>
916
917         * buildsym.c (start_subfile): Properly cast sentinel in concat
918         call.
919         * cp-name-parser.y: Include "config.h".
920         * xml-tdesc.c (fetch_xml_from_file): Properly cast sentinel in
921         concat call.
922         * gdb_select.h: Include sys/time.h if sys/select.h is not
923         available.
924
925 2008-08-09  Pedro Alves  <pedro@codesourcery.com>
926
927         * go32-nat.c: Include "gdbthread.h".
928         (go32_stop, go32_kill_inferior): Delete the main thread.
929         (go32_create_inferior): Add it.
930         (go32_thread_alive, go32_pid_to_str): New.
931         (init_go32_ops): Register go32_thread_alive and go32_pid_to_str.
932
933 2008-08-09  Pedro Alves  <pedro@codesourcery.com>
934
935         * go32-nat.c (fetch_register, store_register): Pass the regcache
936         gdbarch to i386_fp_regnum_p and i386_fpc_regnum_p.
937         (go32_xfer_memory): Change type of myaddr parameter to gdb_byte.
938         (struct seg_descr, struct seg_descr): pack the whole struct
939         instead of each member individually.
940
941 2008-08-09  Andreas Schwab  <schwab@suse.de>
942
943         * python/python.c (_initialize_python): Use unabbreviated commands
944         in prefix name.
945
946 2008-08-09  Daniel Jacobowitz  <dan@codesourcery.com>
947
948         * Makefile.in (stamp-h): Also create .deps.
949
950 2008-08-09  Tom Tromey  <tromey@redhat.com>
951
952         * Makefile.in (generated_files): Add GNULIB_H.
953
954 2008-08-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
955
956         * solib-pa64.c (pa64_solib_create_inferior_hook): Don't set
957         DT_HP_DEBUG_PRIVATE.  Add warning if DT_HP_DEBUG_PRIVATE is not set.
958         Revise comment.
959         (pa64_current_sos): Remove map private warning warning.
960         * solib-som.c: Include string.h and sys/utsname.h.
961         (get_hpux_major_release): New function.
962         (som_solib_create_inferior_hook): Read dynamic linker header.  Warn
963         about shared library private mapping on HP-UX 11 and later.  Only force
964         private mapping of shared libraries on HP-UX 10 and earlier.
965         (link_map_start): Delete warning.
966
967 2008-08-09  Xuepeng Guo  <xuepeng.guo@intel.com>
968             H.J. Lu  <hongjiu.lu@intel.com>
969             Mark Kettenis <kettenis@gnu.org>
970
971         * amd64-tdep.c (amd64_frame_cache): Add saved_sp_reg.
972         (amd64_init_frame_cache): Initialize saved_sp_reg.
973         (amd64_analyze_stack_align): New.
974         (amd64_analyze_prologue): Call it.
975         (amd64_frame_cache): Use saved_sp_reg if it is invalid.  Don't set
976         %rip to 8 when halfway aligning the stack.
977
978         * amd64-tdep.h (amd64_regnum): Add AMD64_R9_REGNUM to
979         AMD64_R14_REGNUM.
980
981         * i386-tdep.c (i386_frame_cache): Remove stack_align.  Add
982         saved_sp_reg.
983         (i386_alloc_frame_cache): Remove stack_align.  Initialize
984         saved_sp_reg to -1.
985         (i386_analyze_stack_align): Rewrite.
986         (i386_frame_cache): Use saved_sp_reg if it is valid.
987
988 2008-08-09  Ulrich Weigand  <uweigand@de.ibm.com>
989
990         * target.c: Include "solib.h".
991         (target_pre_inferior): Call no_shared_libraries.
992         * infcmd.c (run_command_1): Do not call objfile_purge_solibs
993         or clear_solib.
994         (attach_command): Do not call clear_solib.
995
996 2008-08-09  Mark Kettenis  <kettenis@gnu.org>
997
998         * i386obsd-nat.c (i386obsd_supply_pcb): Supply the right bytes for
999         the %eip register.
1000
1001 2008-08-08  Tom Tromey  <tromey@redhat.com>
1002
1003         * Makefile.in (python.o): Remove dependencies.  Use COMPILE and
1004         POSTCOMPILE.
1005         (python-utils.o): Likewise.
1006
1007 2008-08-08  Andreas Schwab  <schwab@suse.de>
1008
1009         * corefile.c (_initialize_core): Remove spurious paren from set
1010         gnutarget doc string.
1011
1012 2008-08-08  Luis Machado  <luisgpm@br.ibm.com>
1013
1014         * ppc-linux-nat.c: Include "auxv.h" and "elf/common.h".
1015         Define PPC_FEATURE_BOOKE.
1016         (ppc_linux_get_hwcap): New function.
1017         (ppc_linux_region_ok_for_hw_watchpoint): Handle PowerPC 440
1018         4-bytes alignment restrictions.
1019         (ppc_linux_insert_watchpoint): Handle PowerPC 440-specific
1020         positioning of the read/write flags.
1021         (ppc_linux_watchpoint_addr_within_range): Handle PowerPC 440
1022         4-bytes alignment.
1023
1024 2008-08-08  Pedro Alves  <pedro@codesourcery.com>
1025
1026         Use ptid_t.tid to store thread ids instead of ptid_t.pid.
1027
1028         * win32-nat.c (win32_add_thread): Change thread argument type to
1029         ptid_t.  Adjust.
1030         (win32_add_thread): Adjust.
1031         (win32_delete_thread): Change thread argument type to ptid_t.
1032         Adjust.
1033         (win32_fetch_inferior_registers, win32_store_inferior_registers)
1034         (win32_resume, get_win32_debug_event, get_win32_debug_event)
1035         (win32_wait, win32_pid_to_exec_file, win32_pid_to_str): Adjust.
1036         (init_win32_ops): Put to_magic last.
1037         (win32_win32_thread_alive): Adjust.
1038
1039 2008-08-08  Pedro Alves  <pedro@codesourcery.com>
1040
1041         * remote-m32r-sdi.c (m32r_thread_alive, m32r_pid_to_str): New.
1042         (init_m32r_ops): Register m32r_thread_alive and m32r_pid_to_str.
1043
1044 2008-08-08  Pedro Alves  <pedro@codesourcery.com>
1045
1046         * remote-m32r-sdi.c: Include "gdbthread.h".
1047         (remote_m32r_ptid): New.
1048         (m32r_close): Delete the main thread.
1049         (m32r_resume): Set inferior_ptid toA remote_m32r_ptid. Add the
1050         main thread.
1051         (m32r_kill, m32r_load, sdireset_command): Delete the main thread.
1052         (_initialize_remote_m32r): Initialize remote_m32r_ptid.
1053
1054 2008-08-07  Tom Tromey  <tromey@redhat.com>
1055             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1056
1057         * aclocal.m4, configure: Rebuild.
1058         * configure.in: Call ZW_CREATE_DEPDIR,
1059         ZW_PROG_COMPILER_DEPENDENCIES, AC_PROG_MAKE_SET.
1060         (MAKE, GMAKE): New substs.
1061         * acinclude.m4: Include depstand.m4.
1062         * Makefile.in (DEPMODE, DEPDIR, COMPILE.post, COMPILE.pre,
1063         COMPILE, POSTCOMPILE, depcomp): New variables.
1064         Remove all _h variables.
1065         Remove many .o targets.
1066         ($(srcdir)/copying.c): avoid backslash-newline after comment
1067         sign (@maintainer_mode_true@).
1068         (HFILES_NO_SRCDIR): Regenerate.
1069         (generated_files): New variable.
1070         (all_gdbtk_cflags): Likewise.
1071         (.c.o): Rewrote.
1072         (init.o, version.o, copying.o): Remove.
1073         (distclean): Remove DEPDIR.
1074         (test-cp-name-parser.o, hpux-thread.o, main.o, monitor.o,
1075         printcmd.o, procfs.o, v850ice.o): Rewrite.
1076         (cli-cmds.o, cli-decode.o, cli-dump.o, cli-interp.o, cli-logging.o,
1077         cli-script.o, cli-setshow.o, cli-utils.o): Likewise.
1078         (gdbtk.o, gdbtk-bp.o, gdbtk-cmds.o, gdbtk-hooks.o, gdbtk-interp.o,
1079         gdbtk-main.o, gdbtk-register.o, gdbtk-stack.o, gdbtk-varobj.o,
1080         gdbtk-wrapper.o): Likewise.
1081         (mi-cmd-break.o, mi-cmd-disas.o, mi-cmd-env.o, mi-cmd-file.o,
1082         mi-cmds.o, mi-cmd-stack.o, mi-cmd-target.o, mi-cmd-var.o,
1083         mi-console.o, mi-getopt.o, mi-interp.o, mi-main.o, mi-out.o,
1084         mi-parse.o, mi-symbol-cmds.o, mi-common.o, signals.o, tui.o,
1085         tui-command.o, tui-data.o, tui-disasm.o, tui-file.o, tui-hooks.o,
1086         tui-interp.o, tui-io.o, tui-layout.o, tui-main.o, tui-out.o,
1087         tui-regs.o, tui-source.o, tui-stack.o, tui-win.o, tui-windata.o,
1088         tui-wingeneral.o, tui-winsource.o): Likewise.
1089         (all_object_files): New variable.
1090         ($(all_object_files)): New target.
1091         Include dependency files, when using GNU Make.
1092
1093 2008-08-07  Ulrich Weigand  <uweigand@de.ibm.com>
1094
1095         * spu-tdep.c (info_spu_dma_cmdlist): Only show entries with
1096         the valid bit set.  Ensure display order respects partial
1097         order defined by dependency bits.
1098
1099 2008-08-06  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1100
1101         * solib-pa64.c (read_dld_descriptor): Return zero if load map is not
1102         setup.
1103
1104 2008-08-06  Mark Kettenis  <kettenis@gnu.org>
1105
1106         * i386obsd-nat.c (i386obsd_supply_pcb): Adjust for changes in
1107         OpenBSD 4.3.
1108
1109 2008-08-06  Vladimir Prus  <vladimir@codesourcery.com>
1110             Tom Tromey  <tromey@redhat.com>
1111             Thiago Jung Bauermann  <bauerman@br.ibm.com>
1112             Doug Evans  <dje@google.com>
1113
1114         * Makefile.in (SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS,
1115         SUBDIR_PYTHON_DEPS, SUBDIR_PYTHON_LDFLAGS, SUBDIR_PYTHON_CFLAGS,
1116         PYTHON_CFLAGS): New.
1117         (python_h, python_internal_h): New.
1118         (cli-script.o): Depend on python.h
1119         (python.o, python-utils.o): New.
1120         * cli/cli-script.c (print_command_lines): Handle python_control.
1121         (execute_control_command): Handle python_control.
1122         (execute_control_command_untraced): New function.
1123         (while_command): Call execute_control_command_untraced.
1124         (if_command): Likewise.
1125         (get_command_line): Remove static attribute.
1126         (read_next_line): Handle "python".
1127         (recurse_read_control_structure): Handle python_control.
1128         (read_command_lines): Handle python_control.
1129         Include python.h.
1130         * cli/cli-script.h (get_command_line): Add prototype.
1131         (execute_control_command_untraced): Likewise.
1132         * configure.ac: Add --with-python.
1133         * defs.h (enum command_control_type) <python_control>: New
1134         constant.
1135         * python/python-internal.h: New file.
1136         * python/python.c: New file.
1137         * python/python.h: New file.
1138         * python/python-utils.c: New file.
1139         * NEWS: Mention Python scripting support and its new commands.
1140
1141 2008-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1142
1143         * spu-tdep.c (spu_gdbarch_init): Call set_gdbarch_frame_red_zone_size.
1144
1145 2008-08-06  Phil Muldoon  <pmuldoon@redhat.com>
1146
1147         * MAINTAINERS (Write After Approval): Add self.
1148
1149 2008-08-06  Phil Muldoon  <pmuldoon@redhat.com>
1150
1151         * breakpoint.c (hw_breakpoint_used_count): Use breakpoint_enabled.
1152         (insert_breakpoint_locations): Likewise.
1153
1154 2008-08-05  Phil Muldoon  <pmuldoon@redhat.com>
1155
1156         * breakpoint.c (create_longjmp_breakpoint): Remove unused struct
1157         breakpoint.
1158         (set_longjmp_breakpoint): Likewise.
1159
1160 2008-08-04  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1161
1162         PR build/2490
1163         * solib-pa64.c: Only compile if both HAVE_ELF_HP_H and __LP64__ are
1164         defined.
1165
1166 2008-08-05  Tom Tromey  <tromey@redhat.com>
1167
1168         * bcache.c (deprecated_bcache_added): Initialize obstack.
1169         (bcache_xmalloc): Don't initialize obstack.
1170         (bcache_xfree): Conditionally free obstack.
1171         (bcache_memory_used): Update.
1172
1173 2008-08-05  Tom Tromey  <tromey@redhat.com>
1174
1175         * symfile.c (add_psymbol_to_bcache): Return a const pointer.  Use
1176         bcache_full.
1177         (append_psymbol_to_list): Accept a const pointer.
1178         (add_psymbol_to_list): Fix const correctness.
1179         * bcache.h: (deprecated_bcache_added, deprecated_bcache): Remove.
1180         (bcache_full): Declare.
1181         * bcache.c (bcache_data, deprecated_bcache): Remove.
1182         (bcache): Use bcache_full.
1183         (bcache_full): Rename from deprecated_bcache_added.  Change return
1184         type.
1185
1186 2008-08-04  Stan Shebs  <stan@codesourcery.com>
1187
1188         * solib-svr4.c (BKPT_AT_SYMBOL): Remove, always defined.
1189         (bkpt_names): Remove SOLIB_BKPT_NAME, never defined.
1190         (enable_break): Remove test of BKPT_AT_SYMBOL.
1191
1192 2008-08-02  Keith Seitz  <keiths@redhat.com>
1193
1194         * acinclude.m4: Include ../config/tcl.m4 to pick up
1195         standard Tcl configury bits.
1196         Remove all Tcl, Tk, Itcl, Itk, etc definitions.
1197         * configure.ac: Don't check if ../itcl exists when building
1198         gdbtk. It could be installed.
1199         Rewrite gdbtk configury to allow for using system-supplied
1200         Tcl and Tk. Gdbtk no longer requires build-time access to
1201         itcl and itk.
1202         * Makefile.in: Remove everything related to itcl and itk.
1203         Rewrite the Tcl bits for gdbtk to correspond to rewrite of
1204         configure.ac.
1205         Remove v850ice.o build rule.
1206         (ALL_TCL_CFLAGS): New convenience defintion. Change all
1207         gdbtk sources to use it.
1208         * configure: Regenerate.
1209
1210 2008-07-31  Stan Shebs  <stan@codesourcery.com>
1211
1212         * coffread.c (coff_symtab_read): Remove FUNCTION_EPILOGUE_SIZE.
1213
1214 2008-07-30  Stan Shebs  <stan@codesourcery.com>
1215
1216         * objfiles.c (TARGET_KEEP_SECTION): Remove.
1217         (add_to_objfile_sections): Remove use.
1218
1219 2008-07-29  Tom Tromey  <tromey@redhat.com>
1220
1221         * cli/cli-decode.c (lookup_cmd_1): Use memcpy.
1222         (lookup_cmd_composition): Likewise.
1223
1224 2008-07-29  Tom Tromey  <tromey@redhat.com>
1225
1226         * cli/cli-cmds.c (edit_command): Remove unused variables.  Delete
1227         dead code.  Fix indentation.
1228
1229 2008-07-29  Stan Shebs  <stan@codesourcery.com>
1230
1231         * main.c (captured_main): Remove long-unused #if 0 blocks.
1232
1233 2008-07-28  Tom Tromey  <tromey@redhat.com>
1234
1235         * annotate.h (deprecated_annotate_starting_hook): Remove.
1236         (deprecated_annotate_stopped_hook): Remove.
1237         (deprecated_annotate_exited_hook): Remove.
1238         * Makefile.in (annotate.o): Depend on observer_h.
1239         * top.c (deprecated_delete_breakpoint_hook): Remove.
1240         (deprecated_create_breakpoint_hook): Likewise.
1241         (deprecated_modify_breakpoint_hook): Likewise.
1242         * interps.c (clear_interpreter_hooks): Update for removed hooks.
1243         * breakpoint.c (mention): Don't call removed hook.
1244         (delete_breakpoint): Likewise.
1245         (disable_breakpoint): Likewise.
1246         (do_enable_breakpoint): Likewise.
1247         * annotate.c: Include observer.h.
1248         (breakpoint_changed): Change type of argument.
1249         (_initialize_annotate): Register observers.
1250         (deprecated_annotate_starting_hook): Remove.
1251         (deprecated_annotate_stopped_hook): Remove.
1252         (deprecated_annotate_exited_hook): Remove.
1253         (annotate_starting): Update for hook removal.
1254         (annotate_stopped): Likewise.
1255         (annotate_exited): Likewise.
1256         * defs.h (deprecated_delete_breakpoint_hook): Remove.
1257         (deprecated_create_breakpoint_hook): Likewise.
1258         (deprecated_modify_breakpoint_hook): Likewise.
1259
1260 2008-07-28  Tom Tromey  <tromey@redhat.com>
1261
1262         * main.c (captured_main): Don't use BEFORE_MAIN_LOOP_HOOK.
1263
1264 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
1265
1266         * configure.ac: Check for the GNU/Linux ptrace signature.
1267         * configure: Regenerated.
1268
1269 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
1270
1271         * linux-nat.c (resume_callback): Add more debugging output.
1272         (linux_nat_has_pending_sigint): New function, based on
1273         linux_nat_has_pending.
1274         (set_ignore_sigint, maybe_clear_ignore_sigint): New functions.
1275         (stop_wait_callback): Remove flush_mask handling.  Honor
1276         ignore_sigint.  Call maybe_clear_ignore_sigint.  Pass NULL
1277         to recursive calls.
1278         (linux_nat_has_pending, flush_callback): Remove.
1279         (linux_nat_filter_event): Check for ignore_sigint.
1280         (linux_nat_wait): Remove flush_mask support and call to
1281         flush_callback.  Use set_ignore_sigint and maybe_clear_ignore_sigint.
1282         * linux-nat.h (struct lwp_info): Add ignore_sigint field.
1283
1284 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
1285
1286         * linux-nat.c (count_events_callback, select_event_lwp_callback): Only
1287         report events from resumed threads.
1288
1289 2008-07-27  Daniel Jacobowitz  <dan@codesourcery.com>
1290
1291         * mips-linux-tdep.c (mips_linux_syscall_next_pc): New function.
1292         (mips_linux_init_abi): Set tdep->syscall_next_pc.
1293         * mips-tdep.c (enum mips_fpu_type, struct gdbarch_tdep): Move to
1294         mips-tdep.h.
1295         (mips32_next_pc): Handle the syscall instruction.
1296         * mips-tdep.h (enum mips_fpu_type, struct gdbarch_tdep): New,
1297         from mips-tdep.c.  Add syscall_next_pc to gdbarch_tdep.
1298
1299 2008-07-26  Tom Tromey  <tromey@redhat.com>
1300
1301         PR gdb/1158:
1302         * valops.c (value_struct_elt): Treat function-valued field as a
1303         static method.
1304
1305 2008-07-26  Tom Tromey  <tromey@redhat.com>
1306
1307         PR gdb/1136:
1308         * macroexp.c (get_punctuator) <punctuators>: Rearrange to put
1309         longer tokens first.
1310
1311 2008-07-26  Vladimir Prus  <vladimir@codesourcery.com>
1312
1313         Kill cmd_async_ok.
1314         * cli/cli-decode.h (CMD_ASYNC_OK, set_cmd_async_ok)
1315         (get_cmd_async_ok): Remove.
1316         * cli/cli-decode.c (set_cmd_async_ok, get_cmd_async_ok): Remove.
1317         * cli/cli-cmds.c (init_cli_cmds): Don't use set_cmd_async_ok.
1318         * infcmd.c (_initialize_infcmd): Likewise.
1319         * thread.c (_initialize_thread): Likewise.
1320
1321 2008-07-25  Joseph Myers  <joseph@codesourcery.com>
1322
1323         * mips-tdep.c (mips_n32n64_push_dummy_call): Handle passing
1324         128-bit long doubles in even-odd pairs of FPRs.  Do not
1325         right-align float arguments for big-endian.
1326         (mips_n32n64_return_value): Apply return value convention for
1327         structs containing one or two floating-point values to soft-float
1328         as well as hard-float.  Handle 128-bit long doubles in such
1329         structs.
1330         (mips_o32_push_dummy_call): Only skip one integer register for a
1331         float argument passed in an FPR.
1332
1333 2008-07-25  Tom Tromey  <tromey@redhat.com>
1334
1335         * tui/tui-hooks.c: Include observer.h.
1336         (tui_event_default, tui_old_event_hooks, tui_event_hooks):
1337         Remove.
1338         (tui_bp_created_observer, tui_bp_deleted_observer,
1339         tui_bp_modified_observer): New globals.
1340         (tui_install_hooks): Use observers, not events.
1341         (tui_remove_hooks): Likewise.
1342         * mi/mi-cmd-break.c: Include observer.h, not gdb-events.h.
1343         (mi_breakpoint_observers_installed, mi_can_breakpoint_notify): New
1344         globals.
1345         (breakpoint_notify): Check mi_can_breakpoint_notify.
1346         (breakpoint_hooks): Remove.
1347         (mi_cmd_break_insert): Attach observers.  Don't use events.
1348         * tracepoint.c: Include observer.h, not gdb-events.h.
1349         (tracepoint_operation, trace_pass_command): Notify observer.
1350         * interps.c: Don't include gdb-events.h.
1351         (clear_interpreter_hooks): Don't call clear_gdb_event_hooks.
1352         * gdbarch.c: Rebuild.
1353         * gdbarch.sh: Emit include for observer.h, not gdb-events.h.
1354         (deprecated_current_gdbarch_select_hack): Notify observer.
1355         * breakpoint.h: Don't include gdb-events.h.
1356         * breakpoint.c: Don't include gdb-events.h.
1357         (condition_command): Notify observer.
1358         (commands_command): Likewise.
1359         (commands_from_control_command): Likewise.
1360         (mention, delete_breakpoint, set_ignore_count): Likewise.
1361         (disable_breakpoint, do_enable_breakpoint): Likewise.
1362         * Makefile.in (gdb_events_h): Remove.
1363         (breakpoint_h): Update.
1364         (COMMON_OBS): Remove gdb-events.o.
1365         (gdb-events.o): Remove.
1366         (breakpoint.o, gdbarch.o, interps.o, tracepoint.o, gdbtk-bp.o,
1367         gdbtk-hooks.o, mi-cmd-break.o, tui-hooks.o): Update.
1368         * gdb-events.c: Remove.
1369         * gdb-events.h: Remove.
1370         * gdb-events.sh: Remove.
1371
1372 2008-07-24  Pedro Alves  <pedro@codesourcery.com>
1373
1374         * remote.c (remote_threads_extra_info): Don't query the remote
1375         server about info on the internally added main thread.
1376
1377 2008-07-24  Aleksandar Ristovski  <aristovski@qnx.com>
1378
1379         * nto-procfs.c (procfs_attach): Populate initial thread list.
1380         (procfs_wait): Return new pid, built from the inferior status.
1381
1382 2008-07-23  Thiago Jung Bauermann  <bauerman@br.ibm.com>
1383
1384         * configure.ac (CONFIG_INITS): Delete long obsoleted variable.
1385         * configure: Regenerate.
1386
1387 2008-07-23  Aleksandar Ristovski  <aristovski@qnx.com>
1388
1389         * nto-procfs.c (procfs_xfer_memory): Changed signature.
1390         (procfs_resume): Workaround for dereferencing type-punned pointer
1391         warning.
1392         * nto-tdep.c (nto_parse_redirection): Change signature to be const
1393         correct.
1394         * nto-tdep.h (nto_parse_redirection): Likewise.
1395
1396 2008-07-21  Stan Shebs  <stan@codesourcery.com>
1397
1398         Scrub remnants of IN_SOLIB_DYNSYM_RESOLVE_CODE.
1399         * gdbarch.sh: Adjust comment to refer to
1400         in_solib_dynsym_resolve_code().
1401         * gdbarch.h, gdbarch.c: Update.
1402         * solib-osf.c: Ditto.
1403         * infrun.c: Ditto.
1404         (handle_inferior_event): Use in_solib_dynsym_resolve_code
1405         unconditionally.
1406         * config/mips/nm-irix5.h: Remove undef of
1407         IN_SOLIB_DYNSYM_RESOLVE_CODE.
1408
1409 2008-07-21  Tom Tromey  <tromey@redhat.com>
1410
1411         * symfile.c (reread_symbols): Don't pass argument to observer.
1412         * exec.c (exec_file_attach): Don't pass argument to observer.
1413         * ada-lang.c (ada_executable_changed_observer): Remove argument.
1414         * symtab.c (symtab_observer_executable_changed): Remove argument.
1415         * observer.sh: Handle functions with no arguments.
1416
1417 2008-07-20  Sergei Poselenov  <sposelenov@emcraft.com>
1418             Chris Demetriou  <cgd@google.com>
1419
1420         * elfread.c (elf_symfile_segments): Fix the check that each loadable
1421         section fits within an ELF segment to handle ELF segments that hit
1422         the end of the address space.
1423
1424 2008-07-20  Chris Demetriou  <cgd@google.com>
1425
1426         * MAINTAINERS (Write After Approval): Add self.
1427
1428 2008-07-18  Tom Tromey  <tromey@redhat.com>
1429
1430         PR gdb/855:
1431         * NEWS: Add entry for macro commands.
1432         * Makefile.in (macrocmd.o): Add gdb_string.h.
1433         * macroscope.h (user_macro_scope): Declare.
1434         (default_macro_scope): Update documentation.
1435         (macro_user_macros): Declare.
1436         * c-lang.c (c_preprocess_and_parse): Always attempt macro lookup.
1437         Use user_macro_scope.
1438         (null_macro_lookup): Remove.
1439         * macrotab.h (macro_callback_fn): Declare.
1440         (macro_for_each): Likewise.
1441         (macro_allow_redefinitions): Likewise.
1442         * macrotab.c (foreach_macro): New function
1443         (macro_for_each): Likewise.
1444         (struct macro_table) <redef_ok>: New field.
1445         (macro_allow_redefinitions): New function.
1446         (new_macro_table): Update.
1447         (macro_define_function): Likewise.
1448         (macro_define_object): Likewise.
1449         * macroscope.c (user_macro_scope): New function.
1450         (default_macro_scope): Use it.
1451         (macro_user_macros): New global.
1452         (standard_macro_lookup): Look in macro_user_macros.
1453         (_initialize_macroscope): New function.
1454         * macroexp.h (macro_is_whitespace, macro_is_digit,
1455         macro_is_identifier_nondigit): Declare.
1456         * macroexp.c (macro_is_whitespace): Rename.  No longer static.
1457         (macro_is_digit): Likewise.
1458         (macro_is_identifier_nondigit): Likewise.
1459         (get_identifier): Update.
1460         (get_pp_number): Likewise.
1461         (get_token): Likewise.
1462         * macrocmd.c (skip_ws): New function.
1463         (extract_identifier): Likewise.
1464         (free_macro_definition_ptr): Likewise.
1465         (user_macros): Remove.
1466         (macro_define_command): Implement.
1467         (_initialize_macrocmd): Update.
1468         (macro_undef_command): Implement.
1469         (print_one_macro): New function.
1470         (macro_list_command): Implement.
1471
1472 2008-07-18  Joseph Myers  <joseph@codesourcery.com>
1473
1474         * configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
1475         in BFD ELF check.
1476         * configure: Regenerate.
1477
1478 2008-07-17  Paul Pluzhnikov  <ppluzhnikov@google.com>
1479
1480         * auxv.c (fprint_target_auxv): Stop at AT_NULL.
1481
1482 2008-07-15  Andreas Schwab  <schwab@suse.de>
1483
1484         * valops.c (value_cast_pointers): Follow typedefs when checking
1485         result of coercion.
1486
1487 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1488
1489         * block.c (block_function): Renamed to ...
1490         (block_linkage_function): ... this.  All callers changed.
1491         * block.h (block_function): Renamed to ...
1492         (block_linkage_function): ... this.
1493
1494 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1495
1496         * mn10300-tdep.c (set_reg_offsets): Use get_frame_register_unsigned.
1497
1498 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1499
1500         * frame.c (frame_sp_unwind): Delete.
1501         (get_frame_sp): Do not use it.
1502         * frame.h (frame_sp_unwind): Delete prototype.
1503
1504 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1505
1506         * ia64-tdep.c (ia64_dummy_id): Use get_frame_pc.
1507
1508 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1509
1510         * dwarf2-frame.c (dwarf2_frame_cache): Update comment.
1511         * frame.c (frame_unwind_address_in_block): Delete.
1512         (get_frame_address_in_block): Do not use it.  Check the type
1513         of the next frame first.
1514         (frame_cleanup_after_sniffer): Update comment.
1515         * frame.h (frame_unwind_address_in_block): Delete prototype.
1516         * hppa-tdep.c (hppa_find_unwind_entry_in_block): Update comment.
1517
1518 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1519
1520         * frame.c (frame_func_unwind): Delete.
1521         (get_frame_func): Do not use it.
1522         * frame.h (frame_func_unwind): Delete prototype.
1523         * hppa-tdep.c (hppa_frame_cache): Update comment.
1524         * rs6000-tdep.c (rs6000_frame_cache): Update comment.
1525
1526 2008-07-14  Stan Shebs  <stan@codesourcery.com>
1527
1528         * remote-sim.c (init_gdbsim_ops): Remove
1529         TARGET_REDEFINE_DEFAULT_OPS.
1530
1531 2008-07-15  Daniel Jacobowitz  <dan@codesourcery.com>
1532
1533         * findvar.c (read_var_value): Remove unused variable.
1534
1535 2008-07-15  Luis Machado  <luisgpm@br.ibm.com>
1536
1537         * infrun.c (handle_inferior_event): Tag threads as stopped
1538         before inserting breakpoints.
1539
1540 2008-07-15  Hui Zhu  <teawater@gmail.com>
1541
1542         * MAINTAINERS: Added myself to section Write After Approval.
1543
1544 2008-07-14  Paul Pluzhnikov  <ppluzhnikov@google.com>
1545
1546         PR gdb/2477
1547         * cp-abi.c (value_virtual_fn_field): Handle invalid pointers.
1548
1549 2008-07-14  Pedro Alves  <pedro@codesourcery.com>
1550
1551         * i386-dicos-tdep.c (i386_dicos_frame_align): Delete.
1552         (i386_dicos_push_dummy_code): New.
1553         (i386_dicos_init_abi): Don't register i386_dicos_frame_align.
1554         Register i386_dicos_push_dummy_code.
1555
1556 2008-07-14  Markus Deuling  <deuling@de.ibm.com>
1557
1558         * mips-tdep.c (fp_register_arg_p): Add gdbarch as paramter.
1559         (mips_n32n64_push_dummy_call, mips_o64_return_value)
1560         (mips_eabi_push_dummy_call): Update call to fp_register_arg_p.
1561
1562         (MIPS_FPU_TYPE): Add gdbarch as parameter and replace current_gdbarch.
1563         (fp_register_arg_p, mips_dump_tdep, show_mipsfpu_command)
1564         (mips_n32n64_fp_arg_chunk_p): Update caller.
1565
1566         (mips_n32n64_fp_arg_chunk_p): Add gdbarch as paramter.
1567         (mips_n32n64_push_dummy_call): Update caller.
1568
1569         (MIPS_LAST_ARG_REGNUM): Add gdbarch as parameter and replace
1570         current_gdbarch.
1571         (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call)
1572         (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Update caller.
1573
1574
1575         (MIPS_LAST_FP_ARG_REGNUM): Add gdbarch as parameter and replace
1576         current_gdbarch.
1577         (mips_eabi_push_dummy_call, mips_o32_push_dummy_call)
1578         (mips_o64_push_dummy_call): Update caller.
1579
1580         (MIPS_EABI): Add gdbarch as parameter and replace current_gdbarch.
1581         (fp_register_arg_p, mips_dump_tdep): Update caller.
1582
1583         (set_reg_offset): Add gdbarch as parameter and replace current_gdbarch.
1584         (mips16_scan_prologue, mips32_scan_prologue): Update caller.
1585
1586         (reset_saved_regs): Make static.  Add gdbarch as parameter.  Replace
1587         current_gdbarch.
1588         (mips32_scan_prologue): Update caller.
1589
1590         (heuristic_proc_start): Add gdbarch as parameter. Replace
1591         current_gdbarch.
1592         (mips_insn16_frame_cache, mips_insn32_frame_cache): Update caller.
1593
1594         * mipsnbsd-nat.c (mipsnbsd_fetch_inferior_registers)
1595         (mipsnbsd_store_inferior_registers): Use get_regcache_arch to get at
1596         the current architecture. Update call to getregs_supplies.
1597         (getregs_supplies): Add gdbarch as parameter and replace
1598         current_gdbarch.
1599
1600         * mipsnbsd-tdep.c (mipsnbsd_get_longjmp_target): Use get_frame_arch to
1601         get at the current architecture. Update call to NBSD_MIPS_JB_OFFSET and
1602         NBSD_MIPS_JB_ELEMENT_SIZE.
1603         (NBSD_MIPS_JB_ELEMENT_SIZE, NBSD_MIPS_JB_OFFSET): Add gdbarch and
1604         replace current_gdbarch.
1605
1606         * remote-mips.c (mips_map_regno): Add gdbarch as parameter and replace
1607         current_gdbarch.
1608         (mips_fetch_registers, mips_store_registers): Update call
1609         to mips_map_regno.
1610         (mips_load): Use get_regcache_arch to get at the current_architecture
1611         and replace current_gdbarch.
1612
1613 2008-07-13  Pedro Alves  <pedro@codesourcery.com>
1614
1615         * thread.c (restore_selected_frame): On fail to restore, select
1616         the innermost frame, and don't crash when warning the user.
1617
1618 2008-07-13  Hui Zhu  <teawater@gmail.com>
1619
1620         * symtab.c (expand_line_sal): Fix a memory leak.
1621
1622 2008-07-13  Pedro Alves  <pedro@codesourcery.com>
1623
1624         * utils.c (struct continuation): Define as inheriting struct
1625         cleanup.
1626         (add_continuation, do_all_continuations)
1627         (discard_all_continuations, add_intermediate_continuation)
1628         (do_all_intermediate_continuations)
1629         (discard_all_intermediate_continuations): Adjust.
1630
1631 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
1632
1633         Skip varobj in running threads.
1634         * mi/mi-cmd-var.c (mi_cmd_var_update): If varobj's
1635         thread is not stopped, skip the varobj.
1636         * Makefile.in: Update dependencies.
1637
1638 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
1639
1640         Enable all commands while inferiour is running
1641         * mi/mi-main.c (mi_cmd_execute): Don't check if
1642         inferiour is executing.
1643
1644 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
1645
1646         Allow all CLI command even if target is executing.
1647         * gdb/top.c (execute_command_1): Don't check if the inferiour
1648         is running.
1649
1650 2008-07-13  Vladimir Prus  <vladimir@codesourcery.com>
1651
1652         * mi/mi-main.c (mi_cmd_execute): Remove unused variable.
1653         Fix printing of frame, when frame is wrong.
1654
1655 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
1656
1657         * spu-tdep.c (spu_frame_unwind_cache): Do not error if
1658         backchain is unreadable.
1659
1660 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
1661
1662         * spu-linux-nat.c: Include "gdbthread.h".
1663         (spu_child_post_startup_inferior): Register main thread.
1664         (spu_child_post_attach): Likewise.
1665         * Makefile.in (spu-linux-nat.o): Update dependencies.
1666
1667 2008-07-12  Pedro Alves  <pedro@codesourcery.com>
1668
1669         Rewrite continuations internals on top of cleanups and plug
1670         continuation arguments leaks.
1671
1672         * defs.h (struct continuation): Make it opaque.
1673         (add_continuation, add_intermediate_continuation): Drop the int
1674         argument of the continuation hook argument.  Add
1675         continuation_free_args argument.
1676         (do_all_continuations, do_all_intermediate_continuations): Drop
1677         the error_p argument.
1678
1679         * utils.c (add_continuation): Drop the int argument of the
1680         continuation hook argument.  Add continuation_free_args argument.
1681         Reimplement on top of cleanups.
1682         (do_all_continuations): Drop error argument.  Reimplement on top
1683         of cleanups.
1684         (discard_all_continuations): Reimplement on top of cleanups.
1685         (add_intermediate_continuation): Drop the int argument of the
1686         continuation hook argument.  Add continuation_free_args argument.
1687         Reimplement on top of cleanups.
1688         (do_all_intermediate_continuations): Drop error argument.
1689         Reimplement on top of cleanups.
1690         (discard_all_intermediate_continuations): Reimplement on top of
1691         cleanups.
1692
1693         * breakpoint.c (until_break_command_continuation): Drop error
1694         argument.  Add xfree as continuation argument deleter.
1695
1696         * inf-loop.c (inferior_event_handler): On error, discard all
1697         continuations.  Adjust to new do_all_intermediate_continuations
1698         and do_all_continuations interfaces.
1699
1700         * infcmd.c (step_1_continuation): Drop error_p argument.  Adjust.
1701         Pass xfree as continuation argument deleter.
1702         (finish_command_continuation): Drop error_p argument.  Adjust.
1703         (finish_command_continuation_free_arg): New.
1704         (finish_command): Pass finish_command_continuation_free_arg as
1705         continuation argument deleter.  Adjust to new do_all_continuations
1706         interfaces.
1707         (attach_command_continuation): Drop error_p argument.
1708         (attach_command_continuation_free_args): New.
1709         (attach_command): Pass attach_command_continuation_free_args as
1710         continuation argument deleter.
1711
1712         * interps.c (interp_set): Adjust to new do_all_continuations
1713         interfaces.
1714
1715         * event-top.c (stdin_event_handler): In error, also discard the
1716         intermediate continuations.
1717
1718 2008-07-12  Pedro Alves  <pedro@codesourcery.com>
1719
1720         Replace struct continuation_args by void* and per command structs.
1721
1722         * top.c (execute_command): Remove unused arg1 and arg2 locals.
1723
1724         * breakpoint.c (struct until_break_command_continuation_args):
1725         New.
1726         (until_break_command_continuation): Take a void* instead of a
1727         continuations_arg.  Adjust.
1728         (until_break_command): Adjust to use struct
1729         until_break_command_continuation_args instead of struct
1730         continuation_arg.
1731
1732         * infcmd.c (struct step_1_continuation_args): New.
1733         (step_1_continuation): Take a void* instead of a
1734         continuations_arg.  Adjust to use struct step_1_continuation_args.
1735         (step_once): Adjust to use struct step_1_continuation_args.
1736
1737         (struct finish_command_continuation_args): New.
1738         (finish_command_continuation): Take a void* instead of a
1739         continuations_arg.  Adjust to use struct
1740         finish_command_continuation_args.
1741         (finish_command): Adjust to use struct
1742         finish_command_continuation_args.
1743         (struct attach_command_continuation_args): New.
1744         (attach_command_continuation): Take a void* instead of a
1745         continuations_arg.  Adjust to use struct
1746         attach_command_continuation_args.
1747         (attach_command): Adjust to use struct
1748         attach_command_continuation_args.
1749
1750         * defs.h (struct continuation_arg): Delete.
1751         (struct continuation): Replace the struct continuation_arg*
1752         parameter of continuation_hook by a void*.  Replace "arg_list"
1753         member by a new "args" member with void* type.
1754         (add_continuation, add_intermediate_continuation): Replace struct
1755         continuation_arg type usages by void* usages.
1756
1757         * utils.c (add_continuation, do_all_continuations)
1758         (add_intermediate_continuation)
1759         (do_all_intermediate_continuations): Replace struct
1760         continuation_arg type usages by void* usages.  Pass "args" instead
1761         of "arg_list".
1762
1763 2008-07-12  Pedro Alves  <pedro@codesourcery.com>
1764
1765         * infrun.c (struct thread_stepping_state): Delete sal member.
1766         (init_thread_stepping_state): Add local sal.  Use it instead of
1767         tss->sal.
1768         (handle_inferior_event): New local stop_pc_sal.  Use it instead of
1769         tss->sal.
1770         (step_into_function): Add local stop_func_sal.  Use it instead of
1771         tss->sal.
1772
1773 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
1774
1775         Implement -exec-continue/-exec-interrupt --all.
1776         * infcmd.c (continue_1): New, extracted from
1777         (continue_command): ...here.
1778         (interrupt_target_1): New, extracted from
1779         (interrupt_target_command): ...here.
1780         * inferior.h (continue_1, interrupt_target_1): New.
1781         * mi/mi-main.c (mi_cmd_exec_continue)
1782         (mi_cmd_exec_interrupt): Handle --all.
1783
1784 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
1785
1786         Implement --thread and --frame.
1787         * gdbthread.h (find_thread_id): Declare.
1788         * thread.c (find_thread_id): Make non-static.
1789         * mi/mi-main.c (mi_cmd_execute): Switch to the right
1790         thread and frame, if necessary.
1791         * mi/mi-parse.c (mi_parse): Handle --thread and --frame.
1792         * mi/mi-parse.h (strcut mi_parse): New fields thread and frame.
1793
1794 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
1795
1796         * infrun.c (resume): Discard cleanups on early exit path.
1797
1798 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
1799
1800         * infrun.c (normal_stop): For MI, report which threads
1801         were stopped.
1802
1803 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
1804
1805         Report thread state in -thread-info output.
1806         * thread.c (print_thread_info): Add new field "state".
1807
1808 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
1809
1810         * infrun.c (handle_inferior_event): Also ignore a
1811         TARGET_SIGNAL_TRAP on a STOP_QUIETLY_NO_SIGSTOP.
1812
1813 2008-07-11  Tom Tromey  <tromey@redhat.com>
1814
1815         * completer.c (complete_line_internal): New function, from
1816         complete_line.  Add 'for_help' parameter.
1817         (complete_line): Use it.
1818         (command_completer): Move later.  Rewrite.
1819
1820 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
1821
1822         * thread.c (thread_apply_command): Move making the cleanup out of
1823         the loop.
1824
1825 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
1826
1827         Exited threads.
1828
1829         * thread.c (enum thread_state): New.
1830         (thread_state main_thread_running): Delete, in favor of...
1831         (thread_state main_thread_state): ... this.  Update throughout.
1832         (clear_thread_inferior_resources): New, split from free_thread.
1833         (free_thread): Call clear_thread_inferior_resources.
1834         (init_thread_list): Set main thread to stopped state.
1835         (add_thread_silent): Take care of PTID reuses.
1836         (delete_thread): If deleting inferior_ptid or a thread with
1837         refcount > 0, mark it as exited, but still keep it in the list.
1838         Only notify of thread exits, if we haven't done so yet.
1839         (iterate_over_threads): Make it safe to delete threads while
1840         iterating over them.
1841         (do_captured_list_thread_ids): Don't account for exited threads.
1842         (thread_alive): Check for the THREAD_EXITED state, and don't set
1843         ptid to -1 on exited threads.
1844         (set_running): Update to account for extra possible states.
1845         (is_thread_state): New.
1846         (is_stopped, is_exited): New.
1847         (is_running): Implement in terms of is_thread_state.
1848         (any_running): Update.
1849         (print_thread_info): Update.  Account for exited threads.  Don't
1850         warn about missed frame restoring here, its done in the cleanup.
1851         (switch_to_thread): Don't read from a thread that has gone.
1852         (restore_current_thread): In non-stop mode, do a full context
1853         switch.
1854         (restore_selected_frame): Add a frame_level argument.  Rewrite.
1855         (struct current_thread_cleanup): Add selected_frame_level and
1856         was_stopped members.
1857         (do_restore_current_thread_cleanup): Check if thread was stopped
1858         and still is, and if the target has registers, stack and memory
1859         before restoring the selected frame.  Don't delete the cleanup
1860         argument here.
1861         (restore_current_thread_cleanup_dtor): New.
1862         (make_cleanup_restore_current_thread): Remove all arguments.
1863         Rewrite.
1864         (thread_apply_all_command): Update.  Prune threads.
1865         (thread_apply_command): Update.
1866         (thread_command): Account for currently selected exited thread.
1867         (do_captured_thread_select): Check for a running thread.  Prune
1868         threads.
1869         (_initialize_thread): Make "info threads", "thread", "thread
1870         apply", and "thread apply all" appliable without a selected thread.
1871         * gdbthread.h (struct thread_info): Replace running_ by state_.
1872         Add refcount.
1873         (is_exited, is_stopped): Declare.
1874         (make_cleanup_restore_current_thread): Remove all arguments.
1875         * infrun.c: Include "event-top.h".
1876         (fetch_inferior_event): In non-stop mode, restore selected thread
1877         and frame after handling the event and running breakpoint
1878         commands.  Display GDB prompt if needed.
1879         (normal_stop): In non-stop mode, don't print thread switching
1880         notice.
1881         * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
1882         (get_cmd_no_selected_thread_ok): New.
1883         * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): New.
1884         (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
1885         Declare.
1886         * cli/cli-cmds.c: Set "pwd", "help", "info", "show" as
1887         no-selected-thread ok.
1888         * top.c (execute_command): Check for non no-selected-thread-ok
1889         commands.
1890         * linux-nat.c (struct saved_ptids, threads_to_delete)
1891         (record_dead_thread, prune_lwps): Delete.
1892         (exit_lwp): Unconditionally delete thread.
1893         (linux_nat_resume): Remove prune_lwps call.
1894         * infcmd.c (proceed_thread_callback): Check if !is_stopped instead
1895         of is_running.  Adjust to make_cleanup_restore_current_thread
1896         interface change.
1897         * mi/mi-main.c (mi_cmd_execute): Only allow a few commands if the
1898         selected thread has exited.
1899         * inf-loop.c (inferior_event_handler): Don't display the prompt
1900         here.
1901         * varobj.c (c_value_of_root): Update.
1902         * defs.h (make_cleanup_dtor): Declare.
1903         * utils.c (make_cleanup_dtor): New.
1904
1905         * Makefile.in (infrun.o): Depend on $(event_top_h).
1906
1907 2008-07-11  Pedro Alves  <pedro@codesourcery.com>
1908
1909         Add "continue -a" and "interrupt -a" options for non-stop mode.
1910
1911         * infcmd.c (proceed_thread_callback, do_context_switch_to): New.
1912         (continue_command): Add "-a" option.
1913         (interrupt_target_command): Add "-a" option.
1914         (_initialize_infcmd): Add extend help of continue and interrupt
1915         command to mention the new "-a" option.  Mark "continue" async ok.
1916
1917 2008-07-10  Doug Evans  <dje@google.com>
1918
1919         Add "set print symbol-loading on|off".
1920         * NEWS: Document new option.
1921         * symfile.h (print_symbol_loading): Declare.
1922         * symfile.c (print_symbol_loading): New global.
1923         (symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
1924         from ..." if print_symbol_loading.
1925         (_initialize_symfile): Add set/show print symbol-loading.
1926         * solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
1927         if print_symbol_loading.
1928
1929 2008-07-10  Pedro Alves  <pedro@codesourcery.com>
1930
1931         Non-stop linux native.
1932
1933         * linux-nat.c (linux_test_for_tracefork): Block events while we're
1934         here.
1935         (get_pending_status): Implement non-stop mode.
1936         (linux_nat_detach): Stop threads before detaching.
1937         (linux_nat_resume): In non-stop mode, always resume only a single
1938         PTID.
1939         (linux_handle_extended_wait): On a clone event, in non-stop mode,
1940         add new lwp to GDB's thread table, and mark as running, executing
1941         and stopped appropriately.
1942         (linux_nat_filter_event): Don't assume there are other running
1943         threads when a thread exits.
1944         (linux_nat_wait): Mark the main thread as running and executing.
1945         In non-stop mode, don't stop all lwps.
1946         (linux_nat_kill): Stop lwps before killing them.
1947         (linux_nat_thread_alive): Use signal 0 to detect if a thread is
1948         alive.
1949         (send_sigint_callback): New.
1950         (linux_nat_stop): New.
1951         (linux_nat_add_target): Set to_stop to linux_nat_stop.
1952
1953         * linux-nat.h (thread_db_attach_lwp): Declare.
1954
1955         * linux-thread-db.c (thread_get_info_callback): Check for new
1956         threads if we have none.
1957         (thread_from_lwp, enable_thread_event): Set proc_handle.pid to the
1958         stopped lwp.  Check for new threads if we have none.
1959         (thread_db_attach_lwp): New.
1960         (thread_db_init): Set proc_handle.pid to inferior_ptid.
1961         (check_event): Set proc_handle.pid to the stopped lwp.
1962         (thread_db_find_new_threads): Set proc_handle.pid to any stopped
1963         lwp available, bail out if there is none.
1964
1965         * linux-fork.c (linux_fork_killall): Use SIGKILL instead of
1966         PTRACE_KILL.
1967
1968 2008-07-10  Kevin Buettner  <kevinb@redhat.com>
1969
1970         * rs6000-tdep.c (ppc_displaced_step_fixup): Change type of
1971         `current_pc' from CORE_ADDR to ULONGEST.
1972
1973         * remote-sim.c (gdbsim_cntrl_c): Pass remote_sim_ptid to
1974         gdbsim_stop().
1975
1976 2008-07-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1977
1978         * NEWS (New commands): Mention "set disable-randomization".
1979         * configure.ac: Add check for HAVE_PERSONALITY and
1980         HAVE_DECL_ADDR_NO_RANDOMIZE.
1981         * configure, config.in: Regenerate.
1982         * linux-nat.c [HAVE_PERSONALITY]: New include <sys/personality.h>.
1983         [HAVE_PERSONALITY] [!HAVE_DECL_ADDR_NO_RANDOMIZE]: Set
1984         ADDR_NO_RANDOMIZE.
1985         (disable_randomization, show_disable_randomization)
1986         (set_disable_randomization): New.
1987         (linux_nat_create_inferior) [HAVE_PERSONALITY]: New variables
1988         PERSONALITY_ORIG and PERSONALITY_SET.  Disable randomization upon the
1989         variable DISABLE_RANDOMIZATION.
1990         (_initialize_linux_nat): Call ADD_SETSHOW_BOOLEAN_CMD for the variable
1991         DISABLE_RANDOMIZATION.
1992
1993 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
1994
1995         Adjust all targets to new target_stop interface.
1996
1997         * gnu-nat.c (gnu_stop): Add ptid argument.
1998         * go32-nat.c (go32_stop): Add ptid argument.
1999         (go32_create_inferior): Pass inferior_ptid to go32_stop.
2000         * hpux-thread.c (hpux_thread_stop): Add ptid argument.
2001         * monitor.c (monitor_stop): Add ptid argument.
2002         (monitor_open): Pass inferior_ptid to monitor_stop.
2003         (monitor_interrupt): Pass inferior_ptid to target_stop.
2004         (monitor_stop): Add ptid argument.
2005         * nto-procfs.c (nto_interrupt): Pass inferior_ptid to target_stop.
2006         (procfs_create_inferior): Add ptid argument.
2007         * procfs.c (procfs_stop): Add ptid argument.
2008         * remote-m32r-sdi.c (m32r_stop): Add ptid argument.
2009         * remote-sim.c (gdbsim_stop): Add ptid argument.
2010         * sol-thread.c (sol_thread_stop): Add ptid argument.
2011         * win32-nat.c (win32_stop): Add ptid argument.
2012
2013 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2014
2015         Non-stop inferior control.
2016
2017         * infrun.c (resume): In non-stop mode, always resume just one
2018         thread.
2019         (proceed): Don't call prepare_to_proceed in non-stop mode.
2020         (fetch_inferior_event): In non-stop mode, switch context before
2021         handling the event.
2022         (error_is_running, ensure_not_running): New.
2023         (handle_inferior_event): In non-stop mode: Mark only the event
2024         thread as stopped.  Require that the target module manages adding
2025         threads to the thread list.  Assert that there isn't a
2026         deferred_step_ptid set.  Don't switch to infwait_thread_hop_state.
2027         (normal_stop): Only mark not-running if inferior hasn't exited.
2028         In non-stop mode, only mark the event thread.
2029
2030         * thread.c:Include "cli/cli-decode.h".
2031         (print_thread_info): Don't read from a running thread.
2032         Output "(running)" if thread is running.
2033         (switch_to_thread): Don't read stop_pc if thread is executing.
2034         (do_restore_current_thread_cleanup): Don't write to a running
2035         thread.
2036         (thread_apply_all_command): Don't read from a running thread.  In
2037         non-stop mode, do a full context-switch instead of just switching
2038         threads.
2039         (thread_apply_command): In non-stop mode, do a full context-switch
2040         instead of just switching threads.
2041         (do_captured_thread_select): Likewise.  Inform user if selected
2042         thread is running.
2043         (_initialize_thread): Mark "info threads" and "thread" and
2044         async_ok.
2045
2046         * inf-loop.c (inferior_event_handler): In non-stop mode, don't
2047         unregister the target from the event loop.
2048
2049         * infcmd.c (continue_command, step_1, jump_command)
2050         (signal_command): Ensure the selected thread isn't running.
2051         (interrupt_target_command): In non-stop mode, interrupt only the
2052         selected thread.
2053
2054         * inferior.h (error_is_running, ensure_not_running): Declare.
2055
2056         * target.h (struct target_ops): Add ptid argument to the to_stop
2057         member.
2058         (target_stop): Add ptid_t argument.
2059
2060         * target.c (update_current_target): Add ptid argument to to_stop's
2061         type.
2062         (debug_to_stop): Add ptid_t argument.
2063         (debug_to_rcmd): Set to_stop_ptid.
2064
2065         * remote.c (remote_stop): Add ptid_t argument.
2066         (async_remote_interrupt): Add inferior_ptid to target_stop.
2067         * inf-ptrace.c (inf_ptrace_stop): Add ptid argument.
2068
2069         * Makefile.in (thread.o): Depend on $(cli_decode_h).
2070
2071 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2072
2073         Don't rely on ecs->wait_for_more.
2074
2075         * infrun.c (proceed): Clear the stepping state, set
2076         previous_inferior_ptid and clear infwait state.
2077         (wait_for_inferior): Don't clear the stepping state, set
2078         previous_inferior_ptid, or clear the infwait state here.
2079         (fetch_inferior_event): Don't clear the stepping state, set
2080         previous_inferior_ptid, or clear the infwait state here.  Don't
2081         condition on wait_for_more.
2082
2083 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2084
2085         Refactor infrun a bit.
2086
2087         * infrun.c (currently_stepping): Take a struct
2088         thread_stepping_state instead of an execution_control_state.
2089         (struct thread_stepping_state): New, split from
2090         execution_control_state.
2091         (gtss, tss): New globals.
2092         (proceed): Clear the stepping state, set previous_inferior_ptid
2093         and clear infwait state.
2094         (init_wait_for_inferior): Clear the stepping state,
2095         previous_inferior_ptid and infwait state.
2096         (waiton_ptid, infwait_state): New, split from
2097         execution_control_state.
2098         (struct execution_control_state): Members that persist through
2099         events moved out to either struct thred_stepping_state or made
2100         global.  Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
2101         (wait_for_inferior, fetch_inferior_event): Use local
2102         execution_control_state.  Update to execution_control_state split.
2103         (init_execution_control_state): Adjust.
2104         (init_thread_stepping_state): New, extracted from
2105         init_execution_control_state.
2106         (context_switch): Take a ptid instead of an
2107         execution_control_state.
2108         (context_switch_to): Adjust.
2109         (adjust_pc_after_break): Adjust.
2110         (init_infwait_state): New.
2111         (handle_inferior_event): Adjust.
2112
2113 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2114             Vladimir Prus  <vladimir@codesourcery.com>
2115
2116         Per-thread commands.
2117
2118         * gdbthread.h: Remove unneeded forward declarations.
2119         Include "inferior.h".
2120         (struct thread_info): Add continuations,
2121         intermediate_continuations, proceed_to_finish, step_over_calls,
2122         stop_step, step_multi and stop_signal members.
2123         (save_infrun_state): Add continuations,
2124         intermediate_continuations, proceed_to_finish, step_over_calls,
2125         stop_step, step_multi, stop_signal and stop_bpstat parameters.
2126         (load_infrun_state): Add continuations,
2127         intermediate_continuations, proceed_to_finish, step_over_calls,
2128         stop_step, step_multi, stop_signal and stop_bpstat parameters.
2129
2130         * thread.c (load_infrun_state): In non-stop mode, load
2131         continuations, intermediate_continuations, proceed_to_finish,
2132         step_over_calls, stop_step, step_multi and stop_signal.
2133         (save_infrun_state): Store continuations,
2134         intermediate_continuations, proceed_to_finish, step_over_calls,
2135         stop_step, step_multi, stop_signal and stop_bpstat.
2136         (save_infrun_state): Store continuations,
2137         intermediate_continuations, proceed_to_finish, step_over_calls,
2138         stop_step, step_multi, stop_signal and stop_bpstat.
2139         (free_thread): Clear The thread's stop_bpstat.
2140
2141         * inferior.h (context_switch_to): Declare.
2142
2143         * infrun.c (ecss): New global.
2144         (context_switch): Context switch continuations,
2145         intermediate_continuations, proceed_to_finish, step_over_calls,
2146         stop_step, step_multi, stop_signal and stop_bpstat.
2147         (wait_for_inferior): Use global ecss.
2148         (async_ecss, async_ecs): Delete.
2149         (fetch_inferior_event): Use global ecss.
2150         (context_switch_to): New.
2151
2152         * top.c (execute_command): In non-stop, only check if the current
2153         thread is running, in all-stop, check if there's any thread
2154         running.
2155
2156         * breakpoint.c (bpstat_remove_breakpoint): New.
2157         (bpstat_remove_breakpoint_callback): New.
2158         (delete_breakpoint): Clear the stop_bpstats of all threads.
2159
2160         * mi/mi-main.c (mi_cmd_execute): In non-stop, only check if the
2161         current thread is running, in all-stop, check if there's any
2162         thread running.
2163
2164         * Makefile.in (gdbthread_h): Depend on $(inferior_h).
2165
2166 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2167
2168         Add non_stop global.
2169
2170         * inferior.h (non_stop): Declare.
2171         * infrun.c (non_stop, non_stop_1): New.
2172         (set_non_stop, show_non_stop): New.
2173         (_initialize_infrun): Add "set/show non-stop" command.
2174
2175 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2176
2177         Adjust fork/vfork/exec to pass ptids around.
2178
2179         * target.h (struct target_waitstatus): Store related_pid as a ptid.
2180         (inferior_has_forked, inferior_has_vforked, inferior_has_execd):
2181         Take a ptid_t.
2182         * breakpoint.h (struct breakpoint): Change forked_inferior_pid
2183         type to ptid.
2184         * breakpoint.c (print_it_typical, bpstat_check_location)
2185         (print_one_breakpoint_location, set_raw_breakpoint_without_location)
2186         (create_fork_vfork_event_catchpoint): Adjust.
2187         * infrun.c (fork_event): Change parent_pid and child_pid types to
2188         ptid.
2189         (follow_exec, inferior_has_forked, inferior_has_vforked)
2190         (inferior_has_execd): Take a ptid_t and don't trim it.
2191         * linux-thread-db.c (thread_db_wait): Don't trim the returned ptid.
2192         * linux-nat.c (linux_child_follow_fork): Adjust.
2193         * inf-ptrace.c (inf_ptrace_wait): Adjust.
2194         * inf-ttrace.c (inf_ttrace_wait): Adjust.
2195         * win32-nat.c (get_win32_debug_event): Don't set related_pid.
2196
2197 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2198
2199         Add "executing" property to threads.
2200
2201         * inferior.h (target_executing): Delete.
2202         * gdbthread.h (struct thread_info): Add executing_ field.
2203         (set_executing, is_executing): New.
2204         * thread.c (main_thread_executing): New.
2205         (init_thread_list): Clear it and also main_thread_running.
2206         (is_running): Return false if target has no execution.
2207         (any_running, is_executing, set_executing): New.
2208
2209         * top.c: Include "gdbthread.h".
2210         (target_executing): Delete.
2211         (execute_command): Replace target_executing check by any_running.
2212         * event-top.c: Include "gdbthread.h".
2213         (display_gdb_prompt, command_handler): Replace target_executing by
2214         is_running.
2215         * inf-loop.c: Include "gdbthread.h".  Don't mark as not executing
2216         here.  Replace target_executing by is_running.
2217         * infrun.c (handle_inferior_event): Mark all threads as
2218         not-executing.
2219         * linux-nat.c (linux_nat_resume): Don't mark thread as executing
2220         here.
2221         * stack.c (get_selected_block): Return null if inferior is
2222         executing.
2223         * target.c (target_resume): Mark resumed ptid as executing.
2224         * breakpoint.c (until_break_command): Replace target_executing
2225         check by is_executing.
2226         * remote.c (remote_async_resume): Don't mark inferior as executing
2227         here.
2228         * mi/mi-interp.c (mi_cmd_interpreter_exec): Replace target_executing
2229         by any_running.
2230
2231         * mi/mi-main.c (mi_cmd_exec_interrupt, mi_cmd_execute)
2232         (mi_execute_async_cli_command): Replace target_executing by
2233         is_running.
2234
2235         * frame.c (get_current_frame): Error out if the current thread is
2236         executing.
2237         (has_stack_frames): New.
2238         (get_selected_frame, deprecated_safe_get_selected_frame): Check
2239         has_stack_frames.
2240
2241         * Makefile.in (event-top.o, frame.o, inf-loop.o, top.o): Depend on
2242         $(gdbthread_h).
2243
2244 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2245
2246         * symfile.c (load_command): Reopen the exec file and reread
2247         symbols before anything else.
2248
2249 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2250
2251         * remote-sim.c: Include gdbthread.h.
2252         (remote_sim_ptid): New global.
2253         (gdbsim_create_inferior): Silently add the main task to GDB's
2254         thread list.
2255         (gdbsim_close, gdbsim_mourn_inferior): Silently delete the main
2256         task from GDB's thread list.
2257         (gdbsim_resume): Adjust to use remote_sim_ptid.
2258         (gdbsim_thread_alive, gdbsim_pid_to_str): New.
2259         (init_gdbsim_ops): Register gdbsim_thread_alive and
2260         gdbsim_pid_to_str.
2261         (_initialize_remote_sim): Initialize remote_sim_ptid.
2262         * Makefile.in (remote-sim.o): Depend on $(gdbthread_h).
2263
2264 2008-07-09  Pedro Alves  <pedro@codesourcery.com>
2265
2266         * monitor (monitor_ptid): New global.
2267         (monitor_open): Silently add the main task to GDB's thread list.
2268         (monitor_close, monitor_mourn_inferior): Silently delete the main
2269         task from GDB's thread list.
2270         (monitor_thread_alive, monitor_pid_to_str): New.
2271         (init_base_monitor_ops): Register monitor_thread_alive and
2272         monitor_pid_to_str.
2273         (_initialize_remote_monitors): Initialize monitor_ptid.
2274
2275         * gdbthread.h (delete_thread_silent): Declare.
2276         * thread.c (delete_thread): Rename to ...
2277         (delete_thread_1): ... this.  Add "silent" parameter.  If silent,
2278         don't do exit notifications.
2279         (delete_thread, delete_thread_silent): New, as wrappers to
2280         delete_thread_1.
2281
2282 2008-07-08  Pedro Alves  <pedro@codesourcery.com>
2283
2284         * breakpoint.c (update_global_location_list): Add boolean
2285         "should_insert" argument.  Only insert locations if caller told it
2286         too.
2287         (update_global_location_list_nothrow): Add boolean "should_insert"
2288         argument.  Pass it to update_global_location_list.
2289         (insert_breakpoints, create_longjmp_breakpoint)
2290         (create_overlay_event_breakpoint, enable_overlay_breakpoints)
2291         (create_thread_event_breakpoint, create_solib_event_breakpoint)
2292         (create_fork_vfork_event_catchpoint, create_exec_event_catchpoint)
2293         (enable_watchpoints_after_interactive_call_stop)
2294         (set_momentary_breakpoint, create_breakpoints)
2295         (break_command_really, watch_command_1)
2296         (create_ada_exception_breakpoint, update_breakpoint_locations)
2297         (do_enable_breakpoint, enable_command): Pass true to
2298         update_global_location_list.
2299         (bpstat_stop_status, disable_overlay_breakpoints)
2300         (disable_watchpoints_before_interactive_call_start)
2301         (delete_breakpoint, disable_breakpoint, disable_command): Pass
2302         false to update_global_location_list.
2303         (update_breakpoints_after_exec): Don't temporarily disable
2304         always-inserted mode.
2305
2306 2008-07-08  Pedro Alves  <pedro@codesourcery.com>
2307
2308         * breakpoint.c (mark_breakpoints_out): Make public.
2309         (update_breakpoints_after_exec): Don't call mark_breakpoints_out
2310         here.  Update comment.
2311         * breakpoint.h (mark_breakpoints_out): Declare.
2312
2313         * linux-nat.c (linux_handle_extended_wait): On
2314         TARGET_WAITKIND_EXECD, call mark_breakpoints_out.
2315         * inf-ttrace.c (inf_ttrace_wait): Likewise.
2316
2317 2008-07-08  Pedro Alves  <pedro@codesourcery.com>
2318
2319         * infrun.c (follow_exec): Reset shared libraries before adding the
2320         main exec file.
2321
2322 2008-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2323
2324         * breakpoint.c (bpstat_copy): Call RELEASE_VALUE on the new OLD_VAL.
2325
2326 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
2327
2328         * i386-dicos-tdep.c: Include "inferior.h".
2329         (i386_dicos_frame_align): New.
2330         (i386_dicos_init_abi): Register i386_dicos_frame_align.  Set call
2331         dummy location ON_STACK.
2332         * Makefile.in (i386-dicos-tdep.o): Depend on $(inferior_h).
2333
2334 2008-07-07  Joel Brobecker  <brobecker@adacore.com>
2335
2336         * gstdint.h: New file.
2337
2338 2008-07-05  Vladimir Prus  <vladimir@codesourcery.com>
2339
2340         * mi/mi-interp.c (mi_on_resume): Don't try to report
2341         resumed thread it the thread list is empty.
2342
2343 2008-07-05  Pierre Muller  <muller@ics.u-strasbg.fr>
2344
2345         * cli/cli-decode.c (add_setshow_optional_filename_cmd): Set
2346         completer for set to filename_completer.
2347
2348         NEWS: Mention it.
2349
2350 2008-07-04  Vladimir Prus  <vladimir@codesourcery.com>
2351
2352         Implement -target-attach.
2353         * mi/mi-cmds.c (mi_cmds): Forward -target-attach to CLI attach.
2354
2355 2008-06-21  Hui Zhu  <teawater@gmail.com>
2356
2357         * target-descriptions.c (maint_print_c_tdesc_cmd): Fix a memory leak.
2358
2359 2008-07-03  Pedro Alves  <pedro@codesourcery.com>
2360
2361         * config/i386/nm-cygwin.h (ATTACH_NO_WAIT): Delete.
2362         * config/i386/nm-i386gnu.h (ATTACH_NO_WAIT): Delete.
2363
2364         * target.h (struct target_ops): Add to_attach_no_wait member.
2365         (target_attach_no_wait): New.
2366         * target.c (update_current_target): Inherit to_attach_no_wait.
2367
2368         * infcmd.c: Replace ATTACH_NO_WAIT compile time check by
2369         target_attach_no_wait runtime check.
2370
2371         * gnu-nat.c (init_gnu_ops): Set to_attach_no_wait in gnu_ops.
2372         * win32-nat.c (init_win32_ops): Set to_attach_no_wait in
2373         win32_ops.
2374
2375 2008-07-03  Pedro Alves  <pedro@codesourcery.com>
2376
2377         * i386-tdep.c (i386_displaced_step_fixup): Condition log printing
2378         on debug_displaced being set.
2379
2380 2008-06-30  Daniel Jacobowitz  <dan@codesourcery.com>
2381
2382         * frame.c (get_prev_frame_1): Call frame_unwind_find_by_frame
2383         directly instead of get_frame_id.
2384
2385 2008-06-30  Luis Machado  <luisgpm@br.ibm.com>
2386
2387         * rs6000-tdep.c (ppc_displaced_step_fixup): New function.
2388         (deal_with_atomic_sequence): Update BC masks.
2389         (rs6000_gdbarch_init): Init displaced stepping infra-structure.
2390         Define BRANCH_MASK, B_INSN, BC_INSN, BXL_INSN, BP_MASK and BP_INSN.
2391
2392 2008-06-30  Daniel Jacobowitz  <dan@codesourcery.com>
2393
2394         * cris-tdep.c (crisv32_single_step_through_delay): Get this frame's
2395         register, not the previous frame's.
2396
2397 2008-06-30  Luis Machado  <luisgpm@br.ibm.com>
2398
2399         * source.c (select_source_symtab): Make sure we skip namespace
2400         symtabs when showing cpp source code.
2401
2402 2008-06-30  Hans-Peter Nilsson  <hp@axis.com>
2403
2404         * MAINTAINERS (Authorized committers): Fix my email address.
2405
2406 2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
2407
2408         * mi/mi-cmds.c (mi_cmds): Route -exec-run, -exec-until,
2409         -target-download and -target-select via CLI, so that
2410         the quoting rules are the same as they were (unfortunately)
2411         in all prior gdb releases.
2412         * mi/mi-cmds.h (mi_cmd_exec_run, mi_cmd_exec_until)
2413         (mi_cmd_target_download, mi_cmd_target_select): Remove.
2414         * mi/mi-main.c (mi_cmd_exec_run, mi_cmd_exec_until)
2415         (mi_cmd_target_download, mi_cmd_target_select): Remove.
2416         (mi_cmd_execute): Set current_token even for commands
2417         routed via CLI.
2418
2419 2008-06-28  Ulrich Weigand  <uweigand@de.ibm.com>
2420
2421         * alphafbsd-tdep.c: Update for unwinder changes.
2422         * alpha-linux-tdep.c: Likewise.
2423         * alphanbsd-tdep.c: Likewise.
2424         * alphaobsd-tdep.c: Likewise.
2425         * avr-tdep.c: Likewise.
2426         * cris-tdep.c: Likewise.
2427         * frv-linux-tdep.c: Likewise.
2428         * frv-tdep.c: Likewise.
2429         * h8300-tdep.c: Likewise.
2430         * hppa-linux-tdep.c: Likewise.
2431         * iq2000-tdep.c: Likewise.
2432         * m32c-tdep.c: Likewise.
2433         * m32r-linux-tdep.c: Likewise.
2434         * m32r-tdep.c: Likewise.
2435         * m68hc11-tdep.c: Likewise.
2436         * mep-tdep.c: Likewise.
2437         * mn10300-tdep.c: Likewise.
2438         * mt-tdep.c: Likewise.
2439         * score-tdep.c: Likewise.
2440         * sh64-tdep.c: Likewise.
2441         * sh-tdep.c: Likewise.
2442         * sparc64fbsd-tdep.c: Likewise.
2443         * sparc64nbsd-tdep.c: Likewise.
2444         * sparc64obsd-tdep.c: Likewise.
2445         * v850-tdep.c: Likewise.
2446         * vaxobsd-tdep.c: Likewise.
2447         * vax-tdep.c: Likewise.
2448         * xstormy16-tdep.c: Likewise.
2449
2450 2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
2451
2452         * mi/mi-main.c (enum captured_mi_execute_command_actions)
2453         (captured_mi_execute_command_args): Remove.
2454         (captured_mi_execute_command): Cast the closure to mi_parse
2455         pointer, not to captured_mi_execute_command_args, and don't
2456         set the action field thereof.
2457         (mi_execute_command): Pass struct mi_parse, not
2458         captured_mi_execute_command_args to captured_mi_execute_command.
2459         (mi_execute_command): Remove (dead) code for suppressing
2460         printing prompt.
2461
2462 2008-06-28  Pedro Alves  <pedro@codesourcery.com>
2463
2464         * linux-nat.c (enum sigchld_state): New.
2465         (linux_nat_async_events_state): Renamed from
2466         linux_nat_async_events_enabled.
2467         (linux_nat_event_pipe_push, my_waitpid): Adjust.
2468         (sigchld_default_action): New.
2469         (lin_lwp_attach_lwp): Adjust.  Call linux_nat_async_events
2470         unconditionally.
2471         (linux_nat_create_inferior): Set events state to sigchld_default
2472         state.
2473         (linux_nat_resume): Adjust.
2474         (linux_nat_wait): Call linux_nat_async_events unconditionally.
2475         (sigchld_handler): Adjust.
2476         (linux_nat_async_mask): Don't set SIGCHLD actions here.
2477         (get_pending_events): Adjust.
2478         (linux_nat_async_events): Rewrite to handle enum sigchld_state
2479         instead of a boolean.
2480         (linux_nat_async): Adjust.
2481         (_initialize_linux_nat): Capture default SIGCHLD action into
2482         sigchld_default_action.
2483
2484 2008-06-28  Vladimir Prus  <vladimir@codesourcery.com>
2485
2486         * breakpoint.c (moribund_locations): New.
2487         (bpstat_stop_status): Process moribund locations.
2488         (update_global_location_list): Add removed
2489         locations to moribund_locations.
2490         (breakpoint_retire_moribund): New.
2491         * breakpoint.h (struct bp_location): New field
2492         events_till_retirement.
2493         (breakpoint_retire_moribund): Declare.
2494         * thread.c (thread_count): New.
2495         * infrun.c (handle_inferior_event): Call
2496         breakpoint_retire_moribund.
2497         * gdbthread.h (thread_count): Declare.
2498
2499 2008-06-27  Joseph Myers  <joseph@codesourcery.com>
2500
2501         * dfp.c (decimal_convert): Call match_endianness before and after
2502         conversion.
2503
2504 2008-06-27  Jonathan Larmour  <jifl@eCosCentric.com>
2505
2506         * remote.c (remote_insert_breakpoint): Ensure that if Z0
2507         unsupported and we fall back to memory_insert_breakpoint, we
2508         use the unmodified requested address.
2509
2510 2008-06-27  Joel Brobecker  <brobecker@adacore.com>
2511
2512         * dwarf2read.c (read_attribute_value): Issue a complaint when
2513         adjusting size attribute values of 0xffffffff as zero.
2514
2515 2008-06-27  Joseph Myers  <joseph@codesourcery.com>
2516
2517         * i386-tdep.c (i386_16_byte_align_p): New.
2518         (i386_push_dummy_call): Determine stack space required for
2519         arguments going forwards allowing for 16-byte alignment, then push
2520         arguments going forwards.
2521
2522 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
2523
2524         * infrun.c (start_remote): Don't clear thread list here.
2525         * monitor.c (monitor_open): Include "gdbthread.h".  Clear thread
2526         list here.
2527         * remote.c (record_currthread): Upgrade the main thread and its
2528         entry in the thread list if this is the first time we hear about
2529         threads.
2530         (remote_thread_alive): Consider magic_null_ptid or a ptid without
2531         a tid member always alive.
2532         (remote_find_new_threads): Don't update the main thread here.
2533         (remote_start_remote): Clear thread list here.  Always add the
2534         main thread.
2535         (extended_remote_attach_1): Add the main thread here.
2536         (extended_remote_mourn_1): Re-add the main thread here.
2537         (extended_remote_create_inferior_1): Add a main thread.
2538
2539         * Makefile.in (monitor.o): Depend on $(gdbthread_h).
2540
2541 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
2542
2543         Use ptid_t.tid to store thread ids instead of ptid_t.pid.
2544
2545         * remote.c (magic_null_ptid, not_sent_ptid, any_thread_ptid): New
2546         globals.
2547         (general_thread, continue_thread): Change type to ptid_t.
2548         (record_currthread): Take a ptid_t parameter instead of an
2549         integer.
2550         (MAGIC_NULL_PID): Delete.
2551         (set_thread): Take a ptid_t parameter and adjust.
2552         (set_general_thread, set_continue_thread): New.
2553         (remote_thread_alive, remote_newthread_step)
2554         (remote_current_thread, remote_find_new_threads)
2555         (remote_threads_info, remote_start_remote, remote_vcont_resume)
2556         (remote_resume_1, remote_wait, extended_remote_create_inferior_1)
2557         (threadalive_test, remote_pid_to_str)
2558         (remote_get_thread_local_address): Adjust.
2559         (_initialize_remote): Initialize magic_null_ptid, not_sent_ptid
2560         and any_thread_ptid.
2561
2562 2008-06-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
2563
2564         * configure.ac (--enable-tui): AC_MSG_ERROR for explicit --enable-tui.
2565         * configure: Regenerated.
2566
2567 2008-06-26  Joel Brobecker  <brobecker@adacore.com>
2568
2569         * dwarf2read.c (read_attribute_value): Treat size attribute
2570         values of 0xffffffff as if the attribute value was zero.
2571
2572 2008-06-26  Vladimir Prus  <vladimir@codesourcery.com>
2573
2574         * linux-nat.c: Add description of overall logic.
2575
2576 2008-06-26  Daniel Jacobowitz  <dan@codesourcery.com>
2577
2578         * Makefile.in (GNULIB_H): Use GNULIB_STDINT_H.
2579         (gdb_stdint_h, gdb_stdint.h, stamp-int): Delete.  Remove
2580         all dependencies on $(gdb_stdint_h).
2581         (distclean): Do not delete gdb_stdint.h.
2582         * acinclude.m4: Do not use stdint.m4.
2583         * configure.ac: Set GNULIB_STDINT_H.  Remove tests for stdint.h,
2584         uintptr_t, and gdb_stdint.h.
2585         * defs.h: Include <stdint.h>.
2586         * gdb_thread_db.h: Assume stdint.h is already included.
2587         * breakpoint.c, findcmd.c, hppa-tdep.c, inf-ptrace.c, proc-service.c,
2588         rs6000-nat.c, spu-linux-nat.c, target.c, win32-nat.c: Do not
2589         include gdb_stdint.h.
2590         * configure, config.in: Regenerate.
2591
2592 2008-06-26  Joseph Myers  <joseph@codesourcery.com>
2593
2594         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Handle passing
2595         decimal floating-point values in GPRs for soft-float.
2596         (do_ppc_sysv_return_value): Handle returning decimal
2597         floating-point values in GPRs for soft-float.
2598
2599 2008-06-26  Vladimir Prus  <vladimir@codesourcery.com>
2600
2601         * target.c (target_read_until_error): New.
2602         * target.h (target_read_until_error): Declare.
2603         * mi/mi-main.c (mi_cmd_data_read_memory): Use
2604         target_read_until_error.
2605
2606 2008-06-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
2607
2608         Fix a memory leak found by Hui Zhu <teawater@gmail.com>.
2609         * c-exp.y (parse_number): Move the S and SAVED_CHAR initialization
2610         after the DECFLOAT detection to fix a memory leak.  Remove the
2611         redundant NUM initialization.  Protect the DECFLOAT detection memory
2612         access before the P block.  Restore the P memory content for the
2613         DECFLOAT detection.
2614
2615 2008-06-25  Vladimir Prus  <vladimir@codesourcery.com>
2616
2617         Kill the return value for all MI command functions.
2618         * mi/mi-cmds.h (enum mi_cmd_result): Remove.
2619         (mi_cmd_argv_ftype): Change return type to void.
2620
2621         * mi/mi-main.c: Adjust all function that implement
2622         MI commands to return nothing.
2623         (struct captured_mi_execute_command_actions):
2624         Remove the rc field.
2625         (mi_cmd_execute): Return nothing.
2626         (mi_execute_async_cli_command): Return nothing.
2627         (mi_cmd_exec_interrupt): Don't print ^done here.
2628         (mi_cmd_target_select): Don't print ^connected here.
2629         (captured_mi_execute_command): Don't check for MI_CMD_DONE.
2630         Special-case -target-select and output ^connected, not ^done.
2631
2632         * mi/mi-cmd-break.c: Adjust.
2633         * mi/mi-cmd-disas.c: Adjust.
2634         * mi/mi-cmd-env.c: Adjust.
2635         * mi/mi-cmd-file.c: Adjust.
2636         * mi/mi-cmd-stack.c: Adjust.
2637         * mi/mi-cmd-target.c: Adjust.
2638         * mi/mi-cmd-var.c: Adjust.
2639         * mi/mi-interp.c: Adjust.
2640         * mi/mi-symbol-cmds.c: Adjust.
2641
2642 2008-06-25  Vladimir Prus  <vladimir@codesourcery.com>
2643
2644         Emit ^running via observer.
2645         * mi/mi-interp.c (mi_cmd_interpreter_exec): Do no print
2646         ^running here.
2647         (mi_on_resume): Print ^running if not previously output.
2648         * mi/mi-main.c (running_result_record_printed): New.
2649         (captured_mi_execute_command): Reset
2650         running_result_record_printed.  Use running_result_record_printed
2651         to decide if we should skip ^done.
2652         (mi_execute_async_cli_command): Don't print ^running here.
2653         * mi/mi-main.h (current_token, running_result_record_printed):
2654         Declare.
2655
2656 2008-06-24  Michael Snyder  <msnyder@specifix.com>
2657
2658         * infrun.c (_initialize_infrun): White space and typo fix.
2659
2660 2008-06-23  Christopher Faylor  <me.gdb.changelog@cgf.cx>
2661
2662         * win32-nat.c (safe_symbol_file_add_stub): Remove unused variable.
2663         (do_initial_win32_stuff): Fix problem with inability to set breakpoints
2664         when first loading DLL with "dll" command.
2665
2666 2008-06-19  Pierre Muller  <muller@ics.u-strasbg.fr>
2667
2668         * gnu-nat.c (proc_string): Use capital T for "Thread".
2669
2670 2008-06-19  Pierre Muller  <muller@ics.u-strasbg.fr>
2671
2672         * win32-nat.c (win32_pid_to_str): Use capital T for "Thread".
2673
2674 2008-06-18  Joel Brobecker  <brobecker@adacore.com>
2675
2676         * solib-osf.c (osf_solib_create_inferior_hook): Do nothing if
2677         the target cannot run.
2678
2679 2008-06-18  Joel Brobecker  <brobecker@adacore.com>
2680
2681         * solib-osf.c (osf_solib_create_inferior_hook): Do nothing if
2682         we're attaching to a running process.
2683
2684 2008-06-18  Pierre Muller  <muller@ics.u-strasbg.fr>
2685
2686         * win32-nat.c (handle_load_dll): Give dll name and load address
2687         if debug_events is on.
2688         (handle_unload_dll): Likewise.
2689
2690 2008-06-14  Vladimir Prus  <vladimir@codesourcery.com>
2691
2692         Don't suppress *running when doing finish.
2693         * infcall.c (call_function_by_hand): Set both
2694         suppress_resume_observer and suppress_stop_observer.
2695         * infcmd.c (suppress_run_stop_observers): Split into...
2696         (suppress_resume_observer, suppress_stop_observer): ...those.
2697         (finish_command_continuation): Clear suppress_stop_observer.
2698         (finish_command): Set suppress_stop_observer.
2699         * inferior.h (suppress_run_stop_observers): Split into...
2700         (suppress_resume_observer, suppress_stop_observer): ...those.
2701         * infrun.c (normal_stop): Check for suppress_stop_observer.
2702         * thread.c (set_running): Check for suppress_resume_observer.
2703
2704 2008-06-12  Pedro Alves  <pedro_alves@portugalmail.pt>
2705             Pierre Muller  <muller@ics.u-strasbg.fr>
2706
2707         * gdbarch.sh (gdbarch_skip_main_prologue): New.
2708         * gdbarch.h, gdbarch.c: Regenerate.
2709         * i386-tdep.h (i386_skip_main_prologue): Declare.
2710         * i386-tdep.c (i386_skip_main_prologue): New.
2711         * i386-cygwin-tdep.c (i386_cygwin_init_abi): Register
2712         i386_skip_main_prologue as gdbarch_skip_main_prologue gdbarch callback.
2713         * symtab.c (find_function_start_sal): When pc points at the "main"
2714         function, call gdbarch_skip_main_prologue.
2715
2716 2008-06-11  Daniel Jacobowitz  <dan@codesourcery.com>
2717
2718         * value.c (value_primitive_field): Fetch lazy register values.
2719
2720 2008-06-11  Pedro Alves  <pedro@codesourcery.com>
2721
2722         * NEWS: Mention support removal of undocumented S AA p PID stop
2723         reply packet.
2724
2725         * remote.c (remote_wait): Remove undocumented S AA p PID support.
2726
2727 2008-06-10  Stan Shebs  <stan@codesourcery.com>
2728
2729         * MAINTAINERS: Update my affiliation and address.
2730
2731 2008-06-10  Andreas Schwab  <schwab@suse.de>
2732
2733         * top.c (print_gdb_version): Don't print final newline.
2734
2735 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
2736
2737         Implement *running.
2738         * Makefile.in: Update dependencies.
2739         * gdbthread.h (struct thread_info): New field
2740         running_.
2741         (set_running, is_running): New.
2742         * thread.c (set_running, is_running): New.
2743         * inferior.h (suppress_normal_stop_observer): Rename to...
2744         (suppress_run_stop_observers): ..this.
2745         * infcmd.c (suppress_normal_stop_observer): Rename to...
2746         (suppress_run_stop_observers): ..this.
2747         (finish_command_continuation, finish_command): Adjust.
2748         * infcall.c (call_function_by_hand): Adjust.
2749         * infrun.c (normal_stop): Call set_running.
2750         * target.c (target_resume): New.  Call set_running.
2751         * target.h (target_resume): Convert from macro to
2752         a function.
2753
2754         * mi/mi-interp.c (mi_on_resume): New.
2755         (mi_interpreter_init): Register mi_on_resume.
2756
2757 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
2758
2759         Use observers to report stop events in MI.
2760         * mi/mi-interp.c (mi_on_normal_stop): New.
2761         (mi_interpreter_init): Register mi_on_normal_stop.
2762         (mi_interpreter_exec_continuation): Remove.
2763         (mi_cmd_interpreter_exec): Don't register the above.
2764         * mi/mi-main.c (captured_mi_execute_command): Don't care
2765         about sync_execution.
2766         (mi_execute_async_cli_command): Don't install continuation.  Don't
2767         print *stopped.
2768         (mi_exec_async_cli_cmd_continuation): Remove.
2769
2770 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
2771
2772         Suppress normal stop observer when it's problematic.
2773         * inferior.h (suppress_normal_stop_observer): New.
2774         * infcall.c (call_function_by_hand): Disable stop events when
2775         doing function calls.
2776         * infmcd.c (suppress_normal_stop_observer): New.
2777         (finish_command_continuation): Call normal_stop observer
2778         explicitly.
2779         (finish_command): Disable stop events inside proceed.
2780         * infrun.c (normal_stop): Don't call normal stop observer if
2781         suppressed of if multi-step is in progress.
2782
2783 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
2784
2785         Remove stale code.
2786         * infrun.c (finish_command): Don't pass cleanup
2787         to continuation.
2788         (finish_command_continuation): Don't grab cleanup from
2789         the passed data, as we don't use, and cannot, use it anyway.
2790
2791 2008-06-10  Vladimir Prus  <vladimir@codesourcery.com>
2792
2793         Introduce common cleanup for restoring integers.
2794         * defs.h (make_cleanup_restore_integer): New declaration.
2795         (struct cleanup): New field free_arg.
2796         (make_my_cleanup_2): New.
2797         * utils.c (restore_integer_closure, restore_integer)
2798         (make_cleanup_restore_integer): New.
2799         (make_my_cleanup): Initialize the free_arg field and
2800         renamed to make_my_cleanup_2.
2801         (do_my_cleanups): Call free_arg.
2802         (discard_cleanups): Call free_arg.
2803         * breakpoint.c (restore_always_inserted_mode): Remove.
2804         (update_breakpoints_after_exec): Use make_cleanup_restore_integer.
2805
2806 2008-06-09  Doug Evans  <dje@google.com>
2807
2808         * remote.c (remote_wait): Include beginning of malformed packet
2809         in error output.
2810
2811 2008-06-09  Tom Tromey  <tromey@redhat.com>
2812
2813         * completer.c (complete_line): Don't special-case
2814         expression_completer.
2815         (expression_completer): Only pass last word to
2816         location_completer.
2817         * c-exp.y (yylex): Check 'token', not 'operator'.
2818
2819 2008-06-09  Daniel Jacobowitz  <dan@codesourcery.com>
2820
2821         * configure.ac (build_warnings): Add -Wno-format for mingw.
2822         * configure: Regenerated.
2823
2824 2008-06-07  Daniel Jacobowitz  <dan@codesourcery.com>
2825
2826         * NEWS: Make indentation consistent.  Move exec tracing entry out
2827         of remote packet list.
2828
2829 2008-06-06  Tom Tromey  <tromey@redhat.com>
2830
2831         * value.h (evaluate_subexpression_type, extract_field_op):
2832         Declare.
2833         * printcmd.c (_initialize_printcmd): Use expression_completer for
2834         'p', 'inspect', 'call'.
2835         * parser-defs.h (parse_field_expression): Declare.
2836         * parse.c: Include exceptions.h.
2837         (in_parse_field, expout_last_struct): New globals.
2838         (mark_struct_expression): New function.
2839         (prefixify_expression): Return int.
2840         (prefixify_subexp): Return int.  Use expout_last_struct.
2841         (parse_exp_1): Update.
2842         (parse_exp_in_context): Add 'out_subexp' argument.  Handle
2843         in_parse_field.
2844         (parse_field_expression): New function.
2845         * expression.h (parse_field_expression): Declare.
2846         (in_parse_field): Likewise.
2847         * eval.c (evaluate_subexpression_type): New function.
2848         (extract_field_op): Likewise.
2849         * completer.h (expression_completer): Declare.
2850         * completer.c (expression_completer): New function.
2851         (count_struct_fields, add_struct_fields): New functions.
2852         * c-exp.y (yyparse): Redefine.
2853         (COMPLETE): New token.
2854         (exp): New productions.
2855         (saw_name_at_eof, last_was_structop): New globals.
2856         (yylex): Return COMPLETE when needed.  Recognize in_parse_field.
2857         (c_parse): New function.
2858         * breakpoint.c (_initialize_breakpoint): Use expression_completer
2859         for watch, awatch, and rwatch.
2860         * Makefile.in (parse.o): Depend on exceptions_h.
2861
2862 2008-06-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
2863
2864         PR gdb/1147
2865         * gdb/valopts.c (find_overload_match): Handle references
2866         to pointers.
2867
2868 2008-06-06  Paul N. Hilfinger  <hilfinger@adacore.com>
2869
2870         * ada-lang.c (ada_value_assign): Correct big-endian case to take into
2871         account the bitsize of the 'from' operand.
2872
2873 2008-06-06  Pedro Alves  <pedro@codesourcery.com>
2874
2875         * annotate.h (annotate_thread_changed): Declare.
2876
2877 2008-06-06  Nick Roberts  <nickrob@snap.net.nz>
2878
2879         * annotate.c (annotate_thread_changed): New function.
2880         * thread.c (thread_command) : Use it.
2881         * infrun.c (normal_stop): Use it.
2882
2883 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
2884             Nathan Sidwell  <nathan@codesourcery.com>
2885             Joseph Myers  <joseph@codesourcery.com>
2886
2887         * acinclude.m4: Include ../config/acx.m4.
2888         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
2889         * configure, config.in: Regenerate.
2890         * main.c (print_gdb_help): Use REPORT_BUGS_TO for bug-reporting
2891         address.
2892         * top.c (print_gdb_version): Use PKGVERSION and REPORT_BUGS_TO.
2893
2894 2008-06-05  Pedro Alves  <pedro@codesourcery.com>
2895
2896         Replace 'target async' by 'maintenance set remote-async' and
2897         'target remote' combination.
2898
2899         * remote.c (remote_async_wait): Merge into remote_wait, and
2900         remove.
2901         (remote_async_permitted, remote_async_permitted_set): New
2902         variables.
2903         (set_maintenance_remote_async_permitted)
2904         (show_maintenance_remote_async_permitted): New functions.
2905         (remote_async_ops, extended_async_remote_ops): Delete.
2906         (remote_async_open, extended_remote_async_open): Delete.
2907         (remote_open_1): Drop async_p parameter.  Update callers.  Replace
2908         async_p with remote_async_permitted checks.
2909         (extended_async_remote_attach): Delete.
2910         (remote_resume, remote_async_resume): Merge and leave remote_resume.
2911         (remote_async_terminal_inferior): Rename to...
2912         (remote_terminal_inferior): ... this, and add
2913         remote_async_termitted check.
2914         (remote_async_terminal_ours): Rename to...
2915         (remote_terminal_ours): ... this, and add remote_async_termitted
2916         check.
2917         (remote_wait, remote_async_wait): Merge and leave remote_wait
2918         only.
2919         (remote_kill, remote_async_kill): Merge and leave remote_kill
2920         only.
2921         (remote_async_mourn, extended_async_remote_mourn): Delete.
2922         (extended_remote_create_inferior_1): Drop async_p parameter.
2923         Update callers.  Always use extended_remote_ops.
2924         (extended_remote_async_create_inferior): Delete.
2925         (remote_return_zero): Delete.
2926         (init_remote_ops): Register remote_can_async_p, remote_async,
2927         remote_async_mask, remote_terminal_inferior and
2928         remote_terminal_ours.
2929         (remote_can_async_p, remote_is_async_p): Check for
2930         remote_async_permitted.
2931         (init_remote_async_ops, init_extended_async_remote_ops): Remove.
2932         (set_remote_cmd): Don't add async and extended-async targets.
2933         (_initialize_remote): Add set/show remote-async maintenance
2934         commands.
2935
2936 2008-06-05  Pedro Alves  <pedro@codesourcery.com>
2937
2938         * remote.c (kill_kludge): Delete.
2939         (remote_wait, remote_async_wait): Don't set it.
2940         (remote_kill, remote_async_kill): Don't do anything with it.
2941
2942 2008-06-05  Pedro Alves  <pedro@codesourcery.com>
2943
2944         * linux-thread-db.c (thread_db_wait): Don't trim event ptid.
2945
2946 2008-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
2947
2948         * bcache.c (bcache_data): Call deprecated_bcache_added function.
2949         (deprecated_bcache_added): New function name. Body of function
2950         bcache_data is used here with the addition of 'added' argument.
2951         * bcache.h (deprecated_bcache_added): New function.
2952         * symfile.c (add_psymbol_to_bcache): New helper function, takes part of
2953         work from add_psymbol_to_list - initialises partial symbol and stashes
2954         it in objfile's cache.
2955         (append_psymbol_to_list): New helper function, takes other part of
2956         work from add_psymbol_to_list - adds partial symbol to the given list.
2957         (add_psymbol_to_list): Call helper functions instead of doing work
2958         here. If adding to global list, do not duplicate partial symbols in the
2959         partial symtab.
2960
2961 2008-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
2962
2963         * breakpoint.c (print_exception_catchpoint): Put 'exception' back to
2964         'exception caught|thrown' message.
2965
2966 2008-06-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
2967
2968         * Makefile.in: Update dependencies.
2969         * dwarf2expr.c: New include "gdb_assert.h".
2970         (new_dwarf_expr_context): Initialize MAX_RECURSION_DEPTH.
2971         (dwarf_expr_eval): Sanity check the RECURSION_DEPTH count.
2972         (execute_stack_op): Error out on too large RECURSION_DEPTH.
2973         Increase/decrease RECURSION_DEPTH around the function.
2974
2975 2008-06-05  Daniel Jacobowitz  <dan@codesourcery.com>
2976
2977         * remote.c (get_offsets): Handle a single segment.
2978         * symfile.c (symfile_map_offsets_to_segments): Allow more bases
2979         than segments.
2980
2981 2008-06-03  Daniel Jacobowitz  <dan@codesourcery.com>
2982
2983         * solib-svr4.c (struct lm_info): Add lm_addr.
2984         (main_lm_addr): New.
2985         (svr4_default_sos): Set lm_addr.
2986         (svr4_current_sos): Set lm_addr and main_lm_addr.
2987         (svr4_fetch_objfile_link_map): Rewrite.
2988         (svr4_clear_solib): Clear main_lm_addr.
2989
2990 2008-06-03  Michael Snyder  <msnyder@redhat.com>
2991             Joseph Myers  <joseph@codesourcery.com>
2992
2993         * mips-tdep.c (mips_eabi_return_value): Replace stub that always
2994         returned RETURN_VALUE_STRUCT_CONVENTION with a real function.
2995
2996 2008-06-02  Roman Zippel <zippel@linux-m68k.org>
2997
2998         * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Fix incorrect test.
2999
3000 2008-06-02  Roman Zippel <zippel@linux-m68k.org>
3001
3002         * m68k-tdep.c (m68k_analyze_prologue): Fix length of lea insn.
3003
3004 2008-06-01  Joel Brobecker  <brobecker@adacore.com>
3005
3006         * rs6000-aix-tdep.c (rs6000_convert_from_func_ptr_addr): Do not
3007         treat pointers in data space as function descriptors if the
3008         target address is also in the data space.
3009
3010 2008-05-30  Joel Brobecker  <brobecker@adacore.com>
3011
3012         * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Set
3013         the trad-frame register value for the SP register.
3014
3015 2008-05-29  Mark Kettenis  <kettenis@gnu.org>
3016
3017         * sparcnbsd-tdep.c, sparcobsd-tdep.c: Update for unwinder changes.
3018
3019 2008-05-28  Joel Brobecker  <brobecker@adacore.com>
3020
3021         * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Improve the heuristic
3022         that identifies function descriptors outside of the .opd section.
3023
3024 2008-05-28  Aleksandar Ristovski  <aristovski@qnx.com>
3025
3026         * breakpoint.c (print_exception_catchpoint): In CLI add 'Temporary' for
3027         temporary catchpoints.  In MI add missing fields 'reason', 'disp',
3028         'bkptno'.
3029         (print_mention_exception_catchpoint): Add 'Temporary' for temporary
3030         catchpoints.
3031         (handle_gnu_v3_exceptions): Use tempflag.
3032
3033 2008-05-28  Vladimir Prus  <vladimir@codesourcery.com>
3034
3035         Refactor varobj_update interface.
3036         * varobj.c (varobj_update): Report changes as vector.  Also
3037         return not just a list of varobj, but a list of special structures
3038         that tell what exactly has changed.
3039         * varobj.h (enum varobj_update_error): Rename to
3040         varobj_scope_status.
3041         (struct varobj_update_result_t): New.
3042         (varobj_update): Adjust prototype.
3043         * mi/mi-cmd-var.c: Adjust for changes.
3044
3045 2008-05-28  Vladimir Prus  <vladimir@codesourcery.com>
3046
3047         * varobj.c (varobj_update): Fix comment typo.
3048         Fix indentation.
3049
3050 2008-05-26  Joel Brobecker  <brobecker@adacore.com>
3051
3052         Set the symtab field of symbols read from ECOFF debugging entries.
3053         * mdebugread.c (add_symbol): Add new parameter symtab.
3054         (parse_symbol): Update calls to add_symbol throughout.
3055
3056 2008-05-27  Andreas Schwab  <schwab@suse.de>
3057
3058         * symtab.h (enum address_class): Remove LOC_REGPARM and
3059         LOC_COMPUTED_ARG.
3060         (struct symbol): Add is_argument.
3061         (SYMBOL_IS_ARGUMENT): Define.
3062
3063         * ada-lang.c (ada_add_block_symbols): Use SYMBOL_IS_ARGUMENT.
3064         * buildsym.c (finish_block): Likewise.
3065         * stack.c (print_frame_args, print_block_frame_locals)
3066         (print_frame_arg_vars): Likewise.
3067         * symtab.c (lookup_block_symbol): Likewise.
3068         * tracepoint.c (add_local_symbols): Likewise.
3069         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
3070
3071         * coffread.c (process_coff_symbol): Set SYMBOL_IS_ARGUMENT.
3072         * dwarf2read.c (new_symbol): Likewise.
3073         * mdebugread.c (parse_symbol): Likewise.
3074         * stabsread.c (define_symbol): Likewise.
3075
3076         * ada-exp.y (select_possible_type_sym): Don't handle LOC_REGPARM
3077         and LOC_COMPUTED_ARG.
3078         * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
3079         * ax-gdb.c (gen_var_ref): Likewise.
3080         * eval.c (evaluate_subexp_for_address): Likewise.
3081         * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
3082         * m2-exp.y (yylex): Likewise.
3083         * printcmd.c (address_info): Likewise.
3084         * symmisc.c (print_symbol, print_partial_symbols): Likewise.
3085         * tracepoint.c (collect_symbol, scope_info): Likewise.
3086
3087 2008-05-24  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
3088
3089         * gdbarch.sh: Added new gdbarch struct
3090         core_regset_sections.
3091         * gdbarch.c: Refreshed.
3092         * gdbarch.h: Refreshed.
3093         * regset.h (core_regset_section): Declared.
3094         * linux-nat.c (linux_nat_do_thread_registers): Added
3095         support for the new gdbarch struct core_regset_sections.
3096         * utils.c (host_address_to_string): New function.
3097         * defs.h (host_address_to_string): New prototype.
3098         * i386-linux-tdep.c (i386_regset_rections): New register
3099         sections list for i386.
3100           (i386_linux_init_abi): Initialized new gdbarch struct
3101           core_regset_sections.
3102         * Makefile.in: Updated to reflect dependency changes.
3103         * ppc-linux-tdep.c (ppc_regset_sections): Register
3104         sections list for ppc.
3105           (ppc_linux_init_abi): Initialized new gdbarch struct
3106           core_regset_sections
3107
3108 2008-05-24  Andreas Schwab  <schwab@suse.de>
3109
3110         * linespec.c (decode_objc): Save current language around call to
3111         get_selected_block.
3112
3113 2008-05-23  Joel Brobecker  <brobecker@adacore.com>
3114
3115         * valprint.h (get_array_bounds): Renames get_array_low_bound.
3116         * valprint.c (get_array_bounds): Renames get_array_low_bound.
3117         Return the proper bound value if the array index type is an
3118         enumerated type. Compute the high bound if requested.
3119         (val_print_array_elements): Handle the case when the array
3120         element has a null size.
3121         * ada-valprint.c (print_optional_low_bound): Add handling
3122         for empty arrays or arrays of zero-size elements.
3123         (ada_val_print_array): New function, extracted out from
3124         ada_val_print_1 case TYPE_CODE_ARRAY, and enhanced to
3125         handle empty arrays and arrays of zero-size elements.
3126         (ada_val_print_1)[case TYPE_CODE_ARRAY]: Replace extracted-out
3127         code by call to ada_val_print_array.
3128         (ada_value_print): Remove handling of null array.  The handling
3129         was incomplete and is now better handled by ada_val_print_array.
3130
3131 2008-05-23 Markus Deuling  <deuling@de.ibm.com>
3132
3133         * annotate.c (annotate_source, annotate_frame_begin): Replace
3134         deprecated_print_address_numeric with paddress.
3135         * cli/cli-cmds.c (list_command, edit_command): Likewise.
3136         * tui/tui-stack.c (tui_make_status_line): Likewise.
3137
3138         * defs.h (deprecated_print_address_numeric): Remove.
3139         * printcmd.c (deprecated_print_address_numeric): Remove.
3140         * maint.c (maint_print_section_info): Fix comment.
3141
3142 2008-05-23 Markus Deuling  <deuling@de.ibm.com>
3143
3144         * valprint.c (print_hex_chars, print_octal_chars, print_decimal_chars,
3145         print_binary_chars, print_char_chars): Add byte_order parameter and
3146         replace gdbarch_byte_order.
3147         (print_decimal_chars): Replace START_P, NOT_END_P and NEXT_P by their
3148         expressions and remove them.  Remove unused TWO_TO_FOURTH.
3149         (val_print_type_code_int): Introduce gdbarch_byte_order to get at the
3150         endianness.  Update call to print_hex_chars.
3151         * valprint.h (print_hex_chars, print_octal_chars, print_decimal_chars,
3152         print_binary_chars, print_char_chars): Add byte_order parameter.
3153         * printcmd.c (print_scalar_formatted): Introduce gdbarch_byte_order to
3154         get at the endianness.  Update print_*_char calls to use byte_order.
3155
3156 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
3157
3158         * symtab.h (struct symbol): Make "aux_value" member a void pointer
3159         instead of a union.
3160         (SYMBOL_LOCATION_BATON): Update.
3161
3162 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
3163
3164         * symtab.h (enum address_class): Remove LOC_BASEREG and
3165         LOC_BASEREG_ARG.
3166         (struct symbol): Remove "basereg" member of "aux_value" union.
3167         (SYMBOL_BASEREG): Remove.
3168
3169         * ada-exp.y (select_possible_type_sym): Do not handle LOC_BASEREG
3170         or LOC_BASEREG_ARG.
3171         * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
3172         (ada_add_block_symbols): Likewise.
3173         * ax-gdb.c (gen_var_ref): Likewise.
3174         * buildsym.c (finish_block): Likewise.
3175         * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
3176         * m2-exp.y (yylex): Likewise.
3177         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
3178         * printcmd.c (address_info): Likewise.
3179         * stack.c (print_frame_args, print_block_frame_locals): Likewise.
3180         (print_frame_arg_vars): Likewise.
3181         * symmisc.c (print_symbol): Likewise.
3182         * symtab.c (lookup_block_symbol): Likewise.
3183         * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
3184         (scope_info): Likewise.
3185
3186 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
3187
3188         * symtab.h (enum address_class): Remove LOC_LOCAL_ARG.
3189
3190         * ada-exp.y (select_possible_type_sym): Do not handle LOC_LOCAL_ARG.
3191         * ada-lang.c (resolve_subexp, symtab_for_sym): Likewise.
3192         (ada_add_block_symbols): Likewise.
3193         * ax-gdb.c (gen_var_ref): Likewise.
3194         * buildsyms.c (finish_block): Likewise.
3195         * findvar.c (symbol_read_needs_frame, read_var_value): Likewise.
3196         * m2-exp.y (yylex): Likewise.
3197         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
3198         * printcmd.c (address_info): Likewise.
3199         * stack.c (print_frame_args, print_frame_arg_vars): Likewise.
3200         * symmisc.c (print_symbol, print_partial_symbols): Likewise.
3201         * symtab.c (lookup_block_symbol): Likewise.
3202         * tracepoint.c (collect_symbol, add_local_symbols): Likewise.
3203         (scope_info): Likewise.
3204
3205 2008-05-22  Ulrich Weigand  <uweigand@de.ibm.com>
3206
3207         * symtab.h (enum address_class): Remove LOC_INDIRECT and
3208         LOC_HP_THREAD_LOCAL_STATIC.
3209
3210         * findvar.c (symbol_read_needs_frame, read_var_value): Do not
3211         handle LOC_INDIRECT or LOC_HP_THREAD_LOCAL_STATIC.
3212         (read_var_value): Likewise.
3213         * buildsym.c (finish_block): Likewise.
3214         * objfiles.c (objfile_relocate): Likewise.
3215         * printcmd.c (address_info): Likewise.
3216         * symmisc.c (print_symbol, print_partial_symbols): Likewise.
3217         * tracepoint.c (scope_info): Likewise.
3218
3219 2008-05-21 Markus Deuling  <deuling@de.ibm.com>
3220            Maxim Grigoriev  <maxim2405@gmail.com>
3221
3222         * xtensa-tdep.c (xtensa_read_register): Remove.
3223         (xtensa_frame_cache): Get rid of xtensa_read_register. Pass extra
3224         argument litbase to call0_frame_cache().
3225         (call0_track_op, call0_analyze_prologue)
3226         (call0_frame_cache): Use extra argument litbase.
3227
3228 2008-05-21  Joel Brobecker  <brobecker@adacore.com>
3229
3230         * infcmd.c (_initialize_infcmd): Add new "fin" alias for "finish".
3231
3232 2008-05-21  Ulrich Weigand  <uweigand@de.ibm.com>
3233
3234         * frame.h (SIZEOF_FRAME_SAVED_REGS): Remove.
3235
3236 2008-05-21  Ulrich Weigand  <uweigand@de.ibm.com>
3237
3238         * alpha-mdebug-tdep.c: Include "trad-frame.h".
3239         (struct alpha_mdebug_unwind_cache): Change type of SAVED_REGS to
3240         struct trad_frame_saved_reg *.
3241         (alpha_mdebug_frame_unwind_cache): Allocate SAVED_REGS using
3242         trad_frame_alloc_saved_regs.  Update accesses.  Record previous
3243         value of SP as being vfp.
3244         (alpha_mdebug_frame_prev_register): Use trad_frame_get_prev_register.
3245         * Makefile.in (alpha-mdebug-tdep.o): Update dependencies.
3246
3247 2008-05-21  Markus Deuling  <deuling@de.ibm.com>
3248
3249         * score-tdep.c (score_print_insn): Get the current endianess from
3250         disassemble_info instead of gdbarch_byte_order.
3251
3252 2008-05-21  Pedro Alves  <pedro@codesourcery.com>
3253
3254         * frame.c (get_prev_frame_1): Build frame id before setting
3255         this_frame->prev_p, not after.
3256
3257 2008-05-21  Nick Roberts  <nickrob@snap.net.nz>
3258
3259         * annotate.c (annotate_new_thread): New function for new-thread
3260         annotation.
3261         * annotate.h: (annotate_new_thread): New extern.
3262         * thread.c (add_thread_with_info): Use it.
3263         * Makefile.in (thread.o): Add dependency on annotate.h.
3264
3265 2008-05-20  Joel Brobecker  <brobecker@adacore.com>
3266
3267         * win32-nat.c (win32_wait): Block the control-c event while
3268         waiting for a debug event.
3269
3270 2008-05-19  Pedro Alves  <pedro@codesourcery.com>
3271
3272         * symtab.h (lookup_symbol_in_language): Update comment.
3273         * symtab.c (lookup_symbol_aux_block): Update comment.
3274         * ada-lang.c (ada_lookup_symbol_list): Update comment.
3275
3276 2008-05-19  Ulrich Weigand  <uweigand@de.ibm.com>
3277
3278         * symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
3279         (lookup_symbol): Likewise.
3280         * symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
3281         (lookup_symbol): Likewise.
3282         (search_symbols): Update.
3283
3284         * linespec.c (find_methods, collect_methods): Update.
3285         (add_matching_methods, add_constructors): Update.
3286         (decode_compound, decode_dollar, decode_variable): Update.
3287         (lookup_prefix_sym): Update.
3288
3289         (symbol_found): Remove SYM_SYMTAB parameter.
3290         Use SYMBOL_SYMTAB (sym) instead.
3291
3292         * gdbtypes.c (lookup_typename): Update.
3293         (lookup_struct, lookup_union, lookup_enum): Update.
3294         (lookup_template_type): Update.
3295         (check_typedef): Update.
3296         * language.c (lang_bool_type): Update.
3297         * mdebugread.c (parse_procedure): Update.
3298         * mi/mi-cmd-stack.c (list_args_or_locals): Update.
3299         * parse.c (write_dollar_variable): Update.
3300         * printcmd.c (address_info): Update.
3301         * source.c (select_source_symtab): Update.
3302         * stack.c (print_frame_args, print_frame_arg_vars): Update.
3303         * valops.c (find_function_in_inferior): Update.
3304         (value_struct_elt_for_reference): Update.
3305         * value.c (value_static_field, value_fn_field): Update.
3306
3307         * alpha-mdebug-tdep.c (find_proc_desc): Update.
3308         * arm-tdep.c (arm_skip_prologue): Update.
3309         * mt-tdep.c (mt_skip_prologue): Update.
3310         * xstormy16-tdep.c (xstormy16_skip_prologue): Update.
3311
3312         * ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
3313         * ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
3314         (add_defn_to_vec): Likewise.
3315         (ada_add_block_symbols): Likewise.
3316         (lookup_cached_symbol, cache_symbol): Likewise.
3317         (standard_lookup): Update.
3318         (ada_lookup_symbol_list): Update.
3319
3320         * c-valprint.c (c_val_print): Update.
3321         * cp-support.c (cp_lookup_rtti_type): Update.
3322         * jv-lang.c (java_lookup_class, get_java_object_type): Update.
3323         * objc-lang.c (lookup_struct_typedef, find_imps): Update.
3324         * p-valprint.c (pascal_val_print): Update.
3325         * scm-lang.c (scm_lookup_name): Update.
3326
3327         * c-exp.y: Update.
3328         * f-exp.y: Update.
3329         * jv-exp.y: Update.
3330         * m2-exp.y: Update.
3331         * objc-exp.y: Update.
3332         * p-exp.y: Update.
3333
3334 2008-05-19  Ulrich Weigand  <uweigand@de.ibm.com>
3335
3336         * language.h (struct language_defn): Remove SYMTAB parameter from
3337         la_lookup_symbol_nonlocal callback function pointer.
3338
3339         * ada-lang.h (ada_lookup_encoded_symbol): Remove SYMTAB parameter.
3340         (ada_lookup_encoded_symbol): Likewise.
3341         * ada-lang.c (ada_lookup_encoded_symbol): Remove SYMTAB parameter.
3342         Always call fixup_symbol_section.
3343         (ada_lookup_symbol): Remove SYMTAB parameter.
3344         (ada_lookup_symbol_nonlocal): Likewise.
3345         * ada-exp.y (write_object_renaming): Update.
3346         (find_primitive_type): Likewise.
3347
3348         * cp-support.h (cp_lookup_symbol_nonlocal): Remove SYMTAB parameter.
3349         (cp_lookup_symbol_namespace): Likewise.
3350         * cp-namespace.c (lookup_namespace_scope): Remove SYMTAB parameter.
3351         (lookup_symbol_file): Likewise.
3352         (lookup_possible_namespace_symbol): Likewise.
3353         (cp_lookup_symbol_nonlocal): Likewise.
3354         (cp_lookup_symbol_namespace): Likewise.
3355         (cp_lookup_nested_type): Update.
3356
3357         * scm-valprint.c (scm_inferior_print): Update.
3358         * valops.c (value_maybe_namespace_elt): Update.
3359
3360         * solist.h (struct target_so_ops): Remove SYMTAB parameter from
3361         lookup_lib_global_symbol callback function pointer.
3362         (solib_global_lookup): Remove SYMTAB parameter.
3363         * solib.c (solib_global_lookup): Remove SYMTAB parameter.
3364         * solib-svr4.c (elf_lookup_lib_symbol): Likewise.
3365
3366         * symtab.h (basic_lookup_symbol_nonlocal): Remove SYMTAB parameter.
3367         (lookup_symbol_static): Likewise.
3368         (lookup_symbol_global): Likewise.
3369         (lookup_symbol_aux_block): Likewise.
3370         (lookup_global_symbol_from_objfile): Likewise.
3371         * symtab.c (lookup_symbol_aux): Remove SYMTAB parameter.
3372         (lookup_symbol_aux_local): Likewise.
3373         (lookup_symbol_aux_block): Likewise.
3374         (lookup_symbol_aux_symtabs): Likewise.
3375         (lookup_symbol_aux_psymtabs): Likewise.
3376         (lookup_global_symbol_from_objfile): Likewise.
3377         (basic_lookup_symbol_nonlocal): Likewise.
3378         (lookup_symbol_static): Likewise.
3379         (lookup_symbol_global): Likewise.
3380
3381         (lookup_symbol_in_language): Do not pass SYMTAB to lookup_symbol_aux.
3382
3383 2008-05-17  Pedro Alves  <pedro@codesourcery.com>
3384
3385         * remote.c (init_extended_remote_ops): Fix typo.
3386
3387 2008-05-16  Pedro Alves  <pedro@codesourcery.com>
3388
3389         * NEWS: Mention new DICOS x86 target configuration.
3390
3391 2008-05-16  Pedro Alves  <pedro@codesourcery.com>
3392             Ulrich Weigand  <uweigand@de.ibm.com>
3393
3394         * minsyms.c (lookup_minimal_symbol_by_pc_name): New function.
3395         * symtab.h (lookup_minimal_symbol_by_pc_name): Add prototype.
3396
3397         * symtab.c (fixup_section): Remove prototype.  Add ADDR parameter;
3398         use it instead of ginfo->value.address.  Look up minimal symbol by
3399         address and name.  Assume OBJFILE is non-NULL.
3400         (fixup_symbol_section): Ensure we always have an objfile to look
3401         into.  Extract and pass to fixup_section the symbol's address that
3402         will match the minimal symbol's address.
3403         (fixup_psymbol_section): Likewise.
3404
3405         (find_pc_sect_psymtab): Fall back to non-addrmap case when debugging
3406         overlays and the addrmap returned the wrong section.
3407
3408         * dwarf2read.c (var_decode_location): Set SYMBOL_CLASS before
3409         calling fixup_symbol_section.
3410
3411 2008-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
3412
3413         * minsyms.c: Include "target.h".
3414         (find_solib_trampoline_target): Handle minimal symbols pointing
3415         to function descriptors as well.
3416         * Makefile.in (minsyms.o): Update dependencies.
3417
3418         * ppc-linux-tdep.c (ppc64_standard_linkage): Rename to ...
3419         (ppc64_standard_linkage1): ... this.  Fix optional instructions.
3420         (PPC64_STANDARD_LINKAGE_LEN): Rename to ...
3421         (PPC64_STANDARD_LINKAGE1_LEN): ... this.
3422         (ppc64_standard_linkage2, ppc64_standard_linkage3): New.
3423         (PPC64_STANDARD_LINKAGE2_LEN, PPC64_STANDARD_LINKAGE3_LEN): New.
3424         (ppc64_standard_linkage_target): Rename to ...
3425         (ppc64_standard_linkage1_target): ... this.
3426         (ppc64_standard_linkage2_target, ppc64_standard_linkage3_target): New.
3427         (ppc64_skip_trampoline_code): Support three variants of standard
3428         linkage stubs.  Call find_solib_trampoline_target to handle
3429         glink stubs.
3430
3431 2008-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
3432
3433         * ppc-linux-tdep.c (ppc_linux_init_abi): Do not install
3434         ppc64_sysv_abi_adjust_breakpoint_address.
3435         * ppc-sysv-tdep.c (ppc64_sysv_abi_adjust_breakpoint_address): Remove.
3436         * ppc-tdep.h (ppc64_sysv_abi_adjust_breakpoint_address): Remove.
3437
3438 2008-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
3439
3440         * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Remove.
3441         (ppc_linux_init_abi): Install find_solib_trampoline_target instead
3442         of ppc_linux_skip_trampoline_code.
3443
3444 2008-05-15  Daniel Jacobowitz  <dan@codesourcery.com>
3445
3446         * gdbarch.sh: Delete dwarf_reg_to_regnum.
3447         * gdbarch.c, gdbarch.h: Regenerated.
3448         * amd64-tdep.c, arm-tdep.c, h8300-tdep.c, hppa-linux-tdep.c,
3449         hppa-tdep.c, i386-tdep.c, m32c-tdep.c, m68k-tdep.c, mips-tdep.c,
3450         s390-tdep.c, xtensa-tdep.c: Do not set dwarf_reg_to_regnum.
3451
3452 2008-05-15  Pedro Alves  <pedro@codesourcery.com>
3453
3454         * linux-nat.c (trap_ptid): Delete.
3455         (linux_nat_detach, linux_nat_wait, linux_nat_mourn_inferior):
3456         Adjust.
3457         * linux-thread-db.c (thread_db_wait): Adjust.
3458
3459 2008-05-15  Joel Brobecker  <brobecker@adacore.com>
3460
3461         * linespec.c (decode_line_1): Fix a couple of comments.
3462
3463 2008-05-15  Alan Modra  <amodra@bigpond.net.au>
3464
3465         * dbxread.c: Formatting.
3466         (INTERNALIZE_SYMBOL): Init n_other.
3467         (set_namestring): Take pointer to nlist arg rather than struct
3468         copy.  Update all callers.
3469
3470 2008-05-15  Andreas Schwab  <schwab@suse.de>
3471
3472         * Makefile.in (dwarf2loc.o): Remove $(addrmap_h).
3473         (dwarf2read.o): Add $(addrmap_h).
3474
3475 2008-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3476
3477         * ppc-linux-tdep.c (ppc_linux_convert_from_func_ptr_addr): Rename ...
3478         (ppc64_linux_convert_from_func_ptr_addr): ... to this.  No longer try
3479         to handle ppc32 PLT entries.
3480         (ppc_linux_init_abi): Install ppc64_linux_convert_from_func_ptr_addr
3481         only on ppc64.
3482
3483 2008-05-14  Daniel Jacobowitz  <dan@codesourcery.com>
3484
3485         * elfread.c (elf_symtab_read): Create trampolines for @plt symbols.
3486         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Renamed from
3487         lookup_minimal_symbol_by_pc_section.  Prefer trampolines if requested.
3488         (lookup_minimal_symbol_by_pc_section): Use
3489         lookup_minimal_symbol_by_pc_section_1.
3490         (lookup_solib_trampoline_symbol_by_pc): Likewise.
3491
3492 2008-05-13  Joel Brobecker  <brobecker@adacore.com>
3493
3494         * findcmd.c: Add #include "gdb_stdint.h".
3495         * Makefile.in (findcmd.o): Update dependencies.
3496
3497 2008-05-11  David S. Miller  <davem@davemloft.net>
3498
3499         * sparc-linux-tdep.c (sparc32_linux_init_abi): Remove
3500         long double size override, Linux does use 128-bit now.
3501
3502         * sparc-linux-tdep.c (PSR_SYSCALL): Define.
3503         (sparc_linux_write_pc): New function.
3504         (sparc32_linux_init_abi): Register it.
3505         * sparc64-linux-tdep.c (TSTATE_SYSCALL): Define.
3506         (sparc64_linux_write_pc): New function.
3507         (sparc64_linux_init_abi): Register it.
3508
3509         * sparc-linux-tdep.c, sparc64-linux-tdep.c: Use
3510         dwarf2_append_unwinders(), not dwarf2_frame_sniffer.
3511
3512 2008-05-11  Ulrich Weigand  <uweigand@de.ibm.com>
3513
3514         * rs6000-tdep.c (rs6000_gdbarch_init): Set up info.target_desc
3515         and info.tdep_info before calling gdbarch_init_osabi.
3516
3517 2008-05-09  Joel Brobecker  <brobecker@adacore.com>
3518
3519         * ada-lang.c (ada_evaluate_subexp) [BINOP_ASSIGN]: Do not force
3520         the type of the right hand side of the assignment to the type
3521         of the left hand side if the left hand side is a convenience
3522         variable.
3523
3524 2008-05-09  Ulrich Weigand  <uweigand@de.ibm.com>
3525
3526         * NEWS: Mention gdbserver bi-arch capability.
3527
3528 2008-05-09  Doug Evans  <dje@google.com>
3529
3530         New "find" command.
3531         * NEWS: Document find command and qSearch:memory packet.
3532         * Makefile.in (SFILES): Add findcmd.c.
3533         (COMMON_OBJS): Add findcmd.o.
3534         (findcmd.o): New rule.
3535         * findcmd.c: New file.
3536         * target.h (target_ops): New member to_search_memory.
3537         (simple_search_memory): Declare.
3538         (target_search_memory): Declare.
3539         * target.c (simple_search_memory): New fn.
3540         (target_search_memory): New fn.
3541         * remote.c (PACKET_qSearch_memory): New packet kind.
3542         (remote_search_memory): New fn.
3543         (init_remote_ops): Init to_search_memory.
3544         (init_extended_remote_ops): Ditto.
3545         (_initialize_remote): Add qSearch:memory packet config command.
3546
3547 2008-05-09  Eli Zaretskii  <eliz@gnu.org>
3548
3549         * thread.c (_initialize_thread): Don't use commas and periods in
3550         first line of doc string of "set/show print thread-events".
3551
3552 2008-05-08  Joel Brobecker  <brobecker@adacore.com>
3553
3554         * alpha-mdebug-tdep.c, alpha-osf1-tdep.c, alpha-tdep.c:
3555         Update for unwinder changes.
3556
3557 2008-05-08  Joel Brobecker  <brobecker@adacore.com>
3558
3559         * frame.c (get_frame_base_address, get_frame_locals_address)
3560         (get_frame_args_address): Pass the correct frame when calling
3561         frame_base_find_by_frame.
3562
3563 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
3564
3565         * remote.c (extended_remote_attach_1): Call target_find_description.
3566
3567 2008-05-08  Daniel Jacobowitz  <dan@codesourcery.com>
3568
3569         * remote.c (extended_remote_create_inferior_1): Clean up
3570         before marking the target running.
3571
3572 2008-05-08  Joel Brobecker  <brobecker@adacore.com>
3573
3574         * hppa-tdep.h, hppa-tdep.c, hppa-hpux-tdep.c: Update for unwinder
3575         changes.
3576
3577 2008-05-07  Joel Brobecker  <brobecker@adacore.com>
3578
3579         * sparc-tdep.c, sparc-tdep.h, sparc-sol2-tdep.c, sparc64-tdep.c,
3580         sparc64-sol2-tdep.c: Update for unwinder changes.
3581
3582 2008-05-07  Daniel Jacobowitz  <dan@codesourcery.com>
3583
3584         * cp-support.c (mangled_name_to_comp): Initialize storage.
3585         (unqualified_name_from_comp): Likewise.
3586
3587 2008-05-07  Jie Zhang  <jie.zhang@analog.com>
3588
3589         * remote.c (remote_insert_breakpoint): Call get_remote_state
3590         after gdbarch_breakpoint_from_pc is called.
3591         (remote_insert_hw_breakpoint): Likewise.
3592
3593 2008-05-06  Joel Brobecker  <brobecker@adacore.com>
3594
3595         * valprint.c (val_print): Add new language parameter and use it
3596         instead of using the current_language. Update calls to val_print
3597         throughout.
3598         (common_val_print): Add new langauge parameter and pass it to
3599         val_print.
3600         * value.h (struct language_defn): Add opaque declaration.
3601         (val_print, common_val_print): Update declarations.
3602         * stack.c (print_frame_args): Update call to common_val_print
3603         using the appropriate language.
3604         * mi/mi-cmd-stack.c (list_args_or_locals): Likewise.
3605         * c-valprint, f-valprint.c, m2-valprint.c, mt-tdep.c, infcmd.c,
3606         mi/mi-main.c, jv-valprint.c, ada-valprint.c, varobj.c, p-valprint.c,
3607         scm-valprint.c, cp-valprint.c, sh64-tdep.c, printcmd.c:
3608         #include "language.h" if necessary.
3609         Update calls to val_print and common_val_print.
3610         * Makefile.in (mt-tdep.o, sh64-tdep.o, mi-cmds.o, mi-main.o):
3611         Update dependencies.
3612
3613 2008-05-06  Joel Brobecker  <brobecker@adacore.com>
3614
3615         * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Treat addresses
3616         pointing inside a non-executable section as function descriptors.
3617
3618 2008-05-06  Pedro Alves  <pedro@codesourcery.com>
3619
3620         * inf-loop.c (inferior_event_handler): Run all continuations and
3621         print any language change before running the breakpoint commands.
3622
3623 2008-05-06  Joel Brobecker  <brobecker@adacore.com>
3624
3625         * frame-unwind.c (frame_unwind_got_bytes): New function.
3626         * frame-unwind.h (frame_unwind_got_bytes): Add declaration.
3627         * libunwind-frame.h, libunwind-frame.c, ia64-tdep.c: Update
3628         for unwinder changes.
3629
3630 2008-05-05  Doug Evans  <dje@google.com>
3631
3632         * NEWS: Mention new /m modifier for disassemble command.
3633         * cli/cli-cmds.c (print_disassembly): New function.
3634         (disassemble_current_function): New function
3635         (disassemble_command): Recognize /m modifier, print mixed
3636         source+assembly.
3637         (init_cli_cmds): Update disassemble help text.
3638
3639 2008-05-05  Maxim Grigoriev  <maxim2405@gmail.com>
3640
3641         * xtensa-tdep.c: Update for unwinder changes.
3642
3643 2008-05-05  Andreas Schwab  <schwab@suse.de>
3644
3645         Update m68k port for unwinder changes.
3646         * m68k-tdep.c (m68k_frame_cache): Expect this_frame.
3647         (m68k_frame_this_id, m68k_frame_prev_register): Update signature.
3648         (m68k_frame_unwind): Use default_frame_sniffer.
3649         (m68k_frame_sniffer): Remove.
3650         (m68k_frame_base_address): Expect this_frame.
3651         (m68k_dummy_id): Renamed from m68k_unwind_dummy_id.  Expect
3652         this_frame.
3653         (m68k_gdbarch_init): Use set_gdbarch_dummy_id,
3654         dwarf2_append_unwinders, and frame_unwind_append_unwinder.
3655         * m68klinux-tdep.c (m68k_linux_pc_in_sigtramp): Expect frame_info
3656         parameter instead of pc value.
3657         (m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
3658         Expect this_frame.
3659         (m68k_linux_sigtramp_frame_this_id)
3660         (m68k_linux_sigtramp_frame_prev_register)
3661         (m68k_linux_sigtramp_frame_sniffer): Update signature.
3662         (m68k_linux_sigtramp_frame_unwind): Use
3663         m68k_linux_sigtramp_frame_sniffer.
3664         (m68k_linux_init_abi): Use frame_unwind_append_unwinder.
3665
3666         * m68klinux-nat.c (store_register): Fix typo.
3667
3668 2008-05-05  Pedro Alves  <pedro@codesourcery.com>
3669
3670         * infcmd.c (step_1): Put thread id on the stack to avoid possible
3671         NULL dereferencing.
3672
3673 2008-05-05  Luis Machado  <luisgpm@br.ibm.com>
3674
3675         * symfile.c (reread_symbols): Update objfile's entry point.
3676
3677 2008-05-05  Aleksandar Ristovski  <aristovski@qnx.com>
3678             Joel Brobecker  <brobecker@adacore.com>
3679
3680         * ada-lang.c: Update throughout to use symbol_matches_domain
3681         instead of matching the symbol domain explictly.
3682         * dwarf2read.c (add_partial_symbol): Do not add new psym for
3683         STRUCT_DOMAIN. Make sure you recognize c++ struct and java and ada
3684         class as typedefs. See lookup_partial_symbol function.
3685         (new_symbol): Similar to add_partial_symbol, do not create
3686         symbol for the typedef. See lookup_block_symbol.
3687         * symtab.c (symbol_matches_domain): New function, takes care
3688         of dual meaning of STRUCT_DOMAIN symbol for c++, ada and java.
3689         (lookup_partial_symbol): Use symbol_matches_domain to see if the
3690         found psym domain matches the given domain.
3691         (lookup_block_symbol): Likewise.
3692
3693 2008-05-05  Vladimir Prus  <vladimir@codesourcery.com>
3694
3695         * top.c (command_line_handler_continuation): Remove.
3696         (execute_command): Do not install the above.
3697
3698 2008-05-05  Vladimir Prus  <vladimir@codesourcery.com>
3699
3700         * inf-loop.c (inferior_event_handler): Call bpstat_do_action,
3701         and catch all exceptions from it.
3702         * top.c (command_line_handler_continuation): Don't
3703         call bpstat_do_action here.
3704
3705 2008-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
3706
3707         * dwarf2read.c (struct dwarf2_cu): Add type_hash.
3708         (struct die_info): Remove type.
3709         (read_type_die, read_typedef, read_base_type, read_subrange_type)
3710         (read_structure_type, read_enumeration_type, read_array_type)
3711         (read_tag_pointer_type, read_tag_ptr_to_member_type)
3712         (read_tag_reference_type, read_tag_const_type, read_tag_volatile_type)
3713         (read_tag_string_type, read_subroutine_type, read_set_type)
3714         (read_unspecified_type): Delete prototypes.  Remove check for
3715         already-loaded type.  Return the new type.
3716         (set_die_type): Return the new type.
3717         (reset_die_and_siblings_types): Delete.
3718         (load_comp_unit, load_full_comp_unit): Set type_hash.
3719         (process_queue): Remove call to reset_die_and_siblings_types.
3720         (process_die): Do not read most types here.  Use read_type_die
3721         for others.
3722         (read_func_scope, dwarf2_add_member_fn): Use read_type_die.
3723         (quirk_gcc_member_function_pointer): Return the new type.
3724         (process_structure_scope, process_enumeration_scope): Use
3725         get_die_type and read the DIE's type.
3726         (read_full_die): Do not initialize die->type.
3727         (tag_type_to_type): Use read_type_die.
3728         (read_type_die): Check for already defined types.  Return the
3729         type.
3730         (determine_prefix): Use get_die_type.
3731         (set_die_type): Return the type.
3732         (get_die_type): Take a CU argument.  Check for no type_hash.
3733
3734 2008-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
3735
3736         * dwarf2read.c (dwarf2_ranges_read, read_partial_die): Initialize
3737         locals.
3738
3739 2008-05-04  Pedro Alves  <pedro@codesourcery.com>
3740
3741         * breakpoint.c (update_breakpoints_after_exec): Delete bp_longjmp
3742         and bp_longjmp_resume breakpoints.
3743         (breakpoint_address_is_meaningful): Claim bp_longjmp_resume as
3744         meaningful.
3745         (create_longjmp_breakpoint): Don't create bp_longjmp_resume
3746         breakpoints.  Create bp_longjmp breakpoints as momentary
3747         breakpoints.
3748         (enable_longjmp_breakpoint): Delete.
3749         (set_longjmp_breakpoint): New.
3750         (disable_longjmp_breakpoint): Delete.
3751         (delete_longjmp_breakpoint): New.
3752         (set_longjmp_resume_breakpoint): Delete.
3753         (set_momentary_breakpoint_at_pc): New.
3754         (breakpoint_re_set_one): Don't delete bp_longjmp and
3755         bp_longjmp_resume breakpoints.
3756         (breakpoint_re_set): Don't create longjmp and longjmp-resume
3757         breakpoints.
3758
3759         * infrun.c (step_resume_breakpoint): Add comment.
3760         (struct execution_control_state): Delete handling_longjmp member.
3761         (init_execution_control_state). Don't clear handling_longjmp.
3762         (context_switch): Don't context switch handling_longjmp.
3763         (handle_inferior_event): If handling a bp_longjmp breakpoint,
3764         create a bp_longjmp_resume breakpoint, and set it as current
3765         step_resume_breakpoint, then step over the longjmp breakpoint.  If
3766         handling a bp_longjmp_resume breakpoint, don't delete the longjmp
3767         breakpoint, delete the longjmp-resume breakpoint, and stop
3768         stepping.
3769         (currently_stepping): Remove handling_longjmp from expression.
3770         (insert_step_resume_breakpoint_at_sal): Update comment.
3771         (insert_longjmp_resume_breakpoint): New.
3772
3773         * breakpoint.h (set_momentary_breakpoint_at_pc): Declare.
3774         (enable_longjmp_breakpoint, disable_longjmp_breakpoint): Delete
3775         declarations.
3776         (set_longjmp_breakpoint, delete_longjmp_breakpoint): Declare.
3777         (set_longjmp_resume_breakpoint): Delete declaration.
3778
3779         * gdbthread.h (save_infrun_state): Remove handling_longjmp
3780         parameter.
3781         (load_infrun_state): Delete *handling_longjmp parameter.
3782         * thread.c (save_infrun_state): Remove handling_longjmp parameter.
3783         Update body.
3784         (load_infrun_state): Delete *handling_longjmp parameter.  Update
3785         body.
3786
3787         * infcmd.c (disable_longjmp_breakpoint_cleanup): Delete.
3788         (delete_longjmp_breakpoint_cleanup): New.
3789         (step_1): Call set_longjmp_breakpoint instead of
3790         enable_longjmp_breakpoint.  Use delete_longjmp_breakpoint_cleanup
3791         instead of disable_longjmp_breakpoint_cleanup when making cleanup.
3792         (step_1_continuation): Pass thread id in the continuation args to
3793         step_once.
3794         (step_once): Add thread parameter.  Pass thread id the the
3795         continuation.
3796
3797 2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
3798
3799         Set CU BASE_ADDRESS already from partial DIEs.
3800         * dwarf2read.c (read_partial_die): New variables BASE_ADDRESS and
3801         BASE_ADDRESS_TYPE.  Set these variables from DW_AT_LOW_PC and
3802         DW_AT_ENTRY_PC.  Set CU->HEADER.BASE_KNOWN and CU->HEADER.BASE_ADDRESS
3803         from these variables if it was still unset.
3804
3805         * Makefile.in: Update dependencies.
3806         * dwarf2read.c: Include "addrmap.h"
3807         (struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
3808         (dwarf2_ranges_read): New prototype.
3809         (dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
3810         Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
3811         HAS_RANGES_OFFSET, otherwise add there the contiguous range.
3812         (dwarf2_ranges_read): New parameter RANGES_PST, update the function
3813         comment for it.  Add the found ranges to RANGES_PST.  New variable
3814         BASEADDR, initialize it the common way.
3815         (dwarf2_get_pc_bounds): Update the caller for the new parameter.
3816         (read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
3817         HAS_RANGES_OFFSET for the later processing.
3818         * objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
3819         * symtab.c: Include "addrmap.h"
3820         (find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
3821         Move the psymtab locator into ...
3822         (find_pc_sect_psymtab_closer): ... a new function.
3823
3824 2008-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
3825
3826         * arch-utils.c (gdbarch_update_p): Use default values for
3827         info.abfd and info.target_desc if they are NULL.
3828         (gdbarch_from_bfd): Remove assertion.
3829         (set_gdbarch_from_file): Call gdbarch_find_by_info directly,
3830         using the current target description.
3831         (gdbarch_info_fill): Do not use default values for info->abfd
3832         and info->target_desc.
3833
3834 2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
3835
3836         * symfile.c (reread_symbols): Reload EXEC_BFD on its change.
3837
3838 2008-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
3839
3840         * inferior.h (read_pc_pid, write_pc_pid): Remove.
3841         * regcache.h (regcache_read_pc, regcache_write_pc): Add prototypes.
3842
3843         * regcache.c (read_pc_pid): Remove, replace by ...
3844         (regcache_read_pc): ... this function.
3845         (write_pc_pid): Remove, replace by ...
3846         (regcache_write_pc): ... this function.
3847         (read_pc, write_pc): Update.
3848
3849         * infrun.c (displaced_step_prepare): Replace read_pc_pid and
3850         write_pc_pid by regcache_read_pc and regcache_write_pc.
3851         (displaced_step_fixup): Likewise.
3852         (resume): Likewise.  Use regcache arch instead of current_gdbarch.
3853         (prepare_to_proceed): Likewise.
3854         (proceed): Likewise.
3855         (adjust_pc_after_break): Likewise.
3856         (handle_inferior_event): Likewise.
3857
3858         * linux-nat.c (cancel_breakpoint): Likewise.
3859         * linux-thread-db.c (check_event): Likewise.
3860         * aix-thread.c (aix_thread_wait): Likewise.
3861         * tracepoint.c (trace_dump_command): Likewise.
3862
3863 2008-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
3864
3865         * dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
3866         SYMBOL_LOCATION_BATON.
3867
3868 2008-05-04  Vladimir Prus  <vladimir@codesourcery.com>
3869
3870         * target.h (struct target_ops): New field to_auxv_parse.
3871         * auxv.c (default_auxv_parse): New, renamed from previous
3872         target_auxv_parse.
3873         (target_auxv_parse): Try to call target method.  Fallback to
3874         default_auxv_parse if not found.
3875         * procfs.c (procfs_auxv_parse): New.
3876         (init_procfs_ops): On Solaris, in 64-bit mode, install
3877         procfs_auxv_parse.
3878
3879 2008-05-03  Adam Nemet  <anemet@caviumnetworks.com>
3880
3881         * symfile.c (add_symbol_file_command):  Use paddress rather than
3882         hex_string to print the address.
3883
3884 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
3885
3886         * rs6000-tdep.c (rs6000_frame_this_id): If info->base is 0,
3887         return the null frame ID to terminate the backtrace.
3888
3889 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
3890
3891         * rs6000-tdep.c: Do not include "rs6000-tdep.h".
3892         (rs6000_find_toc_address_hook): Move to rs6000-aix-tdep.c.
3893         (SIG_FRAME_PC_OFFSET): Likewise.
3894         (SIG_FRAME_LR_OFFSET): Likewise.
3895         (SIG_FRAME_FP_OFFSET): Likewise.
3896         (rs6000_push_dummy_call): Likewise.
3897         (rs6000_return_value): Likewise.
3898         (rs6000_convert_from_func_ptr_addr): Likewise.
3899         (branch_dest, rs6000_software_single_step): Likewise.
3900         (deal_with_atomic_sequence): Rename to ...
3901         (ppc_deal_with_atomic_sequence): ... this.  Adapt all callers.
3902         Do not call branch_dest; inline required parts of that function.
3903         (rs6000_skip_trampoline_code): Replace DEPRECATED_SYMBOL_NAME
3904         with SYMBOL_LINKAGE_NAME.
3905         (struct reg, regsize): Delete.
3906         (read_memory_addr): Delete; inline into callers.
3907         (rs6000_skip_prologue): Move after skip_prologue.
3908         (skip_prologue): Remove prototype.
3909         (rs6000_gdbarch_init): Remove sysv_abi variable; perform all
3910         initialization as if this variable were true.  Do not install
3911         ppc64_sysv_abi_adjust_breakpoint_address.
3912
3913         * rs6000-aix-tdep.c: Include "gdb_assert.h", "gdbtypes.h",
3914         "gdbcore.h", "target.h", "value.h", "infcall.h", "objfiles.h",
3915         and "breakpoint.h".
3916         (rs6000_find_toc_address_hook): Move here from rs6000-tdep.c.
3917         (SIG_FRAME_PC_OFFSET): Likewise.
3918         (SIG_FRAME_LR_OFFSET): Likewise.
3919         (SIG_FRAME_FP_OFFSET): Likewise.
3920         (rs6000_push_dummy_call): Likewise.
3921         (rs6000_return_value): Likewise.
3922         (rs6000_convert_from_func_ptr_addr): Likewise.
3923         (branch_dest, rs6000_software_single_step): Likewise.  Replace
3924         tdep->text_segment_base by AIX_TEXT_SEGMENT_BASE.
3925         (rs6000_aix_init_osabi): Install rs6000_push_dummy_call,
3926         rs6000_return_value, and rs6000_convert_from_func_ptr_addr.
3927         Call set_gdbarch_long_double_bit and set_gdbarch_frame_red_zone_size.
3928         Set tdep->lr_frame_offset.  Do not set tdep->text_segment_base.
3929
3930         * rs6000-tdep.h (rs6000_software_single_step): Remove prototype.
3931         (AIX_TEXT_SEGMENT_BASE): New macro.
3932         * rs6000-nat.c (exec_one_dummy_insn): Replace tdep->text_segment_base
3933         by AIX_TEXT_SEGMENT_BASE.
3934
3935         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Add prototype.
3936         (struct gdbarch_tdep): Remove text_segment_base member.
3937         * ppc-linux-tdep.c (ppc_linux_init_abi): On 64-bit, install
3938         ppc64_sysv_abi_adjust_breakpoint_address.
3939
3940         * Makefile.in (rs6000-tdep.o): Update dependencies.
3941         (rs6000-aix-tdep.o): Likewise.
3942
3943 2008-05-03  Luis Machado  <luisgpm@br.ibm.com>
3944             Thiago Jung Bauermann  <bauerman@br.ibm.com>
3945
3946         * cli/cli-decode.c (lookup_cmd_1): Fix indentation.
3947         * doublest.c (convert_typed_floating): Fix typo in comment.
3948         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
3949         * frame-unwind.h (frame_sniffer_ftype): Likewise.
3950         * frame.c (frame_unwind_address_in_block): Likewise.
3951         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Likewise.
3952         * symtab.h (struct symbol): Likewise.
3953         * tramp-frame.h (struct trad_frame_cache): Likewise.
3954         * value.c (allocate_repeat_value): Likewise.
3955
3956 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
3957
3958         * infrun.c (handle_inferior_event): Do not insert breakpoints at
3959         TARGET_WAITKIND_LOADED events during startup (i.e. in the shell).
3960
3961 2008-05-03  Pedro Alves  <pedro@codesourcery.com>
3962
3963         * parse.c (parse_exp_in_context): Don't override
3964         expression_context_pc if get_selected_block returned a valid
3965         block.
3966
3967 2008-05-03  Daniel Jacobowitz  <dan@codesourcery.com>
3968
3969         * alpha-tdep.h (ALPHA_REGISTER_BYTES): Delete.
3970         * arm-tdep.h (STATUS_REGISTER_SIZE): Delete.
3971         * breakpoint.c (args_for_catchpoint_enable, current_exception_event):
3972         Delete.
3973         * c-typeprint.c (c_type_print_base): Delete handling of template
3974         instantiations.
3975         * cp-support.h (METHOD_PTR_IS_VIRTUAL, METHOD_PTR_FROM_VOFFSET)
3976         (METHOD_PTR_TO_VOFFSET): Delete.
3977         * defs.h (QUIT_FIXME): Delete.
3978         * f-lang.h (DEFAULT_DOTMAIN_NAME_IN_MF77, DEFAULT_MAIN_NAME_IN_MF77)
3979         (DEFAULT_DOTMAIN_NAME_IN_XLF_BUGGY, DEFAULT_DOTMAIN_NAME_IN_XLF): Delete.
3980         * gdbtypes.h (struct cplus_struct_type): Delete is_inlined,
3981         ninstantiations, and instantiations.
3982         (TYPE_INSTANTIATIONS, TYPE_NINSTANTIATIONS, TYPE_INSTANTIATION)
3983         (TYPE_FN_FIELD_INLINED): Delete.
3984         * srec.h (SREC_BINARY): Delete.
3985         * symtab.c (symbol_init_demangled_name): Delete.
3986         * symtab.h (SYMBOL_INIT_DEMANGLED_NAME, symbol_init_demangled_name)
3987         (SYMBOL_OBJFILE, struct exception_event_record, CURRENT_EXCEPTION_KIND)
3988         (CURRENT_EXCEPTION_CATCH_SAL, CURRENT_EXCEPTION_CATCH_LINE)
3989         (CURRENT_EXCEPTION_CATCH_FILE, CURRENT_EXCEPTION_CATCH_PC)
3990         (CURRENT_EXCEPTION_THROW_SAL, CURRENT_EXCEPTION_THROW_LINE)
3991         (CURRENT_EXCEPTION_THROW_FILE, CURRENT_EXCEPTION_THROW_PC): Delete.
3992         * target.h (enum thread_control_capabilities): Delete tc_switch.
3993         (target_can_switch_threads): Delete.
3994
3995 2008-05-03  Daniel Jacobowitz  <dan@codesourcery.com>
3996
3997         * Makefile.in (objfiles.o): Update.
3998         * exec.c (exec_set_section_address): Support p->addr != 0.
3999         * objfiles.c (objfile_relocate): Update exec_ops section
4000         addresses.
4001         * symfile.c (place_section): Move exec_set_section_address call...
4002         (default_symfile_offsets): ...to here.
4003
4004 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
4005
4006         * Makefile.in (ppc_linux_tdep_h): New macro.
4007         (powerpc_32l_c, powerpc_altivec32_c, powerpc_altivec32l_c): Likewise.
4008         (powerpc_64l_c, powerpc_altivec64_c, powerpc_altivec64l_c): Likewise.
4009         (powerpc_e500l_c): Likewise.
4010         (ppc-linux-nat.o): Update dependencies.
4011         (ppc-linux-tdep.o): Update dependencies.
4012         (rs6000-tdep.o): Update dependencies.
4013
4014         * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Remove.
4015         (ppc_linux_svr4_fetch_link_map_offsets): Remove.
4016         (ppc_linux_gregset, ppc_linux_fpregset): Move to ppc-linux-tdep.h
4017         (ppc_supply_reg, ppc_collect_reg): Add prototypes.
4018         (tdesc_powerpc_e500): Remove.
4019
4020         * rs6000.c: Include "features/rs6000/powerpc-altivec32.c"
4021         and "features/rs6000/powerpc-altivec64.c".
4022         (ppc_supply_reg, ppc_collect_reg): Make global.
4023         (variants): Use tdesc_powerpc_32 for "powerpc" and
4024         tdesc_powerpc_altivec64 for "powerpc64".
4025         (_initialize_rs6000_tdep): Initialize AltiVec descriptions.
4026
4027         * ppc-linux-tdep.h: New file.
4028
4029         * ppc-linux-tdep.c: Include "ppc-linux-tdep.c".
4030         Include "features/rs6000/powerpc-32l.c".
4031         Include "features/rs6000/powerpc-altivec32l.c".
4032         Include "features/rs6000/powerpc-64l.c".
4033         Include "features/rs6000/powerpc-altivec64l.c".
4034         Include "features/rs6000/powerpc-e500l.c".
4035         (ppc_linux_supply_gregset): New function.
4036         (ppc_linux_collect_gregset): Handle orig_r3 and trap registers.
4037         (ppc32_linux_gregset): Use ppc_linux_supply_gregset.
4038         (ppc64_linux_gregset): Likewise.
4039         (ppc_linux_sigtramp_cache): Handle orig_r3 and trap registers.
4040         (ppc_linux_trap_reg_p): New function.
4041         (ppc_linux_write_pc): New function.
4042         (ppc_linux_core_read_description): New function.
4043         (ppc_linux_init_abi): Install ppc_linux_write_pc and
4044         ppc_linux_core_read_description.  Install orig_r3 and trap
4045         registers if present in the target description.
4046         (_initialize_ppc_linux_tdep): Initialize Linux target descriptions.
4047
4048         * ppc-linux-nat.c: Include "ppc-linux-tdep.h".
4049         (PT_ORIG_R3, PT_TRAP): Define if necessary.
4050         (ppc_register_u_addr): Handle orig_r3 and trap registers.
4051         (fetch_ppc_registers): Likewise.
4052         (store_ppc_registers): Likewise.
4053         (store_register): Likewise.
4054         (ppc_linux_read_description): Check whether AltiVec is supported.
4055         Check whether inferior is 32-bit or 64-bit.  Return the appropriate
4056         Linux target description.
4057
4058         * features/Makefile (WHICH): Use rs6000/powerpc-32l and
4059         rs6000/powerpc-altivec32l instead of rs6000/powerpc-32.
4060         Use rs6000/powerpc-64l and rs6000/powerpc-altivec64l instead
4061         of rs6000/powerpc-64.  Use rs6000/powerpc-e500l instead of
4062         rs6000/powerpc-e500.  Update -expedite variables accordingly.
4063
4064         * features/rs6000/power-spe.xml: Use regnum 73 for "acc".
4065         * features/rs6000/powerpc-32.xml: Do not include power-altivec.xml.
4066         * features/rs6000/powerpc-64.xml: Do not include power-altivec.xml.
4067         * features/rs6000/powerpc-e500.c: Regenerate.
4068         * features/rs6000/powerpc-32.c: Regenerate.
4069         * features/rs6000/powerpc-64.c: Regenerate.
4070
4071         * features/rs6000/power-linux.xml: New file.
4072         * features/rs6000/power64-linux.xml: New file.
4073         * features/rs6000/powerpc-32l.xml: New file.
4074         * features/rs6000/powerpc-altivec32l.xml: New file.
4075         * features/rs6000/powerpc-64l.xml: New file.
4076         * features/rs6000/powerpc-altivec64l.xml: New file.
4077         * features/rs6000/powerpc-e500l.xml: New file.
4078         * features/rs6000/powerpc-32l.c: New (generated) file.
4079         * features/rs6000/powerpc-altivec32l.c: New (generated) file.
4080         * features/rs6000/powerpc-64l.c: New (generated) file.
4081         * features/rs6000/powerpc-altivec64l.c: New (generated) file.
4082         * features/rs6000/powerpc-e500l.xml: New (generated) file.
4083
4084         * regformats/reg-ppc.dat: Remove.
4085         * regformats/reg-ppc64.dat: Remove.
4086         * regformats/rs6000/powerpc-32.dat: Remove.
4087         * regformats/rs6000/powerpc-64.dat: Remove.
4088         * regformats/rs6000/powerpc-e500.dat: Remove.
4089         * regformats/rs6000/powerpc-32l.dat: New (generated) file.
4090         * regformats/rs6000/powerpc-altivec32l.dat: New (generated) file.
4091         * regformats/rs6000/powerpc-64l.dat: New (generated) file.
4092         * regformats/rs6000/powerpc-altivec64l.dat: New (generated) file.
4093         * regformats/rs6000/powerpc-e500l.dat: New (generated) file.
4094
4095 2008-05-03  Pedro Alves  <pedro@codesourcery.com>
4096
4097         * thread.c (delete_thread): Call observer_notify_thread_exit.
4098         * mi/mi-interp.c (mi_interpreter_init): Register mi_thread_exit as
4099         thread_exit observer.
4100         (mi_thread_exit): New.
4101
4102 2008-05-03  Thiago Jung Bauermann  <bauerman@br.ibm.com>
4103
4104         * breakpoint.c (create_exception_catchpoint): Remove prototype
4105         for already deleted function.
4106         * breakpoint.h (ep_is_exception_catchpoint): Likewise.
4107         * frame.h (show_stack_frame): Remove prototype.
4108         * stack.c (show_stack_frame): Remove empty, unused function.
4109         * source.c (symtab_to_fullname, print_source_lines): Small fix
4110         in comment.
4111         * value.c (show_values): Update comments to mention "show values"
4112         command instead of "info history".
4113
4114 2008-05-02  Ulrich Weigand  <uweigand@de.ibm.com>
4115
4116         * linespec.c: Include "target.h".
4117         (minsym_found): Handle minimal symbols pointing to function
4118         descriptors.  Use find_function_start_pc.
4119         * minsyms.c (msymbol_objfile): New function.
4120         * parse.c (write_exp_msymbol): Handle minimal symbols pointing
4121         to function descriptors.
4122         * symtab.c (fixup_section): Only use minimal symbol at the same
4123         address to determine section of a symbol.
4124         (find_function_start_pc): New function.
4125         (find_function_start_sal): Use it.
4126         * symtab.h (msymbol_objfile): Add prototype.
4127         (find_function_start_pc): Likewise.
4128         * value.c: Include "objfiles.h".
4129         (value_fn_field): Handle minimal symbols pointing to function
4130         descriptors.
4131         * Makefile.in (linespec.o): Update dependencies.
4132         (value.o): Likewise.
4133
4134 2008-05-02  Joel Brobecker  <brobecker@adacore.com>
4135
4136         * ada-lang.c (unwrap_value): Handle the case where the "F" field
4137         inside a PAD type is a bitfield.
4138
4139 2008-05-02  Ulrich Weigand  <uweigand@de.ibm.com>
4140
4141         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Handle
4142         TYPE_CODE_BOOL and TYPE_CODE_CHAR the same as TYPE_CODE_INT.
4143         Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
4144         Handle TYPE_CODE_METHOD the same as TYPE_CODE_FUNC.
4145         Allow typedefs when checking for function pointer arguments.
4146         Right-align small structs passed on the stack.
4147         (ppc64_sysv_abi_return_value): Handle TYPE_CODE_BOOL and
4148         TYPE_CODE_CHAR the same as TYPE_CODE_INT.
4149         Handle TYPE_CODE_REF the same as TYPE_CODE_PTR.
4150
4151 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
4152
4153         * Makefile.in (arm-tdep.o): Update.
4154         * arm-tdep.c (arm_objfile_data_key, struct arm_mapping_symbol)
4155         (struct arm_per_objfile, arm_compare_mapping_symbols): New.
4156         (arm_pc_is_thumb): Use mapping symbols.
4157         (arm_objfile_data_cleanup, arm_record_special_symbol): New.
4158         (arm_gdbarch_init): Call set_gdbarch_record_special_symbol.
4159         (_initialize_arm_tdep): Initialize arm_objfile_data_key.
4160         * elfread.c (elf_symtab_read): Use gdbarch_record_special_symbol.
4161         * gdbarch.sh: Add record_special_symbol.
4162         * gdbarch.c, gdbarch.h: Regenerated.
4163         * objfiles.c (struct objfile_data): Add cleanup member.
4164         (register_objfile_data_with_cleanup): New function, from
4165         register_objfile_data.
4166         (register_objfile_data): Use it.
4167         (objfile_free_data): Call clear_objfile_data.
4168         (clear_objfile_data): Call cleanup functions.
4169         * objfiles.h (register_objfile_data_with_cleanup): Declare.
4170
4171 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
4172
4173         * objfiles.c (init_entry_point_info): Handle shared libraries.
4174
4175 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
4176
4177         * arm-tdep.c (arm_prologue_this_id): Compare pc, not func, to
4178         lowest_pc.
4179
4180 2008-05-02  Jim Blandy  <jimb@codesourcery.com>
4181             Pedro Alves  <pedro@codesourcery.com>
4182
4183         Implement displaced stepping.
4184
4185         * gdbarch.sh (max_insn_length): New 'variable'.
4186         (displaced_step_copy, displaced_step_fixup)
4187         (displaced_step_free_closure, displaced_step_location): New
4188         functions.
4189         (struct displaced_step_closure): Add forward declaration.
4190         * gdbarch.c, gdbarch.h: Regenerated.
4191
4192         * arch-utils.c: #include "objfiles.h".
4193         (simple_displaced_step_copy_insn)
4194         (simple_displaced_step_free_closure)
4195         (displaced_step_at_entry_point): New functions.
4196         * arch-utils.h (simple_displaced_step_copy_insn)
4197         (simple_displaced_step_free_closure)
4198         (displaced_step_at_entry_point): New prototypes.
4199
4200         * i386-tdep.c (I386_MAX_INSN_LEN): Rename to...
4201         (I386_MAX_MATCHED_INSN_LEN): ... this.
4202         (i386_absolute_jmp_p, i386_absolute_call_p)
4203         (i386_ret_p, i386_call_p, i386_breakpoint_p, i386_syscall_p)
4204         (i386_displaced_step_fixup): New functions.
4205         (struct i386_insn, i386_match_insn): Update.
4206         (i386_gdbarch_init): Set gdbarch_max_insn_length.
4207         * i386-tdep.h (I386_MAX_INSN_LEN): New.
4208         (i386_displaced_step_fixup): New prototype.
4209         * i386-linux-tdep.c (i386_linux_init_abi): Include "arch-utils.h".
4210         Register gdbarch_displaced_step_copy,
4211         gdbarch_displaced_step_fixup, gdbarch_displaced_step_free_closure,
4212         and gdbarch_displaced_step_location functions.
4213
4214         * infrun.c (debug_displaced): New variable.
4215         (show_debug_displaced): New function.
4216         (struct displaced_step_request): New struct.
4217         (displaced_step_request_queue, displaced_step_ptid)
4218         (displaced_step_gdbarch, displaced_step_closure)
4219         (displaced_step_original, displaced_step_copy)
4220         (displaced_step_saved_copy, can_use_displaced_stepping): New
4221         variables.
4222         (show_can_use_displaced_stepping, use_displaced_stepping)
4223         (displaced_step_clear, cleanup_displaced_step_closure)
4224         (displaced_step_dump_bytes, displaced_step_prepare)
4225         (displaced_step_clear_cleanup, write_memory_ptid)
4226         (displaced_step_fixup): New functions.
4227         (resume): Call displaced_step_prepare.
4228         (proceed): Call read_pc once, and remember the value.  If using
4229         displaced stepping, don't remove breakpoints.
4230         (handle_inferior_event): Call displaced_step_fixup.  Add some
4231         debugging output.  When we try to step over a breakpoint, but get
4232         a signal to deliver to the thread instead, ensure the step-resume
4233         breakpoint is actually inserted.  If a thread hop is needed, and
4234         displaced stepping is enabled, don't remove breakpoints.
4235         (init_wait_for_inferior): Call displaced_step_clear.
4236         (_initialize_infrun): Add "set debug displaced" command.  Add
4237         "maint set can-use-displaced-stepping" command.  Clear
4238         displaced_step_ptid.
4239         * inferior.h (debug_displaced): Declare variable.
4240         (displaced_step_dump_bytes): Declare function.
4241
4242         * Makefile.in (arch-utils.o, i386-linux-tdep.o): Update
4243         dependencies.
4244
4245 2008-05-02  Daniel Jacobowitz  <dan@codesourcery.com>
4246
4247         * arm-tdep.c (arm_mode_strings, arm_fallback_mode_string)
4248         (arm_force_mode_string, arm_show_fallback_mode)
4249         (arm_show_force_mode): New.
4250         (arm_pc_is_thumb): Honor fallback-mode and force-mode.  Use
4251         arm_frame_is_thumb.
4252         (_initialize_arm_tdep): Add "set arm fallback-mode"
4253         and "set arm force-mode".
4254         * NEWS: Document new commands.
4255
4256 2008-05-02  Andrew Stubbs  <andrew.stubbs@st.com>
4257
4258         * main.h (batch_silent): Declare.
4259         * event-top.c: Include main.h.
4260         (gdb_setup_readline): Remove extern batch_silent declaration.
4261         * infrun.c (normal_stop): Don't print source location when running in
4262         --batch-silent mode.
4263         * Makefile.in (event-top.o): Add main.h dependency.
4264
4265 2008-05-02  Andreas Schwab  <schwab@suse.de>
4266
4267         * target.h (struct target_ops): Add
4268         to_watchpoint_addr_within_range.
4269         (target_watchpoint_addr_within_range): New function.
4270         * target.c (update_current_target): Inherit
4271         to_watchpoint_addr_within_range, defaulting to
4272         default_watchpoint_addr_within_range.
4273         (default_watchpoint_addr_within_range): New function.
4274         (debug_to_watchpoint_addr_within_range): New function.
4275         (setup_target_debug): Set to_watchpoint_addr_within_range.
4276         * ppc-linux-nat.c (ppc_linux_watchpoint_addr_within_range):
4277         New function.
4278         (_initialize_ppc_linux_nat): Set to_watchpoint_addr_within_range.
4279         * breakpoint.c (watchpoints_triggered): Use
4280         target_watchpoint_addr_within_range.
4281
4282 2008-05-01  Pedro Alves  <pedro@codesourcery.com>
4283
4284         * configure.tgt: Add i[34567]86-*-dicos* and x86_64-*-dicos*.
4285         (i[34567]86-*-dicos*, x86_64-*-dicos*):
4286         Set gdb_osabi to GDB_OSABI_DICOS.
4287
4288         * defs.h (enum gdb_osabi): Add GDB_OSABI_DICOS.
4289         * osabi.c (gdb_osabi_name): Add "DICOS".
4290
4291         * i386-dicos-tdep.c: New file.
4292
4293         * Makefile.in (ALL_TARGET_OBS): Add i386-dicos-tdep.o.
4294         (ALLDEPFILES): Add i386-dicos-tdep.c.
4295         (i386-dicos-tdep.o): New rule.
4296
4297 2008-05-01  Pedro Alves  <pedro@codesourcery.com>
4298
4299         * linux-nat.c (linux_nat_switch_fork): Reinit GDB's thread list
4300         and register the fork's PTID as a thread.
4301
4302 2008-05-01  Aleksandar Ristovski  <aristovski@qnx.com>
4303
4304         PR gdb/1665
4305         * breakpoint.c (create_breakpoint): Add breakpoint_ops argument and
4306         assign its value to the breakpoint created.
4307         (create_breakpoints): Add breakpoint_ops argument and pass it
4308         to create_breakpoint call.
4309         (break_command_really): Add breakpoint_ops argument and pass/assign
4310         appropriately.
4311         (break_command_1): Pass NULL as ops argument.
4312         (set_breakpoint): Pass NULL as ops argument.
4313         (print_one_exception_catchpoint): Print <PENDING> if no loc available.
4314         (handle_gnu_v3_exceptions): Call generic breakpoint code to insert
4315         catch and throw catchpoints.
4316
4317 2008-05-01  Aleksandar Ristovski  <aristovski@qnx.com>
4318
4319         PR gdb/2343
4320         * corelow.c (core_open): Use gdbarch_target_signal_from_host to
4321         translate signal numeric value from the target to GDB's enum
4322         target_signal.
4323         * gdbarch.c, gdbarch.h: Regenerated.
4324         * gdbarch.sh: Added two new functions target_signal_from_host and
4325         target_signal_to_host.
4326         * target.h (default_target_signal_from_host,
4327         default_target_signal_to_host): New functions - declarations.
4328         * signals/signals.c (struct gdbarch): New declaration.
4329         (default_target_signal_to_host, default_target_signal_from_host): New
4330         functions.
4331
4332 2008-05-01  Daniel Jacobowitz  <dan@codesourcery.com>
4333             Pedro Alves  <pedro@codesourcery.com>
4334
4335         Based on work by Jan Kratochvil <jan.kratochvil@redhat.com> and Jeff
4336         Johnston <jjohnstn@redhat.com>.
4337
4338         * NEWS: Mention attach to stopped process fix.
4339         * infcmd.c (detach_command, disconnect_command): Discard the thread
4340         list.
4341         * infrun.c (handle_inferior_event): Do not ignore non-SIGSTOP while
4342         attaching.  Use signal_stop_state.
4343         (signal_stop_state): Check stop_soon.
4344         * linux-nat.c (kill_lwp): Declare earlier.
4345         (pid_is_stopped, linux_nat_post_attach_wait): New.
4346         (lin_lwp_attach_lwp): Use linux_nat_post_attach_wait.  Update
4347         comments.
4348         (linux_nat_attach): Use linux_nat_post_attach_wait.
4349         (detach_callback, linux_nat_detach): Improve handling for signalled
4350         processes.
4351         (linux_nat_pid_to_str): Always print out the LWP ID if it differs
4352         from the process ID.
4353         * Makefile.in (infcmd.o): Update.
4354
4355 2008-05-01  Daniel Jacobowitz  <dan@codesourcery.com>
4356
4357         * arm-linux-tdep.h (ARM_CPSR_REGNUM): Delete definition.
4358         * arm-tdep.c (arm_frame_is_thumb): New.
4359         (arm_pc_is_thumb): Clarify comment.
4360         (thumb_analyze_prologue): Remove PC special case.
4361         (thumb_scan_prologue): Take a block_addr argument.  Use it for
4362         find_pc_partial_function.  Remove unused variables.
4363         (arm_scan_prologue): Use arm_frame_is_thumb.  Use the block address
4364         for find_pc_partial_function.  Remove PC special case.
4365         (arm_prologue_prev_register): Add special handling for PC and CPSR.
4366         (arm_dwarf2_prev_register, arm_dwarf2_frame_init_reg): New.
4367         (arm_get_next_pc): Use arm_frame_is_thumb.
4368         (arm_write_pc): Use CPSR_T instead of 0x20.
4369         (arm_gdbarch_init): Call dwarf2_frame_set_init_reg.
4370         * arm-tdep.h (enum gdb_regnum): Add ARM_CPSR_REGNUM.
4371         (CPSR_T): Define.
4372         * dwarf2-frame.c (dwarf2_frame_prev_register): Handle
4373         DWARF2_FRAME_REG_FN.
4374         * dwarf2-frame.h (enum dwarf2_frame_reg_rule): Add
4375         DWARF2_FRAME_REG_FN.
4376         (struct dwarf2_frame_state_reg): Add FN to loc union.
4377
4378 2008-05-01  Nick Roberts  <nickrob@snap.net.nz>
4379
4380         * exec.c (print_section_info): Add missing '\n'.
4381
4382 2008-05-01  Vladimir Prus  <vladimir@codesourcery.com>
4383
4384         * thread.c (add_thread): Move observer call to ...
4385         (add_thread_silent): ... here.
4386
4387 2008-04-30  Ulrich Weigand  <uweigand@de.ibm.com>
4388
4389         * rs6000-tdep.c: Update for unwinder changes.
4390         * ppcobsd-tdep.c: Likewise.
4391
4392 2008-04-30  Ulrich Weigand  <uweigand@de.ibm.com>
4393
4394         * s390-tdep.c: Update for unwinder changes.
4395
4396 2008-04-30  Ulrich Weigand  <uweigand@de.ibm.com>
4397
4398         * spu-tdep.c: Update for unwinder changes.
4399
4400 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4401
4402         * hppanbsd-tdep.c, m68kbsd-tdep.c, mn10300-linux-tdep.c,
4403         ppc-linux-tdep.c, ppcnbsd-tdep.c, sparc-linux-tdep.c,
4404         sparc64-linux-tdep.c: Update for unwinder changes.
4405
4406 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4407
4408         * mipsnbsd-tdep.c, mips64obsd-tdep.c, mips-linux-tdep.c: Update
4409         for unwinder changes.
4410         * mips-tdep.c: Likewise.
4411         (mips_stub_frame_cache): Unwind the ABI stack pointer, not the
4412         raw one.
4413
4414 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4415
4416         * arm-linux-tdep.c, arm-tdep.c, armobsd-tdep.c: Update for
4417         unwinder changes.
4418
4419 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4420
4421         Update i386 and amd64 ports for unwinder changes.
4422
4423         * amd64-tdep.c (amd64_frame_cache): Expect this_frame.
4424         (amd64_frame_this_id, amd64_frame_prev_register): Update signature.
4425         (amd64_frame_unwind): Use default_frame_sniffer.
4426         (amd64_frame_sniffer): Delete.
4427         (amd64_sigtramp_frame_cache): Expect this_frame.
4428         (amd64_sigtramp_frame_this_id, amd64_sigtramp_frame_prev_register)
4429         (amd64_sigtramp_frame_sniffer): Update signature.
4430         (amd64_sigtramp_frame_unwind): Add amd64_sigtramp_frame_sniffer.
4431         (amd64_frame_base_address): Expect this_frame.
4432         (amd64_dummy_id): Renamed from amd64_unwind_dummy_id.  Expect
4433         this_frame.
4434         (amd64_init_abi): Use set_gdbarch_dummy_id and
4435         frame_unwind_append_unwinder.
4436         * i386-tdep.c (i386_frame_cache): Expect this_frame.
4437         (i386_frame_this_id, i386_frame_prev_register): Update signature.
4438         (i386_frame_unwind): Use default_frame_sniffer.
4439         (i386_frame_sniffer): Delete.
4440         (i386_sigtramp_frame_cache): Expect this_frame.
4441         (i386_sigtramp_frame_this_id, i386_sigtramp_frame_prev_register)
4442         (i386_sigtramp_frame_sniffer): Update signature.
4443         (i386_sigtramp_frame_unwind): Use i386_sigtramp_frame_sniffer.
4444         (i386_frame_base_address): Update signature.
4445         (i386_dummy_id): Rename from i386_unwind_dummy_id.  Expect this_frame.
4446         (i386_push_dummy_call): Update comment.
4447         (i386_sigtramp_p, i386_svr4_sigtramp_p, i386_svr4_sigcontext_addr):
4448         Expect this_frame.
4449         (i386_gdbarch_init): Use set_gdbarch_dummy_id, dwarf2_append_unwinders,
4450         and frame_unwind_append_unwinder.
4451         * amd64-linux-tdep.c, amd64-sol2-tdep.c, amd64fbsd-tdep.c,
4452         amd64nbsd-tdep.c, amd64obsd-tdep.c, i386-linux-tdep.c,
4453         i386-nto-tdep.c, i386bsd-tdep.c, i386-sol2-tdep.c, i386obsd-tdep.c,
4454         i386nbsd-tdep.c: Update for unwinder changes.
4455
4456 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4457
4458         * trad-frame.c (struct trad_frame_cache): Rename next_frame to this_frame.
4459         (trad_frame_cache_zalloc, trad_frame_alloc_saved_regs): Expect
4460         this_frame.
4461         (trad_frame_get_prev_register, trad_frame_get_register): Update signature.
4462         * trad-frame.h (trad_frame_cache_zalloc, trad_frame_get_register)
4463         (trad_frame_alloc_saved_regs, trad_frame_get_prev_register): Update
4464         signature.
4465         * tramp-frame.c (tramp_frame_cache, tramp_frame_start): Expect
4466         this_frame.
4467         (tramp_frame_this_id, tramp_frame_prev_register, tramp_frame_sniffer):
4468         Update signature.
4469         * tramp-frame.h (struct tramp_frame): Update signature of init.
4470         * Makefile.in (trad-frame.o): Update.
4471
4472 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4473
4474         * dwarf2-frame.c (read_reg): Expect this_frame in the baton.
4475         (execute_stack_op): Put this_frame in the baton.
4476         (execute_cfa_program): Take this_frame.
4477         (struct dwarf2_frame_ops): Update comment for signal_frame_p.
4478         (dwarf2_frame_default_init_reg, dwarf2_frame_init_reg)
4479         (dwarf2_frame_signal_frame_p, dwarf2_frame_cache)
4480         (dwarf2_frame_this_id): Adjust to work on this_frame.
4481         (dwarf2_signal_frame_this_id): Delete.
4482         (dwarf2_frame_prev_register): Update signature.  Use new frame
4483         unwind methods.
4484         (dwarf2_frame_sniffer): Update signature.  Expect this_frame.
4485         (dwarf2_frame_unwind, dwarf2_signal_frame_unwind): Add
4486         dwarf2_frame_sniffer.
4487         (dwarf2_append_unwinders): New.
4488         (dwarf2_frame_base_address, dwarf2_frame_base_sniffer): Expect
4489         this_frame.
4490         * sparc-tdep.c (sparc32_dwarf2_struct_return_p)
4491         (sparc32_dwarf2_frame_init_reg): Expect this_frame.
4492         * cris-tdep.c (cris_dwarf2_frame_init_reg): Likewise.
4493         * rs6000-tdep.c (ppc_dwarf2_frame_init_reg): Likewise.
4494         * s390-tdep.c (s390_dwarf2_frame_init_reg): Likewise.
4495         * sh-tdep.c (sh_dwarf2_frame_init_reg): Likewise.
4496         * sparc64-tdep.c (sparc64_dwarf2_frame_init_reg): Likewise.
4497         * dwarf2-frame.h (dwarf2_frame_sniffer): Delete declaration.
4498         (dwarf2_append_unwinders): Declare.
4499         (dwarf2_frame_base_sniffer): Update declaration.
4500         * i386-linux-tdep.c (i386_linux_dwarf_signal_frame_p): Expect
4501         this_frame.
4502
4503 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4504
4505         Convert frame unwinders to use the current frame and
4506         "struct value".
4507
4508         * frame.c (frame_debug): Make global.
4509         (get_frame_id): Pass this frame to unwinder routines.
4510         (frame_pc_unwind): Remove unused unwind->prev_pc support.
4511         (do_frame_register_read): Do not discard the return value of
4512         frame_register_read.
4513         (frame_register_unwind): Remove debug messages.  Use
4514         frame_unwind_register_value.
4515         (frame_unwind_register_value, get_frame_register_value): New
4516         functions.
4517         (create_new_frame, get_frame_base_address, get_frame_locals_address)
4518         (get_frame_args_address, get_frame_type): Pass this frame to
4519         unwinder routines.
4520         (frame_cleanup_after_sniffer, frame_prepare_for_sniffer): New
4521         functions.
4522         * frame.h: Update comments.
4523         (frame_debug, frame_unwind_register_value, get_frame_register_value)
4524         (frame_prepare_for_sniffer): Declare.
4525         * frame-unwind.h: Update comments and parameter names.
4526         (default_frame_sniffer): Declare.
4527         (frame_prev_register_ftype): Return a struct value *.
4528         (struct frame_unwind): Remove prev_pc member.
4529         (frame_unwind_sniffer_ftype, frame_unwind_append_sniffer): Delete.
4530         (frame_unwind_append_unwinder, frame_unwind_got_optimized)
4531         (frame_unwind_got_register, frame_unwind_got_memory)
4532         (frame_unwind_got_constant, frame_unwind_got_address): Declare.
4533         * frame-base.h: Update comments and parameter names.
4534         * valops.c (value_fetch_lazy): Use get_frame_register_value.  Iterate
4535         if necessary.  Add debugging output.
4536         * sentinel-frame.c (sentinel_frame_prev_register)
4537         (sentinel_frame_this_id): Update for new signature.
4538         (sentinel_frame_prev_pc): Delete.
4539         (sentinel_frame_unwinder): Remove prev_pc.
4540         * ia64-tdep.c (ia64_libunwind_frame_unwind): Do not initialize
4541         prev_pc.
4542         * libunwind-frame.c (libunwind_frame_unwind): Likewise.
4543         * frame-unwind.c (struct frame_unwind_table_entry): Remove sniffer.
4544         (frame_unwind_append_sniffer): Delete.
4545         (frame_unwind_append_unwinder): New function.
4546         (frame_unwind_find_by_frame): Take this frame.  Only use sniffers
4547         from unwinders.  Use frame_prepare_for_sniffer.
4548         (default_frame_sniffer, frame_unwind_got_optimized)
4549         (frame_unwind_got_register, frame_unwind_got_memory)
4550         (frame_unwind_got_constant, frame_unwind_got_address): New functions.
4551         * dummy-frame.c (dummy_frame_sniffer): Use gdbarch_dummy_id.
4552         (dummy_frame_prev_register, dummy_frame_this_id): Update for new
4553         signature.
4554         * gdbarch.sh: Replace unwind_dummy_id with dummy_id.
4555         * gdbarch.c, gdbarch.c: Regenerated.
4556         * frame-base.c (default_frame_base_address)
4557         (default_frame_locals_address, default_frame_args_address): Update
4558         for new signature.
4559         (frame_base_find_by_frame): Pass this frame to unwinder routines.
4560         * infcall.c (call_function_by_hand): Update comments.
4561         * Makefile.in (frame-unwind.o): Update dependencies.
4562
4563 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4564
4565         * ada-lang.c (ada_value_primitive_packed_val): Only check
4566         value_lazy for memory lvals.
4567         * findvar.c (value_of_register_lazy): New function.
4568         (locate_var_value): Only check value_lazy for memory lvals.
4569         * valarith.c (value_subscripted_rvalue): Likewise.
4570         * valops.c (value_fetch_lazy): Handle both memory and register
4571         lvals.
4572         (search_struct_field, value_slice): Only check value_lazy for memory
4573         lvals.
4574         * value.c (struct value): Update comment for lazy.
4575         (value_primitive_field): Only check value_lazy for memory lvals.
4576         * value.h (value_lazy): Update comment.
4577         (value_of_register_lazy): Declare.
4578
4579 2008-04-30  Daniel Jacobowitz  <dan@codesourcery.com>
4580
4581         * corefile.c (reopen_exec_file): Close any open files.
4582
4583 2008-04-29  Joel Brobecker  <brobecker@adacore.com>
4584
4585         * ia64-tdep.c (ia64_memory_remove_breakpoint): Set
4586         show_memory_breakpoints to 1 while reading the instruction bundle.
4587
4588 2008-04-29  Joel Brobecker  <brobecker@adacore.com>
4589
4590         * gdbarch.sh: Document the return_value method. Explain that
4591         the FUNCTYPE parameter might be NULL.
4592         * gdbarch.h: Regenerated.
4593         * sparc-tdep.c (sparc32_push_dummy_code): Do not pass the function
4594         type when calling using_struct_return, as this is unnecessary
4595         on this target.
4596
4597 2008-04-28  Joel Brobecker  <brobecker@adacore.com>
4598
4599         * terminal.h (create_tty_session): Fix return type.
4600
4601 2008-04-26  Vladimir Prus  <vladimir@codesourcery.com>
4602
4603         * mi/mi-interp.c (mi_new_thread): Quote the thread id.
4604
4605 2008-04-26  Joel Brobecker  <brobecker@adacore.com>
4606
4607         * breakpoint.c (condition_command, commands_from_control_command)
4608         (break_command_really): Minor reformatting.
4609
4610 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
4611
4612         * dwarf2read.c (dwarf2_const_value): Handle DW_FORM_strp.
4613
4614 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
4615
4616         * amd64-tdep.c (amd64_get_longjmp_target): New.
4617         (amd64_init_abi): Register amd64_get_longjmp_target as
4618         gdbarch_get_longjmp_target callback.
4619         * i386-tdep.c (i386_get_longjmp_target): Remove 64-bit handling.
4620
4621 2008-04-25  Pedro Alves  <pedro@codesourcery.com>
4622
4623         * breakpoint.h (enum bpstat_what_main_action): Delete
4624         BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE.
4625
4626         * breakpoint.c (clrs): Delete.
4627         (bpstat_what): Update table.
4628
4629         * infrun.c (handle_inferior_event): Remove
4630         BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE handling.
4631
4632 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4633
4634         * mi/mi-cmds.h (mi_cmd_args_ftype): Remove.
4635         Adjust all prototypes using mi_cmd_args_ftype to use
4636         mi_cmd_argv_ftype.
4637         (struct mi_cmd): Remove the args_func field.
4638         * mi/mi-cmds.c: Don't provide value for the args_func field.
4639         * mi/mi-main.c (mi_execute_async_cli_command)
4640         (mi_cmd_exec_run, mi_cmd_exec_next, mi_cmd_exec_next_instruction)
4641         (mi_cmd_exec_step, mi_cmd_exec_step_instruction)
4642         (mi_cmd_exec_finish, mi_cmd_exec_until, mi_cmd_exec_return)
4643         (mi_cmd_exec_continue, mi_cmd_exec_interrupt)
4644         (mi_cmd_target_download): Adjust.
4645         (mi_cmd_target_select): Adjust. Pass 0 for from_tty parameter.
4646         (mi_cmd_execute): Do not check for args_func.
4647         (mi_execute_async_cli_command): Adjust.
4648         * mi/mi-parse.c: Don't check for args_func.
4649
4650 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4651
4652         * breakpoint.c (bpstat_check_location)
4653         (bpstat_check_watchpoint, bpstat_check_breakpoint_conditions):
4654         New, extracted from bpstat_stop_status.
4655         (bpstat_stop_status): Use the above.
4656
4657 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4658
4659         * mi/mi-main.c (last_async_command): Rename to current_token.
4660         (previous_async_command): Remove.
4661         (mi_cmd_gdb_exit): Adjust.
4662         (mi_cmd_exec_interrupt): Don't dance with previous_async_command.
4663         (mi_cmd_target_select): Adjust.
4664         (mi_cmd_execute): Don't set previous_async_command.  Free token
4665         here even in async mode.
4666         (mi_execute_async_cli_command): Adjust.
4667         (mi_exec_async_cli_cmd_continuation): Adjust.  Do not free the
4668         token.
4669         (mi_load_progress): Adjust.
4670
4671 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4672
4673         * infcmd.c (step_1_continuation): Always disable longjmp
4674         breakpoint if we're not going to do another step.
4675
4676 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4677
4678         exec_cleanup murder.
4679         * breakpoint.c (until_break_command_continuation): Add
4680         the 'error' parameter.  Directly delete the breakoint as
4681         opposed to running cleanups.
4682         (until_break_command): Install continuation only
4683         after starting the target.  Don't use exec cleanups,
4684         use ordinary cleanups.  Discard cleanups is successfully
4685         started the target in async mode.
4686         (make_cleanup_delete_breakpoint): Remove.
4687         * breakpoint.h (make_cleanup_delete_breakpoint): Remove
4688         declaration.
4689         * defs.h (do_exec_cleanups, make_exec_cleanup): Remove
4690         declarations.
4691         (struct continations): Add the 'error' parameter to the
4692         continuation_hook field.
4693         (add_continuation, do_all_continuations)
4694         (add_intermediate_continuation)
4695         (do_all_intermediate_continuations): Add the 'error' parameter.
4696         * exceptions.c (throw_exception): Don't call do_exec_cleanups.
4697         * inf-loop.c (inferior_event_handler): Instead of calling
4698         discard_all_continuations, use do_all_continuations with 1 as
4699         'error' parameter.  Pass 0 as 'error' parameter in existing uses
4700         of discard_all_continuations.
4701         * infcmd.c (step_1): Do not use exec cleanup.  For async case, discard
4702         cleanups.
4703         (step_once): Install continuation only after resuming the target.
4704         (step_1_continuation): Disable longjmp breakpoint on error.
4705         (finish_command_continuation): Add the error parameter.  Delete
4706         the finish breakpoint directly, do not use cleanups.
4707         (finish_command): Do not use exec_cleanups. Always setup
4708         continuation.  For sync case, immediately run them.
4709         (attach_command_continuation): Add the error parameter.
4710         * infrun.c (fetch_inferior_event): Do not use exec cleanups to
4711         remove step_resume_breakpoint -- adjust delete it directly.
4712         * interps.c (interp_set): Adjust call to do_all_continations.
4713         * mi/mi-interp.c (mi_interpreter_exec_continuation): Do not
4714         do exec cleanups.
4715         * mi/mi-main.c (mi_cmd_target_select): Do not do exec
4716         cleanups.
4717         (mi_cmd_execute): Do not use exec_cleanup.
4718         (mi_execute_async_cli_command): Simplify the string concatenation
4719         logic.  Do no use exec cleanup.
4720         (mi_exec_async_cli_cmd_continuation): New parameter error.
4721         Free last_async_command.
4722         * top.c (command_line_handler_continuation): New parameter error.
4723         * utils.c (exec_cleanup_chain, make_exec_cleanup)
4724         (do_exec_cleanups): Remove.
4725         (add_continuation, do_all_continations)
4726         (add_intermediate_continuation)
4727         (do_all_intermediate_continuations): New parameter error.
4728
4729 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4730
4731         * breakpoint.h (bp_location_p): New typedef.
4732         Register a vector of bp_location_p.
4733         * breakpoint.c (always_inserted_mode)
4734         (show_always_inserted_mode): New.
4735         (unlink_locations_from_global_list): Remove.
4736         (update_global_location_list)
4737         (update_global_location_list_nothrow): New.
4738         (update_watchpoint): Don't free locations.
4739         (should_insert_location): New.
4740         (insert_bp_location): Use should_insert_location.
4741         (insert_breakpoint_locations): Copied from
4742         insert_breakpoints.
4743         (insert_breakpoint): Use insert_breakpoint_locations.
4744         (bpstat_stop_status): Call update_global_location_list
4745         when disabling breakpoint.
4746         (allocate_bp_location): Don't add to bp_location_chain.
4747         (set_raw_breakpoint)
4748         (create_longjmp_breakpoint, enable_longjmp_breakpoint)
4749         (disable_longjmp_breakpoint, create_overlay_event_breakpoint)
4750         (enable_overlay_breakpoints, disable_overlay_breakpoints)
4751         (set_longjmp_resume_breakpoint)
4752         (enable_watchpoints_after_interactive_call_stop)
4753         (disable_watchpoints_before_interactive_call_start)
4754         (create_internal_breakpoint)
4755         (create_fork_vfork_event_catchpoint)
4756         (create_exec_event_catchpoint, set_momentary_breakpoint)
4757         (create_breakpoints, break_command_1, watch_command_1)
4758         (create_exception_catchpoint)
4759         (handle_gnu_v3_exceptions)
4760         (disable_breakpoint, breakpoint_re_set_one)
4761         (create_thread_event_breakpoint, create_solib_event_breakpoint)
4762         (create_ada_exception_breakpoint): : Don't call check_duplicates.
4763         Call update_global_location_list.
4764         (delete_breakpoint): Don't remove locations and don't
4765         try to reinsert them. Call update_global_location_list.
4766         (update_breakpoint_locations): Likewise.
4767         (restore_always_inserted_mode): New.
4768         (update_breakpoints_after_exec): Temporary disable
4769         always inserted mode.
4770         * Makefile.in: Update dependencies.
4771
4772         * infrun.c (proceed): Remove breakpoints while stepping
4773         over breakpoint.
4774         (handle_inferior_event): Don't remove or insert
4775         breakpoints.
4776         * linux-fork.c (checkpoint_command): Remove breakpoints
4777         before fork and insert after.
4778         (linux_fork_context): Remove breakpoints before switch
4779         and insert after.
4780         * target.c (target_disconnect, target_detach): Remove
4781         breakpoints from target.
4782
4783
4784 2008-04-24  Vladimir Prus  <vladimir@codesourcery.com>
4785
4786         * breakpoint.c (print_one_breakpoint_location): In MI
4787         mode, report the location string the breakpoint was
4788         originally created with.
4789
4790 2008-04-23  Maxim Grigoriev  <maxim2405@gmail.com>
4791
4792         * Makefile.in (xtensa-tdep.o): Update dependencies.
4793         * configure.tgt (xtensa*): Update dependencies.
4794         * xtensa-tdep.c (arreg_number): Renamed from areg_number.
4795         Local variable areg renamed to arreg.
4796         (areg_number): New function.
4797         (xtensa_pseudo_register_read, xtensa_pseudo_register_write)
4798         (xtensa_extract_return_value, xtensa_store_return_value): areg_number
4799         replaced by arreg_number.
4800         (xtensa_windowed_frame_cache, struct xtensa_frame_cache): New comments.
4801         (xtensa_alloc_frame_cache): Initialize cache->wd.ws.
4802         (xtensa_scan_prologue): New function.
4803         (xtensa_frame_cache): New local fp_regnum. Handle separately the case,
4804         when ENTRY instraction hasn't been executed yet. Get the frame pointer
4805         value based on prologue analysis. Fix the bugs preventing WS and
4806         AR4-AR7/A11 registers from getting right values for intermediate frames,
4807         whose registers have been already spilled.
4808         (xtensa_frame_prev_register): Fix WS register value. Use are_number
4809         and arreg_number appropriately.
4810         (xtensa_gdbarch_init): Set solib_svr4_fetch_link_map_offsets to
4811         svr4_ilp32_fetch_link_map_offsets.
4812
4813 2008-04-23  Andrew Stubbs  <andrew.stubbs@st.com>
4814
4815         * printcmd.c: Define USE_PRINTF_I64 and PRINTF_HAS_LONG_LONG on MinGW.
4816         (printf_command): Convert %lld to %I64d when USE_PRINTF_I64 set.
4817
4818 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
4819
4820         * acinclude.m4: Add override.m4.
4821         * configure: Regenerate.
4822
4823 2008-04-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
4824
4825         * ada-lang.c (get_selections): Variable PROMPT made non-const and
4826         initialized with a trailing space now.  Use PROMPT_ARG of
4827         COMMAND_LINE_INPUT instead of printing it ourselves.
4828
4829 2008-04-22  Joel Brobecker  <brobecker@adacore.com>
4830
4831         * NEWS: Document support for 64-bit core file.
4832
4833 2008-04-22  Corinna Vinschen  <vinschen@redhat.com>
4834
4835         * NEWS: Add information on calling convention and new SH CLI options.
4836
4837         * sh-tdep.c (sh_cc_gcc): New static string.
4838         (sh_cc_renesas): Ditto.
4839         (sh_cc_enum): New static string array.
4840         (sh_active_calling_convention): New static string pointer denoting
4841         active user chosen ABI.
4842         (sh_is_renesas_calling_convention): New function to return function
4843         specific ABI, or user choice if necessary.
4844         (sh_use_struct_convention): Rename first argument and turn around its
4845         meaning.  Check for renesas ABI and return accordingly.
4846         (sh_use_struct_convention_nofpu): New function.
4847         (sh_next_flt_argreg): Get function type as third parameter.  Check
4848         for renesas ABI and choose floating registers accordingly.
4849         (sh_push_dummy_call_fpu): Check for ABI and choose argument slot and
4850         struct return slot accordingly.
4851         (sh_push_dummy_call_nofpu): Ditto.
4852         (sh_return_value_nofpu): Call sh_use_struct_convention_nofpu from here.
4853         Evaluate ABI and give to sh_use_struct_convention_nofpu.
4854         (sh_return_value_fpu):  Evaluate ABI and give to
4855         sh_use_struct_convention.
4856         (show_sh_command): New function.
4857         (set_sh_command): Ditto.
4858         (_initialize_sh_tdep): Initialize `set/show sh calling-convention
4859         CLI command.
4860
4861         * gdbarch.sh (return_value): Add func_type argument.
4862         * gdbarch.c: Regenerate.
4863         * gdbarch.h: Ditto.
4864         * eval.c (evaluate_subexp_standard): Rename local variable value_type to
4865         val_type so as not to collide with value_type function.  Call
4866         using_struct_return with additional function type argument.
4867         * infcall.c (call_function_by_hand): Call using_struct_return and
4868         gdbarch_return_value with additional function type argument.
4869         * infcmd.c (print_return_value): Take addition func_type argument.
4870         Call gdbarch_return_value with additional function type argument.
4871         (finish_command_continuation): Call print_return_value with additional
4872         function type argument.
4873         (finish_command): Ditto.
4874         * sparc-tdep.c (sparc32_push_dummy_code): Call using_struct_return with
4875         additional function type argument.
4876         * stack.c (return_command): Call using_struct_return and
4877         gdbarch_return_value with additional function type argument.
4878         * value.c (using_struct_return): Take additional function type argument.
4879         * value.h (using_struct_return): Accommodate declaration.
4880         * alpha-tdep.c (alpha_return_value): Add func_type argument.
4881         * amd64-tdep.c (amd64_return_value): Ditto.
4882         * arm-tdep.c (arm_return_value): Ditto.
4883         * avr-tdep.c (avr_return_value): Ditto.
4884         * cris-tdep.c (cris_return_value): Ditto.
4885         * frv-tdep.c (frv_return_value): Ditto.
4886         * h8300-tdep.c (h8300_return_value): Ditto.
4887         (h8300h_return_value): Ditto.
4888         * hppa-tdep.c (hppa32_return_value): Ditto.
4889         (hppa64_return_value): Ditto.
4890         * i386-tdep.c (i386_return_value): Ditto.
4891         * ia64-tdep.c (ia64_return_value): Ditto.
4892         * iq2000-tdep.c (iq2000_return_value): Ditto.
4893         * m32c-tdep.c (m32c_return_value): Ditto.
4894         * m32r-tdep.c (m32r_return_value): Ditto.
4895         * m68hc11-tdep.c (m68hc11_return_value): Ditto.
4896         * m68k-tdep.c (m68k_return_value): Ditto.
4897         (m68k_svr4_return_value): Ditto.
4898         * m88k-tdep.c  (m88k_return_value): Ditto.
4899         * mep-tdep.c (mep_return_value): Ditto.
4900         * mips-tdep.c (mips_eabi_return_value): Ditto.
4901         (mips_n32n64_return_value): Ditto.
4902         (mips_o32_return_value): Ditto.
4903         (mips_o64_return_value): Ditto.
4904         * mn10300-tdep.c (mn10300_return_value): Ditto.
4905         * mt-tdep.c (mt_return_value): Ditto.
4906         * ppc-linux-tdep.c (ppc_linux_return_value): Ditto.
4907         * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Ditto.
4908         (ppc_sysv_abi_broken_return_value): Ditto.
4909         (ppc64_sysv_abi_return_value): Ditto.
4910         * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
4911         (ppc_sysv_abi_broken_return_value): Ditto.
4912         (ppc64_sysv_abi_return_value): Ditto.
4913         * ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
4914         * rs6000-tdep.c (rs6000_return_value): Ditto.
4915         * s390-tdep.c (s390_return_value): Ditto.
4916         * score-tdep.c (score_return_value): Ditto.
4917         * sh-tdep.c (sh_return_value_nofpu): Ditto.
4918         (sh_return_value_fpu): Ditto.
4919         * sh64-tdep.c (sh64_return_value): Ditto.
4920         * sparc-tdep.c (sparc32_return_value): Ditto.
4921         * sparc64-tdep.c (sparc64_return_value): Ditto.
4922         * spu-tdep.c (spu_return_value): Ditto.
4923         * v850-tdep.c (v850_return_value): Ditto.
4924         * vax-tdep.c (vax_return_value): Ditto.
4925         * xstormy16-tdep.c (xstormy16_return_value): Ditto.
4926         * xtensa-tdep.c (xtensa_return_value): Ditto.
4927
4928         * gdbtypes.h (struct type): Add calling_convention member.
4929         * dwarf2read.c (read_subroutine_type): Add calling convention read
4930         from DW_AT_calling_convention attribute to function type.
4931
4932 2008-04-22  Markus Deuling  <deuling@de.ibm.com>
4933
4934         * eval.c (evaluate_subexp_standard): Use value_subscripted_rvalue for
4935         multi_f77_subscript to support values from registers.
4936         * valarith.c (value_subscripted_rvalue): Remove prototype and static.
4937         * value.h (value_subscripted_rvalue): Add prototype.
4938
4939         * f-typeprint.c (f_type_print_base): Add support for TYPE_CODE_UNION.
4940         Fix output.
4941         * f-valprint.c (f_val_print): Likewise.
4942
4943 2008-04-21  Craig Silverstein  <csilvers@google.com>
4944
4945         * dwarf2read.c (zlib_decompress_section): Define abfd in the
4946         !HAVE_ZLIB_H case.
4947
4948 2008-04-21  Pedro Alves  <pedro@codesourcery.com>
4949
4950         * symfile.c (syms_from_objfile): Don't warn if lowest loadable
4951         section is not a code section.
4952
4953 2008-04-19  Craig Silverstein  <csilvers@google.com>
4954
4955         * NEWS: Add information on compressed debug sections.
4956
4957 2008-04-19  Vladimir Prus  <vladimir@codesourcery.com>
4958
4959         * mi/mi-cmd-var.c (varobj_update_one): Print new
4960         value for variable objects that changed type.
4961
4962 2008-04-19  Vladimir Prus  <vladimir@codesourcery.com>
4963
4964         * varobj.c (varobj_invalidate): Don't touch floating
4965         varobjs.
4966
4967 2008-04-19  Mark Kettenis  <kettenis@gnu.org>
4968
4969         * symtab.c: (multiple_symbols_modes, multiple_symbols_ask)
4970         (multiple_symbols_cancel): Remove extra const.
4971         * symtab.h: Likewise.
4972
4973 2008-04-19  Nick Roberts  <nickrob@snap.net.nz>
4974
4975         * interps.c (top_level_interpreter): Rename static variable...
4976         (top_level_interpreter_ptr): ...to this.
4977         (top_level_interpreter): New function.
4978
4979         * interps.h: New extern for top_level_interpreter.
4980
4981         * linespec.c: Include interps.h and mi/mi-cmds.h.
4982         (decode_line_2): When using MI, always set all breakpoints in menu.
4983
4984         * Makefile.in (linespec.o, mi-interp.o): Add dependencies.
4985
4986 2008-04-18  Craig Silverstein  <csilvers@google.com>
4987
4988         * configure.ac (AC_SEARCH_LIBS): Add check for zlib.
4989         * config.in, configure: Regenerate.
4990         * dwarf2read.c: Include zlib.h if present.
4991         Modified *_SECTION macros.
4992         (section_is_p): New.
4993         (dwarf2_locate_sections): Use section_is_p instead of strcmp
4994         (dwarf2_resize_section): New.
4995         to determine whether a given section has a given name.
4996         (zlib_decompress_section): New.
4997         (dwarf2_read_section): Read the compressed section if present
4998         in the binary.
4999         * MAINTAINERS: Added myself to section Write After Approval.
5000
5001 2008-04-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
5002
5003         * defs.h (exec_set_section_offsets): Remove prototype.
5004         * exec.c (exec_set_section_offsets): Remove function.
5005
5006 2008-04-18  Joel Brobecker  <brobecker@adacore.com>
5007
5008         * stabsread.c (cleanup_undefined_types_1): Add instance flags check
5009         in the search for the matching symbol.
5010
5011 2008-04-17  Marc Khouzam  <marc.khouzam@ericsson.com>
5012
5013         * breakpoint.c (update_watchpoint): Always reparse
5014         condition.
5015
5016 2008-04-17  Joel Brobecker  <brobecker@adacore.com>
5017
5018         * breakpoint.c (print_one_breakpoint_location): Make sure to print
5019         the breakpoint address only once.
5020
5021 2008-04-17  Dennis Roberts  <dennis.roberts@sunquestinfo.com>
5022
5023         * rs6000-tdep.c (rs6000_gdbarch_init): Use the BFD architecture,
5024         rather than a hard-coded architecture, for xcoff executables.
5025
5026 2008-04-17  Doug Evans  <dje@google.com>
5027
5028         * buildsym.c (watch_main_source_file_lossage): New fn.
5029         (end_symtab): Call it.
5030
5031         * source.c (find_and_open_source): Add some comments clarifying
5032         handling of FULLNAME argument.  Make static.  Remove pointless
5033         xstrdup/xfree.
5034
5035 2008-04-17  Pedro Alves  <pedro@codesourcery.com>
5036
5037         * inf-loop.c (inferior_event_handler): Also run the intermediate
5038         continuations in the INF_EXEC_COMPLETE case.
5039
5040 2008-04-16  Tom Tromey  <tromey@redhat.com>
5041
5042         * cli/cli-decode.h (CMD_ASYNC_OK): New define.
5043         (set_cmd_async_ok, get_cmd_async_ok): Declare.
5044         * cli/cli-decode.c (set_cmd_async_ok): New function.
5045         (get_cmd_async_ok): New function.
5046         * cli/cli-cmds.c (init_cli_cmds): Mark "pwd", "help", "info", and
5047         "show" as async-ok.
5048         * top.c (execute_command): Use get_cmd_async_ok.
5049         * infcmd.c: Include cli/cli-decode.h.
5050         (_initialize_infcmd): Mark "interrupt" as async-ok.
5051         * Makefile.in (infcmd.o): Depend on cli_decode_h.
5052
5053 2008-04-16  Daniel Jacobowitz  <dan@codesourcery.com>
5054
5055         PR gdb/2445
5056         * exec.c: Correct "arch-utils.h" include.
5057
5058 2008-04-15  Aleksandar Ristovski  <aristovski@qnx.com>
5059
5060         PR gdb/2424
5061         * infrun.c (normal_stop) Move breakpoint_auto_delete further down
5062         to allow printing to 'see' real reason of stop. This fixes PR 2424.
5063         * breakpoint.c (bpdisp_texst): New function. The function takes over
5064         the role of bpstats static array in print_one_breakpoint_location.
5065         (print_it_typical): Print "Temporary breakpoint" instead
5066         of just "Breakpoint" when breakpoint is, well, temporary. For mi-like
5067         protocols, print disp field.
5068         (print_one_breakpoint_location): Removed bpdisps static definition.
5069         Call new bpstat_text function to get value for 'disp' field.
5070         (mention): Print "Temporary breakpoint" instead of just "Breakpoint".
5071
5072 2008-04-15  Daniel Jacobowitz  <dan@codesourcery.com>
5073
5074         * gnulib/Makefile.am, gnulib/m4/gnulib-cache.m4,
5075         gnulib/aux/link-warning.h, gnulib/extra/link-warning.h: Adjust
5076         by rerunning gnulib-tool with --aux-dir=gnulib/extra.
5077         * gnulib/Makefile.in: Regenerate.
5078
5079 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
5080
5081         * Makefile.in (GNULIB_H): New.  Trigger all-lib.
5082         (defs_h): Use $(GNULIB_H).
5083         (all-lib): Depend on gnulib/Makefile.
5084         (gnulib/Makefile): Regenerate gnulib/Makefile and gnulib/.deps.
5085         * config.in, gnulib/Makefile.in: Regenerated.
5086
5087 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
5088
5089         * Makefile.in (LIBGNU, INCGNU): Define.
5090         (INTERNAL_CFLAGS_BASE): Add INCGNU.
5091         (INTERNAL_LIBS, CLIBS, CDEPS): Add LIBGNU.
5092         (CLEANDIRS): New.
5093         ($(LIBGNU), all-lib): New rules.
5094         (clean, distclean, do-maintainer-clean): Use CLEANDIRS.
5095         * configure.ac: Use gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE.
5096         Simplify AC_CONFIG_AUX_DIR.  Generate gnulib/Makefile.
5097         * gnulib: New directory, from gnulib-tool.
5098         * configure, aclocal.m4: Regenerated.
5099
5100 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
5101
5102         * linux-thread-db.c (have_threads_callback): Check thread->private.
5103
5104 2008-04-13  Nick Roberts  <nickrob@snap.net.nz>
5105             Vladimir Prus  <vladimir@codesourcery.com>
5106
5107         Fix @-varobjs.
5108         * varobj.c (value_of_root): Update the expression for
5109         floating varobjs.
5110         * mi/mi-cmd-var.c (varobj_update_one): If type has changed,
5111         report that.
5112
5113 2008-04-09  Marc Khouzam  <marc.khouzam@ericsson.com>
5114
5115         * mi/mi-cmd-var.c: Include "mi-getopt.h".
5116         (mi_parse_format): New.  Factored out from mi_cmd_var_set_format.
5117         (mi_cmd_var_set_format): Use new mi_parse_format.
5118         (mi_cmd_var_evaluate_expression): Support for -f option to specify
5119         format.
5120         * Makefile.in (mi-cmd-var.o): Update dependencies.
5121
5122         * varobj.h (varobj_get_formatted_value): Declare.
5123         * varobj.c (my_value_of_variable): Added format parameter.
5124         (cplus_value_of_variable): Likewise.
5125         (java_value_of_variable): Likewise.
5126         (c_value_of_variable): Likewise.  Evaluate expression based
5127         on format parameter.
5128         (struct language_specific): Add format parameter to function member
5129         *value_of_variable.
5130         (varobj_get_formatted_value): New.
5131         (varobj_get_value): Added format parameter to method call.
5132
5133 2008-04-08  Joel Brobecker  <brobecker@adacore.com>
5134
5135         * stabsread.c (cleanup_undefined_types_noname): Manually set the
5136         instance flags of the undefined type before calling replace_type.
5137
5138 2008-04-08  Vladimir Prus  <vladimir@codesourcery.com>
5139
5140         * target.h (enum strata): Remove the download_stratum.
5141
5142 2008-04-07  Doug Evans  <dje@google.com>
5143
5144         * buildsym.h (last_source_file): Add dwarf info to comment.
5145         (last_source_start_addr): Ditto.
5146
5147 2008-04-07  Pedro Alves  <pedro@codesourcery.com>
5148
5149         * alphanbsd-tdep.c: Include "target.h".
5150         * mn10300-tdep.c: Include "target.h".
5151         * Makefile.in (alphanbsd-tdep.o, mn10300-tdep.o): Update.
5152
5153 2008-04-06  Vladimir Prus  <vladimir@codesourcery.com>
5154
5155         Fix breakpoint condition that use member variables.
5156         * valops.c (check_field): Remove.
5157         (check_field_in): Rename to check_field.
5158         (value_of_this): Use la_name_of_this.
5159         * value.h (check_field): Adjust prototype.
5160
5161         * language.h (la_value_of_this): Rename to la_name_of_this.
5162         * language.c (unknown_language_defn): Specify "this" for
5163         name_of_this.
5164         (auto_language_defn): Likewise.
5165         (local_language_defn): Likewise.
5166         * ada-lang.c (ada_language_defn): Adjust comment.
5167         * c-lang.c (c_language_defn): Adjust comment.
5168         (cplus_language_defn): Specify "this" for name_of_this.
5169         (asm_language_defn): Adjust comment.
5170         (minimal_language_defn): Adjust comment.
5171         * f-lang.c (f_language_defn): Specify NULL for name_of_this.
5172         * jv-lang.c (java_language_defn): Specify "this" for name_of_this.
5173         * m2-lang.c (m2_language_defn): Specify "this" for name_of_this.
5174         * objc-lang.c (objc_language_defn): Specify "self" for
5175         name_of_this.
5176         * p-lang.c (pascal_language_defn): Specify "this" for
5177         name_of_this.
5178         * scm-lang.c (scm_language_defn): Specify NULL for name_of_this.
5179
5180         * symtab.c (lookup_symbol_aux): Lookup "this" in the
5181         proper scope, and check for field in type of "this", without
5182         trying to create a value.
5183
5184 2008-04-04  Pedro Alves  <pedro@codesourcery.com>
5185
5186         * mi/mi-cmds.h (enum mi_cmd_result): Delete MI_CMD_ERROR.
5187         (mi_error_message): Delete declaration.
5188         * mi/mi-interp.c (mi_cmd_interpreter_exec): Call error instead of
5189         returning MI_CMD_ERROR.
5190         * mi/mi-main.c (mi_error_message): Delete.
5191         (mi_cmd_exec_interrupt):
5192         (mi_cmd_thread_select, mi_cmd_thread_list_ids)
5193         (mi_cmd_thread_info): Call error instead of returning
5194         MI_CMD_ERROR.
5195         (mi_cmd_data_list_register_values): Call error instead of
5196         returning MI_CMD_ERROR.  Adapt to new get_register interface.
5197         (get_register): Change return typo to void.  Call error instead of
5198         returning MI_CMD_ERROR.
5199         (mi_cmd_data_write_register_values): Call error instead of
5200         returning MI_CMD_ERROR.
5201         (mi_cmd_list_features): Return MI_CMD_DONE.
5202         (captured_mi_execute_command): Remove MI_CMD_ERROR handling.
5203         (mi_execute_command): Always print exceptions with -error.
5204
5205 2008-04-04  Joel Brobecker  <brobecker@adacore.com>
5206
5207         * NEWS: Mention new commands set/show multiple-symbols.
5208
5209 2008-04-03  Joel Brobecker  <brobecker@adacore.com>
5210
5211         * symtab.c (multiple_symbols_ask, multiple_symbols_all)
5212         (multiple_symbols_cancel): New constants.
5213         (multiple_symbols_modes, multiple_symbols_mode): New static globals.
5214         (multiple_symbols_select_mode): New function.
5215         (_initialize_symtab): Add new set/show multiple-symbols commands.
5216         * symtab.h (multiple_symbols_ask, multiple_symbols_all)
5217         (multiple_symbols_cancel, multiple_symbols_select_mode): Declare.
5218         * ada-lang.c (user_select_syms): Add handling of new multiple-symbols
5219         setting.
5220         * linespec.c (decode_line_2): Likewise.
5221
5222 2008-04-03  Doug Evans  <dje@sebabeach.org>
5223
5224         * symtab.h (enum free_code): Delete free_contents, unused.
5225         * symmisc.c (free_symtab_block): Delete.
5226         (free_symtab, case free_code): Delete.
5227
5228 2008-04-01  Aleksandar Ristovski  <aristovski@qnx.com>
5229
5230         * valops.c (value_cast_structs): New function. Cast related
5231         STRUCT types up/down and return cast value. The body of this
5232         function comes mostly from value_cast_pointers.
5233         (value_cast_pointers): Code for actual cast STRUCT-STRUCT moved
5234         to value_cast_structs. Now value_cast_pointers needs only create
5235         appropriate reference after using value_cast_structs for actual
5236         casting.
5237         (value_cast): Handle references.
5238
5239 2008-04-01  Marc Khouzam  <marc.khouzam@ericsson.com>
5240
5241         * MAINTAINERS: Added myself to section Write After Approval.
5242
5243 2008-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
5244
5245         * ia64-tdep.c (examine_prologue): Correct array access.
5246
5247 2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>
5248
5249         * cp-support.c (first_component_command): Return if no arguments.
5250
5251 2008-03-28  Carlos O'Donell  <carlos@codesourcery.com>
5252
5253         * ser-mingw.c (ser_windows_open): Open requested name.
5254
5255 2008-03-28  Aleksandar Ristovski  <aristovski@qnx.com>
5256
5257         * MAINTAINERS: Added myself.
5258
5259 2008-03-28  Pedro Alves  <pedro@codesourcery.com>
5260
5261         * target.c (find_default_run_target): Allow a NULL `do_mesg'
5262         parameter.  If it is NULL, don't call error.
5263         (find_default_can_async_p, find_default_is_async_p): Pass NULL as
5264         `do_mesg' parameter to find_default_run_target.  If no target was
5265         found, return 0.
5266
5267 2008-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5268
5269         * mips-linux-tdep.c: Update N32/N64 signal frame comments.
5270         (N64_SIGCONTEXT_LO, N64_SIGCONTEXT_PC, N64_SIGCONTEXT_FPCSR): Update.
5271         (N64_SIGCONTEXT_FIR, N64_SIGCONTEXT_CAUSE, N64_SIGCONTEXT_BADVADDR):
5272         Delete.
5273         (mips_linux_n32n64_sigframe_init): Do not record cause or badvaddr.
5274
5275 2008-03-27  Joel Brobecker  <brobecker@adacore.com>
5276
5277         GDB 6.8 released.
5278
5279 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
5280
5281         * features/Makefile (%.dat): Set xmltarget to the base filename
5282         of the XML source, without subdirectory.
5283         * regformats/rs6000/powerpc-32.dat: Regenerate.
5284         * regformats/rs6000/powerpc-64.dat: Regenerate.
5285         * regformats/rs6000/powerpc-e500.dat: Regenerate.
5286
5287 2008-03-27  Markus Deuling  <deuling@de.ibm.com>
5288
5289         * xcoffread.c (scan_xcoff_symtab): Replace current_gdbarch by
5290         objfile arch.
5291
5292 2008-03-27  Nick Roberts  <nickrob@snap.net.nz>
5293
5294         * mi/mi-main.c (enum captured_mi_execute_command_actions):
5295         Spell suppress in EXECUTE_COMMAND_SUPPRESS_PROMPT correctly.
5296
5297 2008-03-26  Ulrich Weigand  <uweigand@de.ibm.com>
5298
5299         * objfiles.h (struct objfile): New GDBARCH member.
5300         (get_objfile_arch): Add prototype.
5301         * objfiles.c: Include "arch-utils.h".
5302         (allocate_objfile): Look up gdbarch associated with bfd.
5303         (get_objfile_arch): New function.
5304         * Makefile (objfiles.o): Update dependencies.
5305
5306         * dwarf2-frame.c (decode_frame_entry_1): Replace current_gdbarch
5307         by objfile arch.
5308         * dwarf2loc.c (dwarf_expr_read_reg): Replace current_gdbarch
5309         by frame arch.
5310         (locexpr_describe_location): Replace current_gdbarch by
5311         objfile arch.
5312         * dwarf2read.c (die_type): Replace current_gdbarch by objfile arch.
5313         (dwarf2_add_field): Likewise.
5314         (read_tag_pointer_type): Likewise.
5315         (read_base_type): Likewise.
5316         (new_symbol): Likewise.
5317
5318         * coffread.c (decode_type): Add OBJFILE argument.  Update callers.
5319         (decode_base_type, decode_function_type): Likewise.
5320         (coff_read_struct_type, coff_read_enum_type): Likewise.
5321         (coff_symtab_read): Replace current_gdbarch by objfile arch.
5322         (decode_base_type): Likewise.
5323         (coff_read_enum_type): Likewise.
5324         (coff_read_struct_type): Replace current_objfile by OBJFILE argument.
5325         (coff_read_enum_type): Likewise.
5326
5327         * dbxread.c (read_dbx_symtab): Replace current_gdbarch by objfile arch.
5328         (end_psymtab): Likewise.
5329         (process_one_symbol): Likewise.
5330
5331         * mdebugread.c (parse_symbol): Replace current_gdbarch by objfile arch.
5332         (parse_procedure): Likewise.
5333         (parse_partial_symbols): Likewise.
5334
5335         * somread.c (som_symtab_read): Replace current_gdbarch by objfile arch.
5336
5337         * stabsread.c (define_symbol): Replace current_gdbarch by objfile arch.
5338         Replace static pcc_promotion_type and pcc_unsigned_promotion_type by
5339         built-in types.
5340         (read_range_type): Replace current_gdbarch by objfile arch.  Replace
5341         static range_index_type by built-in type.
5342         (read_one_struct_field): Replace current_gdbarch by objfile arch.
5343         (read_enum_type): Likewise.
5344
5345         * xcoffread.c (read_xcoff_symtab): Replace current_gdbarch by
5346         objfile arch.
5347
5348 2008-03-26  Vladimir Prus  <vladimir@codesourcery.com>
5349
5350         * varobj.h (varobj_floating_p): Declare.
5351         * varobj.c (varobj_floating_p): New.
5352         * mi/mi-cmd-var.c (mi_cmd_var_update): When passed
5353         '@' as the name, update all floating varobjs.
5354
5355 2008-03-26  Vladimir Prus  <vladimir@codesourcery.com>
5356
5357         * varobj.c (struct varobj_root): Rename use_selected_frame to
5358         floating, and clarify the meaning.
5359         (varobj_create, varobj_update,  new_root_variable): Adjust.
5360         (value_of_root): Don't use type_changed as in variable,
5361         adjust comment.
5362         (c_value_of_root): Adjust.
5363
5364 2008-03-25  Pedro Alves  <pedro@codesourcery.com>
5365
5366         * linux-nat.c (linux_nat_attach): Add the pid we attached to, to
5367         gdb's thread list.
5368         (linux_nat_wait): Add main lwp to gdb's thread list.
5369         * linux-thread-db.c (find_new_threads_callback): Also attach to
5370         already listed threads which thread_db didn't know about yet.
5371
5372 2008-03-25  Pedro Alves  <pedro@codesourcery.com>
5373
5374         * linux-nat.c (drain_queued_events): Fix comment typo.
5375         (linux_nat_attach): In async mode, don't rely on storing a pending
5376         status.  Instead place the wait status on the pipe.
5377         (linux_nat_resume): Remove unreacheable shortcut code in async
5378         mode.
5379         (stop_wait_callback): In async mode, don't store pending status.
5380         Instead, cancel breakpoints or resend the signal appropriatelly.
5381         (cancel_breakpoint): New, refactored from
5382         cancel_breakpoints_callback.
5383         (cancel_breakpoints_callback): Call cancel_breakpoint.
5384         (pipe_to_local_event_queue): Remove special token processing.
5385         (linux_nat_wait): Issue an internal error if a pending status is
5386         found in async mode.
5387
5388 2008-03-24  Daniel Jacobowitz  <dan@codesourcery.com>
5389
5390         * inflow.c (gdb_has_a_terminal): Guard access to our_process_group.
5391
5392 2008-03-24  Nick Roberts  <nickrob@snap.net.nz>
5393             Vladimir Prus  <vladimir@codesourcery.com>
5394
5395         * varobj.c  (struct varobj_root): New component thread_id.
5396         (varobj_get_thread_id, check_scope): New functions.
5397         (c_value_of_root): Use check_scope.  Switch to the
5398         proper thread if necessary.
5399
5400         * varobj.h (varobj_get_thread_id): New extern.
5401
5402         * mi/mi-cmd-var.c (print_varobj): Add thread-id field.
5403
5404 2008-03-23  Daniel Jacobowitz  <dan@codesourcery.com>
5405
5406         PR gdb/544
5407         * top.c: Revert 2008-03-21 changes.
5408
5409 2008-03-23  Vladimir Prus  <vladimir@codesourcery.com>
5410
5411         * thread.c (make_cleanup_restore_current_thread): Make it
5412         globally visible.
5413         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5414         * varobj.c (varobj_update): Don't save/restore frame.
5415         (c_value_of_root): Save/restore thread and frame here,
5416         using make_cleanup_restore_current_thread.
5417         * Makefile.in: Update dependecies.
5418
5419 2008-03-23  Vladimir Prus  <vladimir@codesourcery.com>
5420
5421         * varobj.c (struct varobj_root): Clarify
5422         comment on the frame field.
5423         (varobj_create): Don't set frame if we have no
5424         block.
5425
5426 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
5427
5428         PR gdb/544
5429         Suggested by Jan Kratochvil:
5430         * top.c (gdb_rl_operate_and_get_next_completion): Call
5431         rl_redisplay_function.
5432         (gdb_rl_redisplay): New.
5433         (init_main): Set rl_redisplay_function.
5434
5435 2008-03-21  Thomas Mittelstaedt  <T.Mittelstaedt@cadenas.de>  (tiny change)
5436
5437         * aix-thread.c (pdc_read_regs): Fix compiler warning.
5438         (pdc_write_regs, aix_thread_resume, fetch_regs_kernel_thread)
5439         (store_regs_kernel_thread): Likewise.
5440
5441 2008-03-21  Pedro Alves  <pedro@codesourcery.com>
5442
5443         Linux native async support.
5444
5445         * target.h (struct target_ops): Delete to_async_mask_value and add
5446         to_async_mask.
5447         (target_is_async_p, target_async): Formatting.
5448         (target_async_mask_value): Delete.
5449         (target_async_mask): Delete function declaration, and add new
5450         target macro with the same name.
5451
5452         * target.c (update_current_target): Replace to_async_mask_value by
5453         to_async_mask.  Default to_async_mask to return_one.
5454         (target_async_mask): Delete.
5455         (find_default_can_async_p, find_default_is_async_p): New.
5456         (init_dummy_target): register find_default_can_async_p and
5457         find_default_is_async_p on the dummy target.
5458
5459         * linux-nat.c: Include inf-loop.h, event-loop.h and event-top.h.
5460         (debug_linux_nat_async): New global.
5461         (show_debug_linux_nat_async): New function.
5462         (linux_nat_async_enabled, linux_nat_async_mask_value)
5463         (linux_nat_event_pipe, linux_nat_num_queued_events)
5464         (linux_nat_async_events_enabled): New globals.
5465         (struct waitpid_result): New struct.
5466         (waitpid_queue): New global.
5467         (queued_waitpid, push_waitpid, drain_queued_events): New.
5468         (my_waitpid): Call queued_waitpid.
5469         (linux_child_follow_fork): Disable async events during the call.
5470         (blocked_mask): Delete.
5471         (sync_sigchld_action, async_sigchld_action): New globals.
5472         (lin_lwp_attach_lwp): In sync mode, don't reblock SIGCHLD.  In
5473         async mode, block events during the call.
5474         (linux_nat_create_inferior): New.
5475         (linux_nat_attach): In sync mode, restore the mask states.  In
5476         async mode, wake the event loop immediatelly.
5477         (detach_callback): Drain all queued events of the lwp we're
5478         detaching from.
5479         (linux_nat_detach): Block async mode, and drain events of the main
5480         process.
5481         (linux_nat_resume): If in async mode, mask async events during the
5482         call.  If short circuiting, force event loop to wake up.  If
5483         resuming, set target_executing, and register target events in the
5484         event loop.
5485         (pipe_to_local_event_queue, local_event_queue_to_pipe): New.
5486         (linux_nat_wait): In async mode, block events during the call.
5487         Only enable/disable passing SIGINT to the inferior in sync mode.
5488         Get events from local waitpid queue.  If no interesting events was
5489         found, return to events loop.  Reregister target events in the
5490         event loop on exit.  In sync mode, no need to reblock SIGCHLD.
5491         (linux_nat_kill): Disable events on entry.
5492         (linux_nat_mourn_inferior): In sync mode, don't restore the masks
5493         here.  Detach async mode from the event loop if there are no more
5494         forks available, otherwise leave it on.
5495         (sigchld_handler): Assure this is called only in sync mode.
5496         (linux_async_permitted, linux_async_permitted_1): New globals.
5497         (set_maintenance_linux_async_permitted)
5498         (show_maintenance_linux_async_permitted): New functions.
5499         (linux_nat_is_async_p, linux_nat_can_async_p)
5500         (linux_nat_async_mask): New.
5501         (linux_nat_event_pipe_pop, linux_nat_event_pipe_push): New.
5502         (get_pending_events, async_sigchld_handler): New.
5503         (linux_nat_async_events): New.
5504         (async_terminal_is_ours): New global.
5505         (linux_nat_terminal_inferior, linux_nat_terminal_ours): New.
5506         (async_client_callback, async_client_context): New.
5507         (linux_nat_async_file_handler, linux_nat_async)
5508         (linux_nat_disable_async, linux_nat_enable_async): New.
5509         (linux_nat_add_target): Register linux_nat_create_inferior,
5510         linux_nat_can_async_p, linux_nat_is_async_p, linux_nat_async,
5511         linux_nat_async_mask, linux_nat_terminal_inferior and
5512         linux_nat_terminal_ours.
5513         (_initialize_linux_nat): Remove local action variable, and update
5514         code that used it to use sync_sigchld_action.  Add new
5515         "lin-lwp-async" debug set/show command.  Put the "lin-lwp" debug
5516         set/show command in the maintenance class.  Add new "linux-async"
5517         maintenance set/show command.  Block SIGCHLD by default.  Setup
5518         async_sichld_action, and sync_sigchld_action.  Install the default
5519         async mode.
5520         (lin_thread_get_thread_signals): Use a local sigset_t for blocking
5521         the cancel signals.
5522
5523         * linux-thread-db.c (re_check_for_thread_db): New.
5524         (clear_lwpid_callback): Handle TARGET_WAITKIND_IGNORE.
5525         (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
5526         (thread_db_async_mask): New.
5527         (init_thread_db_ops): Register thread_db_can_async_p,
5528         thread_db_is_async_p, thread_db_async and thread_db_async_mask.
5529
5530         * remote.c (remote_async_mask_value): New.
5531         (remote_return_zero): New.
5532         (init_remote_ops): Register remote_return_zero as callbacks of
5533         to_can_async_p and to_is_async_p.
5534         (remote_can_async_p, remote_is_async_p, remote_async): Update to
5535         use remote_async_mask_value.
5536         (remote_async_mask): New.
5537         (init_remote_async_ops): Remove to_async_mask_value setting and
5538         register remote_async_mask as to_async_mask callback in
5539         remote_async_ops.
5540
5541         * Makefile.in (linux-nat.o): Update.
5542
5543 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
5544
5545         * gdbthread.h (add_thread_with_info): New.
5546         * linux-thread-db.c: Add some documentation.
5547         (GET_LWP, GET_PID, GET_THREAD, is_lwp, is_thread, BUILD_LWP): Delete.
5548         (struct private_thread_info): Remove th_valid and ti_valid.
5549         Replace ti with tid.
5550         (thread_get_info_callback): Do not add TID to the new ptid.  Do
5551         not cache th or ti.
5552         (thread_db_map_id2thr, lwp_from_thread): Delete functions.
5553         (thread_from_lwp): Assert that the LWP is set.  Do not add TID to the
5554         new PTID.
5555         (attach_thread): Handle an already-existing thread.  Use
5556         add_thread_with_info.  Cache the th and tid.
5557         (detach_thread): Verify that private was set.  Remove verbose
5558         argument and printing.  Update caller.
5559         (thread_db_detach): Do not adjust inferior_ptid.
5560         (clear_lwpid_callback, thread_db_resume, thread_db_kill): Delete.
5561         (check_event, find_new_threads_callback): Do not add TID to the new PTID.
5562         (thread_db_wait): Do not use lwp_from_thread.
5563         (thread_db_pid_to_str): Use the cached TID.
5564         (thread_db_extra_thread_info): Check that private is set.
5565         (same_ptid_callback): Delete.
5566         (thread_db_get_thread_local_address): Do not use it or check
5567         is_thread.  Check that private is set.  Assume that the thread
5568         handle is already cached.
5569         (init_thread_db_ops): Remove to_resume and to_kill.
5570         * thread.c (add_thread_with_info): New.
5571         (add_thread): Use it.
5572         * linux-nat.c (find_thread_from_lwp): Delete.
5573         (exit_lwp): Do not use it.  Check print_thread_events.  Print before
5574         deleting the thread.
5575         (GET_PID, GET_LWP, BUILD_LWP, is_lwp): Move to...
5576         * linux-nat.h (GET_PID, GET_LWP, BUILD_LWP, is_lwp): ...here.
5577         * inf-ttrace.c (inf_ttrace_wait): Use print_thread_events and
5578         printf_unfiltered for thread exits.
5579         * procfs.c (procfs_wait): Likewise.
5580
5581 2008-03-21  Chris Demetriou  <cgd@google.com>
5582
5583         * symtab.c (rbreak_command): Quote symbol name before passing
5584         it to break_command.
5585
5586 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
5587
5588         * eval.c (evaluate_subexp_for_address): Clarify error message.
5589         Use value_must_coerce_to_target.
5590         * infcall.c (value_arg_coerce): Call value_coerce_to_target.
5591         * valops.c (value_assign): Call value_coerce_to_target when
5592         assigning to anything but internalvars.  Leave GDB-side arrays
5593         as arrays when assigning to internalvars.
5594         (value_must_coerce_to_target, value_coerce_to_target): New.
5595         (value_coerce_array, value_addr): Call value_coerce_to_target.
5596         (value_array): Create the array in GDB's memory instead of
5597         the inferior's.
5598         * value.h (value_must_coerce_to_target, value_coerce_to_target):
5599         Declare.
5600
5601 2008-03-21  Daniel Jacobowitz  <dan@codesourcery.com>
5602
5603         * top.c (quit_confirm): Warn that we will kill the program.
5604
5605 2008-03-19  Pedro Alves  <pedro@codesourcery.com>
5606
5607         * inflow.c (terminal_ours_1): Guard access to
5608         inferior_process_group with #ifdef PROCESS_GROUP_TYPE.
5609
5610 2008-03-18  Ulrich Weigand  <uweigand@de.ibm.com>
5611             Jim Blandy  <jimb@codesourcery.com>
5612             Daniel Jacobowitz  <drow@false.org>
5613
5614         * dwarf2expr.h (struct dwarf_expr_context): Add ADDR_SIZE member.
5615         (dwarf2_read_address): Update prototype.
5616
5617         * dwarf2expr.c (unsigned_address_type): Add ADDR_SIZE parameter.
5618         (signed_address_type): Likewise.
5619         (dwarf2_read_address): Replace BYTES_READ parameter with ADDR_SIZE.
5620         (execute_stack_op): Update calls to unsigned_address_type,
5621         signed_address_type and dwarf2_read_address.  Fix implementation
5622         of DW_OP_deref_size.
5623
5624         * dwarf2loc.h (dwarf2_per_cu_objfile): Add prototype.
5625         (dwarf2_per_cu_addr_size): Likewise.
5626         (struct dwarf2_locexpr_baton): Replace OBJFILE with PER_CU.
5627         (struct dwarf2_loclist_baton): Likewise.
5628
5629         * dwarf2loc.c (find_location_expression): Update calls to
5630         dwarf2_read_address.  Use dwarf2_per_cu_objfile and
5631         dwarf2_per_cu_addr_size to retrieve PER_CU parameters.
5632         (locexpr_describe_location): Likewise.
5633         (dwarf2_evaluate_loc_desc): Replace OBJFILE with PER_CU parameter.
5634         Set ctx->addr_size to dwarf2_per_cu_addr_size (per_cu).
5635         (dwarf2_loc_desc_needs_frame): Add PER_CU parameter.  Set ctx->addr_size
5636         to dwarf2_per_cu_addr_size (per_cu).
5637         (locexpr_read_variable): Update dwarf2_evaluate_loc_desc call.
5638         (loclist_read_variable): Likewise.
5639         (locexpr_read_needs_frame): Update dwarf2_loc_desc_needs_frame call.
5640
5641         * dwarf2read.c (dwarf2_symbol_mark_computed): Set baton->per_cu
5642         instead of baton->objfile.
5643         (dwarf2_per_cu_obfile): New function.
5644         (dwarf2_per_cu_addr_size): Likewise.
5645
5646         * dwarf2-frame.c (struct comp_unit): Move higher.
5647         (struct dwarf2_cie): Add UNIT and ADDR_SIZE members.
5648         (execute_stack_op): Add ADDR_SIZE parameter; set ctx->addr_size.
5649         (execute_cfa_program): Add FDE parameter.  Replace EH_FRAME_P
5650         parameter by using fde->eh_frame_p.  Use read_encoded_value
5651         to implement DW_CFA_set_loc.
5652         (struct dwarf2_frame_cache): Add ADDR_SIZE member.
5653         (dwarf2_frame_cache): Set cache->addr_size.  Update calls to
5654         execute_stack_op and execute_cfa_program.
5655         (dwarf2_frame_prev_register): Update calls to execute_stack_op.
5656         (size_of_encoded_value): Remove.
5657         (read_encoded_value): Add PTR_LEN and FUNC_BASE parameters.
5658         Remove call to size_of_encoded_value.  Implement DW_EH_PE_funcrel.
5659         (add_cie): Set cie->unit backlink.
5660         (decode_frame_entry_1): Set cie->addr_size.  Update calls to
5661         read_encoded_value.
5662         (dwarf2_build_frame_info): Allocate UNIT on objfile obstack.
5663
5664 2008-03-17  Markus Deuling  <deuling@de.ibm.com>
5665
5666         * i386-tdep.c (i386_print_insn): Remove unnecessary call to
5667         gdbarch_bfd_arch_info.
5668
5669 2008-03-17  Joel Brobecker  <brobecker@adacore.com>
5670
5671         * aix-thread.c (pdc_read_regs): Minor reformatting.
5672
5673 2008-03-17  Vladimir Prus  <vladimir@codesourcery.com>
5674
5675         * thread.c (print_thread_info): Don't insist
5676         on having current thread if there are no
5677         threads at all.
5678
5679 2008-03-17  Pedro Alves  <pedro@codesourcery.com>
5680
5681         * infcmd.c (attach_command_post_wait)
5682         (attach_command_continuation): New.
5683         (attach_command): Support background async execution, and async
5684         execution in synchronous mode.
5685
5686 2008-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
5687
5688         * stack.c (print_stack_frame, print_frame): Use RETURN_MASK_ERROR.
5689         * symmisc.c (dump_symtab_1): Likewise.
5690         * wrapper.c (gdb_value_struct_elt): Likewise.
5691
5692 2008-03-17  Pedro Alves  <pedro@codesourcery.com>
5693
5694         * linux-nat.c (linux_nat_filter_event): Fix comment typo.
5695
5696 2008-03-17  Pedro Alves  <pedro@codesourcery.com>
5697
5698         * linux-nat.c (linux_nat_filter_event): New, refactored from
5699         linux_nat_wait.
5700         (linux_nat_wait): Call linux_nat_filter_event.
5701
5702 2008-03-17  Ulrich Weigand  <uweigand@de.ibm.com>
5703
5704         * top.c (execute_command): Fix uninitialized variable error.
5705
5706 2008-03-16  Nick Hudson  <nick.hudson@dsl.pipex.com>
5707
5708         * Makefile.in (amd64nbsd-nat.o): New dependency.
5709         * amd64nbsd-nat.c: Include "nbsd-nat.h".
5710         (_initialize_amd64nbsd_nat): Update target vector to use
5711         nbsd_pid_to_exec_file.
5712         * config/i386/nbsd64.mh (NATDEPFILES): Add nbsd-nat.o.
5713
5714 2008-03-15  Vladimir Prus  <vladimir@codesourcery.com>
5715
5716         Remove ignoring leading exec events code.
5717         * fork-child.c (startup_inferior): Do not set
5718         inferior_ignoring_leading_exec_events.
5719         * inf-child.c (inf_child_reported_exec_events_per_exec_call): Remove.
5720         (inf_child_target): Do not set to_reported_exec_events_per_exec_call.
5721         * infrun.c (inferior_ignoring_leading_exec_events): Remove.
5722         (handle_inferior_event): Remove code for ignoring leading exec
5723         events.
5724         * target.c (update_current_target): Do not inherit, or default,
5725         to_reported_exec_events_per_exec_call.
5726         (debug_to_reported_exec_events_per_exec_call): Remove.
5727         (setup_target_debug): Do not set to_reported_exec_events_per_exec_call.
5728         * target.h (target_reported_exec_events_per_exec_call): Remove.
5729         (struct target): Remove the to_reported_exec_events_per_exec_call
5730         field.
5731
5732 2008-03-15  Vladimir Prus  <vladimir@codesourcery.com>
5733
5734         Implement -thread-info.
5735         * gdbthread.h (print_thread_info): Declare.
5736
5737         * thread.c (print_thread_info): New, extracted
5738         from info_threads_command and adjusted to
5739         work for CLI and MI.
5740         (info_threads_command): Use print_thread_info.
5741         * Makefile.in: Update dependencies.
5742
5743         * mi/mi-cmds.c (mi_cmds): Specify a handler
5744         for -thread-info.
5745         * mi/mi-cmds.h (mi_cmd_thread_info): Declare.
5746         * mi/mi-main.c (mi_cmd_thread_info): New.
5747         (mi_cmd_list_features): Include 'thread-info'.
5748
5749 2008-03-14  Kevin Buettner  <kevinb@redhat.com>
5750
5751         * mips-tdep.c (mips32_scan_prologue): Use the ABI register size
5752         to decide whether to match instruction patterns using "sw" and "sd".
5753
5754 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5755
5756         * infcmd.c (jump_command): Postpone disabling stdin until after
5757         the possible query.
5758
5759 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5760
5761         * inflow.c (gdb_getpgrp): New.
5762         (gdb_has_a_terminal): Use get_getpgrp.
5763         (terminal_ours_1): If attach_flag is set, don't refetch
5764         inferior_process_group.
5765
5766 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5767
5768         * features/library-list.dtd: Allow "section" elements as children
5769         of "library".  Add "section" element and describe its attributes.
5770
5771         * solib-target.c (struct lm_info): Add section_bases member.
5772         (library_list_start_segment): Error out if seen a section element.
5773         (library_list_start_section): New.
5774         (library_list_end_library): New.
5775         (solib_target_free_library_list): Free section_bases.
5776         (section_attributes): New.
5777         (library_children): Make "segment" optional.  Add "section" child.
5778         (library_list_children): Register library_list_end_library.
5779         (solib_target_relocate_section_addresses): Handle section bases.
5780
5781         * NEWS: Mention new qXfer:libraries:read section offsets support.
5782
5783 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
5784
5785         * defs.h (do_exec_error_cleanups, discard_exec_error_cleanups)
5786         (make_exec_error_cleanup): Remove declarations.
5787         * utils.c (exec_error_cleanup_chain): Remove.
5788         (do_exec_error_cleanups, discard_exec_error_cleanups)
5789         (make_exec_error_cleanup): Remove.
5790         * event-loop.c (start_event_loop): Adjust call to
5791         async_enable_stdin.
5792         * event-top.c (async_enable_stdin): Remove the paramater dummy.
5793         (async_disable_stdin): Don't register async_enable_stdin via
5794         cleanup.
5795         * inf-loop.c (inferior_event_handler): Don't
5796         call do_exec_error_cleanups.  Call async_enable_stdin instead.
5797         * event-loop.c (start_event_loop): Adjust call to
5798         async_enable_stdin.
5799         * tui/tui-interp.c (tui_command_loop): Adjust call to
5800         async_enable_stdin.
5801
5802 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
5803
5804         Async mode fixes.
5805         * Makefile.in (infcmd.o, inf-loop.o): Update dependencies.
5806         * breakpoint.c (bpstat_do_actions): In async mode,
5807         don't jump to top expecting stop_bpstat to be already
5808         updated.
5809         * event-loop.c (start_event_loop): Call async_enable_stdin
5810         on exception.
5811         * event-top.c (async_enable_stdin): Do nothing if sync_execution
5812         is not set.
5813         (command_handler): Do not setup continuation here.
5814         (command_line_handler_continuation): Move to...
5815         * top.c (command_line_handler_continuation): ... here.
5816         (execute_command): In async mode, register continuation.
5817         Don't check frame's language in running in async mode.
5818         * exceptions.c (throw_exception): Don't do exec_error_cleanups.
5819         * inf-loop.c (complete_execution): Inline into...
5820         (inferior_event_handler): ... here.  Clear target_executing before
5821         doing any cleanups.  Don't try to show prompt if the target was
5822         resumed.
5823         * infcmd.c (signal_command): Add support for async mode.
5824         (finish_command): Only add continuation if the target was
5825         successfully resumed.
5826         * remote.c (init_async_opts): Register to_get_thread_local_address
5827         handler.
5828         * mi/mi-interp.c (mi_cmd_interpreter_exec): Don't mess
5829         with sync_execution.
5830         * tui/tui-interp.c (tui_command_loop): Call async_enable_stdin
5831         on exception.
5832
5833 2008-03-14  Daniel Jacobowitz  <dan@codesourcery.com>
5834
5835         * corefile.c (reopen_exec_file): Use exec_bfd_mtime.
5836         * exec.c (exec_bfd_mtime): Define.
5837         (exec_close): Clear it.
5838         (exec_file_attach): Set it.
5839         * gdbcore.h (exec_bfd_mtime): Declare.
5840         * source.c (find_source_lines): Do not use bfd_get_mtime.
5841
5842 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
5843
5844         * top.c (simplified_command_loop): Remove.
5845
5846 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
5847
5848         Remove unused remote.c hooks.
5849         * remote.c (deprecated_target_resume_hook)
5850         (deprecated_target_wait_loop_hook): Remove.
5851         (remote_resume): Do not call deprecated_target_resume_hook.
5852         (remote_wait): Do not call deprecated_target_wait_loop_hook.
5853         (remote_async_wait): Likewise.
5854
5855 2008-03-14  Vladimir Prus  <vladimir@codesourcery.com>
5856
5857         Implement MI notification for new threads.
5858         * doc/observer.texi (new_thread): Document.
5859         * observer.sh: Forward declare struct thread_info.
5860         * thread.c (add_thread): Notify observer.
5861
5862         * interps.h (interp_init_ftype): New parameter
5863         top_level.
5864         (interp_set): Likewise.
5865         (top_level_interpreter_data): Declare.
5866         * interps.c (interp_set): New parameter top_level.
5867         Pass it to interpreter's init function.  Remember
5868         top level interpreter.
5869         (interpreter_exec_cmd): Adjust.
5870         (top_level_interpreter_data): New.
5871         * main.c (captured_main): Pass 1 for top_level
5872         parameter of interp_set.
5873         * cli/cli-interp.c (cli_interpreter_init): New
5874         parameter top_level.
5875         * tui/tui-interp.c (tui_init): New parameter top_level.
5876
5877         * mi/mi-interp.c (mi_new_thread): New.
5878         (mi_interpreter_init): If top level, register
5879         observer for new threads.
5880
5881         * Makefile.in (mi-interp.o, thread.o): Update dependencies.
5882
5883 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5884
5885         * top.c (execute_command): Disable break and stop
5886         commands in async mode.
5887
5888 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5889
5890         revert:
5891         2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5892         * inf-loop.c (inferior_event_handler): Don't include remote.h.
5893         Call target_stop in the INF_QUIT_REQ case.
5894         * Makefile.in (inf-loop.o): Update.
5895
5896 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5897
5898         * inf-loop.c (inferior_event_handler): Don't include remote.h.
5899         Call target_stop in the INF_QUIT_REQ case.
5900         * Makefile.in (inf-loop.o): Update.
5901
5902 2008-03-14  Pedro Alves  <pedro@codesourcery.com>
5903
5904         * top.c (execute_command): Enable break, info and interrupt
5905         commands in async mode.
5906
5907 2008-03-13  Vladimir Prus  <vladimir@codesourcery.com>
5908             Daniel Jacobowitz  <dan@codesourcery.com>
5909
5910         * breakpoint.h (breakpoint_restore_shadows): New
5911         declaration.
5912         * breakpoint.c (breakpoint_restore_shadows): New.
5913         (read_memory_nobpt): Delete.
5914         * gdbcore.h (read_memory_nobpt): Delete declaration.
5915         * target.c (memory_xfer_partial): Call
5916         breakpoint_restore_shadows.
5917         (restore_show_memory_breakpoints)
5918         (make_show_memory_beakpoints_cleanup): New.
5919         (show_memory_breakpoints): New.
5920         * target.h (make_show_memory_beakpoints_cleanup): Declare.
5921         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint):
5922         Make sure we see memory breakpoints when checking if
5923         breakpoint is still there.
5924         * alpha-tdep.c, alphanbsd-tdep.c, frame.c, frv-tdep.c,
5925         hppa-linux-tdep.c, hppa-tdep.c, i386-linux-nat.c, i386-tdep.c,
5926         m68klinux-tdep.c, mips-tdep.c, mn10300-tdep.c, s390-tdep.c,
5927         sparc-tdep.c: Use target_read_memory instead of read_memory_nobpt.
5928
5929 2008-03-12  Pedro Alves  <pedro@codesourcery.com>
5930
5931         * thread.c (add_thread): Use printf_unfiltered to print.
5932
5933 2008-03-12  Joel Brobecker  <brobecker@gnat.com>
5934
5935         * sol-thread.c: Replace use of TM_I386SOL2_H by an expression
5936         that is true only on x86-solaris and x86_64-solaris.
5937         * procfs.c: Likewise. Move procfs_find_LDT_entry up together
5938         with proc_get_LDT_entry.
5939
5940 2008-03-12  Thiago Jung Bauermann  <bauerman@br.ibm.com>
5941
5942         * configure.ac (AC_CHECK_FUNCS): Add check for setsid.
5943         * config.in, configure: Regenerate.
5944         * fork-child.c (fork_inferior): Call create_tty_session.
5945         * inflow.c (new_tty): Set controlling terminal with TIOCSCTTY.
5946         (create_tty_session): New function.
5947         * terminal.h: Declare create_tty_session.
5948
5949 2008-03-12  Alan Modra  <amodra@bigpond.net.au>
5950
5951         PR 5900
5952         * elfread.c (elf_symtab_read): Make shndx an unsigned int.
5953         * mipsread.c: Include elf/internal.h.
5954         (read_alphacoff_dynamic_symtab): Map external reserved sym_shndx
5955         to internal range.
5956
5957 2008-03-11  Markus Deuling  <deuling@de.ibm.com>
5958
5959         * win32-nat.c (do_win32_fetch_inferior_registers): Use get_regcache_arch
5960         to get at the current architecture and at the target specific vector.
5961         Add target specific vector to I387_FISEG_REGNUM and I387_FOP_REGNUM and
5962         remove define of I387_ST0_REGNUM.
5963
5964         * amd64-tdep.c (I387_ST0_REGNUM): Remove define.
5965
5966         (amd64_supply_fxsave, amd64_collect_fxsave): Use get_regcache_arch to
5967         get at the current architecture
5968         (I387_FISEG_REGNUM, I387_FOSEG_REGNUM): Add target specific vector as
5969         parameter.
5970
5971         * i386-tdep.c: Remove various define's and undef's of I387_ST0_REGNUM,
5972         I387_NUM_XMM_REGS and I387_MM0_REGNUM.
5973
5974         (I387_NUM_XMM_REGS, I387_XMM0_REGNUM, I387_MXCSR_REGNUM,
5975         I387_ST0_REGNUM, I387_FCTRL_REGNUM, I387_MM0_REGNUM,
5976         (I387_FSTAT_REGNUM): Add target specific vector as parameter.
5977
5978         (i386_register_name, i386_dbx_reg_to_regnum): Use gdbarch_tdep to get
5979         at the target specific vector.
5980
5981         (i386_get_longjmp_target): Use get_frame_arch to get at the current
5982         architecture. Use gdbarch_tdep to get at the target specific vector.
5983
5984         (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as parameter and
5985         update caller. Use gdbarch_tdep to get at the target specific vector.
5986
5987         (i386_register_to_value: Use get_frame_arch to get at the current
5988         architecture.
5989
5990         * i386-tdep.h (i386_fp_regnum_p, i386_fpc_regnum_p): Add gdbarch as
5991         parameter.
5992
5993         * i387-tdep.c (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
5994         I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM
5995         I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_ST0_REGNUM, FSAVE_ADDR,
5996         FXSAVE_ADDR, I387_XMM0_REGNUM): Add target specific vector as parameter.
5997
5998         (I387_ST0_REGNUM, I387_NUM_XMM_REGS): Remove various define's and
5999         undef's.
6000
6001         (i387_convert_register_p, i387_register_to_value,
6002         i387_value_to_register): Update call for i386_fp_regnum_p.
6003
6004         * i387-tdep.h: Remove comment.
6005         (I387_ST0_REGNUM, I387_NUM_XMM_REGS, I387_MM0_REGNUM): Add define.
6006         (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM, I387_FTAG_REGNUM,
6007         I387_FISEG_REGNUM, I387_FIOFF_REGNUM, I387_FOSEG_REGNUM,
6008         I387_FOOFF_REGNUM, I387_FOP_REGNUM, I387_XMM0_REGNUM,
6009         I387_MXCSR_REGNUM): Add target specific vector as parameter.
6010
6011 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
6012
6013         * Makefile.in (fork-child.o): Update.
6014         * NEWS: Document "set exec-wrapper" and the gdbserver --wrapper
6015         argument.  Gather all gdbserver features together.
6016         * fork-child.c (exec_wrapper): New variable.
6017         (fork_inferior): Use it.
6018         (startup_inferior): Skip an extra trap if using "set exec-wrapper".
6019         (unset_exec_wrapper_command, _initialize_fork_child): New.
6020
6021 2008-03-10  Hidetaka Takano  <hidetaka.takano@glb.toshiba.co.jp>
6022
6023         * source.c (directory_command): Modify the determination of
6024         condition of terminal "from_tty".
6025
6026 2008-03-10  Matt Rice  <ratmice@gmail.com>
6027
6028         * dwarf2read.c (set_cu_language): Add DW_LANG_ObjC.
6029
6030 2008-03-10  Hidetaka Takano  <hidetaka.takano@glb.toshiba.co.jp>
6031
6032         * spu-tdep.c (info_spu_event_command): Insert a '\0' to the end
6033         of the data passing to strtoulst function.
6034         (info_spu_signal_command): Likewise.
6035
6036 2008-03-08  Vladimir Prus  <vladimir@codesourcery.com>
6037
6038         * mi/mi-interp.c (mi_command_loop): Remove
6039         commented-out code.
6040
6041 2008-03-07  Joel Brobecker  <brobecker@adacore.com>
6042
6043         * remote.c (extended_remote_attach_1): Make local variable pid an int
6044         instead of a pid_t.
6045
6046 2008-03-07  Joel Brobecker  <brobecker@adacore.com>
6047
6048         * solib-svr4.c (svr4_same_1): New function, originally extracted
6049         from svr4_same and expanded to handle the sparc64 case.
6050         (svr4_same): Move up and reimplement using svr4_same_1.
6051         (enable_break): Use svr4_same_1 to do shared library name comparisons.
6052
6053 2008-03-07  Ramana Radhakrishnan  <ramana.r@gmail.com>
6054
6055         * MAINTAINERS: Move self to Paper trail.
6056
6057 2008-03-05  Daniel Jacobowitz  <dan@codesourcery.com>
6058
6059         * Makefile.in (mingw-hdep.o, posix-hdep.o, remote-fileio.o): Update.
6060         * event-loop.c (call_async_signal_handler): New.
6061         * event-loop.h (call_async_signal_handler)
6062         (gdb_call_async_signal_handler): Declare.
6063         (mark_async_signal_handler): Add comments.
6064         * event-top.c (handle_sigint): Use gdb_call_async_signal_handler.
6065         * mingw-hdep.c (sigint_event, sigint_handler): New.
6066         (gdb_select): Use them.  Wait for the readline signal handler
6067         to finish.
6068         (gdb_call_async_signal_handler, _initialize_mingw_hdep): New functions.
6069         * posix-hdep.c (gdb_call_async_signal_handler): New function.
6070         * remote-fileio.c (sigint_fileio_token, async_remote_fileio_interrupt):
6071         New.
6072         (remote_fileio_ctrl_c_signal_handler): Use
6073         gdb_call_async_signal_handler.
6074         (initialize_remote_fileio): Initialize sigint_fileio_token.
6075         * remote.c (initialize_sigint_signal_handler, handle_remote_sigint): Do
6076         not initialize tokens here.
6077         (handle_remote_sigint_twice): Likewise.  Reinstall
6078         handle_remote_sigint.
6079         (async_remote_interrupt_twice): Just call interrupt_query.
6080         (cleanup_sigint_signal_handler): Do not delete tokens.
6081         (remote_interrupt, remote_interrupt_twice): Use
6082         gdb_call_async_signal_handler.
6083         (interrupt_query): Reinstall the default signal handler.
6084         (_initialize_remote): Initialize tokens here.
6085
6086 2008-03-04  Joel Brobecker  <brobecker@adacore.com>
6087
6088         * features/rs6000/power-core.xml, features/rs6000/power64-core.xml,
6089         features/rs6000/powerpc-601.xml, features/rs6000/rs6000.xml:
6090         Change the type of the lr register to code_ptr.
6091         * features/rs6000/powerpc-32.c, features/rs6000/powerpc-403.c,
6092         features/rs6000/powerpc-403gc.c, features/rs6000/powerpc-505.c,
6093         features/rs6000/powerpc-601.c, features/rs6000/powerpc-602.c,
6094         features/rs6000/powerpc-603.c, features/rs6000/powerpc-604.c,
6095         features/rs6000/powerpc-64.c, features/rs6000/powerpc-7400.c,
6096         features/rs6000/powerpc-750.c, features/rs6000/powerpc-860.c,
6097         features/rs6000/powerpc-e500.c, features/rs6000/rs6000.c: Regenerate.
6098
6099 2008-03-03  James E. Wilson  <wilson@tuliptree.org>
6100
6101         * MAINTAINERS: Update my email address.
6102
6103 2008-03-03  Keith Seitz  <keiths@redhat.com>
6104
6105         From Dave Murphy  <davem@devkitpro.org>:
6106         * configure.ac: Set tcl configdir to win under mingw.
6107         * configure: Regenerate.
6108
6109 2008-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
6110
6111         * breakpoint.c (fetch_watchpoint_value): New function.
6112         (update_watchpoint): Set and clear val_valid.  Use
6113         fetch_watchpoint_value.  Handle unreadable values on the
6114         value chain.  Correct check for user-requested array watchpoints.
6115         (breakpoint_init_inferior): Clear val_valid.
6116         (watchpoint_value_print): New function.
6117         (print_it_typical): Use it.  Do not free or clear old_val.  Print
6118         watchpoints even if old_val == NULL.
6119         (watchpoint_check): Use fetch_watchpoint_value.  Check for values
6120         becoming readable or unreadable.
6121         (watch_command_1): Use fetch_watchpoint_value.  Set val_valid.
6122         (do_enable_watchpoint): Likewise.
6123         * breakpoint.h (struct breakpoint): Update comment for val.  Add
6124         val_valid.
6125         * NEWS: Mention watchpoints on inaccessible memory.
6126
6127 2007-02-29  Daniel Jacobowitz  <dan@codesourcery.com>
6128
6129         * Makefile.in (i386-nat.o): Update.
6130         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Call
6131         i386_use_watchpoints.
6132         * i386-linux-nat.c (_initialize_i386_linux_nat): Call
6133         i386_use_watchpoints.
6134         * i386-nat.c (i386_stopped_data_address): Take two arguments.
6135         (i386_stopped_by_watchpoint): Update call.
6136         (i386_can_use_hw_breakpoint, i386_use_watchpoints): New.
6137         * config/i386/nm-i386.h: Conditionalize definitions on
6138         ! I386_WATCHPOINTS_IN_TARGET_VECTOR.
6139         (i386_use_watchpoints): Declare.
6140         (i386_stopped_data_address): Update.
6141         * config/i386/nm-linux.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
6142         * config/i386/nm-linux64.h (I386_WATCHPOINTS_IN_TARGET_VECTOR): Define.
6143
6144 2008-02-29  Joel Brobecker  <brobecker@adacore.com>
6145
6146         GDB 6.8 branch created (branch timestamp: 2008-02-26 10:00 UTC)
6147         * version.in: Bump version to 6.8.50.20080229-cvs.
6148
6149 2008-02-28  Markus Deuling  <deuling@de.ibm.com>
6150
6151         * f-typeprint.c (f_print_type): Handle NULL pointer in VARSTRING
6152         properly.
6153
6154 2008-02-28  Tom Tromey  <tromey@redhat.com>
6155
6156         * infcmd.c (notice_args_read): Print result of get_inferior_args.
6157
6158 2008-02-28  Daniel Jacobowitz  <dan@codesourcery.com>
6159
6160         * infcmd.c (kill_if_already_running): Make static.  Use
6161         target_require_runnable.
6162         * target.c (target_require_runnable): New.
6163         * target.h (target_require_runnable): Declare.
6164
6165 2008-02-28  Daniel Jacobowitz  <dan@codesourcery.com>
6166
6167         * frame.c (reinit_frame_cache): Only annotate if frames were
6168         previously valid.
6169
6170 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6171
6172         * regformats/reg-ppc.dat: Rename "ps" to "msr".
6173         * regformats/reg-ppc64.dat: Likewise.
6174
6175 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6176
6177         * features/Makefile (%.dat): Emit xmltarget statement.
6178
6179         * regformats/regdat.sh: Support xmltarget and xmlarch statments.
6180         Generate code to set gdbserver_xmltarget in init_registers_${name}.
6181
6182         * regformats/arm-with-iwmmxt.dat: Regenerate.
6183         * regformats/mips64-linux.dat: Regenerate.
6184         * regformats/mips-linux.dat: Regenerate.
6185         * regformats/rs6000/powerpc-32.dat: Regenerate.
6186         * regformats/rs6000/powerpc-64.dat: Regenerate.
6187         * regformats/rs6000/powerpc-e500.dat: Regenerate.
6188
6189         * regformats/reg-arm.dat: Add xmlarch statement.
6190         * regformats/reg-i386.dat: Likewise.
6191         * regformats/reg-i386-linux.dat: Likewise.
6192         * regformats/reg-x86-64-linux.dat: Likewise.
6193         * regformats/reg-spu.dat: Likewise.
6194
6195 2008-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
6196
6197         * remote.c (remote_wait, remote_async_wait): Stop if we receive
6198         an error.
6199
6200 2008-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
6201
6202         * utils.c (debug_timestamp): New.
6203         (vfprintf_unfiltered): Print timestamps if requested.
6204         (show_debug_timestamp): New.
6205         (initialize_utils): Register "set debug timestamp".
6206         * NEWS: Mention "set debug timestamp".  Add GDB 6.8 section.
6207
6208 2008-02-27  Joel Brobecker  <brobecker@adacore.com>
6209
6210         * breakpoint.c (skip_prologue_sal): New function.
6211         (resolve_sal_pc): Adjust SAL past prologue if the SAL was
6212         computed from a line number.
6213
6214 2008-02-27  Joel Brobecker  <brobecker@adacore.com>
6215
6216         * features/rs6000/power-core.xml, features/rs6000/power64-core.xml
6217         features/rs6000/powerpc-601.xml, features/rs6000/rs6000.xml:
6218         Set PC register type to "code_ptr".
6219         * features/rs6000/powerpc-32.c, features/rs6000/powerpc-403.c,
6220         features/rs6000/powerpc-403gc.c, features/rs6000/powerpc-505.c,
6221         features/rs6000/powerpc-601.c, features/rs6000/powerpc-602.c,
6222         features/rs6000/powerpc-603.c, features/rs6000/powerpc-604.c,
6223         features/rs6000/powerpc-64.c, features/rs6000/powerpc-7400.c,
6224         features/rs6000/powerpc-750.c, features/rs6000/powerpc-860.c,
6225         features/rs6000/powerpc-e500.c, features/rs6000/rs6000.c:
6226         Regenerate.
6227
6228 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
6229
6230         * regformats/regdat.sh: Rename init_registers function in
6231         generated file to init_registers_${name}.
6232
6233         * regformats/reg-crisv32.dat: Set "name" to crisv32.
6234         * regformats/reg-ppc64.dat: Set "name" to ppc64.
6235         * regformats/reg-s390x.dat: Set "name" to s390x.
6236
6237 2008-02-26  Greg Law  <glaw@undo-software.com>
6238
6239         * regcache.c (registers_changed): Call reinit_frame_cache.
6240
6241 2008-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
6242
6243         * configure.tgt (sh-*-linux*): Match sh*.  Add glibc-tdep.o.
6244         * sh-linux-tdep.c (sh_linux_init_abi): Use glibc_skip_solib_resolver
6245         and svr4_fetch_objfile_link_map.
6246         * Makefile.in (sh-linux-tdep.o): Update.
6247
6248 2008-02-26  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6249
6250         * amd64-tdep.c (amd64_classify): Add support for decimal float
6251         types.
6252         * i386-tdep.c (i386_return_value): Make 128-bit decimal float
6253         use the struct return convention.
6254
6255 2008-02-26  Nick Roberts  <nickrob@snap.net.nz>
6256
6257         * breakpoint.c (print_one_breakpoint_location): Revert Enb field
6258         to old format.  Discard breakpoint address if shared library is
6259         unloaded.
6260         (breakpoint_1): Adjust formatting of table header accordingly.
6261
6262 2008-02-25  Vladimir Prus  <vladimir@codesourcery.com>
6263
6264        * remote.c (remote_get_threadlist): If the response
6265        is empty, don't try to parse it.
6266
6267 2008-02-23  Vladimir Prus  <vladimir@codesourcery.com>
6268
6269         Unbreak 'target async'.
6270         * serial.c (serial_async): Set the
6271         handler function before enabling async
6272         mode.
6273
6274 2008-02-22  Daniel Jacobowitz  <dan@codesourcery.com>
6275
6276         * solib-svr4.c (enable_break): Convert r_brk to a code address.
6277
6278 2008-02-21  Pedro Alves  <pedro@codesourcery.com>
6279
6280         * remote.c (extended_remote_attach_1): Set attach_flag.
6281         (extended_remote_create_inferior_1): Clear attach_flag.
6282
6283 2008-02-20  Daniel Jacobowitz  <dan@codesourcery.com>
6284
6285         * mipsnbsd-tdep.c (mipsnbsd_ilp32_fetch_link_map_offsets): Set
6286         r_brk_offset.
6287         (mipsnbsd_lp64_fetch_link_map_offsets): Likewise.
6288         * solib-svr4.c (solib_svr4_r_brk): New.
6289         (open_symbol_file_object, svr4_current_sos): Always check the
6290         debug base.
6291         (svr4_fetch_objfile_link_map): Do not set debug_base.
6292         (enable_break): Use r_brk if it is set.
6293         (svr4_ilp32_fetch_link_map_offsets): Set r_brk_offset.
6294         (svr4_lp64_fetch_link_map_offsets): Likewise.
6295         * solib-svr4.h (struct link_map_offsets): Add r_brk_offset.
6296
6297 2008-02-20  Markus Deuling  <deuling@de.ibm.com>
6298             Mark Kettenis  <kettenis@gnu.org>
6299
6300         * alpha-tdep.c (alpha_heuristic_unwind_cache): Replace saved_regs by
6301         trad_frame_saved_reg.
6302         (trad-frame.h): New include.
6303
6304         (alpha_heuristic_frame_unwind_cache): Use trad_frame_alloc_saved_regs
6305         instead of frame_obstack_zalloc.
6306         (alpha_heuristic_frame_prev_register): Use trad_frame_get_prev_register.
6307
6308         * Makefile.in (alpha-tdep.o): Add dependency to trad_frame_h.
6309
6310 2008-02-20  Markus Deuling  <deuling@de.ibm.com>
6311
6312         * rs6000-tdep.c (gdb_print_insn_powerpc): Get the current endianess
6313         from disassemble_info instead of gdbarch_byte_order.
6314
6315         * mips-tdep.c (gdb_print_insn_mips): Likewise.
6316         * arm-tdep.c (gdb_print_insn_arm): Likewise.
6317
6318 2008-02-20  Markus Deuling  <deuling@de.ibm.com>
6319
6320         * gdbarch.sh (memory_insert_breakpoint, memory_remove_breakpoint): Add
6321         gdbarch as parameter.
6322
6323         * gdbarch.{c,h}: Regenerate.
6324
6325         * ppc-tdep.h (ppc_linux_memory_remove_breakpoint): Add gdbarch as
6326         parameter.
6327         * mem-break.c (default_memory_insert_breakpoint)
6328         (default_memory_remove_breakpoint): Likewise.
6329         * target.h (default_memory_remove_breakpoint)
6330         (default_memory_insert_breakpoint): Likewise.
6331
6332         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Add gdbarch as
6333         parameter. Replace current_gdbarch by gdbarch.
6334         * m32r-tdep.c (m32r_memory_insert_breakpoint)
6335         (m32r_memory_remove_breakpoint): Likewise.
6336
6337 2008-02-19  Daniel Jacobowitz  <dan@codesourcery.com>
6338
6339         * MAINTAINERS: Add Vladimir Prus as MI maintainer.
6340
6341 2008-02-19  Joel Brobecker  <brobecker@adacore.com>
6342
6343         * NEWS: Add entry describing Add support improvements.
6344
6345 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
6346
6347         * m68klinux-nat.c (getfpregs_supplies): Replace gdbarch_fp0_regnum by
6348         M68K_FP0_REGNUM.
6349
6350 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
6351
6352         * sentinel-frame.c (sentinel_frame_prev_register): Do not call
6353         register_offset_hack anymore.
6354
6355         * regcache.{c,h} (register_offset_hack): Remove.
6356
6357 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
6358
6359         * hppa-tdep.h (find_global_pointer): Add gdbarch as parameter.
6360
6361         * hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer): Likewise. Replace
6362         current_gdbarch by gdbarch.
6363         (hppa64_hpux_find_global_pointer): Likewise.
6364         * hppa-tdep.c (hppa_find_global_pointer): Likewise.
6365         (hppa32_push_dummy_call, hppa64_push_dummy_call): Update call for
6366         find_global_pointer.
6367
6368         * hppabsd-tdep.c (hppabsd_find_global_pointer): Add gdbarch as
6369         parameter.
6370         * hppa-linux-tdep.c (hppa_linux_find_global_pointer): Likewise.
6371
6372         * hppa-linux-nat.c (hppa_linux_register_addr): Use ARRAY_SIZE instead
6373         of gdbarch_num_regs.
6374
6375         * hppa-hpux-tdep.c (hppa_hpux_sr_for_addr): Add gdbarch as parameter and
6376         replace current_gdbarch by gdbarch.
6377         (hppa_hpux_push_dummy_code): Update call for hppa_hpux_sr_for_addr.
6378
6379 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
6380
6381         * rs6000-nat.c (exec_one_dummy_insn, regmap): Add gdbarch as parameter
6382         and replace current_gdbarch by gdbarch.
6383
6384         (store_register): Update call for exec_one_dummy_insn.
6385         (fetch_register, store_register): Update call of regmap.
6386
6387         * ppcnbsd-nat.c (getregs_supplies, getfpregs_supplies): Add gdbarch as
6388         parameter and replace current_gdbarch by gdbarch.
6389
6390         (ppcnbsd_store_inferior_registers): Use get_regcache_arch to get at
6391         the current architecture. Update call for getregs_supplies and
6392         getfpregs_supplies.
6393         (ppcnbsd_fetch_inferior_registers): Likewise.
6394
6395         * ppcobsd-nat.c (getfpregs_supplies): Add gdbarch as parameter and
6396         replace current_gdbarch by gdbarch.
6397         (ppcobsd_fetch_registers, ppcobsd_store_registers): Use
6398         get_regcache_arch to get at the current architecture. Update call for
6399         getfpregs_supplies.
6400
6401 2008-02-18  Markus Deuling  <deuling@de.ibm.com>
6402
6403         * arch-utils.c (gdbarch_from_bfd): Remove unnecessary {old,new}_gdbarch
6404         variables.
6405
6406 2008-02-15  Markus Deuling  <deuling@de.ibm.com>
6407
6408         * mips-linux-tdep.c (mips_linux_init_abi): Remove internal error.
6409
6410 2008-02-14  Vladimir Prus  <vladimir@codesourcery.com>
6411
6412         * NEWS: Mention pending breakpints in MI.
6413
6414 2008-02-14  Markus Deuling  <deuling@de.ibm.com>
6415
6416         * Makefile.in (ALL_TARGET_OBS): Remove dependency to xtensa-linux-nat.o.
6417
6418 2008-02-13  Markus Deuling  <deuling@de.ibm.com>
6419
6420         Add script to build and test GDB using enable-targets=all.
6421
6422         * gdb_buildall.sh: New file.
6423
6424 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
6425
6426         * NEWS (New native configurations): Xtensa GNU/Linux.
6427         (New targets): Xtensa GNU/Linux.
6428         * Makefile.in (ALL_TARGET_OBS): Add xtensa-linux-nat.o and
6429         xtensa-linux-tdep.o
6430         (ALLDEPFILES): Add xtensa-linux-tdep.c and xtensa-linux-nat.c
6431         (xtensa-linux-nat.o, xtensa-linux-tdep.o): New dependencies.
6432         * configure.tgt (xtensa*-*-linux*): New entry.
6433         * xtensa-config.c (xtensa_tdep): New variable.
6434         (xtensa_config_byte_order, xtensa_config_tdep): Removed.
6435         (rmap): Change format based on new macro XTREG.
6436         (XTENSA_CONFIG_INSTANTIATE): Use new macro defined in xtensa-tdep.h.
6437         * xtensa-linux-nat.c: New.
6438         * xtensa-linux-tdep.c: New.
6439         * xtensa-xtregs.c: New.
6440         * xtensa-tdep.h (xtensa_elf_gregset_t): Update.
6441         (XTENSA_ELF_NGREG, XTREG, XTREG_END, XTENSA_GDBARCH_TDEP_INSTANTIATE)
6442         (XCHAL_NUM_CONTEXTS, XCHAL_HAVE_EXCEPTIONS): New macros.
6443         (xtensa_register_t): New field coprocessor.
6444         (XTENSA_REGISTER_FLAGS_PRIVILEGED): Name spelling corrected.
6445         * xtensa-tdep.c (xtensa_config_tdep, xtensa_config_byte_order): Removed.
6446         (xtensa_pseudo_register_read, xtensa_pseudo_register_write):
6447         Update to handle privileged registers.
6448         (xtensa_supply_gregset) Remove exccause and excvaddr registers.
6449         (xtensa_push_dummy_call): Set windowstart register correctly.
6450         (call0_analyze_prologue): Initialize xtensa_default_isa.
6451         (xtensa_derive_tdep): New.
6452         (xtensa_gdbarch_init): Get rid of xtensa_config_byte_order and
6453         xtensa_config_tdep, use XCHAL_HAVE_BE and xtensa_tdep instead.
6454         Call xtensa_derive_tdep().
6455         * config/xtensa/linux.mh: New.
6456         * regformats/reg-xtensa.dat: New.
6457
6458 2008-02-09  Aleksandar Ristovski  <aristovski@qnx.com>  (tiny change)
6459
6460         * corelow.c (core_open): Use IS_ABSOLUTE_PATH.
6461         (filenames.h): New include.
6462         * Makefile.in (corelow.o): Add dependency for filenames.h.
6463
6464 2008-02-08  Doug Evans  <dje@google.com>
6465
6466         * source.c (find_and_open_source): Always rewrite absolute filenames.
6467
6468 2008-02-07  Doug Evans  <dje@google.com>
6469
6470         * breakpoint.c: #include "hashtab.h".
6471         (ambiguous_names_p): New fn.
6472         (update_breakpoint_locations): When restoring bp enable status, don't
6473         compare function names if any functions have same name.
6474         * Makefile.in (breakpoint.o): Add hashtab.h dependency.
6475
6476 2008-02-07  Joel Brobecker  <brobecker@adacore.com>
6477
6478         * ada-lang.c (symbol_completion_add): Make SV parameter a VEC**
6479         instead of just a VEC*. Update use of SV.
6480         (ada_make_symbol_completion_list): Update symbol_completion_add calls.
6481
6482 2007-02-07  Joel Brobecker  <brobecker@adacore.com>
6483
6484         * NEWS: Put all new commands since gdb-6.7 together.
6485
6486 2007-02-07  Joel Brobecker  <brobecker@adacore.com>
6487
6488         * ada-lang.c: #include "vec.h".
6489         (struct string_vector, new_string_vector, string_vector_append):
6490         Delete.
6491         (char_ptr): New typedef.
6492         (DEF_VEC_P (char_ptr)): New VEC type.
6493         (symbol_completion_add): Update profile to take the new VEC type
6494         instead of the old string_vector structure. Update code accordingly.
6495         (ada_make_symbol_completion_list): Use the new VEC type instead of
6496         the old string_vector structure, and update the code accordingly.
6497         * Makefile.in (ada-lang.o): Add dependency on vec.h.
6498
6499 2008-02-06  Pierre Muller  <muller@ics.u-strasbg.fr>
6500
6501         * p-exp.y: Set current_type in missing places.
6502         (leftdiv_is_integer): New static variable.
6503         Typecast right operand of BINOP_DIV to long_double if both operands
6504         are integers.
6505
6506 2008-02-06  Maciej W. Rozycki  <macro@mips.com>
6507
6508         * remote-mips.c (set_breakpoint): Rename to...
6509         (mips_set_breakpoint): ... this.
6510         (clear_breakpoint): Rename to...
6511         (mips_clear_breakpoint): ... this.
6512         (common_breakpoint): Rename to...
6513         (mips_common_breakpoint): ... this.
6514         (check_lsi_error): Rename to...
6515         (mips_check_lsi_error): ... this.
6516
6517 2007-02-05  Joel Brobecker  <brobecker@adacore.com>
6518
6519         * language.h (struct language_defn): Add new field
6520         la_make_symbol_completion_list.
6521         * symtab.c (default_make_symbol_completion_list): Renames
6522         make_symbol_completion_list.
6523         (make_symbol_completion_list): New function.
6524         * symtab.h (default_make_symbol_completion_list): Add declaration.
6525         * langauge.c (unknown_language): Set la_make_symbol_completion_list.
6526         (auto_language, local_language): Likewise.
6527         * objc-lang.c (objc_language_defn): Likewise.
6528         * scm-lang.c (scm_language_defn): Likewise.
6529         * m2-lang.c (m2_language_defn): Likewise.
6530         * f-lang.c (f_language_defn): Likewise.
6531         * jv-lang.c (java_language_defn): Likewise.
6532         * p-lang.c (pascal_language_defn): Likewise.
6533         * c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn)
6534         (minimal_language_defn): Likewise.
6535         * ada-lang.c (struct string_vector): New structure.
6536         (new_string_vector, string_vector_append, ada_unqualified_name)
6537         (add_angle_brackets, symbol_completion_match, symbol_completion_add)
6538         (ada_make_symbol_completion_list): New functions.
6539         (ada_language_defn): Set la_make_symbol_completion_list.
6540         * ada-lang.h (ada_make_symbol_completion_list): Remove declaration,
6541         this function is static.
6542
6543 2008-02-05  Kevin Buettner  <kevinb@redhat.com>
6544
6545         * mn10300-tdep.c (mn10300_push_dummy_call): Adjust stack pointer
6546         to account for call site optimizations.
6547
6548 2008-02-05  Andrzej Zaborowski  <balrogg@gmail.com>
6549
6550         * tracepoint.c (read_actions): Handle end-of-text indicator
6551         in action list properly.  (Committed by Jim Blandy)
6552
6553 2008-02-05  Jim Blandy  <jimb@red-bean.com>
6554
6555         * ax-gdb.c (gen_expr): Yield ordinary error if asked to trace a
6556         pseudoregister, not an internal error.
6557         Reported by: Andrzej Zaborowski
6558
6559 2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
6560
6561         * varobj.c (c_value_of_variable): Use xstrdup.
6562
6563 2008-02-04  Vladimir Prus  <vladimir@codesourcery.com>
6564
6565         Update stored rendition of varobj value when format changes.
6566         * varobj.c (varobj_set_display_format): Recomputed
6567         print_value.
6568         (c_value_of_variable): Return print_value.
6569
6570 2008-02-03  Doug Evans  <dje@google.com>
6571
6572         * eval.c (evaluate_subexp_standard): Fix type of result of mixed
6573         integer/float division operations when EVAL_AVOID_SIDE_EFFECTS.
6574         * valops.c (value_one): New function.
6575         * value.h (value_one): Declare.
6576
6577         Fix argument promotion for binary arithmetic ops for C.
6578         * valarith.c (unop_result_type): New fn.
6579         (binop_result_type): New fn.
6580         (value_binop): Move result type computation to binop_result_type.
6581         (value_pos, value_neg, value_complement): Move result type
6582         computation to unop_result_type.
6583
6584         PR 2384
6585         * gdbtypes.c (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
6586         Return basetype, fieldno if found.  All callers updated.
6587         Don't cache TYPE_VPTR_FIELDNO, TYPE_VPTR_BASETYPE if from different
6588         objfile.
6589         * gdbtypes.h (get_vptr_fieldno): Renamed from fill_in_vptr_fieldno.
6590         * symfile.h (fill_in_vptr_fieldno): Delete.
6591
6592 2008-02-02  Doug Evans  <dje@google.com>
6593
6594         * valarith.c (value_binop): Handle unsigned BINOP_REM division by zero.
6595
6596         * typeprint.c (*): Whitespace cleanup.
6597
6598 2008-02-02  Mark Kettenis  <kettenis@gnu.org>
6599             Luis Machado  <luisgpm@br.ibm.com>
6600             Thiago Jung Bauermann  <bauerman@br.ibm.com>
6601
6602         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Pass floats that
6603         don't fit into registerson the stack the way GCC does.
6604
6605 2008-02-01  Joel Brobecker  <brobecker@adacore.com>
6606
6607         * symtab.c (symbol_set_names): Do not add an entry in the demangling
6608         hash table for Ada symbols. Just store the linkage name as is,
6609         and leave the demangled_name as NULL.
6610
6611 2007-02-01  Joel Brobecker  <brobecker@adacore.com>
6612
6613         * dwarf2read.c (add_partial_symbol): Always store all Ada subprograms
6614         in the global scope.
6615         (new_symbol): Likewise.
6616
6617 2008-02-01  Vladimir Prus  <vladimir@codesourcery.com>
6618
6619         * breakpoint.c (break_command_1): Return void.
6620         (break_command_really): Return void.  Rethrow
6621         exceptions instead of returning.
6622         (gdb_breakpoint): Remove the error_message parameter.
6623         Return void.  Rename to set_breakpoint.
6624         * gdb.h (gdb_breakpoint): Rename and move to...
6625         * breakpoint.h (set_breakpoint): ...here.
6626         * mi/mi-cmb-break.c (mi_cmd_break_insert): Restore
6627         event hooks even if exception is thrown.  Adjust to
6628         gdb_breakpoint interface changes.
6629
6630
6631 2008-02-01  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6632
6633         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): Write 32-bit
6634         float in both first and second word in the doubleword, to support
6635         old and new ABIs.
6636
6637 2008-02-01  Vladimir Prus  <vladimir@codesourcery.com>
6638
6639         Properly rethrow exception.  This fixes errors
6640         about non-existent functions for -break-insert.
6641         * breakpoint.c (break_command_really): Use throw_exception
6642         for rethrowing.  If rethrowing, don't print the exception.
6643
6644 2008-01-31  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6645
6646         * NEWS: Mention Decimal Floating Point support.
6647
6648 2008-01-31  Joel Brobecker  <brobecker@adacore.com>
6649
6650         * std-regs.c (value_of_builtin_frame_pc_reg): Change the returned
6651         value type to builtin_type_void_func_ptr.
6652
6653 2008-01-31  Andreas Krebbel  <krebbel1@de.ibm.com>
6654
6655         * s390-tdep.c (is_float_singleton, is_float_like,
6656         alignment_of, s390_return_value): Make checks for
6657         TYPE_CODE_FLT to match TYPE_CODE_DECFLOAT as well.
6658
6659 2008-01-31  Luis Machado  <luisgpm@br.ibm.com>
6660             Thiago Jung Bauermann  <bauerman@br.ibm.com>
6661
6662         * infcmd.c (default_print_registers_info): Also print hex
6663         raw contents for TYPE_CODE_DECFLOAT registers.
6664         * ppc-tdep.h (gdbarch_tdep): Add ppc_dl0_regnum member.
6665         * rs6000-tdep.c (IS_DFP_PSEUDOREG): New macro.
6666         (rs6000_register_name): Add support for DFP pseudo-registers.
6667         (rs6000_pseudo_register_type): Likewise.
6668         rs6000_pseudo_register_reggroup_p): Likewise.
6669         (ppc_pseudo_register_read): New function.
6670         (ppc_pseudo_register_write): Likewise.
6671         (rs6000_pseudo_register_read): Likewise.
6672         (rs6000_pseudo_register_write): Likewise.
6673         (e500_pseudo_register_read): Move checks to
6674         rs6000_pseudo_register_read.
6675         (e500_pseudo_register_write): Move checks to
6676         rs6000_pseudo_register_write.
6677         (rs6000_gdbarch_init): Initialize tdep->ppc_dl0_regnum.  Install
6678         rs6000_pseudo_register_read and rs6000_pseudo_register_write
6679         in gdbarch if SPE or DFP is available.  Adjust gdbarch's
6680         num_pseudo_regs to account for DFP pseudo regs.
6681
6682 2008-01-31  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6683
6684         * ppc-tdep.h (struct gdbarch_tdep): Remove ppc_ev31_regnum member.
6685         * rs6000-tdep.c (IS_SPE_PSEUDOREG): New macro.
6686         (spe_register_p, rs6000_register_name, rs6000_pseudo_register_type,
6687         rs6000_pseudo_register_reggroup_p, e500_move_ev_register,
6688         e500_pseudo_register_read, e500_pseudo_register_write): Use
6689         IS_SPE_PSEUDOREG macro.
6690         (rs6000_frame_cache): Remove use of tdep->ppc_ev31_regnum.
6691         (rs6000_gdbarch_init): Remove unnecessary num_sprs local variable.
6692         Remove initialization of tdep->ppc_ev31_regnum.
6693
6694 2008-01-08  Paul Hilfinger  <hilfinger@adacore.com>
6695
6696         * printcmd.c (print_formatted): Handle references as for unformatted
6697         prints.
6698
6699 2008-01-30  Joel Brobecker  <brobecker@adacore.com>
6700
6701         * eval.c (evaluate_subexp_standard): Add handling of user
6702         registers when in EVAL_AVOID_SIDE_EFFECTS mode.
6703
6704 2008-01-30  Pierre Muller  <muller@ics.u-strasbg.fr>
6705
6706         * eval.c (evaluate_subexp_standard): Support
6707         BINOP_INTDIV opcode.
6708
6709 2008-01-30  Paul N. Hilfinger  <hilfinger@adacore.com>
6710
6711         * valarith.c (value_binop): Add floating-point BINOP_MIN and
6712         BINOP_MAX cases.
6713         For BINOP_EXP, use length and signedness of left operand only for
6714         result, as for shifts.
6715         For integral operands to BINOP_EXP, use new integer_pow and
6716         uinteger_pow functions so as to get full range of results.
6717         (integer_pow): New function.
6718         (uinteger_pow): New function.
6719
6720 2008-01-30  Vladimir Prus  <vladimir@codesourcery.com>
6721
6722         Use vector for varobj_list_children interface.
6723         * gdb/varobj.c (varobj_list_children): Return vector
6724         of varobjs.
6725         * gdb/varobj.h (varobj_list_children): Adjust
6726         prototype.
6727         (varobj_p): Declare.  Declare vector thereof.
6728         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust
6729         for varobj_list_children change.
6730         * Makefile.in (varobj_h): Update dependencies.
6731
6732 2008-01-30  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6733
6734         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Add support for
6735         TYPE_CODE_DECFLOAT arguments.
6736         (ppc64_sysv_abi_push_dummy_call) Likewise.
6737         (get_decimal_float_return_value): New function.
6738         (do_ppc_sysv_return_value): Add support for TYPE_CODE_DECFLOAT return
6739         values by calling get_decimal_float_return_value.
6740         (ppc64_sysv_abi_return_value): Likewise.
6741
6742 2008-01-30  Nick Roberts  <nickrob@snap.net.nz>
6743
6744         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file):  Add field
6745         for preprocessor macro information.  Formatting changes.
6746
6747 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
6748
6749         * remote.c (struct remote_state): Add cached_wait_status.
6750         (remote_exec_file): New variable.
6751         (PACKET_vAttach, PACKET_vRun): New constants.
6752         (extended_remote_restart): Do not query for status.
6753         (struct start_remote_args): New.
6754         (remote_start_remote): Take it as a second argument.  Check
6755         whether the target is running.  Issue an error for non-running
6756         non-extended targets.  Cache the wait status.  Set inferior_ptid
6757         here.
6758         (remote_open_1): Prompt to disconnect non-running targets.  Make
6759         sure the target is marked running.  Do not set inferior_ptid here.
6760         Update call to remote_start_remote.  Do not call remote_check_symbols
6761         if the target is not running.
6762         (remote_detach_1): Rename from remote_detach.  Take an EXTENDED
6763         argument.  Handle a non-running target.
6764         (remote_detach): Use it.
6765         (extended_remote_detach): New.
6766         (remote_disconnect): Fix typo.  Use remoute_mourn_1.
6767         (extended_remote_attach_1, extended_remote_attach)
6768         (extended_async_remote_attach): New.
6769         (remote_vcont_resume): Remove unused variable.
6770         (remote_wait, remote_async_wait): Use any cached wait status.
6771         (putpkt_binary, getpkt): Clear any cached wait status.
6772         (extended_remoute_mourn_1): New.
6773         (extended_remote_mourn): Use it.
6774         (extended_async_remote_mourn, extended_remote_run): New.
6775         (extended_remote_create_inferior_1): New.
6776         (extended_remote_create_inferior): Use it.
6777         (extended_remote_async_create_inferior): Likewise.
6778         (remote_xfer_partial): Skip for non-executing targets.
6779         (init_extended_remote_ops): Set to_detach and to_attach.
6780         (init_extended_async_remote_ops): Likewise.  Use
6781         extended_async_remote_mourn.
6782         (_initialize_remote): Register vAttach, vRun, and
6783         set remote exec-file.
6784         * NEWS: Mention vAttach, vRun, and gdbserver extended-remote support.
6785
6786 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
6787
6788         * Makefile.in (symfile.o): Update.
6789         * NEWS: Mention exec tracing support.
6790         * inf-ttrace.c (inf_ttrace_wait): Return TARGET_WAITKIND_EXECD for
6791         exec events.
6792         * infcmd.c (kill_if_already_running, detach_command)
6793         (disconnect_command): Replace SOLIB_RESTART with no_shared_libraries.
6794         * infrun.c (MAY_FOLLOW_EXEC, may_follow_exec): Delete.
6795         (follow_exec): Do not check may_follow_exec.  Do not mourn and push
6796         targets.  Apply the sysroot path to the loaded executable.  Use
6797         no_shared_libraries.
6798         * linux-nat.c (linux_child_follow_fork): Print fork following
6799         messages if verbose.
6800         (kill_wait_callback): Kill again before waiting a second time.
6801         * symfile.c (symbol_file_clear): Replace SOLIB_RESTART with
6802         no_shared_libraries.
6803
6804 2008-01-29  Joel Brobecker  <brobecker@adacore.com>
6805
6806         * amd64-tdep.c (amd64_classify): Add handling of TYPE_CODE_CHAR.
6807
6808 2008-01-29  Joel Brobecker  <brobecker@adacore.com>
6809
6810         * nto-tdep.h: Remove #include "defs.h".
6811         * nto-tdep.c: Add #include "defs.h".
6812         * Makefile.in (nto_tdep_h): Update dependencies.
6813         (nto-tdep.o): Likewise.
6814
6815 2008-01-29  Joel Brobecker  <brobecker@adacore.com>
6816
6817         * infrun.c (wait_for_inferior): Add treat_exec_as_sigtrap parameter
6818         and use it.
6819         (proceed, start_remote): Update call to wait_for_inferior.
6820         * inferior.h (wait_for_inferior): Update declaration.
6821         * fork-child.c, infcmd.c, solib-irix.c, solib-osf.c, solib-sunos.c,
6822         solib-svr4.c, win32-nat.c: Update calls to wait_for_inferior.
6823         * inf-ttrace.c (inf_ttrace_wait): Report TTEVT_EXEC events as
6824         TARGET_WAITKIND_EXECD instead of TARGET_WAITKIND_STOPPED.
6825
6826 2008-01-29  Aleksandar Ristovski  <aristovski@qnx.com>
6827
6828         * varobj (adjust_value_for_child_access): Added checking for
6829         returned value from gdb_value_ind.
6830         (c_describe_child): Likewise.
6831         (cplus_describe_child): Fixed a typo.
6832
6833 2008-01-29  Jim Blandy  <jimb@red-bean.com>
6834
6835         * MAINTAINERS: Update my info.
6836
6837 2008-01-29  Vladimir Prus  <vladimir@codesourcery.com>
6838
6839         Use multiple locations for hardware watchpoints.
6840         This eliminates the need to traverse value chain, doing
6841         various checks, in three different places.
6842
6843         * breakpoint.h (struct bp_location): New fields
6844         lengths and watchpoint_type.
6845         (struct breakpoint): Remove the val_chain field.
6846         * breakpoint.c (is_hardware_watchpoint): New.
6847         (free_valchain): Remove.
6848         (update_watchpoint): New.
6849         (insert_bp_location): For hardware watchpoint, just
6850         directly insert it.
6851         (insert_breakpoints): Call update_watchpoint_locations
6852         on all watchpoints.  If we have failed to insert
6853         any location of a hardware watchpoint, remove all inserted
6854         locations.
6855         (remove_breakpoint): For hardware watchpoints, directly
6856         remove location.
6857         (watchpoints_triggered): Iterate over locations.
6858         (bpstat_stop_status): Use only first location of
6859         a resource watchpoint.
6860         (delete_breakpoint): Don't call free_valchain.
6861         (print_one_breakpoint): Don't print all
6862         locations for watchpoints.
6863         (breakpoint_re_set_one): Use update_watchpoint for
6864         watchpoints.
6865
6866 2008-01-29  Vladimir Prus  <vladimir@codesourcery.com>
6867
6868         Don't reset watchpoint block on solib load.
6869
6870         * breakpoint.c (insert_bp_location): For watchpoints,
6871         recompute condition.
6872         (breakpoint_re_set_one): Instead of recomputing value
6873         and condition for watchpoints, just reset value and
6874         let insert_breakpoints/insert_bp_location recompute it.
6875         Don't do anything about disabled watchpoint.
6876
6877 2008-01-29  Pierre Muller  <muller@ics.u-strasbg.fr>
6878
6879         * valarith.c (value_binop): Handle unsigned integer
6880         division by zero.
6881
6882 2008-01-28  Kevin Buettner  <kevinb@redhat.com>
6883
6884         * mn10300-tdep.c (mn10300_analyze_prologue): Check for an
6885         instruction pattern that appears frequently in position
6886         independent code.  Fix bug in code which looks for "fmov" and
6887         backtracks if no "fmov" is found.
6888
6889 2008-01-28  Doug Evans  <dje@google.com>
6890
6891         * dbxread.c (read_dbx_symtab): Fix indentation.
6892         Reformat comments to 80 columns.
6893         Move local var def closer to only use.
6894
6895 2008-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
6896
6897         * fork-child.c (SHELL_FILE): Remove #ifndef.
6898         (fork_inferior): Remove SHELL_COMMAND_CONCAT.
6899
6900 2008-01-25  Pierre Muller  <muller@ics.u-strasbg.fr>
6901
6902         * i386-tdep.c (i386_skip_noop): New function.
6903         (i386_analyze_prologue): Call i386_skip_noop function.
6904
6905 2008-01-24  Michael Snyder  <msnyder@specifix.com>
6906
6907         * procfs.c (procfs_xfer_partial): Comment, cut/paste error.
6908         * win32-nat.c (win32_xfer_partial): Ditto.
6909         * target.c (default_xfer_partial): Minor whitespace adjustment.
6910
6911 2008-01-24  Pedro Alves  <pedro@codesourcery.com>
6912
6913         * arm-tdep.c (arm_addr_bits_remove): In non 26-bit mode, don't
6914         strip bit 1 even if pc doesn't point to thumb code.
6915
6916 2008-01-23  Daniel Jacobowitz  <dan@codesourcery.com>
6917
6918         * remote.c (remote_wait): Handle SIGINT between packets.
6919         (remote_async_wait): Likewise.
6920
6921 2008-01-23  Vladimir Prus  <vladimir@codesourcery.com>
6922             Chris Demetriou  <cgd@google.com>
6923
6924         * thread.c (add_thread_silent): Renamed
6925         from add_thread.
6926         (print_thread_events): New variable definition.
6927         (show_print_thread_events): New function.
6928         (_initialize_thread): Add "set print thread-events" and
6929         "show print thread-events" commands.
6930         (add_thread): Announce new thread.
6931         * gdbthread.h (add_thread_silent): Declare.
6932         (print_thread_events): New variable declaration.
6933         * inf-ttrace.c (inf_ttrace_wait): Don't
6934         inform about new thread, as add_thread is always
6935         called too, and will take care of that.
6936         * infrun.c (handle_inferior_event): Likewise.
6937         * procfs.c (procfs_wait): Likewise.
6938         * remote.c (remote_currthread): Likewise.
6939         * sol-thread.c (sol_thread_wait): Likewise.
6940         * win32-nat.c (get_win32_debug_event): Likewise.
6941         * linux-thread-db.c (attach_thread): Likewise.
6942         Remove the verbose parameter.
6943         (check_event): Make detach_thread be verbose
6944         only if print_thread_events is set.
6945         * linux-nat.c (lin_lwp_attach_lwp): Don't inform
6946         about new thread.  This is called only from
6947         linux-thread-db.c:attach_thread, which will take care.
6948         Remove the verbose parameter.
6949         * linux-nat.h (lin_lwp_attach_lwp): Adjust prototype.
6950
6951 2008-01-23  Nick Roberts  <nickrob@snap.net.nz>
6952
6953         * mi/mi-cmd-var.c (mi_cmd_var_set_format): Add value field to output.
6954
6955 2008-01-22  Vladimir Prus  <vladimir@codesourcery.com>
6956
6957         * breakpoint.c (break_command_really): New parameter
6958         ignore_count.
6959         (break_command_1): Pass 0 as
6960         ignore_count to break_command_really.
6961         (gdb_breakpoint): Pass ignore_count to
6962         break_command_really.
6963
6964 2008-01-21  Kevin Buettner  <kevinb@redhat.com>
6965
6966         * mn10300-linux-tdep.c (am33_linux_sigframe_cache_init): Find
6967         sigcontext struct via pointer.
6968         (struct sigframe comment): Update to show new field `psc'.
6969
6970 2008-01-21  Vladimir Prus  <vladimir@codesourcery.com>
6971
6972         * infrun.c (handle_inferior_event): If
6973         we failed to remove breakpoints, error,
6974         don't try to increment PC by hand.
6975
6976 2008-01-18  Nick Hudson  <nick.hudson@dsl.pipex.com>
6977
6978         Add NetBSD/hppa target and host support.
6979
6980         * hppabsd-tdep.c (hppabsd_supply_gregset): Move to ...
6981         (hppabsd_gregset): Move to ...
6982         (hppabsd_regset_from_core_section): Rename
6983         hppaobsd_regset_from_core_section and move to ...
6984         (hppabsd_find_global_pointer): Update comment.
6985         (hppabsd_init_abi): Make global. Do not register
6986         hppabsd_regset_from_core_section.
6987         (hppabsd_core_osabi_sniffer): Rename hppaobsd_core_osabi_sniffer and
6988         move to ...
6989         (_initialize_hppabsd_tdep): Move to ...
6990         * hppaobsd-tdep.c: ... here. New file.
6991         * hppnbsd-tdep.c: New file.
6992         * hppnbsd-nat.c: New file.
6993         * Makefile.in (ALL_TARGET_OBS): Add hppanbsd-tdep.o and hppaobsd-tdep.o.
6994         (ALLDEPFILES): Add hppabsd-nat.c and hppabsd-tdep.c.
6995         (hppabsd-nat.o, hppabsd-tdep.o): New dependencies.
6996         (hppabsd-tdep.o, hppaobsd-tdep.o): Update dependencies.
6997         * configure.host (hppa*-*-netbsd*): New entry.
6998         * configure.tgt (hppa*-*-netbsd*): New entry.
6999         (hppa*-*-openbsd*): Update.
7000         * NEWS (New native configuration): Mention NetBSD/hppa.
7001         (New targets): Mention NetBSD/hppa.
7002
7003 2008-01-18  Markus Deuling  <deuling@de.ibm.com>
7004
7005         * gdbarch.sh (function_list): Add new property bits_big_endian to
7006         gdbarch structure.
7007         * gdbarch.{c,h}: Regenerate.
7008
7009         * value.c (struct value): Replace BITS_BIG_ENDIAN by
7010         gdbarch_bits_big_endian (comment).
7011         (unpack_field_as_long, modify_field): Likewise.
7012         * value.h: Likewise (comment).
7013         * valops.c (value_slice): Likewise.
7014         * valarith.c (value_subscript, value_bit_index): Likewise.
7015         * gdbtypes.h (field): Likewise (comment).
7016         * eval.c (evaluate_subexp_standard): Likewise.
7017         * dwarf2read.c (dwarf2_add_field): Likewise.
7018         * ada-lang.c (decode_packed_array, ada_value_primitive_packed_val)
7019         (move_bits, ada_value_assign, value_assign_to_component): Likewise.
7020
7021         * defs.h (BITS_BIG_ENDIAN): Remove.
7022
7023 2008-01-18  Markus Deuling  <deuling@de.ibm.com>
7024
7025         * jv-exp.y (yylex): Replace DEPRECATED_STREQN with the appropriate
7026         function calls.
7027         * m2-exp.y (yylex): Likewise.
7028         * objc-exp.y (yylex): Likewise.
7029
7030         * defs.h (DEPRECATED_STREQN): Remove.
7031
7032 2008-01-17  H.J. Lu  <hjl.tools@gmail.com>
7033
7034         * MAINTAINERS: Update my email address.
7035
7036 2008-01-17  Jim Blandy  <jimb@codesourcery.com>
7037
7038         * README: Mention gdbserver/README.
7039
7040 2008-01-17  Pierre Muller  <muller@ics.u-strasbg.fr>
7041
7042         * valarith.c (value_binop): Handle BINOP_INTDIV
7043         for unsigned and signed integers.
7044
7045 2008-01-17  Ulrich Weigand  <uweigand@de.ibm.com>
7046
7047         * s390-tdep.c (s390_gdbarch_init): Set default long double
7048         type to 128-bit IEEE quad.
7049
7050 2008-01-17  Joel Brobecker  <brobecker@adacore.com>
7051
7052         * hpux-thread.c (hpux_thread_resume): Delete commented-out code.
7053
7054 2008-01-16  Mark Kettenis  <kettenis@gnu.org>
7055
7056         * auxv.c (fprint_target_auxv): Add support for AT_SUN_AUXFLAGS.
7057
7058         * dfp.c, dfp.h: Rename decimal_to_double to decimal_to_doublest.
7059         * value.c: All callers changed.
7060
7061 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
7062
7063         * rs6000-nat.c (add_vmap, vmap_ldinfo, vmap_exec): Replace
7064         DEPRECATED_STREQ by its expression.
7065         * coffread.c (coff_locate_sections, coff_symtab_read): Likewise.
7066         * xcoffread.c (read_xcoff_symtab, read_symbol_lineno, find_linenos)
7067         (scan_xcoff_symtab): Likewise.
7068         * hppa-hpux-tdep.c (hppa_hpux_skip_trampoline_code): Likewise.
7069         * f-lang.c (find_common_for_function): Likewise.
7070         * objc-exp.y (parse_number): Likewise.
7071
7072         * defs.h (DEPRECATED_STREQ): Remove.
7073
7074 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
7075
7076         * mn10300-tdep.h (AM33_MODE): Add gdbarch as parameter.
7077         * mn10300-tdep.c (set_reg_offsets, mn10300_analyze_prologue): Use
7078         get_frame_arch to get at the current_architecture. Update AM33_MODE
7079         call.
7080         (mn10300_analyze_prologue): Add gdbarch as parameter. Update caller.
7081         (mn10300_frame_unwind_cache): Use get_frame_arch to get at the current
7082         architecture.
7083         (set_reg_offsets, mn10300_analyze_prologue): Fix indentation.
7084
7085 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
7086
7087         * amd64-nat.h (amd64_native_gregset_supplies_p): Add gdbarch as
7088         parameter.
7089         * amd64-nat.c (amd64_native_gregset_supplies_p): Likewise.
7090
7091         (amd64_native_gregset_reg_offset): Add gdbarch as parameter. Replace
7092         current_gdbarch by gdbarch. Update caller.
7093
7094         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers)
7095         (amd64_linux_store_inferior_registers): Use get_regcache_arch to get at
7096         the current architecture. Update calls of
7097         amd64_native_gregset_supplies_p.
7098         * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers)
7099         (amd64bsd_store_inferior_registers): Likewise.
7100
7101 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
7102
7103         * ppc-linux-nat.c (ppc_register_u_addr): Add gdbarch as parameter.
7104         Replace current_gdbarch by gdbarch. Update caller.
7105
7106 2008-01-16  Markus Deuling  <deuling@de.ibm.com>
7107
7108         * dbxread.c (repeated_header_complaint, dbx_symfile_init)
7109         (read_dbx_dynamic_symtab, function_outside_compilation_unit_complaint)
7110         (read_dbx_symtab, end_psymtab, dbx_psymtab_to_symtab_1)
7111         (dbx_psymtab_to_symtab, read_ofile_symtab, process_one_symbol)
7112         (stabsect_build_psymtabs): Fix indentation.
7113
7114 2008-01-15  Michael Snyder  <msnyder@specifix.com>
7115
7116         * corelow.c (core_xfer_partial): Comment, cut/paste error.
7117
7118 2008-01-14  Pierre Muller  <muller@ics.u-strasbg.fr>
7119
7120         * win32-nat.c (win32_create_inferior): Restore code calling
7121         CloseHandle on ProcessInformation structure.
7122
7123 2008-01-13  Nick Hudson  <nick.hudson@dsl.pipex.com>
7124
7125         * configure.ac: Check for void * as 3 argument of ptrace.
7126         * configure: regenerate.
7127
7128 2008-01-11  Markus Deuling  <deuling@de.ibm.com>
7129
7130         * alpha-tdep.c (alpha_heuristic_proc_start)
7131         (alpha_sigtramp_register_address): Add gdbarch as parameter. Replace
7132         current_gdbarch by gdbarch.
7133
7134         (alpha_heuristic_frame_unwind_cache): Use get_frame_arch to get at the
7135         current architecture by frame_info. Update alpha_heuristic_proc_start
7136         call.
7137
7138         (alpha_sigtramp_frame_this_id, alpha_sigtramp_frame_prev_register): Use
7139         get_frame_arch to get at the current architecture by frame_info. Update
7140         alpha_sigtramp_register_address call.
7141
7142         * arm-tdep.c (thumb_scan_prologue): Add gdbarch as parameter and replace
7143         current_gdbarch by gdbarch. Update caller.
7144         (convert_to_extended, convert_from_extended): Add endianess parameter
7145         for comparison. Update caller.
7146         (arm_extract_return_value, arm_store_return_value): Use
7147         get_regcache_arch to get at the current architecture.
7148
7149         * cris-tdep.c (cris_register_size): Add gdbarch as parameter. Replace
7150         current_gdbarch by gdbarch. Update caller.
7151         (cris_gdb_func, move_to_preg_op, none_reg_mode_move_from_preg_op): Add
7152         gdbarch as parameter. Update caller. Replace current_gdbarch by gdbarch.
7153
7154         * h8300-tdep.c (E_PSEUDO_CCR_REGNUM, E_PSEUDO_EXR_REGNUM, BINWORD): Add
7155         gdbarch as parameter. Update caller.
7156         (h8300_init_frame_cache): Add gdbarch as parameter. Replace
7157         current_gdbarch by gdbarch. Update caller.
7158
7159         * hppa-tdep.c (skip_prologue_hard_way): Add gdbarch as parameter and
7160         update caller. Replace current_gdbarch by gdbarch.
7161
7162         * m32c-tdep.c (m32c_skip_trampoline_code): Use get_frame_arch to get at
7163         the current architecture. Replace current_gdbarch by gdbarch.
7164         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
7165         (STACK_CORRECTION, USE_PAGE_REGISTER): Replace M6811_TDEP by its
7166         expression. Add gdbarch as parameter and replace current_gdbarch with
7167         it. Update caller.
7168         (M6811_TDEP): Remove.
7169         (m68hc11_frame_prev_register): Use get_frame_arch to get at the current
7170         architecture.
7171         (m68hc11_scan_prologue): Add gdbarch as parameter. Replace
7172         current_gdbarch by gdbarch. Update caller.
7173
7174         * m68k-tdep.c (m68k_analyze_prologue): Add gdbarch as parameter and
7175         update caller.
7176         (m68k_analyze_register_saves): Likewise. Also replace current_gdbarch
7177         by gdbarch.
7178
7179         * rs6000-tdep.c (skip_prologue): Add gdbarch as parameter and update
7180         caller. Relace current_gdbarch by gdbarch.
7181         (altivec_register_p, spe_register_p): Likewise.
7182         * ppc-tdep.h (altivec_register_p, spe_register_p): Add gdbarch as
7183         parameter.
7184         * ppc-linux-nat.c (fetch_register, store_register): Update caller of
7185         altivec_register_p and spe_register_p.
7186
7187         * score-tdep.c (score_fetch_inst): Add gdbarch as parameter. Update
7188         caller. Replace current_gdbarch by gdbarch.
7189         (score_analyze_prologue): use get_frame_arch to get at the current
7190         architecture.
7191
7192         * sparc-tdep.h (sparc_analyze_prologue): Add gdbarch as parameter.
7193         * sparc-tdep.c (sparc_analyze_prologue): Likewise. Replace
7194         current_gdbarch by gdbarch. Update caller.
7195         (sparc_frame_cache): Use get_frame_arch to get at the current
7196         architecture.
7197         * sparce64-tdep.c (sparc64_skip_prologue): Update call of
7198         sparc_analyze_prologue.
7199
7200         * mn10300-tdep.c (mn10300_dwarf2_reg_to_regnum): Add gdbarch as
7201         parameter.
7202
7203 2008-01-11  Markus Deuling  <deuling@de.ibm.com>
7204
7205         * exec.c: #include "arch-utils.h"
7206          (print_section_info): Use gdbarch_from_bfd to get at the
7207         current architecture. Replace current_gdbarch. Fix indention. Replace
7208         deprecated_print_address_numeric by paddress.
7209         * Makefile.in (exec.o) Add dependency to arch-utils.h.
7210
7211         * valprint.c (val_print_string): Replace
7212         deprecated_print_address_numeric.
7213         * tracepoint.c (trace_mention, scope_info): Likewise.
7214         * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1, print_symbol)
7215         (print_symbol, print_partial_symbols, maintenance_info_psymtabs)
7216         (maintenance_check_symtabs): Likewise.
7217         * symfile.c (list_overlays_command): Likewise.
7218         * stack.c (frame_info, print_block_frame_labels): Likewise.
7219         * printcmd.c (print_address, print_address_demangle)
7220         (address_info): Likewise.
7221         * corefile.c (memory_error): Likewise.
7222         * infcmd.c (jump_command): Likewise.
7223         * breakpoint.c (insert_bp_location, describe_other_breakpoints)
7224         (mention, delete_breakpoint): Likewise.
7225         * c-valprint.c (print_function_pointer_address, c_val_print): Likewise.
7226         * dwarf2read.c (dump_die): Likewise.
7227         * ada-valprint.c (ada_val_print_1): Likewise.
7228         * f-valprint.c (f_val_print): Likewise.
7229         * linux-fork.c (info_forks_command): Likewise.
7230         * m32r-com.c (m32r_load_section, m32r_load)
7231         (m32r_upload_command): Likewise.
7232
7233         * ui-out.c (ui_out_field_core_addr): Remove unnecessary comment.
7234
7235 2008-01-11  Markus Deuling  <deuling@de.ibm.com>
7236
7237         * gdbarch.sh (skip_prologue): Add gdbarch
7238         as parameter.
7239         * gdbarch.{c,h}: Regenerate.
7240
7241         * alpha-tdep.c (alpha_skip_prologue): Add gdbarch as parameter.
7242         * amd64-tdep.c (amd64_skip_prologue): Likewise.
7243         * avr-tdep.c (avr_skip_prologue): Likewise.
7244         * cris-tdep.c (cris_skip_prologue): Likewise.
7245         * frv-tdep.c (frv_skip_prologue): Likewise.
7246         * h8300-tdep.c (h8300_skip_prologue): Likewise.
7247         * hppa-tdep.c (hppa_skip_prologue): Likewise.
7248         * i386-tdep.c (i386_skip_prologue): Likewise.
7249         * ia64-tdep.c (ia64_skip_prologue): Likewise.
7250         * iq2000-tdep.c (iq2000_skip_prologue): Likewise.
7251         * m32r-tdep.c (m32r_skip_prologue): Likewise.
7252         * m68hc11-tdep.c (m68hc11_skip_prologue): Likewise.
7253         * m68k-tdep.c (m68k_skip_prologue): Likewise.
7254         * m88k-tdep.c (m88k_skip_prologue): Likewise.
7255         * mep-tdep.c (mep_skip_prologue): Likewise.
7256         * mips-tdep.c (mips_skip_prologue): Likewise.
7257         * mn10300-tdep.c (mn10300_skip_prologue): Likewise.
7258         * mt-tdep.c (mt_skip_prologue): Likewise.
7259         * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
7260         * score-tdep.c (score_skip_prologue): Likewise.
7261         * sh64-tdep.c (sh64_skip_prologue): Likewise.
7262         * sh-tdep.c (sh_skip_prologue): Likewise.
7263         * sparc64-tdep.c (sparc64_skip_prologue): Likewise.
7264         * sparc-tdep.c (sparc32_skip_prologue): Likewise.
7265         * spu-tdep.c (spu_skip_prologue): Likewise.
7266         * v850-tdep.c (v850_skip_prologue): Likewise.
7267         * vax-tdep.c (vax_skip_prologue): Likewise.
7268         * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise.
7269         * xtensa-tdep.c (xtensa_skip_prologue): Likewise.
7270
7271         * arm-tdep.c (arm_skip_prologue): Add gdbarch as parameter. Replace
7272         current_gdbarch by gdbarch.
7273         * m32c-tdep.c (m32c_skip_prologue): Likewise.
7274         * s390-tdep.c (s390_skip_prologue): Likewise.
7275
7276 2008-01-10  Doug Evans  <dje@google.com>
7277
7278         * defs.h (struct continuation_arg): Fix typo in comment.
7279         * target.c (target_translate_tls_address): Fix comment spelling error.
7280
7281 2008-01-09  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7282
7283         * doublest.h (DOUBLEST_PRINT_FORMAT): Remove % from string.
7284         (DOUBLEST_SCAN_FORMAT): Likewise.
7285         * dfp.c (decimal_from_floating): Use DOUBLEST_PRINT_FORMAT.
7286         * ada-lex.l (processReal): Prepend "%" to use of DOUBLEST_SCAN_FORMAT.
7287         * c-exp.y (parse_number): Likewise.
7288         * jv-exp.y (parse_number): Likewise.
7289         * objc-exp.y (parse_number): Likewise.
7290         * p-exp.y (parse_number): Likewise.
7291
7292 2008-01-09  Joel Brobecker  <brobecker@adacore.com>
7293
7294         * gdbtypes.c (create_array_type): Add handling of null Ada arrays.
7295         (check_typedef): Likewise.
7296
7297 2008-01-09  Luis Machado  <luisgpm@br.ibm.com>
7298
7299         * printcmd.c (printf_command): Add seen_big_h, seen_big_d and
7300         seen_double_big_d, treat the new H, D, and DD modifiers as length
7301         modifiers.
7302
7303 2008-01-08  Joel Brobecker  <brobecker@adacore.com>
7304
7305         * dwarf2read.c (read_enumeration_type): Add comment.
7306
7307 2008-01-08  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7308
7309         * config.in: Regenerate.
7310
7311 2008-01-08  Joel Brobecker  <brobecker@adacore.com>
7312
7313         * ada-lang.c (ada_convert_actual): Renames convert_actual.
7314         Make non-static.
7315         (ada_convert_actuals): Delete.
7316         * ada-lang.h (ada_convert_actual): Add declaration.
7317         (ada_convert_actuals): Remove declaration.
7318         * infcall.c: #include "ada-lang.h".
7319         (value_arg_coerce): Add new parameter sp.  Update function
7320         documetnation.  Add handling of Ada function call parameters.
7321         * Makefile.in (infcall.o): Update dependencies.
7322
7323 2008-01-08  Paul Hilfinger  <hilfinger@adacore.com>
7324
7325         * ada-lang.c (ensure_lval): Fix value lval kind.
7326         (convert_actual): Add handling for arguments passed by reference.
7327
7328 2008-01-08  Doug Evans  <dje@google.com>
7329
7330         * dbxread.c (read_dbx_symtab): Fix indentation.
7331
7332 2008-01-07  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7333
7334         * Makefile.in (dfp.o): Depend on expression.h, gdbtypes.h and value.h.
7335         (valarith.o): Depend on dfp.h.
7336         (valops.o): Likewise.
7337         * dfp.c: Include expression.h, gdbtypes.h, value.h and dfp.h.
7338         (set_decnumber_context): New function.
7339         (decimal_check_errors): Likewise.
7340         (decimal_from_number): Likewise.
7341         (decimal_to_number): Likewise.
7342         (decimal_from_string): Use set_decnumber_context and
7343         decimal_check_errors.
7344         (decimal_from_integral): New function.
7345         (decimal_from_floating): Likewise.
7346         (decimal_to_double): Likewise.
7347         (promote_decimal): Likewise.
7348         (decimal_binop): Likewise.
7349         (decimal_is_zero): Likewise.
7350         (decimal_compare): Likewise.
7351         (decimal_convert): Likewise.
7352         * dfp.h (decimal_from_integral): New prototype.
7353         (decimal_from_floating): Likewise.
7354         (decimal_to_double): Likewise.
7355         (decimal_binop): Likewise.
7356         (decimal_is_zero): Likewise.
7357         (decimal_compare): Likewise.
7358         (decimal_convert): Likewise.
7359         * eval.c (evaluate_subexp_standard): Remove expect_type argument from
7360         call to value_from_decfloat.
7361         * valarith.c: Include dfp.h.
7362         (value_args_as_decimal): New function.
7363         (value_binop): Add if block to handle TYPE_CODE_DECFLOAT values.
7364         (value_logical_not): Likewise.
7365         (value_equal): Likewise.
7366         (value_less): Likewise.
7367         (value_pos): Likewise.
7368         (value_neg): Formatting fix.
7369         * valops.c: Include dfp.h.
7370         (value_cast): Add if block to handle TYPE_CODE_DECFLOAT values.
7371         * value.c (unpack_long): Add case to handle TYPE_CODE_DECFLOAT.
7372         (unpack_double): Add if block to handle TYPE_CODE_DECFLOAT.
7373         (value_from_decfloat): Remove expect_type argument.
7374         * value.h (value_from_decfloat): Update prototype.
7375
7376 2008-01-07  Vladimir Prus  <vladimir@codesourcery.com>
7377
7378         Ignore change in name of dynamic linker during
7379         execution on Solaris.  This also unbreaks pending breakpoints.
7380
7381         * solist.h (struct target_so_ops): New field same.
7382         * solib-svr4.c (svr4_same): New.
7383         (_initialize_svr4_solib): Register svr4_same.
7384         * solib.c (update_solib_list): Use ops->same, if available.
7385
7386 2008-01-06  Christopher Faylor  <me+cygwin@cgf.cx>
7387
7388         * win32-nat.c (win32_make_so): Use cygwin-style path to avoid warnings
7389         when using MS-DOS paths.
7390
7391 2008-01-05  Pedro Alves  <pedro@codesourcery.com>
7392
7393         * NEWS: Mention --pid and --core command line behaviour changes.
7394
7395 2008-01-05  Pedro Alves  <pedro@codesourcery.com>
7396
7397         * main.c (captured_main): Remove 'count' varible and the
7398         ALIGN_STACK_ON_ENTRY block that used it.  Error out if --core and
7399         --pid options were issued simultaneously.  If an explicit pid
7400         option was passed, don't fallback to core file.  Detect extra
7401         arguments better in the presence of explicit pid or core
7402         arguments.
7403
7404 2008-01-05  Joel Brobecker  <brobecker@adacore.com>
7405
7406         * ada-lang.c (ada_which_variant_applies): Correctly compute
7407         the value of the discriminant when the variant record is packed.
7408
7409 2008-01-04  Joel Brobecker  <brobecker@adacore.com>
7410
7411         * ada-lang.c (is_name_suffix): Handle middle-name numeric suffixes
7412         that are used to differentiate homonyms.
7413
7414 2008-01-04  Jerome Guitton  <guitton@adacore.com>
7415
7416         * ada-lang.c (decode_packed_array_type): Avoid a seg fault
7417         when the type is an anonymous pointer type.
7418         (ada_check_typedef): Avoid a seg fault when the type is null.
7419         * ada-typeprint.c (print_array_type): Add support for pointer
7420         to packed arrays.
7421
7422 2008-01-04  Paul N. Hilfinger  <hilfinger@adacore.com>
7423
7424         * ada-exp.y: Allow '{type} ADDRESS' notation on left of assignment.
7425
7426 2008-01-04  Joel Brobecker  <brobecker@adacore.com>
7427
7428         * ada-lang.c (ada_evaluate_subexp): Evaluate tagged types in
7429         EVAL_NORMAL mode when noside is EVAL_AVOID_SIDE_EFFECTS.
7430
7431 2008-01-04  Joel Brobecker  <brobecker@adacore.com>
7432
7433         * ada-exp.y (chop_separator): New function.
7434         (write_selectors): Rewrite to re-use chop_separator.
7435         (ada_nget_field_index, get_symbol_field_type): New functions.
7436         (write_var_or_type): Add support for "ptype TYPENAME.FIELD"
7437         expressions.
7438
7439 2008-01-03  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7440
7441         * symtab.c (find_pc_sect_line): Use SYMBOL_VALUE_ADDRESS instead
7442         of SYMBOL_VALUE when working with function symbols.
7443
7444 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
7445
7446         * ada-lang.c (resolve_subexp): Add handling of OP_REGISTER
7447         expressions.  These expressions do not need to be rewriten.
7448
7449 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
7450
7451         * dwarf2read.c (read_enumeration_type): Flag type as stub if
7452         the given die is a declaration.
7453
7454 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
7455
7456         * ada-lang.c (ada_array_bound_from_type): Make non-static.
7457         Handle properly the case when the index type is an enumerated type.
7458         Do not return the subtype of the bounds type, just return the
7459         bounds type directly - this is not needed and is more consistent
7460         with what we do for arrays when no XA parallel type exists.
7461
7462 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
7463
7464         * ada-lang.c (static_unwrap_type): Add forward declaration.
7465         (template_to_static_fixed_type): Fields of dynamic types sometimes
7466         also need to be unwrapped. Take this into account.
7467         (ada_to_fixed_type_1): Renamed from ada_to_fixed_type.
7468         (ada_to_fixed_type): New wrapper around ada_to_fixed_type_1.
7469         * ada-typeprint.c (ada_print_type): Get the typename from
7470         the original type, not the base type.
7471
7472 2008-01-03  Jerome Guitton  <guitton@adacore.com>
7473
7474         * ada-lang.c (ada_value_struct_elt, to_fixed_array_type)
7475         (to_fixed_array_type, ada_to_fixed_value_create, unwrap_value):
7476         Update calls to ada_to_fixed_type.
7477         (ada_template_to_fixed_record_type_1): Ditto, but without looking
7478         for the tag.
7479         (ada_to_fixed_type): Add check_tag parameter; do not look for
7480         tag if null.  When looking for a tag, use a fixed record type.
7481         * ada-lang.h (ada_to_fixed_type): Add check_tag parameter.
7482         * ada-valprint.c (printable_val_type, ada_value_print): Update
7483         calls to ada_to_fixed_type.
7484
7485 2008-01-03  Luis Machado  <luisgpm@br.ibm.com>
7486
7487         * doublest.c (convert_floatformat_to_doublest): Call
7488         floatformat_to_doublest instead of floatformat_to_double and use
7489         DOUBLEST variables.
7490         (convert_doublest_to_floatformat): Call floatformat_from_doublest
7491         instead of floatformat_from_double and use DOUBLEST variables.
7492
7493 2008-01-03  Nick Hudson  <nick.hudson@dsl.pipex.com>
7494
7495         * MAINTAINERS (Write After Approval): Add self.
7496
7497 2008-01-03  Joel Brobecker  <brobecker@adacore.com>
7498
7499         * symfile.c (set_initial_language): Make non-static.
7500         * symfile.h (set_initial_language): Add declaration.
7501         * language.c: #include "symfile.h".
7502         (set_language): Call set_initial_language if the frame language
7503         could not be determined.
7504
7505 2008-01-03  Paul N. Hilfinger  <hilfinger@adacore.com>
7506
7507         * eval.c (evaluate_subexp_for_address): Provide frame address to
7508         locate_var_value only if it will be needed.
7509
7510 2008-01-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
7511
7512         * linux-nat.c (linux_child_follow_fork): Call also CHECK_FOR_THREAD_DB.
7513
7514 2008-01-02  Joel Brobecker  <brobecker@adacore.com>
7515
7516         * ada-lang.c (ada_evaluate_subexp): Modify the value returned
7517         when noside is EVAL_AVOID_SIDE_EFFECTS to be an lval_memory.
7518         This is needed to make sure that any other treatment applied
7519         to the resulting value does not fail for spurious reason,
7520         such as trying to take the address of this value.
7521
7522 2008-01-02  Joel Brobecker  <brobecker@adacore.com>
7523
7524         * ada-lang.c (ada_value_equal): Dereference reference types when
7525         comparing arrays.
7526
7527 2008-01-01  Daniel Jacobowitz  <dan@codesourcery.com>
7528
7529         Updated copyright notices for most files.
7530
7531 2008-01-01  Christopher Faylor  <me+gdb@cgf.cx>
7532
7533         * win32-nat.c (psapi_module_handle): Remove static.
7534         (get_module_name): Rename from psapi_get_dll_name.  Revamp slightly to
7535         return first module found if base_address is zero.  Don't initialize
7536         psapi function pointers here.  Convert to cygwin paths when
7537         appropriate.
7538         (win32_pid_to_exec_file): Use Cygwin's /proc interface to determine
7539         executable name.  Use get_module_name when that fails or when
7540         !__CYGWIN__.
7541         (_initialize_psapi): New function.  Initialize psapi stuff before it is
7542         needed or issue a warning if it is not found.  Move psapi_module_handle
7543         here.
7544
7545 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
7546
7547         * ada-lang.c (ada_remove_trailing_digits): New function.
7548         (ada_remove_po_subprogram_suffix): New function.
7549         (ada_decode): Improve. Move the description of the algorithm
7550         directly inside the code, instead of in the function global
7551         description.
7552
7553 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
7554
7555         * ada-valprint.c (ada_val_print_1) [TYPE_CODE_REF]: Ignore deref_ref
7556         and always print the dereferenced value.
7557
7558 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
7559
7560         * ada-lang.c (ada_evaluate_subexp, case BINOP_SUB): Add handling
7561         of the case where the first argument is a reference.
7562         (ada_evaluate_subexp, case BINOP_ADD): Likewise.
7563
7564 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
7565
7566         Implement support for Ada interface types.
7567
7568         * ada-lang.c (ada_is_dispatch_table_ptr_type): New function.
7569         (ada_is_ignored_field): Ignore fields that are a dispatch table
7570         of a tagged type.
7571
7572 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
7573
7574         * top.c (print_gdb_version): Update copyright year.
7575
7576 2008-01-01  Joel Brobecker  <brobecker@adacore.com>
7577
7578         * ChangeLog-2007: New ChangeLog rotation.
7579         * ChangeLog: Reset for 2008.
7580         * config/djgpp/fnchange.lst: Add entries for ChangeLog-2006 and
7581         ChangeLog-2007.
7582
7583 For older changes see ChangeLog-2007.
7584 \f
7585 Local Variables:
7586 mode: change-log
7587 left-margin: 8
7588 fill-column: 74
7589 version-control: never
7590 coding: utf-8
7591 End: