fcb9e80596c54af606bb58c6aefd5ab7becf0e8a
[external/binutils.git] / gdb / ChangeLog
1 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * gdbtypes.c (make_pointer_type, make_reference_type,
4         smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
5         Use type architecture instead of current_gdbarch.
6
7         * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
8         Add GDBARCH paramter.
9         * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
10         Add GDBARCH parameter.   Use it instead of current_gdbarch.
11         * c-typeprint.c (c_type_print_modifier): Update call.
12         * parse.c (push_type_address_space): Likewise.
13
14         * findvar.c (extract_typed_address, store_typed_address): Use type
15         architecture instead of current_gdbarch.
16
17         * value.c (value_as_address, unpack_field_as_long): Use type architecture
18         instead of current_gdbarch.
19
20         * doublest.c (floatformat_from_length): Add GDBARCH argument.  Use it
21         instead of current_gdbarch.
22         (floatformat_from_type): Pass type architecture.
23
24         * infcall.c (find_function_addr): Use type architecture instead
25         of current_gdbarch.
26
27         * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
28         value_bit_index): Use type architecture instead of current_gdbarch.
29         * valops.c (value_cast, value_slice): Likewise.
30
31         * value.h (modify_field): Add TYPE argument.
32         * value.c (modify_field): Add TYPE argument.  Use type architecture
33         instead of current_gdbarch.
34         (set_internalvar_component): Likewise.
35         * eval.c (evaluate_struct_tuple): Update call.
36         * valops.c (value_assign): Likewise.
37         * ada-lang.c (modify_general_field): Likewise.  Add TYPE argument.
38         (make_array_descriptor): Update calls.
39         (move_bits): Add BITS_BIG_ENDIAN_P argument.  Use it instead of
40         current_gdbarch.
41         (ada_value_assign, value_assign_to_component): Update calls.
42         (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
43         value_assign_to_component): Use type arch instead of current_gdbarch.
44
45         * printcmd.c (float_type_from_length): Remove GDBARCH argument,
46         use type architecture instead.
47         (print_scalar_formatted, printf_command): Update calls.  Use type
48         architecture instead of current_gdbarch.
49         * valprint.c (val_print_type_code_int): Use type architecture
50         instead of current_gdbarch.
51         * varobj.c (value_get_print_value): Likewise.
52         * python/python-prettyprint.c (print_string_repr): Add GDBARCH
53         argument.  Use it instead of current_gdbarch.
54         (apply_val_pretty_printer): Update call.
55
56         * ada-valprint.c (ada_val_print_1): Use type architecture instead
57         of current_gdbarch.
58         * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
59         Use it instead of current_gdbarch.
60         (c_val_print): Update calls passing type architecture.
61         * f-valprint.c (f_val_print): Use type architecture instead of
62         current_gdbarch.
63         * jv-valprint (java_value_print): Likewise.
64         * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
65         Use it instead of current_gdbarch.
66         (print_unpacked_pointer): Update calls passing type architecture.
67         * scm-valprint.c (scm_scmval_print): Use type architecture instead of
68         current_gdbarch.
69
70         * gnu-v3-abi.c (get_class_arch): Remove.
71         (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch.  Remove
72         special-case check for Java classes.
73         (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
74         gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
75         Use get_type_arch instead of get_class_arch.
76
77 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
78
79         * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
80         (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
81         (alloc_type_arch): Add prototype.
82         (alloc_type_copy): Likewise.
83         (get_type_arch): Likewise.
84         (arch_type): Likewise.
85         (arch_integer_type): Likewise.
86         (arch_character_type): Likewise.
87         (arch_boolean_type): Likewise.
88         (init_float_type): Remove, replace by ...
89         (arch_float_type): ... this.
90         (init_complex_type): Remove, replace by ...
91         (arch_complex_type): ... this.
92         (init_flags_type): Remove, replace by ...
93         (arch_flags_type): ... this.
94         (init_composite_type): Remove, replace by ...
95         (arch_composite_type): ... this.
96
97         * gdbtypes.c (alloc_type): No longer support NULL objfile.
98         (init_type): Likewise.
99         (alloc_type_arch): New function.
100         (alloc_type_copy): New function.
101         (get_type_arch): New function.
102
103         (smash_type): Preserve type ownership information.
104         (make_pointer_type, make_reference_type, make_function_type,
105         smash_to_memberptr_type, smash_to_method_type): No longer
106         preserve OBJFILE across smash_type calls.
107         (make_pointer_type, make_reference_type, make_function_type,
108         lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
109         create_range_type, create_array_type, create_set_type, copy_type):
110         Use alloc_type_copy when allocating types.
111         (check_typedef): Use alloc_type_arch.
112         (copy_type_recursive): Likewise.  Preserve type ownership data
113         after copying type.
114         (recursive_dump_type): Dump type ownership data.
115         (alloc_type_instance): Update type ownership check.
116         (copy_type, copy_type_recursive): Likewise.
117
118         (arch_type): New function.
119         (arch_integer_type): Likewise.
120         (arch_character_type): Likewise.
121         (arch_boolean_type): Likewise.
122         (init_float_type): Remove, replace by ...
123         (arch_float_type): ... this.
124         (init_complex_type): Remove, replace by ...
125         (arch_complex_type): ... this.
126         (init_flags_type): Remove, replace by ...
127         (arch_flags_type): ... this.
128         (append_flags_type_flag): Move down.
129         (init_composite_type): Remove, replace by ...
130         (arch_composite_type): ... this.
131         (append_composite_type_field_aligned,
132         append_composite_type_field): Move down.
133
134         * gdbarch.c (gdbtypes_post_init): Allocate all types
135         using per-architecture routines.
136         * ada-lang.c (ada_language_arch_info): Likewise.
137         * f-lang.c (build_fortran_types): Likewise.
138         * jv-lang.c (build_java_types): Likewise.
139         * m2-lang.c (build_m2_types): Likewise.
140         * scm-lang.c (build_scm_types): Likewise.
141
142         * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
143         (packed_array_type): Likewise.
144         (ada_template_to_fixed_record_type_1): Likewise.
145         (template_to_static_fixed_type): Likewise.
146         (to_record_with_fixed_variant_part): Likewise.
147         (to_fixed_variant_branch_type): Likewise.
148         (to_fixed_array_type): Likewise.
149         (to_fixed_range_type): Likewise.
150         (empty_record): Use type instead of objfile argument.
151         Use alloc_type_copy.
152         (to_fixed_variant_branch_type): Update call to empty_record.
153         * jv-lang.c (type_from_class): Use alloc_type_arch.
154
155         * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
156         * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
157         i386_mmx_type, i386_sse_type): Likewise.
158         * ia64-tdep.c (ia64_ext_type): Likewise.
159         * m32c-tdep.c (make_types): Likewise.
160         * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
161         * rs6000-tdep.c (rs6000_builtin_type_vec64,
162         rs6000_builtin_type_vec128): Likewise.
163         * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
164         * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
165         sparc64_fprs_type): Likewise.
166         * spu-tdep.c (spu_builtin_type_vec128): Likewise.
167         * xtensa-tdep.c (xtensa_register_type): Likewise.
168         * linux-tdep.c (linux_get_siginfo_type): Likewise.
169         * target-descriptions.c (tdesc_gdb_type): Likewise.
170         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
171
172 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
173
174         * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
175         i386_mxcsr_type members.
176         (i386_eflags_type): Make into function.
177         (i386_mxcsr_type): Likewise.
178         * i386-tdep.c (i386_eflags_type): Make into function.
179         (i386_mxcsr_type): Likewise.
180         (i386_register_type): Update uses.
181         (i386_init_types): Remove.
182         (_initialize_i386_tdep): Do not call it.
183         * amd64-tdep.c (amd64_register_type): Update uses.
184
185         * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
186         * m68k-tdep.c (m68k_ps_type): Make into function.
187         (m68k_register_type): Update use.
188         (m68k_init_types): Remove.
189         (_initialize_m68k_tdep): Do not call it.
190
191         * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
192         sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
193         sparc64_fprs_type members.
194         * sparc-tdep.c (sparc_psr_type): Make into function.
195         (sparc_fsr_type): Likewise.
196         (sparc32_register_type): Update uses.
197         (sparc_init_types): Remove.
198         (_initialize_sparc_tdep): Do not call it.
199         * sparc64-tdep.c (sparc64_pstate_type): Make into function.
200         (sparc64_fsr_type): Likewise.
201         (sparc64_fprs_type): Likewise.
202         (sparc64_register_type): Update uses.
203         (sparc64_init_types): Remove.
204         (_initialize_sparc64_tdep): Likewise.
205
206 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
207
208         * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
209         builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
210         builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
211         (init_float_type, init_complex_type): Add prototypes.
212         * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
213         builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
214         builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
215         (_initialize_gdbtypes): Do not initialize them.
216         (build_flt): Rename to ...
217         (init_float_type): ... this.  Make global.
218         (build_complex): Rename to ...
219         (init_complex_type): ... this.  Make global.  Remove BIT argument.
220         (gdbtypes_post_init): Update calls.
221
222         * ada-lang.c (ada_language_arch_info): Use init_float_type.
223         * jv-lang.c (build_java_types): Likewise.
224         * m2-lang.c (build_m2_types): Likewise.
225         * f-lang.c (build_fortran_types): Use init_float_type and
226         init_complex_type.
227
228         * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
229         of using builtin_type_ieee_single, builtin_type_ieee_double, or
230         builtin_type_arm_ext.
231
232         * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
233         * ia64-tdep.c (builtin_type_ia64_ext): Remove.
234         (_initialize_ia64_tdep): Do not initialize it.
235         (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
236         Move up.
237         (ia64_ext_type): New function.
238         (ia64_register_reggroup_p, ia64_convert_register_p,
239         ia64_register_to_value, ia64_value_to_register,
240         ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
241         instead of builtin_type_ia64_ext.
242
243         * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
244         (i387_ext_type): Add prototype.
245         * i386-tdep.c (i387_ext_type): New function.
246         (i386_extract_return_value, i386_store_return_value,
247         i386_register_type): Use it instead of builtin_type_i387_ext.
248         * amd64-tdep.c (amd64_register_type): Likewise.
249         * i387-tdep.c (print_i387_value, i387_register_to_value,
250         i387_value_to_register): Likewise.
251         (print_i387_value, print_i387_ext): Add GDBARCH argument.
252         (print_i387_ext, i387_print_float_info): Pass to subroutines.
253
254         * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
255         * m68k-tdep.c (m68881_ext_type): New function.
256         (m68k_register_type, m68k_convert_register_p): Use it instead
257         of builtin_type_m68881_ext.
258
259         * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
260         * arm-tdep.c (arm_ext_type): New function.
261         (arm_register_type): Use it instead of builtin_type_arm_ext.
262
263         * alpha-tdep.c (alpha_register_type): Use builtin types
264         instead of builtin_type_ieee_double.
265
266         * mips-tdep.c (mips_float_register_type, mips_double_register_type):
267         Remove.
268         (mips_register_type): Use builtin types instead of
269         builtin_type_ieee_single and builtin_type_ieee_double.
270         (mips_print_fp_register): Use builtin types instead of
271         mips_float_register_type and mips_double_register_type.
272
273         * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
274         Use builtin types instead of builtin_type_ieee_single and
275         builtin_type_ieee_double.
276
277 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
278
279         * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
280         builtin_type_int16, builtin_type_uint16, builtin_type_int32,
281         builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
282         builtin_type_int128, builtin_type_uint128): Remove.
283         (struct builtin_type): New members builtin_int0, builtin_int8,
284         builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
285         builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
286         and builtin_uint128.
287         * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
288         builtin_type_int16, builtin_type_uint16, builtin_type_int32,
289         builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
290         builtin_type_int128, builtin_type_uint128): Remove.
291         (_initialize_gdbtypes): Do not initialize them.
292         (gdbtypes_post_init): Initialize fixed-size integer types.
293
294         * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
295         GDBARCH argument.  Return platform-specific type.
296         (dwarf2_read_address, execute_stack_op): Update calls.
297
298         * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
299         instead of global builtin_int_... variables.
300         * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
301         * printcmd.c (do_examine): Likewise.
302         * jv-exp.y (parse_number): Likewise.
303
304         * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
305         alpha_store_return_value): Likewise.
306         * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
307         * amd64-tdep.c (amd64_register_type): Likewise.
308         * arm-tdep.c (arm_register_type): Likewise.
309         * avr-tdep.c (avr_register_type): Likewise.
310         * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
311         * frv-tdep.c (frv_register_type): Likewise.
312         * h8300-tdep.c h8300_register_type): Likewise.
313         * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
314         hppa64_register_type): Likewise.
315         * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
316         * iq2000-tdep.c (iq2000_register_type): Likewise.
317         * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
318         * m32r-tdep.c (m32r_register_type): Likewise.
319         * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
320         m68hc11_pseudo_register_write): Likewise.
321         * m68k-tdep.c (m68k_register_type): Likewise.
322         * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
323         * mep-tdep.c (mep_register_type): Likewise.
324         * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
325         mips_print_fp_register): Likewise.
326         * moxie-tdep.c (moxie_register_type): Likewise.
327         * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
328         * rs6000-tdep.c (rs6000_builtin_type_vec64,
329         rs6000_builtin_type_vec128): Likewise.
330         * score-tdep.c (score_register_type): Likewise.
331         * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
332         Likewise.
333         * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
334         Likewise.
335         * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
336         * v850-tdep.c (v850_register_type): Likewise.
337         * xstormy16-tdep.c (xstormy16_register_type): Likewise.
338         * xtensa-tdep.c (xtensa_register_type): Likewise.
339
340         * mt-tdep.c (struct gdbarch_tdep): New data structure.
341         (mt_gdbarch_init): Alloc TDEP structures.
342         (mt_register_type): Cache coprocessor type in TDEP instead of
343         static global variable.
344
345         * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
346         * xtensa-tdep.c (type_entries): Remove.
347         (xtensa_register_type): Cache fixed-size types in TDEP instead
348         of in global variable.
349
350 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
351
352         * gdbtypes.h (builtin_type_true_char): Remove.
353         (builtin_type_true_unsigned_char): Likewise.
354         (struct builtin_type): Add builtin_true_char and
355         builtin_true_unsigned_char members.
356         * gdbtypes.c (builtin_type_true_char): Remove.
357         (builtin_type_true_unsigned_char): Likewise.
358         (_initialize_gdbtypes): Do not initialize them.
359         (gdbtypes_post_init): Initialize builtin_true_char and
360         builtin_true_unsigned_char members of builtin_type.
361
362         * printcmd.c (print_scalar_formatted): Use builtin_type
363         members instead of builtin_type_true_char and
364         builtin_type_true_unsigned_char.
365         * ada-valprint.c (ada_val_print_1): Likewise.
366
367 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
368
369         * gdbtypes.h (builtin_type_void): Remove.
370         * gdbtypes.c (builtin_type_void): Remove.
371         (_initialize_gdbtypes): Do not initialize it.
372
373         (safe_parse_type): Add GDBARCH argument.  Use it to construct
374         void return type.
375         (check_stub_method): Update call.
376
377         * infcall.c (call_function_by_hand): Use platform-specific type
378         instead of builtin_type_void.
379         * valops.c (value_cast): Use input void type instead of
380         builtin_type_void.
381
382 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
383
384         * ada-lang.c (assign_component): Use platform-specific integer type
385         instead of builtin_type_int32 type.
386         (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
387
388         * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
389         instead of builtin_type_int8 type.
390         * valarith.c (value_x_unop): Likewise.
391         * python/python-value.c (valpy_absolute): Avoid reference to
392         builtin_type_int8 type.
393
394         * eval.c (evaluate_subexp_standard): Use platform-specific integer
395         type instead of builtin_type_int8 as EVAL_SKIP return value type.
396         * ada-lang.c (ada_evaluate_subexp): Likewise.
397         * jv-lang.c (evaluate_subexp_java): Likewise.
398         * m2-lang.c (evaluate_subexp_modula2): Likewise.
399         * scm-lang.c (evaluate_exp): Likewise.
400
401         * value.h (value_bitstring): Add INDEX_TYPE argument.
402         * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
403         of builtin_type_int32 as base range type.
404         * eval.c (evaluate_subexp_standard): Update value_bitstring call.
405
406 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
407
408         * gdbtypes.c (lookup_array_range_type): Add prototype.
409         (lookup_string_range_type): Likewise.
410         * gdbtypes.c (lookup_array_range_type): New function.
411         (lookup_string_range_type): Likewise.
412
413         * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
414         * parse.c (follow_types): Likewise.
415         * jv-lang.c (java_array_type): Likewise.
416         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
417         * mt-tdep.c (mt_register_type): Likewise.
418         * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
419         * sh64-tdep.c (sh64_build_float_register_type): Likewise.
420         * value.c (allocate_repeat_value): Likewise.
421         * valops.c (value_array, value_cstring): Likewise.
422         * valops.c (value_string): Use lookup_string_range_type.
423
424 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
425
426         * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
427         redundant check for NULL TYPE_TARGET_TYPE.
428         * m2-valprint.c (m2_print_long_set): Likewise.
429         * p-valprint.c (pascal_type_print_base): Likewise.
430
431 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
432
433         * printcmd.c (next_gdbarch): New static variable.
434         (set_next_address, do_examine, x_command): Set it.
435         (decode_format): Use 'a' size to indicate width of an address.
436         (do_examine): Add GDBARCH argument.  Handle 'a' size.
437         (x_command): Pass architecture to do_examine.
438         Error if called without argument the first time.  
439         (do_one_display): Pass architecture to do_examine.
440
441         (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
442         examine_g_type): Remove.
443         (_initialize_printcmd): Do not initialize them.
444         (do_examine): Use builin_type_int... instead of examine_..._type.
445
446 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
447
448         * gdbtypes.h (struct builtin_type): Add internal_fn member.
449         * gdbtypes.c (gdbtypes_post_init): Initialize it.
450         * value.c (internal_fn_type): Remove.
451         (_initialize_values): Do not initialize it.
452
453         * value.c (struct internalvar): Add enum internalvar_kind type and
454         kind member.  Restructure union internalvar_data type.  Remove type,
455         canonical, and make_value members.
456         (init_if_undefined_command): Update for data structure changes.
457         (create_internalvar): Likewise.
458         (create_internalvar_type_lazy): Likewise.
459         (get_internalvar_integer): Likewise.
460         (get_internalvar_function): Likewise.
461         (set_internalvar_component): Likewise.
462         (set_internalvar): Likewise.
463         (set_internalvar_integer): Likewise.
464         (set_internalvar_function): Likewise.
465         (clear_internalvar): Likewise.
466         (add_internal_function): Likewise.
467         (preserve_one_internalvar): New function.
468         (preserve_values): Call it.
469
470         * value.h (value_of_internalvar): Add GDBARCH parameter.
471         (internalvar_make_value): Likewise.
472         * value.c (value_of_internalvar): Add GDBARCH parameter.  Pass it to
473         make_value callback.  Use it to generate per-architecture result value
474         types for internal variables with no pre-defined type.  Update for data
475         structure changes.
476         (show_convenience): Pass architecture to value_of_internalvar.
477         * eval.c (evaluate_subexp_standard): Likewise.
478         * infrun.c (siginfo_make_value): Add GDBARCH parameter.  Use it
479         instead of current frame architecture.  Return per-architecture type.
480
481         * value.h (set_internalvar_string): Add prototype.
482         * value.c (set_internalvar_string): New function.
483         * tracepoint.c (set_traceframe_context): Use it.
484
485 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
486
487         * jv-lang.h (java_int_type, java_byte_type, java_short_type,
488         java_long_type, java_boolean_type, java_char_type, java_float_type,
489         java_double_type, java_void_type): Remove.
490         (struct builtin_java_type): New data type.
491         (builtin_java_type): Add prototype.
492         (java_primitive_type): Add GDBARCH argument.
493         (java_primitive_type_from_name): Likewise.
494         (type_from_class): Likewise.
495
496         * jv-lang.c (java_int_type, java_byte_type, java_short_type,
497         java_long_type, java_boolean_type, java_char_type, java_float_type,
498         java_double_type, java_void_type): Remove.
499
500         (build_java_types, builtin_java_type): New functions.
501         (java_type_data): New static variable.
502         (_initialize_java_language): Initialize it.  No longer initialize
503         global types.
504         (java_language_arch_info): Use per-architecture types.
505
506         (java_primitive_type): Add GDBARCH argument.  Return per-architecture
507         type instead of refering to global variable.
508         (java_primitive_type_from_name): Add GDBARCH argument.
509         (java_primitive_type_name): New function.
510         (java_demangled_signature_length): Use it instead of
511         java_primitive_type_from_name.
512         (java_demangled_signature_copy): Likewise.
513
514         (type_from_class): Add GDBARCH argument.  Pass to java_link_class_type,
515         java_primitive_type, and recursive type_from_class call.
516         (java_link_class_type): Add GDBARCH argument.  Pass to type_from_class
517         calls.  Use per-architecture types instead of global types.
518
519         * jv-exp.y (parse_java_type): New define.
520         Use per-architecture types instead of global types througout.
521
522         * jv-valprint.c (java_value_print): Pass architecture to
523         type_from_class and java_primitive_type_from_name.  Use per-
524         architecture types instead of global types.
525
526 2009-07-01  Doug Evans  <dje@google.com>
527
528         * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
529         support for i386-linux, amd64-linux, and i386-win32 builds of
530         gdbserver.
531
532 2009-07-01  Nick Roberts  <nickrob@snap.net.nz>
533
534         * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
535
536 2009-06-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
537
538         * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
539         (check//%): Construct FORCE_PARALLEL for the sub-make.  Extend the
540         comment for it.
541
542 2009-06-30  Paul Pluzhnikov  <ppluzhnikov@google.com>
543
544         gdb/10275
545         * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
546         cfa_how and cfa_exp into regs and adjust users.
547         
548 2009-06-30  Daniel Jacobowitz  <dan@codesourcery.com>
549
550         * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
551
552 2009-06-30  Vladimir Prus  <vladimir@codesourcery.com>
553
554         * mi/mi-cmd-stack.c (parse_print_values): New.
555         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
556
557 2009-06-30  Vladimir Prus  <vladimir@codesourcery.com>
558
559         * varobj.c (varobj_get_type): Use type_to_string.
560
561 2009-06-29  Pedro Alves  <pedro@codesourcery.com>
562
563         * infrun.c (handle_inferior_event): Context switch to the new
564         thread when resuming for a new_thread_event.
565
566 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
567
568         * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
569         * ada-lang.c (convert_actual): Remove stale prototype.
570         (ensure_lval, make_array_descriptor, ada_convert_actual):
571         Add GDBARCH argument and pass through to subroutine calls.
572         (ensure_lval): Use GDBARCH instead of current_gdbarch.
573         * infcall.c (value_arg_coerce): Update ada_convert_actual call.
574
575 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
576
577         * ada-lang.c (resolve): Use per-architecture void type instead
578         of platform-independent one.
579         (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
580         (ada_resolve_function): Reimplement fallback logic to avoid
581         explicit reference to builtin_type_void.
582
583 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
584
585         * ada-valprint.c (ada_print_scalar): Accept NULL type argument
586         to indicate scalar should be printed as default integer.
587         (print_optional_low_bound): Pass NULL to ada_print_scalar to
588         indicate default integer output.
589         * ada-typeprint.c (print_range, print_range_bound): Likewise.
590         (print_choices): Likewise.  Thus, accept NULL as val_type.
591         * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
592         to look up controlling discriminant name.
593
594 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
595
596         * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
597         Fall back to orig_type as index type if symbol lookup fails.
598         Allocate result types from ORIG_TYPE's objfile.
599         (ada_array_bound_from_type, to_fixed_array_type,
600         ada_evaluate_subexp): Pass original index type to
601         to_fixed_range_type.  Do not pass objfile.
602
603         * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
604         Fall back to orig_type as index type if symbol lookup fails.
605         (print_array_type, ada_print_type): Pass original index type
606         to print_range_type_named.
607
608 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
609
610         * ada-lang.c (ada_index_type): Update comment.
611
612 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
613
614         * ada-lang.c (ada_index_type): Make static.  Add NAME argument.
615         Throw error on invalid input arguments.  Return NULL if unable
616         to determine index type.
617
618         (ada_array_bound_from_type): Remove TYPEP argument.
619         (ada_array_bound): Make static.  Return LONGEST instead of value.
620         Update for ada_array_bound_from_type change.
621         (ada_array_length): Return LONGEST instead of value.
622         Update for ada_array_bound_from_type change.
623         (make_array_descriptor): Update for ada_array_bound change.
624
625         (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
626         OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
627         ada_array_bound, ada_array_length, ada_index_type changes.
628         Always use ada_index_type to compute result type; fall back
629         to architecture-specific integer type if ada_index_type fails.
630
631         * ada-lang.h (ada_index_type): Remove prototype.
632         (ada_array_bound): Likewise.
633
634 2009-06-29  Pedro Alves  <pedro@codesourcery.com>
635
636         * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
637         a psymtab.
638
639 2009-06-29  Tom Tromey  <tromey@redhat.com>
640
641         * README: Mention parallel check.
642
643 2009-06-29  Sami Wagiaalla  <swagiaal@redhat.com>
644
645         * dwarf2read.c (read_import_statement): Properly set import location
646         and destination.
647         * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
648         inner, char* outer arguments. Updated callers.
649
650 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
651
652         * value.h (value_subscript, value_subscripted_rvalue,
653         value_bitstring_subscript, value_ptradd): Use LONGEST instead
654         of value as type of the index argument.
655         (value_ptrsub): Remove.
656         * valarith.c (value_subscript, value_subscripted_rvalue,
657         value_bitstring_subscript, value_ptradd): Use LONGEST instead
658         of value as type of the index argument.
659         (value_ptrsub): Remove.
660
661         * wrapper.h (gdb_value_subscript): Use LONGEST instead of
662         value as type of the index argument.
663         * wrapper.c (gdb_value_subscript): Likewise.
664
665         Update calls to gdb_value_subscript, value_subscript,
666         value_subscripted_rvalue, value_bitstring_subscript and
667         value_ptradd to use LONGEST instead of value as index
668         argument type.  Use value_ptradd instead of value_ptrsub.
669         * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
670         ada_tag_name_2): Update.
671         * ada-tasks.c (read_atcb): Update.
672         * eval.c (evaluate_subexp_standard): Update.
673         * valarith.c (value_subscript): Update.
674         * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
675         * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
676         gnuv3_method_ptr_to_value): Update.
677         * jv-lang.c (evaluate_subexp_java): Update.
678         * m2-lang.c (evaluate_subexp_modula2): Update.
679         * python/python-value.c (valpy_getitem, valpy_binop): Update.
680         * wrapper.c (gdb_value_subscript): Update.
681         * varobj.c (c_describe_child): Update.
682
683 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
684
685         * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
686         * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
687         (lookup_function_type): Update call.
688         * stabsread.c (read_type): Likewise.
689         * dwarf2read.c (read_subroutine_type): Use lookup_function_type
690         instead of make_function_type.
691         * jv-lang.c (type_from_class): Likewise.  Do not allocate types
692         on the fake "dynamics" obstack.
693
694 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
695
696         * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
697         nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
698         and nodebug_tls_symbol members.
699         (struct objfile_type): New data structure.
700         (objfile_type): Add prototype.
701         * gdbtypes.c (gdbtypes_post_init): Remove initialization code
702         for types no longer in struct builtin_type.
703         (objfile_type_data): New static variable.
704         (_initialize_gdbtypes): Initialize it.
705         (objfile_type): New function.
706
707         * gdbtypes.h (builtin_type_error): Remove.
708         * gdbtypes.c (build_complex): Do not use builtin_type_error.
709         * symtab.c (builtin_type_error): Remove.
710         (_initialize_symtab): Remove initialization.
711
712         * stabsread.c (dbx_lookup_type, define_symbol, error_type,
713         rs6000_builtin_type, read_range_type): Use per-objfile types
714         instead of global or per-architecture builtin types.
715         * coffread.c (decode_type): Likewise.
716         * dwarf2read.c (read_array_type, read_tag_string_type,
717         new_symbol, die_type): Likewise.
718         * mdebugread.c (parse_symbol, basic_type, upgrade_type,
719         parse_procedure, psymtab_to_symtab_1): Likewise.
720         * xcoffread.c (process_xcoff_symbol): Likewise.
721         * parse.c (write_exp_msymbol): Likewise.
722
723         * stabsread.c (rs6000_builtin_type_data): New static variable.
724         (_initialize_stabsread): Initialize it.
725         (rs6000_builtin_type): Add OBJFILE argument.  Allocate builtin
726         types per-objfile instead of globally.
727
728         * stabsread.c (dbx_lookup_type): Add OBJFILE argument.  Use it
729         instead of current_objfile; pass it to rs6000_builtin_type.
730         (dbx_alloc_type, read_type, read_range_type): Update calls.
731         (cleanup_undefined_types_noname): Add OBJFILE argument and
732         pass it to dbx_lookup_type.
733         (cleanup_undefined_types): Add OBJFILE argument and pass it
734         to cleanup_undefined_types_noname.
735         * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
736         * buildsym.c (end_symtab): Update call.
737
738 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
739
740         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
741         target_gdbarch instead of current_gdbarch.
742
743 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
744
745         * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
746         (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
747         solib-darwin.o.
748
749         * configure.tgt: Add comment.
750
751 2009-06-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
752
753         * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
754         
755 2009-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
756             Jan Kratochvil  <jan.kratochvil@redhat.com>
757
758         * NEWS: Document inlined function support.
759         * Makefile.in (SFILES): Add inline-frame.c.
760         (COMMON_OBS): Add inline-frame.o.
761         * block.c (contained_in): Rewrite to use lexical nesting.
762         (block_linkage_function): Skip inlined function blocks.
763         (block_inlined_p): New.
764         * block.h (struct block): Update comment.
765         (block_inlined_p): New prototype.
766         * blockframe.c (get_frame_block): Handle inlined functions.
767         (get_frame_function): Do not use block_linkage_function.
768         (block_innermost_frame): Use get_frame_block and contained_in.
769         * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
770         Skip over inlined functions.  Simplify epilogue check.
771         (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
772         Update comments.
773         (set_momentary_breakpoint): Only accept non-inlined frames.
774         (watch_command_1): Use frame_unwind_caller_pc and
775         frame_unwind_caller_id instead of get_prev_frame.
776         (until_break_command): Likewise.  Use get_stack_frame_id.
777         * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
778         * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
779         * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
780         (read_func_scope, new_symbol): Likewise.  Handle arguments specially
781         for inlined functions without call site information.
782         (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
783         (die_specification): Treat DW_AT_abstract_origin as a specification.
784         (read_type_die): Handle DW_TAG_inlined_subroutine.
785         * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
786         * frame.c (fprint_frame_id): Print inline depth.
787         (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
788         (skip_inlined_frames, get_stack_frame_id): New.
789         (frame_unwind_caller_id): Use skip_inlined_frames.
790         (frame_id_inlined_p): New.
791         (frame_id_eq): Make the logic match the comments.  Add inline_depth
792         check.
793         (frame_id_inner): Handle inlined functions.
794         (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
795         (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
796         (get_prev_frame_1): Check for inline frames.  Split out frame
797         allocation to get_prev_frame_raw.
798         (get_prev_frame_raw): New function.
799         (get_prev_frame): Handle inline frames.
800         (get_frame_pc): Use frame_unwind_pc.
801         (get_frame_address_in_block): Skip inlined frames on both sides.
802         (pc_notcurrent): Delete.
803         (find_frame_sal): Rewrite to handle inline call sites.  Use
804         get_frame_address_in_block.
805         (deprecated_update_frame_pc_hack): Make static.
806         * frame.h: Update comments.
807         (struct frame_id): Add inline_depth.
808         (enum frame_type): Add INLINE_FRAME.
809         (frame_id_inlined_p, get_stack_frame_id): New prototypes.
810         * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
811         * infcmd.c (set_step_frame): New function.
812         (step_once): Use set_step_frame.  Handle inlined functions.
813         (until_next_command): Use set_step_frame.
814         (finish_backward), finish_forward): Use get_stack_frame_id.
815         (finish_command): Support inlined functions.
816         * inferior.h (set_step_info): New prototype.
817         * infrun.c (RESUME_ALL): Use minus_one_ptid.
818         (clear_proceed_status): Clear step_stack_frame_id.
819         (init_wait_for_inferior): Call clear_inline_frame_state.
820         (init_execution_control_state): Make static.
821         (set_step_info): New function.
822         (init_thread_stepping_state): Do not set the symtab or line here.
823         (stepped_in_from): New function.
824         (handle_inferior_event): Handle inlined functions.  Use set_step_info.
825         (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
826         (struct inferior_status): Add step_stack_frame_id.
827         (save_inferior_status, restore_inferior_status): Save and restore
828         step_stack_frame_id.
829         * inline-frame.c, inline-frame.h: New files.
830         * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
831         * regcache.c (regcache_write_pc): Call reinit_frame_cache.
832         * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
833         * stack.c (frame_show_address): New.
834         (print_frame_info, print_frame): Use it.
835         (find_frame_funname): Use get_frame_function.  Handle inlined blocks.
836         (frame_info): Mark inlined functions.
837         (backtrace_command_1): Use get_current_user_frame.
838         (print_frame_local_vars, print_frame_label_vars): Update comments.
839         (return_command): Refuse inlined functions.
840         * symtab.c (lookup_symbol_aux_local): Stop at inlined function
841         boundaries.
842         (find_function_start_sal): Avoid inlined functions.
843         (completion_list_add_fields): New function.
844         (default_make_symbol_completion_list): Use it.  Use block_static_block
845         and block_global_block.  Check for inlined functions.
846         (skip_prologue_using_sal): Avoid line number comparison across
847         inlining.
848         * symtab.h (struct symbol): Add is_inlined.
849         (SYMBOL_INLINED): New.
850         * target.c (target_resume): Call clear_inline_frame_state.
851         * valops.c (value_of_variable): Check block_inlined_p.
852
853 2009-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
854
855         * frame.c (frame_unwind_id): Renamed to ...
856         (frame_unwind_caller_id): ... this.  All callers updated.
857         (frame_pc_unwind): Renamed to ...
858         (frame_unwind_caller_pc): ... this.  All callers updated.
859         * frame.h: Document frame_unwind_caller_WHAT functions.
860         (frame_unwind_id): Renamed to ...
861         (frame_unwind_caller_id): ... this.
862         (frame_pc_unwind): Renamed to ...
863         (frame_unwind_caller_pc): ... this.
864         * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
865         * stack.c (parse_frame_specification_1): Do not rely on
866         frame_unwind_id.
867
868 2009-06-27  Michael Snyder  <msnyder@vmware.com>
869
870         * infrun.c (handle_inferior_event): Improve handling of
871         reverse-stepping into and over shared library functions.
872
873 2009-06-25  Karen Osmond  <karen.osmond@gmail.com>
874
875         * linespec.c (find_method): Add new not_found_ptr parameter to
876         bring in line with symtab_from_filename, decode_variable.
877         (decode_compound): Likewise.  Also propagate not_found_ptr to 
878         find_method.
879         (decode_line_1): Propagate not_found_ptr to decode_compound.
880         (cplusplus_error): Now throws NOT_FOUND_ERROR.
881
882 2009-06-25  Karen Osmond  <karen.osmond@gmail.com>
883
884         * MAINTAINERS (Write After Approval): Add self.
885
886 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
887
888         * valops.c (value_one): Reimplement broken decimal-float case.
889
890 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
891
892         * eval.c (evaluate_subexp_standard): Use expression architecture
893         instead of current_gdbarch.
894
895         * infrun.c (handle_inferior_event): Avoid unncessary reference
896         to current_gdbarch and get_current_frame ().
897
898 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
899
900         * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
901         (enum bptype): Add bp_longjmp_master.
902
903         * breakpoint.c (create_longjmp_master_breakpoint): New function.
904         (update_breakpoints_after_exec): Handle bp_longjmp_master
905         breakpoints.  Call create_longjmp_master_breakpoint.
906         (print_it_typical, bpstat_stop_status, bpstat_what,
907         print_one_breakpoint_location, allocate_bp_location, mention,
908         delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
909         (breakpoint_re_set): Call create_longjmp_master_breakpoint.
910         (create_longjmp_breakpoint): Delete.
911         (set_longjmp_breakpoint): Add THREAD argument.  Reimplement
912         to install momentary clones of bp_longjmp_master breakpoints.
913
914         * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
915
916 2009-06-23  Cary Coutant  <ccoutant@google.com>
917
918         * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
919         Set basic_block to 0 after a special opcode.
920
921 2009-06-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
922
923         Fix a regression by the mmap patch from 2009-06-16.
924         * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
925         calls before deleting the OBJFILE obstack.  Extend the comment.
926
927 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
928
929         * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
930         (get_java_object_header_size): Add GDBARCH parameter.
931         * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
932         Use it instead of current_gdbarch.
933         (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
934         get_java_object_header_size.
935         * jv-valprint.c (java_value_print): Likewise.
936
937 2009-06-23  Sami Wagiaalla  <swagiaal@redhat.com>
938
939         * dwarf2read.c (process_die): Handle import statements
940         (DW_TAG_imported_declaration, case DW_TAG_imported_module)
941         (read_import_statement): New.
942         (read_func_scope): Update using_directives to point to current context
943         (read_lexical_block_scope): Ditto.
944         * cp-support.h: Added prototype for cp_add_using.
945         * cp-namespace.c: Removed local context_stack.
946         (cp_initialize_namespace): Deleted.
947         (cp_finalize_namespace): Deleted.
948         (cp_add_using_directive): Use using_directives instead of using_list.
949         (cp_add_using): No longer static.
950         * buildsym.h: Created global using_direct variable.
951         Created using_direct variable in context_stack.
952         * buildsym.c (finish_block): Set using directives for the block under
953         construction.
954         (start_symtab): Removed call to cp_initialize_namespace().
955         (end_symtab): Removed call to cp_finalize_namespace().
956         (push_context): Save and reset using_directives.
957         * block.c (block_using): Return using directives for given
958         block instead of static block.
959
960 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
961
962         * target-descriptions.h (struct type): Do not declare.
963         (struct tdesc_type): Declare.
964         (tdesc_named_type): Change return type to struct tdesc_type *.
965         (tdesc_record_type): Remove.
966         (tdesc_create_vector): Add prototype.
967         (tdesc_create_union): Likewise.
968         (tdesc_add_field): Likewise.
969
970         * target-descriptions.c (struct tdesc_reg): Replace gdb_type
971         member by tdesc_type member.
972         (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
973         (struct tdesc_type, tdesc_type_p): Likewise.
974         (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
975         (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
976         (struct tdesc_arch_data): Replace registers member by arch_regs.
977
978         (tdesc_predefined_types): Change to array of pre-defined
979         struct tdesc_type structures.  Add "code_ptr" and "data_ptr".
980         (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
981         (tdesc_gdb_type): New function.
982
983         (target_find_description): Update for data structure changes.
984         (tdesc_data_cleanup): Likewise.
985         (tdesc_numbered_register): Likewise.
986         (tdesc_use_registers): Likewise.
987         (tdesc_create_reg): Likewise.
988         
989         (tdesc_find_arch_register): New function.
990         (tdesc_find_register): Use it.
991         (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
992         tdesc_type on demand; cache generated types in tdesc_arch_reg.
993
994         (tdesc_free_type): New function.
995         (tdesc_free_feature): Call it.
996
997         (tdesc_create_vector): New function.
998         (tdesc_create_union): Likewise.
999         (tdesc_add_field): Likewise.
1000         (tdesc_record_type): Remove.
1001
1002         (tdesc_type_id): Remove.
1003         (maint_print_c_tdesc_cmd): Update for data structure changes.  Update
1004         generated code to create tdesc_type structures instead of GDB types.
1005
1006         * xml-tdesc.c: Do not include "gdbtypes.h".
1007         (struct tdesc_parsing_data): Change type of current_union to
1008         struct tdesc_type *.
1009         (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
1010         (tdesc_start_union): Call tdesc_create_union.
1011         (tdesc_start_field): Call tdesc_add_field.
1012         (tdesc_start_vector): Call tdesc_create_vector.
1013         (tdesc_end_union): Remove.
1014         (feature_children): Remove reference to tdesc_end_union.
1015
1016         * features/arm-with-iwmmxt.c: Regenerate.
1017         * features/mips-linux.c: Regenerate.
1018         * features/mips64-linux.c: Regenerate.
1019         * features/rs6000/powerpc-32.c: Regenerate.
1020         * features/rs6000/powerpc-32l.c: Regenerate.
1021         * features/rs6000/powerpc-403.c: Regenerate.
1022         * features/rs6000/powerpc-403gc.c: Regenerate.
1023         * features/rs6000/powerpc-505.c: Regenerate.
1024         * features/rs6000/powerpc-601.c: Regenerate.
1025         * features/rs6000/powerpc-602.c: Regenerate.
1026         * features/rs6000/powerpc-603.c: Regenerate.
1027         * features/rs6000/powerpc-604.c: Regenerate.
1028         * features/rs6000/powerpc-64.c: Regenerate.
1029         * features/rs6000/powerpc-64l.c: Regenerate.
1030         * features/rs6000/powerpc-7400.c: Regenerate.
1031         * features/rs6000/powerpc-750.c: Regenerate.
1032         * features/rs6000/powerpc-860.c: Regenerate.
1033         * features/rs6000/powerpc-altivec32.c: Regenerate.
1034         * features/rs6000/powerpc-altivec32l.c: Regenerate.
1035         * features/rs6000/powerpc-altivec64.c: Regenerate.
1036         * features/rs6000/powerpc-altivec64l.c: Regenerate.
1037         * features/rs6000/powerpc-e500.c: Regenerate.
1038         * features/rs6000/powerpc-e500l.c: Regenerate.
1039         * features/rs6000/powerpc-isa205-32l.c: Regenerate.
1040         * features/rs6000/powerpc-isa205-64l.c: Regenerate.
1041         * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
1042         * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
1043         * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
1044         * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
1045         * features/rs6000/powerpc-vsx32.c: Regenerate.
1046         * features/rs6000/powerpc-vsx32l.c: Regenerate.
1047         * features/rs6000/powerpc-vsx64.c: Regenerate.
1048         * features/rs6000/powerpc-vsx64l.c: Regenerate.
1049         * features/rs6000/rs6000.c: Regenerate.
1050
1051 2009-06-23  Joel Brobecker  <brobecker@adacore.com>
1052
1053         * ada-lang.c (decode_packed_array): If the value is a pointer to
1054         an array, then use value_ind to dereference it, not ada_value_ind.
1055         (ada_template_to_fixed_record_type_1): Handle the case where a
1056         dynamic field is an aligner type.
1057         (to_fixed_array_type): Add handling for packed array types.
1058         (ada_get_base_type): Do not follow the XVS type if the type is
1059         an aligner type.
1060         (ada_evaluate_subexp): Split a few statements up for clarity
1061         and debuggability.
1062         <OP_FUNCALL>: Add handling of the case of a packed array that
1063         has already been fixed.
1064
1065 2009-06-23  Joel Brobecker  <brobecker@adacore.com>
1066
1067         * ada-lang.c (evaluate_subexp): Delete.  Use the version from eval.c.
1068         (evaluate_subexp_type): Reimplement using evaluate_subexp.
1069         * value.h (evaluate_subexp): Add declaration.
1070         * eval.c (evaluate_subexp): Make non-static.
1071         * objc-lang.c (print_object_command): Use evaluate_subexp.
1072
1073 2009-06-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1074
1075         Revert 2009-05-14 breakpoint commit (no longer needed).
1076         * breakpoint.h (breakpoint_re_set_objfile): Remove
1077         * breakpoint.c (breakpoint_re_set_objfile): Likewise
1078         (create_overlay_event_breakpoint): Remove objfile parameter,
1079         iterate over all objfiles.
1080         * objfiles.c (objfile_relocate): Update.
1081         * symfile.c (new_symfile_objfile): Likewise.    
1082         
1083 2009-06-23  Tom Tromey  <tromey@redhat.com>
1084
1085         PR gdb/10309:
1086         * c-lang.c (classify_type): Iterate over typedefs.
1087         * c-valprint.c (textual_element_type): Iterate over typedefs.
1088
1089 2009-06-22  Tristan Gingold  <gingold@adacore.com>
1090
1091         * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
1092         instead of "%p".
1093
1094 2009-06-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
1095
1096         PR gdb/9988:
1097         * buildsym.c (block_compar): New function.
1098         (end_symtab): Replace the bubble sort by a qsort based code.
1099
1100 2009-06-22  Sami Wagiaalla  <swagiaal@redhat.com>
1101
1102         * MAINTAINERS (Write After Approval): Add self.
1103
1104 2009-06-22  Ulrich Weigand  <uweigand@de.ibm.com>
1105
1106         * spu-tdep.c (spu_get_longjmp_target): New function.
1107         (spu_gdbarch_init): Install it.
1108
1109 2009-06-22  H.J. Lu  <hongjiu.lu@intel.com>
1110
1111         PR server/10306
1112         * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
1113
1114 2009-06-21  Michael Snyder  <msnyder@vmware.com>
1115
1116         * inferior.h: Update ancient comment.
1117
1118 2009-06-20  Aleksandar Ristovski  <aristovski@qnx.com>
1119             Pedro Alves  <pedro@codesourcery.com>
1120
1121         * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
1122         NULL pointer.
1123         (scan_dyntag): Skip if input bfd isn't elf flavoured.
1124         (locate_base): Call elf_locate_base even without an exec_bfd.
1125
1126 2009-06-19  Samuel Bronson  <naesten@gmail.com>
1127
1128         PR cli/9903:
1129         * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
1130         for prefix commands to avoid duplicates in the output.
1131
1132 2009-06-19  Samuel Bronson  <naesten@gmail.com>
1133
1134         PR cli/9903:
1135         * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
1136         printing.
1137
1138 2009-06-19  Jerome Guitton  <guitton@adacore.com>
1139
1140         * breakpoint.c (expand_line_sal_maybe): When explicit_line,
1141         skip prologue on each sals.
1142         (skip_prologue_sal): Return explicit_line and explicit_pc
1143         unmodified.
1144
1145 2009-06-19  Tristan Gingold  <gingold@adacore.com>
1146
1147         * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
1148         line.
1149
1150 2009-06-19  Tristan Gingold  <gingold@adacore.com>
1151         * machoread.c (macho_symtab_read): Adjust for bfd changes.
1152         * darwin-nat.h (struct darwin_exception_msg): New type to describe
1153         a mach exception.
1154         (struct private_thread_info): New type to describe the state of the
1155         thread.
1156         (DEF_VEC_I thread_t): Removed, replaced by ...
1157         (DEF_VEC_O darwin_thread_t): ... this new type.
1158         (struct darwin_inferior): Renamed to ...
1159         (struct private_inferior): ... this type.  Fields added.
1160         (darwin_not_port): Moved into the private inferior structure.
1161         * darwin-nat.c: Add includes, improve comments.
1162         Rewrite to handle multiple threads and processes.
1163         (darwin_resume_to): New function and protype.
1164         (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
1165         (darwin_kill_inferior): Add ops argument.
1166         (darwin_pid_to_str): New function.
1167         (darwin_thread_alive): Ditto.
1168         (darwin_inf, darwin_not_port): Removed.
1169         (darwin_inf_fake_stop): New variable.
1170         (msgin, msgout, msg_state, exc_msg): Removed.
1171         (mach_check_error): Use warning instead of error.
1172         (darwin_ptrace): Adjust debug level.
1173         (cmp_thread_t): Fix names (typo).
1174         (darwin_check_new_threads): Argument is now an inferior,
1175         adjust for new structures, add no change check, ignore dead ports,
1176         handle first thread case.
1177         (find_inferior_task_it): New function.
1178         (find_inferior_notify_it): Ditto.
1179         (darwin_find_inferior_by_task): Ditto.
1180         (darwin_find_inferior_by_notify): Ditto.
1181         (darwin_find_thread): Ditto.
1182         (darwin_suspend_inferior): Ditto.
1183         (darwin_resume_inferior): Ditto.
1184         (catch_exception_raise_state): Removed.
1185         (catch_exception_raise_state_identity): Removed.
1186         (darwin_suspend_inferior_it): New function.
1187         (darwin_resume_inferior_it): Ditto.
1188         (darwin_dump_message): New function, extracted from darwin_wait.
1189         (darwin_decode_exception_message): New function.
1190         (darwin_encode_reply): New function.
1191         (catch_exception_raise): Removed.
1192         (darwin_send_reply): New function, extracted from darwin_resume.
1193         (darwin_resume_thread): New function, extracted from darwin_resume.
1194         (struct resume_inferior_threads_param): New type.
1195         (darwin_resume_inferior_threads_it): New function.
1196         (darwin_resume_inferior_threads): New function.
1197         (darwin_suspend_inferior_threads): New function.
1198         (darwin_resume): Mostly rewritten to handle multiple threads and
1199         some corner cases.
1200         (darwin_decode_message): New function extracted from darwin_wait.
1201         (cancel_breakpoint): New function.
1202         (darwin_wait): Mostly rewritten.  Handle multiple threads.
1203         (darwin_mourn_inferior): Adjust for per process structures.
1204         (darwin_reply_to_all_pending_messages): New function.
1205         (darwin_stop_inferior): Adjust for per inferior structures.
1206         (darwin_attach_pid): Ditto.
1207         (darwin_init_thread_list): Ditto.
1208         (darwin_attach): Ditto.
1209         (darwin_detach): Ditto.
1210         (darwin_files_info): Now empty.
1211         (darwin_pid_to_str): Adjust returns string to match one expected by
1212         the testsuite.
1213         (darwin_read_write_inferior): Rename err variable to match other uses.
1214         Adjust debug message.  Handle submaps.
1215         (darwin_xfer_memory): Adjust for per inferior structures.
1216         (set_enable_mach_exceptions): Ditto.
1217         (darwin_pid_to_exec_file): New function.
1218         (darwin_get_ada_task_ptid): Ditto.
1219         (darwin_supports_multi_process): Ditto.
1220         (_initialize_darwin_inferior): Remove useless assertion, adjust for
1221         per inferior structures.  Add new target operations.
1222
1223 2009-06-18  Hui Zhu  <teawater@gmail.com>
1224             Michael Snyder  <msnyder@vmware.com>
1225
1226         * infrun.c (handle_inferior_event): Improve reverse stepping
1227         through function epilogue.
1228
1229         * infrun.c (handle_inferior_event): Reverse-next through
1230         trampoline.
1231
1232 2009-06-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
1233
1234         * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
1235         dwarf_frame_size.
1236
1237 2009-06-17  Tom Tromey  <tromey@redhat.com>
1238
1239         * dwarf2read.c (zlib_decompress_section): Use a cleanup.
1240
1241 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1242
1243         * gdbarch.sh (pointer_to_address): Change to type 'm'.
1244         (address_to_pointer): Likewise.
1245         * gdbarch.c, gdbarch.h: Regenerate.
1246
1247         * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
1248         (signed_pointer_to_address): Likewise.
1249         (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
1250         * findvar.c (unsigned_pointer_to_address): Likewise.
1251         (signed_pointer_to_address): Likewise.
1252         (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
1253
1254         * avr-tdep.c (avr_address_to_pointer): Likewise.
1255         (avr_pointer_to_address): Likewise.
1256         * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
1257         (iq2000_address_to_pointer): Likewise.
1258         * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
1259         (m32c_m16c_pointer_to_address): Likewise.
1260         * spu-tdep.c (spu_pointer_to_address): Likewise.
1261         * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
1262         (xstormy16_address_to_pointer): Likewise.
1263
1264 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1265
1266         * printcmd.c (print_scalar_formatted): Always truncate
1267         unsigned data types.
1268
1269         * cli-dump.c (struct callback_data): Change type of load_offset
1270         to CORE_ADDR.
1271         (restore_binary_file): Update type casts.
1272         (restore_command): Parse load_offset as address, not long.
1273
1274         * utils.c (string_to_core_addr): Do not sign-extend value.
1275         * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
1276         before comparing against requested frame address.
1277
1278 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1279
1280         * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
1281         * gdbarch.h, gdbarch.c: Regenerate.
1282
1283         * gcore.c (default_gcore_target): Make return value const.
1284         Call gdbarch_gcore_bfd_target if present.
1285         (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
1286
1287         * corelow.c (core_read_description): Call gdbarch_core_read_description
1288         on core_gdbarch instead of current_gdbarch.
1289
1290         * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
1291
1292 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1293
1294         * gdbtypes.c (create_string_type): Receive character type as argument.
1295         * gdbtypes.h (create_string_type): Add character type argument.
1296         * dwarf2read.c (read_tag_string_type): Pass character type to
1297         create_string_type.
1298
1299         * value.h (value_string): Add character type argument.
1300         * valops.c (value_string): Add character type argument.  Pass it to
1301         create_string_type.  Do not allocate space in inferior.
1302         * valarith.c (value_concat): Pass character type to value_string.
1303
1304         * value.h (value_typed_string): Rename to ...
1305         (value_cstring): ... this.
1306         * valops.c (value_typed_string): Rename to ...
1307         (value_cstring): ... this.
1308         * c-lang.c (evaluate_subexp_c): Update.
1309
1310         * python/python-value.c (builtin_type_pychar): New define.
1311         (convert_value_from_python): Call value_cstring instead
1312         of value_from_string.
1313         * value.c (value_from_string): Remove.
1314         * value.h (value_from_string): Remove.
1315
1316         * eval.c (evaluate_subexp_standard): Pass character type to
1317         value_string.  Pass expression architecture to value_nsstring
1318         and lookup_child_selector.
1319         * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
1320         (lookup_child_selector): Likewise.
1321         (value_nsstring): Likewise.
1322         * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
1323         Pass character type to value_string..
1324         (lookup_child_selector): Likewise.
1325         (value_nsstring): Add GDBARCH parameter, use it instead of
1326         objfile architecture.  Pass architecture to lookup_objc_class
1327         and lookup_child_selector. Pass character type to value_string.
1328         (end_msglist): Pass architecture to lookup_objc_class.
1329         * objc-exp.y: Pass architecture to lookup_objc_class.
1330
1331 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1332
1333         * gdbtypes.h (struct language_defn): Add forward declaration.
1334         (lookup_typename): Add LANGUAGE and GDBARCH parameters.
1335         (lookup_unsigned_typename): Likewise.
1336         (lookup_signed_typename): Likewise.
1337         * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
1338         Use them instead of current_language and current_gdbarch.
1339         (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
1340         Pass them to lookup_typename.
1341         (lookup_signed_typename): Likewise.
1342
1343         * c-exp.y: Pass parse_language and parse_gdbarch to
1344         lookup_unsigned_typename and lookup_signed_typename.
1345         * objc-exp.y: Likewise.
1346         * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
1347
1348         * c-lang.c (evaluate_subexp_c): Pass expression language and
1349         gdbarch to lookup_typename.
1350         * printcmd.c (printf_command): Pass current language and
1351         gdbarch to lookup_typename.
1352         * python/python-type.c (typy_lookup_typename): Likewise.
1353         Include "language.h".
1354
1355 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1356
1357         * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
1358         Use it instead of current_gdbarch.  Pass architecture to
1359         sparc32_gregset_supplies_p.
1360         (sparc64_fpregset_supplies_p): Add GDBARCH parameter.  Use it instead
1361         of current_gdbarch.  Pass architecture to sparc32_fpregset_supplies_p.
1362         * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
1363         sparc64nbsd_fpregset_supplies_p): Likewise.
1364         * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
1365         Add GDBARCH parameter.
1366         (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
1367         (sparc_fetch_inferior_registers): Pass regcache architecture to
1368         sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
1369         (sparc_store_inferior_registers): Likewise.
1370         * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
1371         Add GDBARCH parameter.
1372         (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
1373
1374 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1375
1376         * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
1377         of current_gdbarch.
1378         * aix-thread.c (pd_enable): Likewise.
1379         * amd64-linux-nat.c (ps_get_thread_area): Likewise.
1380         * bsd-uthread.c (bsd_uthread_activate): Likewise.
1381         * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
1382         * linux-thread-db.c (enable_thread_event): Likewise.
1383         * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
1384         * nto-procfs.c (procfs_open): Likewise.
1385         * procfs.c (invalidate_cache, procfs_insert_watchpoint,
1386         info_proc_mappings, info_mappings_callback): Likewise.
1387         * record.c (record_open): Likewise.
1388         * rs6000-nat.c (ARCH64): Likewise.
1389         * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
1390         (darwin_bfd_open): Likewise.
1391         * memattr.c (mem_info_command): Likewise.
1392
1393         * windows-nat.c (win32_resume): Use current regcache architecture
1394         instead of current_gdbarch.
1395
1396         * dbug-rom.c (dbug_regname): Remove check against number of
1397         registers in current_gdbarch.
1398         * solib-pa64.c (read_dynamic_info): Remove unused variable.
1399
1400 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1401
1402         * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
1403         use it instead of current_gdbarch.
1404         * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
1405         * arm-tdep.c (arm_skip_prologue): Pass architecture to
1406         deprecated_pc_in_call_dummy.
1407
1408         * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
1409         Use it instead of current_gdbarch.
1410         * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
1411         * breakpoint.c (expand_line_sal_maybe): Pass architecture to
1412         skip_prologue_using_sal.
1413         * arm-tdep.c (skip_prologue_using_sal): Likewise.
1414         * lm32-tdep.c (lm32_skip_prologue): Likewise.
1415         * m32-tdep.c (m32c_skip_prologue): Likewise.
1416         * mips-tdep.c (mips_skip_prologue): Likewise.
1417         * moxie-tdep.c (moxie_skip_prologue): Likewise.
1418         * mt-tdep.c (mt_frame_unwind_cache): Likewise.
1419         * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
1420         * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
1421         it to skip_prologue_using_sal.  Update call sites ...
1422         (frv_skip_prologue, frv_frame_unwind_cache): ... here.
1423
1424         * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
1425         (check_for_saved): Use it instead of current_gdbarch.
1426         (mn10300_analyze_prologue): Set it.
1427
1428         * value.c (using_struct_return): Add GDBARCH parameter.  Use it
1429         instead of current_gdbarch.
1430         * value.h (using_struct_return): Add GDBARCH parameter.
1431         * eval.c (evaluate_subexp_standard): Pass architecture to
1432         using_struct_return.
1433         * infcall.c (call_function_by_hand): Likewise.
1434         * stack.c (return_command): Likewise.
1435         * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
1436
1437         * symtab.c (in_prologue): Add GDBARCH parameter.  Use it instead of
1438         current_gdbarch.
1439         * symtab.h (in_prologue): Add GDBARCH parameter.
1440         * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
1441
1442         * eval.c (evaluate_subexp_standard): Use expression architecture
1443         instead of current_gdbarch.
1444
1445         * c-lang.c (evaluate_subexp_c): Use expression architecture and
1446         language instead of current_gdbarch and current_language.
1447
1448         * printcmd.c (do_one_display): Use expression architecture instead
1449         of current_gdbarch.
1450
1451         * infcmd.c (print_return_value): Use architecture of stop_regcache
1452         instead of current_gdbarch.
1453         (print_vector_info, print_float_info): Remove GDBARCH argument,
1454         use frame architecture instead.
1455         (vector_info, float_info): Update calls.
1456
1457         * objc-lang.c (objc_skip_trampoline): Use frame architecture
1458         instead of current_gdbarch.
1459
1460         * parse.c (write_dollar_variable): Use parse architecture instead
1461         of current_gdbarch.
1462
1463         * source.c (line_info): Use objfile architecture instead of
1464         current_gdbarch.
1465
1466         * symtab.c (find_function_start_sal): Use gdbarch instead of
1467         current_gdbarch.
1468         (print_msymbol_info): Use objfile architecture instead of
1469         current_gdbarch.
1470
1471         * valops.c (value_assign): Use frame architecture instead of
1472         current_gdbarch.
1473
1474 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1475
1476         * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
1477
1478         * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
1479         calling record_line.
1480         (enter_linenos): Likewise.
1481         * dbxread.c (process_one_symbol): Likewise.
1482         * dwarf2read.c (dwarf_decode_lines): Likewise.
1483         * mdebugread.c (psymtab_to_symtab_1): Likewise.
1484         * xcoffread.c (enter_line_range): Likewise.
1485
1486 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1487
1488         * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
1489         architecture instead of current_gdbarch.
1490         (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
1491         (gen_expr): Pass expression to get_struct_ref.
1492
1493         * symtab.h (struct symbol_ops): Add GDBARCH parameter to
1494         tracepoint_var_ref callback.
1495         * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
1496         symbol operation callback.
1497         * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
1498         Use it instead of current_gdbarch.
1499         (locexpr_tracepoint_var_ref): Add GDBARCH parameter.  Pass it to
1500         dwarf2_tracepoint_var_ref.
1501         (loclist_tracepoint_var_ref): Likewise.
1502
1503 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1504
1505         * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
1506         Use it instead of address bits of current_gdbarch.
1507         * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
1508         * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
1509         make_pv_area.
1510         (arm_scan_prologue): Likewise.
1511         * m32c-tdep.c (m32c_analyze_prologue): Likewise.
1512         * mep-tdep.c (mep_analyze_prologue): Likewise.
1513         * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
1514         * s390-tdep.c (s390_analyze_prologue): Likewise.
1515
1516 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1517
1518         * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
1519         frame architecture instead of current_gdbarch.
1520         (mi_cmd_data_list_changed_registers): Likewise.
1521         (mi_cmd_data_list_register_values): Likewise.  Pass selected
1522         frame to get_register.
1523         (get_register): Add FRAME argument, use it as frame to retrieve
1524         registers from (instead of selected frame).  Use frame architecture
1525         instead of current_gdbarch.
1526         (mi_cmd_data_write_register_values): Use current regcache
1527         architecture instead of current_gdbarch.
1528
1529 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1530
1531         * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
1532         use frame architecture instead.  Replace current_gdbarch uses.
1533         (tui_show_registers): Update call.
1534         (tui_get_register): Remove GDBARCH parameter; use frame architecture
1535         instead.
1536         (tui_show_register_group): Update call.
1537         (tui_check_register_values): Likewise.
1538         (tui_register_format): Remove GDBARCH parameter; use frame
1539         architecture instead.  Replace current_gdbarch uses.
1540         (tui_get_register): Update call.
1541
1542 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1543
1544         * gdbarch.sh (construct_inferior_arguments): Remove.
1545         * gdbarch.c, gdbarch.h: Regenerate.
1546         * infcmd.c (get_inferior_args): Call construct_inferior_arguments
1547         directly instead of gdbarch_construct_inferior_arguments.
1548         (construct_inferior_arguments): Remove GDBARCH argument.
1549         * inferior.h (construct_inferior_arguments): Likewise.
1550
1551 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1552
1553         * symfile.c (section_is_mapped): Use objfile architecture instead
1554         of current_gdbarch.
1555         (TARGET_LONG_BYTES): Remove.
1556         (read_target_long_array): Add SIZE argument.  Use it instead of
1557         TARGET_LONG_BYTES.
1558         (simple_read_overlay_table): Retrieve long size from objfile
1559         architecture; pass it to read_target_long_array.
1560         (simple_read_overlay_region_table): Likewise.
1561         (simple_overlay_update_1): Likewise.
1562
1563 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1564
1565         * infrun.c (cleanup_displaced_step_closure): Remove.
1566         (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
1567         (displaced_step_prepare): Use displaced_step_clear_cleanup instead
1568         of cleanup_displaced_step_closure.
1569         (handle_inferior_event, keep_going): Use thread architecture instead
1570         of current_gdbarch.
1571
1572 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
1573
1574         * infrun.c (handle_inferior_event): Use current frame architecture
1575         or thread architecture instead of current_gdbarch.  Pass to
1576         handle_step_into_function and handle_step_into_function_backward.
1577         (handle_step_into_function): Add GDBARCH parameter.  Use it instead
1578         of current_gdbarch.
1579         (handle_step_into_function_backward): Likewise.
1580         (insert_step_resume_breakpoint_at_frame): Use frame architecture
1581         instead of current_gdbarch.
1582         (insert_step_resume_breakpoint_at_caller): Likewise.
1583
1584 2009-06-17  Pierre Muller  <muller@ics.u-strasbg.fr>
1585         Pedro Alves  <pedro@codesourcery.com>
1586         
1587         * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
1588         is pushed for watchpoint promotion to hardware watchpoint.
1589
1590 2009-06-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
1591
1592         * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
1593         (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
1594         (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
1595         (dwarf_ranges_section, dwarf_frame_section)
1596         (dwarf_eh_frame_section): Removed.
1597         (dwarf2_resize_section): Likewise.
1598         (dwarf2_read_section): Now static, use bfd_mmap() if possible.
1599         (dwarf2_get_section_info): New function.
1600         (munmap_section_buffer): Likewise.
1601         (dwarf2_per_objfile_cleanup): Likewise.
1602         (section_is_p): Signature change.
1603         * dwarf2-frame.c (dwarf2_build_frame_info): Use
1604         dwarf2_get_section_info instead of dwarf2_read_section.
1605         
1606 2009-06-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
1607
1608         * solib.c (symbol_add_stub): New FLAGS parameter.
1609         (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
1610         directly.
1611         (solib_add): Defer breakpoint_re_set until after all solibs.
1612         * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
1613         * rs6000-nat.c (objfile_symbol_add): Adjust.
1614         * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
1615         (new_symfile_objfile): Likewise.
1616         (symbol_file_add_with_addrs_or_offsets): Likewise.
1617         (symbol_file_add_from_bfd): Likewise.
1618         (symbol_file_add): Likewise.
1619         * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
1620         * symfile-mem.c (symbol_file_add_from_memory): Adjust.
1621         * windows-nat.c (safe_symbol_file_add_stub): Adjust.
1622         * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
1623         
1624 2009-06-16  Keith Seitz  <keiths@redhat.com>
1625
1626         * linespec.c (collect_methods): Delete.
1627         (add_matching_methods): Reove destructor special case.
1628         (find_method): Call find_methods directly instead of
1629         collect_methods.
1630         * valops.c (value_struct_elt): Remove destructor
1631         special cases.
1632         (check_field): Likewise.
1633         (value_struct_elt_for_reference): Likewise.
1634         (destructor_name_p): Remove misleading comment about dtors
1635         being "special cases". 
1636         * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
1637         * gdbtypes.c (get_destructor_fn_field): Likewise. 
1638
1639 2009-06-16  Pedro Alves  <pedro@codesourcery.com>
1640
1641         * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
1642         TARGET_OJECT_MEMORY reads to the topmost target, not to the
1643         flattened current_target.
1644
1645 2009-06-16  Tristan Gingold  <gingold@adacore.com>
1646
1647         * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
1648         call_length field.
1649         (avr_register_name): Add const to register_names.
1650         (avr_scan_arg_moves): Move inside avr_scan_prologue.
1651         (avr_scan_prologue): Add pc_end argument.
1652         Only read prologue bytes that can be read.
1653         Limit the scan to the known prologue length.
1654         Makes pattern variables static and const.
1655         Fix indentation.
1656         (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
1657         Fix indentation.
1658         (avr_breakpoint_from_pc): Constify avr_break_insn.
1659         (avr_extract_return_value): Fix function comment.
1660         (avr_frame_unwind_cache): Fix GNU style violations.
1661         Pass current_pc argument to avr_scan_prologue to stop prologue
1662         analysis to the current pc.  This fixes the bug with the 'next'
1663         command.
1664         Correctly set the SP register of the previous frame (use call_length).
1665         (avr_frame_prev_register): Fix indentation.
1666         Correctly read PC from the stack on avr6 architectures.
1667         (avr_push_dummy_call): Fix indentation.
1668         (avr_gdbarch_init): Set call_length according to the architecture.
1669
1670 2009-06-15  Phil Muldoon  <pmuldoon@redhat.com>
1671
1672         * infcall.c (show_unwind_on_terminating_exception_p): New
1673         function.
1674         (call_function_by_hand): Create breakpoint and clean-up call for
1675         std::terminate.breakpoint. Add unwind_on_terminating_exception_p
1676         gate. Pop frame on breakpoint hit.
1677         (_initialize_infcall): Add add_setshow_boolean_cmd for
1678         unwind-on-terminating-exception.
1679
1680 2009-06-12  Kevin Buettner  <kevinb@redhat.com>
1681
1682         * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
1683         `has_section_at_zero' flag from stripped objfile to separate,
1684         debug info only, objfile.
1685
1686 2009-06-12  Pedro Alves  <pedro@codesourcery.com>
1687
1688         * exec.h (section_table_xfer_memory_partial): Improve description,
1689         mention SECTION_NAME.
1690         * exec.c (section_table_xfer_memory_partial): Remove stale
1691         description.
1692
1693 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
1694
1695         * nto-tdep.h (nto_generic_supply_gpregset)
1696         (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
1697         * nto-tdep.c (nto_generic_supply_gpregset)
1698         (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
1699
1700 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
1701
1702         * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
1703         (i386nto_sigcontext_addr): Change the way context address is calculated.
1704         (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
1705         sc_sp_offset and set sc_reg_offset and sc_num_regs.
1706
1707 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
1708
1709         * i386-nto-tdep.c (i386_nto_target): Remove definition.
1710         (init_i386nto_ops): Use macros to set fields to global
1711         current_nto_target directly.
1712         (i386nto_init_abi): Remove unused nto_set_target call.
1713         * nto-tdep.h (nto_set_target): Remove unused declaration.
1714         * nto-tdep.c (nto_set_target): Remove unused function.
1715
1716 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
1717
1718         * breakpoint.c (break_command_really): Rename local variable
1719         breakpoint_chain to bkpt_chain.
1720
1721 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
1722
1723         Add support for XMM registers.
1724         * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
1725         (i386nto_register_area): Correctly calculate offsets and sizes for
1726         all supported registers.
1727
1728 2009-06-11  Tom Tromey  <tromey@redhat.com>
1729
1730         * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
1731         'static' from local variable definitions.
1732
1733 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
1734
1735         * symtab.c (append_expanded_sal): Remove unused local variables.
1736
1737 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
1738
1739         * infrun.c (sched_multi): New global.
1740         (resume): If sched_multi is set, resume only threads of the
1741         current inferior.
1742         (prepare_to_proceed): Don't switch over to wait_ptid if we're
1743         resuming a different inferior, and sched_multi is off.
1744         (show_schedule_multiple): New.
1745         (_initialize_infrun): Register new "set schedule-multiple" command.
1746         * inferior.h (sched_multi): Declare.
1747         * NEWS: Mention new "schedule-multiple" setting.
1748
1749 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
1750
1751         * varobj.c (varobj_create): Properly restore the selected frame.
1752
1753 2009-06-05  Tom Tromey  <tromey@redhat.com>
1754
1755         * inferior.c (print_inferior): Make a table, not a list.  Emit
1756         table headers.
1757
1758 2009-06-10  Jonas Maebe  <jonas.maebe@elis.ugent.be>
1759
1760         * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
1761         darwin_wait (blocking wait).
1762         (darwin_kill_inferior): Likewise.
1763
1764 2009-06-10  Pedro Alves  <pedro@codesourcery.com>
1765
1766         * infrun.c (handle_inferior_event): Update comment around trying
1767         to revert back to a stepping thread that has exited.
1768
1769 2009-06-10  Cary Coutant  <ccoutant@google.com>
1770
1771         * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
1772         DW_LNE_set_discriminator.
1773
1774 2009-06-10  Pierre Muller  <muller@ics.u-strasbg.fr>
1775
1776         * breakpoint.c: ARI fixes.
1777         (create_overlay_event_breakpoint): Avoid assignment inside if statement.
1778         (print_one_breakpoint_location): Likewise.
1779         (create_longjmp_breakpoint): Likewise.
1780         (tracepoint_save_command): Likewise
1781         (bpstat_find_step_resume_breakpoint): No operator at end of line.
1782         (bpstat_stop_status): Likewise.
1783         (describe_other_breakpoints): Likewise.
1784         (hw_watchpoint_used_count): Likewise.
1785         (expand_line_sal_maybe): Likewise.
1786         (break_command_really): Likewise.
1787         (delete_command): Likewise.
1788         (do_enable_breakpoint): Likewise.
1789         (delete_trace_command): Likewise.
1790         (catch_exception_command_1): Likewise and remove extra parentheses.
1791
1792 2009-06-08  Pierre Muller  <muller@ics.u-strasbg.fr>
1793
1794         * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
1795         "ubreak" command that does not exist.
1796
1797 2009-06-08  Pierre Muller  <muller@ics.u-strasbg.fr>
1798
1799         * cli/cli-decode.c (add_alias_cmd): Correct assertion.
1800
1801 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
1802
1803         * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
1804
1805 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
1806
1807         * procfs.h: New.
1808         * proc-utils.h (procfs_first_available): Don't declare here.
1809         * sol-thread.c: Include procfs.h instead of sys/procfs.h and
1810         proc-utils.h.
1811         * procfs.c: Include procfs.h.
1812         (procfs_target): Make it public.  Don't register
1813         procfs_can_use_hw_breakpoint here.
1814         (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
1815         defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
1816         (procfs_can_use_hw_breakpoint): Remove check of
1817         TARGET_HAS_HARDWARE_WATCHPOINTS.
1818         (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
1819         here.
1820         (_initialize_procfs): Don't add the procfs target here.
1821
1822         * i386-sol2-nat.c: Include target.h and procfs.h.
1823         (_initialize_amd64_sol2_nat): Install the procfs target here,
1824         customized with watchpoints support.
1825         * irix5-nat.c: Include target.h.
1826         (_initialize_core_irix5): Rename to ...
1827         (_initialize_irix5_nat): ... this.  Install the procfs target
1828         here, customized with watchpoints support.
1829         * alpha-nat.c: Include procfs.h.
1830         (_initialize_core_alpha): Rename to...
1831         (_initialize_alpha_nat): ... this.  Install the procfs target
1832         here, customized with watchpoints support.
1833         * sparc-sol2-nat.c: Include target.h and procfs.h.
1834         (_initialize_sparc_sol2_nat): New.
1835
1836         * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
1837         * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
1838         * config/mips/irix5.mh (NAT_FILE): Delete.
1839         * config/mips/irix6.mh (NAT_FILE): Delete.
1840         * config/mips/nm-irix5.h: Delete.
1841
1842 20009-06-07  Pedro  Alves  <pedro@codesourcery.com>
1843
1844         * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
1845         to enum target_object.  Cleanup comments.
1846         * auxv.h: Include "target.h".  Cleanup comments to not mention
1847         NATIVE_XFER_AUXV anymore.
1848
1849 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
1850
1851         * inferior.h (procfs_first_available): Move declaration to...
1852         * proc-utils.h: ... here.
1853         * sol-thread.c: Include procfs.h and proc-utils.h.
1854
1855 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
1856
1857         * inferior.h (proc_iterate_over_mappings): Delete declaration.
1858         * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
1859         * procfs.c (proc_iterate_over_mappings): Delete.
1860
1861 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
1862
1863         * target.h (struct target_ops): Make to_has_all_memory,
1864         to_has_memory, to_has_stack, to_has_registers and to_has_execution
1865         methods instead of variables.
1866         (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
1867         (target_has_registers_1, target_has_execution_1): Declare
1868         functions.
1869         (target_has_all_memory): Rewrite to call target_has_all_memory_1.
1870         (target_has_memory): Rewrite to call target_has_memory_1.
1871         (target_has_stack): Rewrite to call target_has_all_stack_1.
1872         (target_has_registers): Rewrite to call target_has_registers_1.
1873         (target_has_execution): Rewrite to call target_has_execution_1.
1874         (default_child_has_all_memory, default_child_has_memory)
1875         (default_child_has_stack, default_child_has_registers)
1876         (default_child_has_execution): Declare.
1877         (target_mark_running, target_mark_exited): Delete declarations.
1878         * target.c (default_child_has_all_memory,
1879         default_child_has_memory, default_child_has_stack,
1880         default_child_has_registers, default_child_has_execution): New.
1881         (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
1882         target_has_registers_1, target_has_execution_1): New.
1883         (add_target): Default the to_has_all_memory, to_has_all_memory,
1884         to_has_memory, to_has_stack, to_has_registers and to_has_execution
1885         callbacks to return 0.
1886         (update_current_target): Do not inherit to_has_all_memory,
1887         to_has_memory, to_has_stack, to_has_registers or to_has_execution.
1888         (target_mark_running, target_mark_exited): Delete.
1889         (memory_xfer_partial): Adjust.
1890         (target_read_memory, target_write_memory, target_search_memory):
1891         Dispatch to the the top-most target, not the flattened
1892         current_target.
1893         (target_info): Adjust.
1894         (init_dummy_target): Install return_zero as callback for
1895         to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
1896         to_has_execution.
1897         (set_maintenance_target_async_permitted): Use have_live_inferiors
1898         instead of target_has_execution.
1899         * target-memory.c (target_write_memory_blocks): Dispatch memory
1900         writes to the the top-most target, not the flattened
1901         current_target.
1902
1903         * breakpoint.c (insert_breakpoints): Don't check for
1904         target_has_execution here.
1905         (update_global_location_list): Check if there are live inferiors
1906         to debug instead of target_has_execution.
1907         * infcmd.c (kill_command, detach_command): Check if there are
1908         inferiors instead of target_has_execution.
1909         * inferior.h (have_live_inferiors): Declare.
1910         * inferior.c (have_live_inferiors): New.
1911         * infrun.c (normal_stop): Don't check for target_has_execution to
1912         finish the thread states.
1913         * thread.c (is_thread_state, is_stopped, is_exited, is_running)
1914         (any_running, is_executing): Remove checks for
1915         target_has_execution.
1916         * top.c (kill_or_detach): Don't try to kill core inferiors.
1917         (quit_target): Don't check for target_has_execution.
1918
1919         * corelow.c (core_has_memory, core_has_stack, core_has_registers):
1920         New.
1921         (init_core_ops): Install core_has_memory, core_has_stack and
1922         core_has_registers.
1923         * exec.c (exec_has_memory): New.
1924         (init_exec_ops): Install exec_has_memory.
1925         * remote.c (remote_add_inferior): Don't call target_mark_running.
1926         (remote_start_remote): Don't call target_mark_exited or call
1927         target_mark_running.
1928         (remote_open_1): Use have_inferiors instead of
1929         target_has_execution.  Don't use target_mark_exited.
1930         (init_remote_ops): Install deafult_child_has_all_memory,
1931         default_child_has_memory, default_child_has_stack,
1932         default_child_has_registers, default_child_has_execution.
1933         * bsd-kvm.c (bsd_kvm_return_one): New.
1934         (bsd_kvm_add_target): Register bsd_kvm_return_one as
1935         to_has_memory, to_has_stack and to_has_registers callbacks.
1936         * remote-m32r-sdi.c (m32r_return_one): New.
1937         (init_m32r_ops): Register it.
1938         * inf-child.c (inf_child_target): Adjust to register
1939         default_child_has_all_memory, default_child_has_memory,
1940         default_child_has_stack, default_child_has_registers,
1941         default_child_has_execution callbacks.
1942         * gnu-nat.c (init_gnu_ops): Likewise.
1943         * go32-nat.c (init_go32_ops): Likewise.
1944         * hpux-thread.c (init_hpux_thread_ops): Likewise.
1945         * monitor.c (init_base_monitor_ops): Likewise.
1946         * nto-procfs.c (init_procfs_ops): Likewise.
1947         * remote-mips.c (_initialize_remote_mips): Likewise.
1948         * windows-nat.c (init_windows_ops): Likewise.
1949         * remote-sim.c (gdbsim_create_inferior): Don't use
1950         target_mark_running or target_mark_exited.
1951         (gdbsim_mourn_inferior): Don't call target_mark_exited.
1952         (init_gdbsim_ops): Adjust to register
1953         default_child_has_all_memory, default_child_has_memory,
1954         default_child_has_stack, default_child_has_registers,
1955         default_child_has_execution callbacks.
1956
1957         * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
1958         there's no inferior selected, defer to a lower stratum.
1959
1960 2009-06-05  Tom Tromey  <tromey@redhat.com>
1961
1962         * varobj.c (update_dynamic_varobj_children): Wrap error text in
1963         _().
1964         (install_visualizer): Likewise.
1965         (varobj_set_visualizer): Likewise.
1966
1967 2009-06-05  Marc Khouzam  <marc.khouzam@ericsson.com>
1968
1969         * mi/mi-main.c (mi_cmd_exec_continue)
1970         (mi_cmd_exec_interrupt): Adjust parsing of thread group
1971         ids to current reality, where they don't have any 'p' prefix.
1972
1973 2009-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
1974
1975         * corelow.c (core_open): Check for core_gdbarch before calling
1976         gdbarch_target_signal_from_host.
1977
1978 2009-06-05  Tom Tromey  <tromey@redhat.com>
1979
1980         * c-exp.y (parse_number): Don't use K&R definition.
1981         (yylex): Likewise.
1982         (yyerror): Likewise.
1983
1984 2009-06-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
1985
1986         * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
1987
1988 2009-06-04  Ulrich Weigand  <uweigand@de.ibm.com>
1989
1990         * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
1991         * ax-gdb.c (gen_var_ref): Likewise.
1992         * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
1993         * printcmd.c (address_info): Likewise.
1994         * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
1995         * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
1996         * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
1997         * dwarf2loc.h: Likewise.
1998         * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
1999
2000         * symtab.h: (struct symbol_register_ops): New struct definition.
2001         (struct symbol): Make "ops" member a union of symbol_computed_ops and
2002         symbol_register_ops callback pointers.
2003         (SYMBOL_REGISTER_OPS): New macro.
2004         * tracepoint.c: Include "objfiles.h".
2005         (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
2006         callback to retrieve register numbers.
2007         * ax-gdb.c (gen_var_ref): Likewise.
2008         * findvar.c (read_var_value): Likewise.
2009         * printcmd.c (address_info): Likewise.
2010
2011         * coffread.c (coff_reg_to_regnum): New function.
2012         (coff_register_funcs): New static variable.
2013         (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
2014         Install SYMBOL_REGISTER_OPS callbacks.
2015         * mdebugread.c (mdebug_reg_to_regnum): New function.
2016         (mdebug_register_funcs): New static variable.
2017         (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
2018         Install SYMBOL_REGISTER_OPS callbacks.
2019         * stabsread.c (stab_reg_to_regnum): New function.
2020         (stab_register_funcs): New static variable.
2021         (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
2022         Install SYMBOL_REGISTER_OPS callbacks.
2023
2024 2009-06-03  Doug Evans  <dje@google.com>
2025
2026         * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
2027         after discarding its contents.
2028
2029 2009-06-03  Pedro Alves  <pedro@codesourcery.com>
2030
2031         * target.c: Include "exec.h".
2032         (update_current_target): Don't inherit to_sections or
2033         to_sections_end.
2034         (target_get_section_table): New.
2035         (target_section_by_addr): Fetch the section table from the passed
2036         in target.
2037         (memory_xfer_partial): Handle unmapped overlay sections before
2038         anything else.  Get the overlay mapped address here.  Adjust to
2039         use section_table_xfer_memory_partial.
2040         (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
2041         instead of TARGET_OBJECT_MEMORY.
2042         (target_resize_to_sections): Delete.
2043         (remove_target_sections): Adjust to remove target sections from
2044         `current_target_sections', and use resize_section_table.
2045         * target.h (struct target_ops) <to_sections, to_sections_end>:
2046         Remove fields.
2047         <to_get_section_table>: New method.
2048         (xfer_memory, print_section_info): Delete declarations.
2049         (struct target_section_table): New type.
2050         (target_get_section_table): Declare.
2051         (target_resize_to_sections): Delete declaration.
2052         (remove_target_sections): Delete declaration.
2053         * bfd-target.c (target_bfd_xfer_partial): Get the section table
2054         from to_data.
2055         (target_bfd_get_section_table): New.
2056         (target_bfd_xclose): Adjust.
2057         (target_bfd_reopen): Store the section table in the to_data field.
2058         * corelow.c (core_data): New.
2059         (core_close): Adjust to release core_data and its sections.
2060         (core_open): Allocate core_data, and build its target sections
2061         table.
2062         (deprecated_core_resize_section_table): New.
2063         (core_files_info): Pass core_data to print_section_info.
2064         (core_xfer_partial): Adjust to use
2065         section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
2066         (init_core_ops): Do not install a deprecated_xfer_memory callback
2067         anymore.
2068         * solib.c (update_solib_list): Add the shared library sections
2069         to the current target sections table.
2070         * exec.c (current_target_sections_1): New global.
2071         (current_target_sections): New global.
2072         (exec_close_1): New function, refactored from exec_close.  Remove
2073         the exec_bfd's sections from the current target sections table.
2074         Adjust to not use to_sections.
2075         (exec_close): Remove all target sections.  Call exec_close_1.
2076         (exec_file_clear): Use exec_close_1 instead of unpushing the
2077         target.
2078         (exec_file_attach): Likewise.  Adjust to not use to_sections.  Add
2079         exec_bfd's sections to the current target sections table.  Don't
2080         push the exec_ops target here.
2081         (resize_section_table): New.
2082         (add_target_sections): New.
2083         (remove_target_sections): Moved here.
2084         (section_table_xfer_memory): Adjust to implement the xfer_partial
2085         interface, and rename to...
2086         (section_table_xfer_memory_partial): ... this, replacing the
2087         current function of that same name.
2088         (exec_get_section_table): New.
2089         (exec_xfer_partial): New.
2090         (xfer_memory): Delete.
2091         (print_section_info): Replace the target_ops parameter by a
2092         target_section_table parameter.
2093         (exec_files_info, set_section_command, exec_set_section_address):
2094         Adjust to use the current sections table.
2095         (init_exec_ops): Do not register a deprecated_xfer_memory
2096         callback.  Register to_xfer_partial and to_get_section_table
2097         callbacks.
2098         * infrun.c (handle_inferior_event): Update comments around
2099         solib_add.
2100         * rs6000-nat.c (xcoff_relocate_core): Adjust to use
2101         deprecated_core_resize_section_table.
2102         * exec.h (resize_section_table): Declare.
2103         (section_table_xfer_memory_partial): Add const char * argument.
2104         (remove_target_sections): Declare here.
2105         (add_target_sections): Declare.
2106         (print_section_info): Declare here.
2107         * gdbcore.h (deprecated_core_resize_section_table): Declare.
2108
2109 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
2110
2111         * value.h (struct internalvar): Remove.
2112         (get_internalvar_integer): Add prototype.
2113         (set_internalvar_integer): Add prototype.
2114         (clear_internalvar): Add prototype.
2115
2116         * value.c (struct internalvar): Move here.  Add type member.  Remove
2117         endian member.  Add union_internalvar member instead of value member.
2118         (init_if_undefined_command): Use intvar->type.
2119         (create_internalvar): Do not initialize value/endian, but type.
2120         (create_internalvar_type_lazy): Call create_internalvar.
2121         (value_of_internalvar): Handle host-side internalvar contents.
2122         (set_internalvar_component): Likewise.
2123         (set_internalvar): Likewise.
2124         (get_internalvar_integer): New function.
2125         (clear_internalvar): Likewise.
2126         (set_internalvar_integer): Likewise.
2127         (preserve_values): Handle host-side internalvar contents.
2128
2129         * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
2130         set_internalvar_integer instead of set_internalvar.
2131         * findcmd.c (find_command): Likewise.
2132         * infrun.c (handle_inferior_event): Likewise.
2133         * source.c (forward_search_command, reverse_search_command): Likewise.
2134         * tracepoint.c (set_traceframe_num, set_tracepoint_num,
2135         set_traceframe_context): Likewise.
2136
2137         * printcmd.c (x_command): Call clear_internalvar instead of
2138         set_internalvar.
2139         * tracepoint.c (set_traceframe_context): Likewise.
2140         
2141         * breakpoint.c (get_number_trailer): Call get_internalvar_integer
2142         instead of value_of_internalvar.
2143         * linespec.c (decode_dollar): Likewise.
2144
2145         * expprint.c (dump_subexp_body_standard): Use internalvar_name
2146         instead of accessing internalvar private elements.
2147         * valops.c (value_assign): Copy from original source instead of
2148         accessing internalvar private elements.
2149
2150 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
2151
2152         * scm-lang.c (builtin_type_scm): Remove.
2153         (scm_lookup_name): Add GDBARCH parameter.  Use it instead of
2154         objfile architecture.  Use per-architecture builtin_scm_type instead
2155         of builtin_type_scm.
2156         (evaluate_exp): Pass expression architecture to scm_lookup_name.
2157
2158         (scm_get_field): Add SIZE parameter.  Use it instead of 
2159         TYPE_LENGTH (builtin_type_scm).
2160
2161         (build_scm_types): New function.
2162         (scm_type_data): New variable.
2163         (builtin_scm_type): New function.
2164         (_initialize_scheme_language): Do not initialize builtin_type_scm.
2165         Register build_scm_types as post-init function for scm_type_data.
2166
2167         * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
2168         instead of builtin_type_scm.
2169
2170         * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
2171         (scm_get_field): Add SIZE paramter.
2172         (scm_scmval_print): Remove prototype.
2173         (builtin_type_scm): Remove.
2174         (struct builtin_scm_type): Add structure definition.
2175         (builtin_scm_type): Add prototype.
2176
2177         * scm-valprint.c (scm_inferior_print): Add TYPE parameter.  Use it
2178         instead of builtin_core_addr type; do not use objfile architecture.
2179         (scm_scmlist_print): Add TYPE parameter.  Use it to define SCM_SIZE.
2180         Pass type to scm_scmval_print.
2181         (scm_ipruk): Add TYPE parameter.  Use it to define SCM_SIZE.
2182         (scm_scmval_print): Make static.  Add TYPE parameter.  Use it to
2183         define SCM_SIZE.  Pass type to scm_ipruk and scm_scmlist_print.
2184         (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
2185
2186 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
2187
2188         * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
2189         mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
2190         mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
2191         mdebug_type_unsigned_char, mdebug_type_unsigned_short,
2192         mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
2193         mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
2194         mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
2195         mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
2196         mdebug_type_complex, mdebug_type_double_complex,
2197         mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
2198         Remove.
2199
2200         (basic_type_data): New global variable.
2201         (basic_type): New function.
2202         (parse_type): Remove static basic type map map_bt.  Call basic_type
2203         to get basic types instead of using mdebug_type_ variables.
2204
2205         (parse_symbol): Use builtin types instead of mdebug_type_ variables.
2206         (upgrade_type): Likewise.
2207         (parse_procedure): Likewise.
2208         (psymtab_to_symtab_1): Likewise.
2209
2210         (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
2211         Initialize basic_type_data.
2212
2213 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
2214
2215         * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
2216         * dfp.c (promote_decimal): Remove.
2217         (decimal_binop): Convert LEN_RESULT to input parameter.
2218         Remove call to decimal_binop.
2219         (decimal_compare): Remove call to decimal_binop.
2220
2221         * valarith.c (value_binop): Pass desired result type length
2222         to decimal_binop.
2223
2224 2009-06-01  Tristan Gingold  <gingold@adacore.com>
2225
2226         * configure.tgt (avr): Set gdb_sim to use the simulator.
2227
2228 2009-05-29  Doug Evans  <dje@google.com>
2229
2230         * infrun.c (prepare_to_proceed): Document.  Assert !non_stop.
2231         If scheduler-locking is enabled, we're not going to be singlestepping
2232         any other previously stopped thread.
2233
2234 2009-05-29  Pedro Alves  <pedro@codesourcery.com>
2235
2236         * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
2237
2238 2009-05-29  Eli Zaretskii  <eliz@gnu.org>
2239
2240         * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
2241         for stabs and COFF debug info.
2242
2243 2009-05-28  Pedro Alves  <pedro@codesourcery.com>
2244
2245         * infrun.c (handle_inferior_event): When thread hoping, switch
2246         inferior_ptid to the event thread before removing breakpoints from
2247         the target.  If not stopping, also try to revert back to a thread
2248         that was doing a "next".  Check if that thread still exists before
2249         resuming.
2250         (currently_stepping_thread): Delete and merge with ...
2251         (currently_stepping): ... this.
2252         (currently_stepping_callback): Rename to ...
2253         (currently_stepping_or_nexting_callback): ... this, and also
2254         return true if the thread was stepping over a call (has a
2255         step-resume breakpoint).
2256
2257 2009-05-28  Tom Tromey  <tromey@redhat.com>
2258
2259         * python/python.c (gdbpy_parameter): Rename.  Fix error message.
2260         (GdbMethods): Change "get_parameter" to "parameter".
2261
2262 2009-05-28  Pierre Muller  <muller@ics.u-strasbg.fr>
2263             Paul Pluzhnikov  <ppluzhnikov@google.com>
2264
2265         * configure.ac (!have_libpython): Add python-prettyprint source
2266         and object files.
2267         * configure: Regenerate.
2268         * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
2269         python headers.
2270         
2271 2009-05-27  Vladimir Prus  <vladimir@codesourcery.com>
2272             Tom Tromey  <tromey@redhat.com>
2273             Thiago Jung Bauermann  <bauerman@br.ibm.com>
2274
2275         * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
2276         * varobj.h (varobj_set_visualizer): Declare.
2277         (varobj_get_display_hint): Likewise.
2278         (varobj_update_result_t) <children_changed, value_installed>: New
2279         fields.
2280         * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
2281         * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
2282         mi_cmd_var_set_child_range): Declare.
2283         * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
2284         (mi_cmd_var_list_children): Emit display hint.
2285         (varobj_update_one): Emit display hint.  Handle dynamic children.
2286         * python/python.c (GdbMethods): Add "default_visualizer".
2287         * python/python-internal.h (apply_varobj_pretty_printer,
2288         gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
2289         Declare.
2290         (gdbpy_default_visualizer): Likewise.
2291         * varobj.c: Include python.h, python-internal.h.
2292         (PyObject): New typedef.
2293         (struct varobj) <children_requested, pretty_printer>: New fields.
2294         (varobj_create): Call install_default_visualizer.
2295         (instantiate_pretty_printer): New function.
2296         (varobj_set_display_format): Update.
2297         (varobj_get_display_hint): New function.
2298         (update_dynamic_varobj_children): New function.
2299         (varobj_get_num_children): Handle dynamic children.
2300         (varobj_list_children): Likewise.
2301         (install_new_value): Likewise.
2302         (varobj_add_child): New function.
2303         (install_visualizer): Likewise.
2304         (install_default_visualizer): Likewise.
2305         (varobj_set_visualizer): Likewise.
2306         (varobj_update): Handle dynamic children.
2307         (create_child): Use create_child_with_value.
2308         (create_child_with_value): New function.
2309         (value_get_print_value): Call pretty printer.  Add value_formatter
2310         argument.
2311         (c_value_of_variable): Update.
2312         (varobj_invalidate): Always free all_rootvarobj.
2313         * python/python-prettyprint.c (apply_varobj_pretty_printer): New
2314         function.
2315         (gdbpy_get_varobj_pretty_printer): Likewise.
2316         (gdbpy_default_visualizer): Likewise.
2317
2318 2009-05-27  Tom Tromey  <tromey@redhat.com>
2319             Thiago Jung Bauermann  <bauerman@br.ibm.com>
2320             Phil Muldoon  <pmuldoon@redhat.com>
2321             Paul Pluzhnikov  <ppluzhnikov@google.com>
2322             Vladimir Prus  <vladimir@codesourcery.com>
2323
2324         * python/python-value.c (value_object_to_value): New function.
2325         * python/python-internal.h: Include frameobject.h.
2326         (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
2327         Declare.
2328         (value_object_to_value): Declare.
2329         * printcmd.c (struct format_data) <raw>: New field.
2330         (last_format): Default to 0.
2331         (decode_format): Initialize val.raw.  Handle /r flag.
2332         (print_command_1): Initialize fmt.raw and opts.raw.
2333         (output_command): Likewise.
2334         (x_command): Fix initialization of fmt.format.  Initialize
2335         fmt.raw.
2336         (display_command): Initialize fmt.raw.
2337         (do_one_display): Set opts.raw.
2338         * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
2339         gdbpy_display_hint_cst): New globals.
2340         (_initialize_python): Initialize them.  Set gdb.pretty_printers.
2341         * cp-valprint.c: Include python.h.
2342         (cp_print_value): Call apply_val_pretty_printer.
2343         * python/python.h (apply_val_pretty_printer): Declare.
2344         * stack.c (print_this_frame_argument_p): Remove.
2345         (print_frame_args): Compute summary flag.  Don't use
2346         print_this_frame_argument_p.
2347         * valprint.c: Include python.h.
2348         (user_print_options): Initialize new fields.
2349         (scalar_type_p): New function.
2350         (val_print): Handle 'raw' and 'summary' modes.  Call
2351         apply_val_pretty_printer.
2352         (value_print): Handle 'raw' mode.
2353         * valprint.h (struct value_print_options) <raw, summary>: New
2354         fields.
2355         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
2356         (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
2357         (python-prettyprint.o): New target.
2358         * python/python-prettyprint.c: New file.
2359
2360 2009-05-27  Tom Tromey  <tromey@redhat.com>
2361             Paul Pluzhnikov  <ppluzhnikov@google.com>
2362
2363         * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
2364         value_address.
2365         * cli/cli-dump.c (dump_value_to_file): Use value_address.
2366         * valprint.c (common_val_print): Likewise.
2367         * v850-tdep.c (v850_push_dummy_call): Use value_address.
2368         * tracepoint.c (encode_actions): Use value_address.
2369         * printcmd.c (print_formatted): Use value_address.
2370         (x_command): Likewise.
2371         * p-valprint.c (pascal_object_print_static_field): Use
2372         value_address.
2373         * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
2374         * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
2375         * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
2376         * jv-valprint.c (java_value_print): Use value_address.
2377         * infcall.c (find_function_addr): Use value_address.
2378         * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
2379         * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
2380         * frv-tdep.c (frv_push_dummy_call): Use value_address.
2381         * frame.c (frame_register_unwind): Use value_address.
2382         (frame_unwind_register_value): Likewise.
2383         * darwin-nat-info.c (info_mach_region_command): Use
2384         value_address.
2385         * cp-valprint.c (cp_print_static_field): Use value_address.
2386         * c-valprint.c (c_value_print): Use value_address.
2387         * breakpoint.c (update_watchpoint): Use value_address.
2388         (can_use_hardware_watchpoint): Likewise.
2389         * ada-valprint.c (ada_val_print_1): Use value_address.
2390         (ada_value_print): Likewise.
2391         * ada-tasks.c (read_fat_string_value): Use value_address.
2392         * jv-lang.c (java_link_class_type): Use set_value_address.
2393         (java_link_class_type): Likewise.
2394         (get_java_utf8_name): Use value_address.
2395         (type_from_class): Likewise.
2396         (java_link_class_type): Likewise.
2397         * findvar.c (value_of_register): Use set_value_address.
2398         (read_var_value): Likewise.
2399         (read_var_value): Likewise.
2400         * eval.c (evaluate_subexp_standard): Use set_value_address.
2401         (evaluate_subexp_standard): Use value_address.
2402         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
2403         * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
2404         (ada_value_primitive_packed_val): Likewise.
2405         (ensure_lval): Likewise.
2406         (thin_data_pntr): Use value_address.
2407         (desc_bounds): Likewise.
2408         (ada_value_primitive_packed_val): Likewise.
2409         (value_assign_to_component): Likewise.
2410         (ensure_lval): Likewise.
2411         (make_array_descriptor): Likewise.
2412         (ada_to_fixed_value): Likewise.
2413         (unwrap_value): Likewise.
2414         * value.c (deprecated_value_address_hack): Remove.
2415         (value_address): New function.
2416         (value_raw_address): Likewise.
2417         (set_value_address): Likewise.
2418         (value_fn_field): Use set_value_address.
2419         (value_from_contents_and_address): Likewise.
2420         (value_fn_field): Likewise.
2421         (allocate_value_lazy): Don't use VALUE_ADDRESS.
2422         (value_as_address): Use value_address.
2423         (value_static_field): Likewise.
2424         * valops.c (search_struct_field): Use set_value_address.
2425         (value_at): Likewise.
2426         (value_at_lazy): Likewise.
2427         (value_repeat): Likewise.
2428         (value_cast_structs): Use value_address.
2429         (value_cast): Likewise.
2430         (value_fetch_lazy): Likewise.
2431         (value_assign): Likewise.
2432         (value_repeat): Likewise.
2433         (address_of_variable): Likewise.
2434         (value_coerce_array): Likewise.
2435         (value_coerce_function): Likewise.
2436         (value_addr): Likewise.
2437         (search_struct_field): Likewise.
2438         (search_struct_method): Likewise.
2439         (find_method_list): Likewise.
2440         (value_struct_elt_for_reference): Likewise.
2441         (value_full_object): Likewise.
2442         * jv-valprint.c (java_value_print): Use set_value_address.
2443         * value.h (deprecated_value_address_hack): Remove.
2444         (VALUE_ADDRESS): Remove.
2445         (value_address): Declare.
2446         (value_raw_address): Declare.
2447         (set_value_address): Declare.
2448
2449 2009-05-27  Tom Tromey  <tromey@redhat.com>
2450             Thiago Jung Bauermann  <bauerman@br.ibm.com>
2451             Phil Muldoon  <pmuldoon@redhat.com>
2452             Paul Pluzhnikov  <ppluzhnikov@google.com>
2453
2454         * python/python.c (_initialize_python): Call
2455         gdbpy_initialize_types.
2456         (GdbMethods): Add "lookup_type".
2457         * python/python-value.c (value_object) <type>: New field.
2458         (valpy_dealloc): Decref type.
2459         (valpy_new): Initialize type.
2460         (valpy_get_type): New function.
2461         (value_to_value_object): Initialize type.
2462         (valpy_cast): New function.
2463         (value_object_getset): Add "type".
2464         (value_object_methods): Add "cast".
2465         * python/python-internal.h (type_to_type_object): Declare.
2466         (type_object_to_type): Likewise.
2467         (gdbpy_initialize_types): Likewise.
2468         (gdbpy_lookup_type): Declare.
2469         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
2470         (SUBDIR_PYTHON_SRCS): Add python-type.c.
2471         (python-type.o): New target.
2472         * python/python-type.c: New file.
2473
2474 2009-05-27  Tom Tromey  <tromey@redhat.com>
2475             Thiago Jung Bauermann  <bauerman@br.ibm.com>
2476             Phil Muldoon  <pmuldoon@redhat.com>
2477
2478         * python/python.c: Include objfiles.h, observer.h.
2479         (gdbpy_auto_load): New global.
2480         (gdbpy_current_objfile): Likewise.
2481         (GDBPY_AUTO_FILENAME): New define.
2482         (gdbpy_new_objfile): New function.
2483         (gdbpy_get_current_objfile): Likewise.
2484         (gdbpy_objfiles): Likewise.
2485         (_initialize_python): Add "maint set auto-load".  Call
2486         gdbpy_initialize_objfile.  Attach objfile observer.
2487         (GdbMethods): New methods current_objfile, objfiles.
2488         * python/python-objfile.c: New file.
2489         * python/python-internal.h (objfile_to_objfile_object): Declare.
2490         (objfpy_get_printers): Likewise.
2491         (gdbpy_initialize_objfile): Likewise.
2492         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
2493         (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
2494         (python-objfile.o): New target.
2495
2496 2009-05-27  Pedro Alves  <pedro@codesourcery.com>
2497
2498         * infrun.c (follow_exec): Clear the stop_requested flag.
2499         * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
2500         Add debug output.
2501
2502 2009-05-27  Aleksandar Ristovski  <aristovski@qnx.com>
2503
2504         * nto-procfs.c (get_regset): Pass correct pointer.
2505
2506 2009-05-26  Doug Evans  <dje@google.com>
2507
2508         * dwarf2read.c (follow_die_ref): Add comment.
2509         (dwarf2_mark_helper): Tweak comment.
2510         (dwarf2_mark): Move description to its proper place.
2511
2512 2009-05-25  Pierre Muller  <muller@ics.u-strasbg.fr>
2513
2514         * procfs.c (procfs_wait): Add options parameter.
2515
2516 2009-05-24  Doug Evans  <dje@google.com>
2517
2518         Global renaming of find_thread_pid to find_thread_ptid.
2519         * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
2520         * thread.c (find_thread_ptid): Renamed from find_thread_pid.
2521         All callers updated.
2522
2523         * infrun.c (follow_fork): Initialize new step_* locals
2524         to avoid "may be used uninitialized" warnings.
2525
2526 2009-05-24  Pedro Alves  <pedro@codesourcery.com>
2527
2528         * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
2529
2530 2009-05-24  Pedro Alves  <pedro@codesourcery.com>
2531
2532         * gdbthread.h (struct thread_info): New `pending_follow' field.
2533         * thread.c (new_thread): New function.
2534         (add_thread_silent): Use it.
2535         * breakpoint.c (internal_breakpoint_number): New global, moved
2536         from inside...
2537         (create_internal_breakpoint): ... this.
2538         (clone_momentary_breakpoint): New.
2539         * breakpoint.h (clone_momentary_breakpoint): Declare.
2540         * infrun.c (nullify_last_target_wait_ptid): Move declaration
2541         higher.
2542         (pending_follow): Delete.
2543         (follow_fork): Handle pending follow fork event here.  Moved the
2544         preserving of thread stepping state here.
2545         (resume): Don't handle pending follow fork events here.  Only
2546         install the inferior's terminal modes if we're about to resume it.
2547         (proceed): Handle possible pending follow fork events here.
2548         (init_wait_for_inferior): No need to clear pending_follow anymore,
2549         it's gone.
2550         (handle_inferior_event): Adjust to per-thread `pending_follow'.
2551         Call `follow_fork' to handle following the fork.  If the
2552         follow-fork is cancelled, stop stepping.
2553         * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
2554         `pending_follow' events.  Remove code that handled preserving the
2555         thread stepping state.
2556         * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
2557         * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
2558
2559 2009-05-24  Pierre Muller  <muller@ics.u-strasbg.fr>
2560
2561         * symfile.c (add_shared_symbol_files_command): Remove
2562         prototype and function.
2563         (_initialize _symfile): Move "add-shared-symbol-files"
2564         command and "assf" alias.
2565         * windows-nat.c (_initialize_windows_nat): to here.
2566         Change "add-shared-symbol-files" to alias.
2567         
2568         * config/i386/cygwin.mh: Remove NAT_FILE.
2569         * config/i386/mingw.mh: Remove NAT_FILE.
2570         * config/i386/mingw64.mh: Remove NAT_FILE.
2571         * config/i386/nm-cygwin.h: Remove file.
2572         * config/i386/nm-cygwin64.h: Remove file.
2573
2574 2009-05-24  Hui Zhu  <teawater@gmail.com>
2575
2576         * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
2577         I386_LINUX_RECORD_IOCTL_*,
2578         I386_LINUX_RECORD_FCNTL_*) Removed.
2579         (i386_linux_init_abi): Change size of record from macros to
2580         numbers.
2581
2582 2009-05-24  Hui Zhu  <teawater@gmail.com>
2583
2584         * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
2585         * linux-record.c (record_linux_system_call): Ditto.
2586         * linux-record.h (linux_record_tdep): Ditto.
2587
2588 2009-05-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
2589
2590         Replace the savestring calls by xstrdup calls where possible.
2591         * breakpoint.c (condition_command, set_raw_breakpoint)
2592         (create_catchpoint, update_breakpoint_locations): Replace the
2593         savestring calls by xstrdup calls where possible.
2594         * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
2595         (record_producer): Likewise.
2596         * coffread.c (coff_start_symtab, complete_symtab): Likewise.
2597         * corefile.c (set_gnutarget): Likewise.
2598         * dbxread.c (add_new_header_file): Likewise.
2599         * demangle.c (set_demangling_command, set_demangling_style): Likewise.
2600         * event-top.c (push_prompt, pop_prompt, command_line_handler)
2601         (set_async_prompt): Likewise.
2602         * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
2603         Likewise.
2604         * language.c (set_language_command, _initialize_language): Likewise.
2605         * linespec.c (decode_line_2): Likewise.
2606         * rs6000-nat.c (add_vmap): Likewise.
2607         * top.c (set_prompt, init_history, init_main): Likewise.
2608         * tracepoint.c (stringify_collection_list): Likewise.
2609         * varobj.c (varobj_create): Remove variable expr_len.  Replace the 
2610         savestring calls by xstrdup calls where possible.
2611         (value_of_root, c_name_of_variable, c_describe_child): Replace the
2612         savestring calls by xstrdup calls where possible.
2613         * xcoffread.c (complete_symtab): Likewise.
2614         * cli/cli-script.c (build_command_line, define_command): Likewise.
2615         * cli/cli-setshow.c (do_setshow_command): Likewise.
2616
2617 2009-05-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
2618
2619         Remove already unreachable code.
2620         * varobj.c (varobj_get_handle): Fix comment when error is called.
2621         All callers updated.
2622
2623 2009-05-23  Eli Zaretskii  <eliz@gnu.org>
2624
2625         * README (`configure' options): Document GDB-specific options to
2626         `configure'.
2627
2628         * symtab.c (skip_prologue_using_lineinfo): New function.
2629         (find_function_start_sal): Use it to get to the first line of
2630         function's body that has an entry in the lineinfo table.
2631
2632         * symmisc.c (dump_symtab): Switch the current language to
2633         the language of the symtab we are dumping only if the symtab's
2634         language is neither language_auto nor language_unknown.
2635
2636         * coffread.c (coff_symtab_read): Set language_minimal as the
2637         language for the "_globals_" pseudo-file.
2638         (process_coff_symbol): Set the symbol's language to the language
2639         of current_subfile.
2640
2641 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
2642
2643         * target.h (struct section_table): Rename to ...
2644         (struct target_section): ... this.
2645         * exec.c: Adjust all references.
2646         * exec.h: Adjust all references.
2647         * nto-tdep.c: Adjust all references.
2648         * nto-tdep.h: Adjust all references.
2649         * ppc-linux-tdep.c: Adjust all references.
2650         * rs6000-nat.c: Adjust all references.
2651         * s390-tdep.c: Adjust all references.
2652         * solib-darwin.c: Adjust all references.
2653         * solib-frv.c: Adjust all references.
2654         * solib-irix.c: Adjust all references.
2655         * solib-null.c: Adjust all references.
2656         * solib-osf.c: Adjust all references.
2657         * solib-pa64.c: Adjust all references.
2658         * solib-som.c: Adjust all references.
2659         * solib-sunos.c: Adjust all references.
2660         * solib-svr4.c: Adjust all references.
2661         * solib-target.c: Adjust all references.
2662         * solib.c: Adjust all references.
2663         * solist.h: Adjust all references.
2664         * symfile.c: Adjust all references.
2665         * symfile.h: Adjust all references.
2666         * target.c: Adjust all references.
2667
2668 2009-05-22  Hui Zhu  <teawater@gmail.com>
2669
2670         Add sys_fcntl argument interfaces to linux_record_tdep.
2671
2672         * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
2673         fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
2674         interfaces.
2675         * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
2676         I386_LINUX_RECORD_FCNTL_F_GETLK64,
2677         I386_LINUX_RECORD_FCNTL_F_SETLK64,
2678         I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
2679         of I386 Linux sys_fcntl arguments.
2680         (i386_linux_init_abi): Set macros values to linux_record_tdep.
2681         * linux-record.c (record_linux_system_call): Change to use
2682         the interface in linux_record_tdep in sys_fcntl and
2683         sys_fcntl64.
2684
2685         * linux-record.c (record_linux_system_call): Fix the process
2686         record build error about type in CYGWIN.
2687
2688 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
2689
2690         * inflow.c (kill_command): Delete left over static declaration.
2691
2692 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
2693
2694         * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
2695         Include exec.h.
2696         (struct section_closure): Delete.
2697         (add_to_section_table): Delete.
2698         (build_target_sections_from_bfd): Delete.
2699         (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
2700         (target_bfd_reopen): Use build_section_table.
2701         * exec.c (xfer_memory): Move most code except for overlay
2702         debugging support from here...
2703         (section_table_xfer_memory): ... to this new function.
2704         (section_table_xfer_memory_partial): New.
2705         * exec.h (section_table_xfer_memory_partial): Declare.
2706         * bfd-target.h (build_target_sections_from_bfd): Delete
2707         declaration.
2708
2709 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
2710
2711         * remote.c (compare_sections_command): Don't declare exec_bfd.
2712         * tracepoint.c: Include "gdbcore.h".
2713         (remote_set_transparent_ranges): Don't declare exec_bfd.
2714
2715 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
2716
2717         * aix-thread.c (init_aix_thread_ops): Whitespace.
2718
2719 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
2720
2721         * dec-thread.c (dec_thread_wait): Add options parameter.  Use it
2722         to call the to_wait method in the target beneath.
2723         * remote-m32r-sdi.c (m32r_wait): Add options parameter.
2724
2725 2009-05-21  Joel Brobecker  <brobecker@adacore.com>
2726
2727         * aix-thread.c (aix_thread_wait): Add options parameter.  Use it
2728         to call the to_wait method in the target_beneath.
2729
2730 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
2731
2732         * linux-nat.c (linux_nat_terminal_inferior)
2733         (linux_nat_terminal_ours): Don't check sync_execution.
2734         * remote.c (remote_terminal_inferior, remote_terminal_ours):
2735         Don't check sync_execution.  Update comments.
2736         * target.c (target_terminal_inferior): New.
2737         * target.h (target_terminal_inferior): Delete macro, and declare
2738         as function.
2739         * event-top.c (async_disable_stdin): Make idempotent.  Don't give
2740         the target the terminal here.
2741         * inflow.c (terminal_ours_1): Don't return early without setting
2742         `terminal_is_ours'.
2743
2744 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
2745
2746         * target.h (TARGET_WNOHANG): New.
2747         * target.c (target_wait): Add `options' argument.  Adjust.
2748         (struct target_ops) <to_wait>: Add `options' argument.
2749         (target_wait): Add `options' argument.
2750         * infrun.c (wait_for_inferior): Pass 0 as options to
2751         target_wait (blocking wait).
2752         (fetch_inferior_event): Pass TARGET_WNOHANG as options to
2753         target_wait.
2754         * fork-child.c (startup_inferior): Pass 0 as options to
2755         target_wait (blocking wait).
2756         * linux-nat.c (linux_nat_create_inferior): Remove async masking.
2757         (linux_nat_wait_1): Add `target_options' argument.  Use it instead
2758         of checking on target_can_async_p.
2759         (linux_nat_wait): Add `target_options' argument.  Adjust.
2760         * remote.c (remote_wait_ns): Add `options' argument.  Adjust to
2761         check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
2762         (remote_wait_as): Add `options' argument.  Adjust to check on
2763         TARGET_WNOWAIT instead of checking on remote_is_async_p.  If doing
2764         a blocking wait, keep waiting until an interesting event comes
2765         out.
2766         (remote_wait): Add `options' argument.  Don't loop here if the
2767         target is in async mode, and a blocking wait has been requested.
2768
2769         * top.c (deprecated_target_wait_hook): Add `options' argument.
2770         * linux-thread-db.c (thread_db_wait): Add `options' argument, and
2771         pass it down to the layer beneath.
2772         * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
2773         * record.c (record_beneath_to_wait): Add `options' argument.
2774         (record_wait): Add `options' argument, and pass it down to the
2775         layer beneath.
2776         * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
2777         * darwin-nat.c (darwin_wait): Likewise.
2778         * defs.h (deprecated_target_wait_hook): Likewise.
2779         * gnu-nat.c (gnu_wait): Add `options' argument.
2780         * go32-nat.c (go32_wait): Likewise.
2781         * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
2782         pass it down to the layer beneath.
2783         * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
2784         * monitor.c (monitor_wait): Likewise.
2785         * nto-procfs.c (procfs_wait): Likewise.
2786         * remote-mips.c (mips_wait): Add `options' argument.
2787         * remote-sim.c (gdbsim_wait): Likewise.
2788         * rs6000-nat.c (rs6000_wait): Add `options' argument.
2789         * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
2790         it down to the layer beneath.
2791         * spu-linux-nat.c (spu_child_wait): Add `options' argument.
2792         * windows-nat.c (windows_wait): Likewise.
2793         * tui/tui-hooks.c (tui_target_wait_hook): Likewise.  Adjust.
2794
2795 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
2796
2797         * mi/mi-interp.c (mi_on_resume): Account for whole process
2798         resumes.
2799
2800 2009-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2801
2802         * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
2803
2804 2009-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2805
2806         * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
2807
2808 2009-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2809
2810         Fix parsing DW_AT_const_value using DW_FORM_string.
2811         * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
2812
2813 2009-05-20  Joel Brobecker  <brobecker@adacore.com>
2814
2815         * aix-thread.c (giter_count): Do not count the main thread.
2816         (giter_accum): Do not include the main thread.
2817
2818 2009-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
2819
2820         Remove the PROT parameter from openp.
2821         * source.c (openp): Remove the parameter PROT.  Assertion check MODE.
2822         defs.h (openp): Update the prototype.
2823         Update all the openp callers.
2824
2825 2009-05-19  Pedro Alves  <pedro@codesourcery.com>
2826
2827         * inflow.c (kill_command): Moved to infcmd.c.
2828         (_initialize_inflow): Don't add the "kill" command or clear
2829         inferior_ptid here.
2830         * infcmd.c (kill_command): Moved here from inflow.c.
2831         (_initialize_infcmd): Add the "kill" command here.
2832
2833 2009-05-19  Pedro Alves  <pedro@codesourcery.com>
2834
2835         * fork-child.c: Don't include frame.h.  Include terminal.h.
2836         (fork_inferior): Call new_tty_postfork after forking adn adding
2837         the child to the inferior list.
2838         * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
2839         here.
2840         * inflow.c (struct terminal_info): Remove const qualifier from
2841         `run_terminal' field.
2842         (inferior_thisrun_terminal): Tweak comment.
2843         (inflow_inferior_exit): Release the `run_terminal' field.
2844         (copy_terminal_info): New function.
2845         (new_tty_postfork): New function.
2846         * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
2847         (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
2848         * inf-ptrace.c: Include terminal.h.
2849         (inf_ptrace_follow_fork): Copy the parent's terminal info to the
2850         child.
2851         * linux-nat.c: Include terminal.h.
2852         (linux_child_follow_fork): Copy the parent's terminal info to the
2853         child.
2854         * inf-ttrace.c: Include terminal.h.
2855         (inf_ttrace_follow_fork): Copy the parent's terminal info to the
2856         child.
2857
2858 2009-05-19  Pedro Alves  <pedro@codesourcery.com>
2859
2860         * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
2861         (update_global_location_list): Use gdbarch_has_global_breakpoints
2862         instead of gdbarch_has_global_solist and
2863         target_supports_multi_process.
2864         * dicos-tdep.c (dicos_init_abi): Set
2865         gdbarch_has_global_breakpoints.
2866         * gdbarch.sh (has_global_solist): Update comment.
2867         (has_global_breakpoints): New.
2868         * remote.c (remote_start_remote): Use
2869         gdbarch_has_global_breakpoints instead of
2870         gdbarch_has_global_solist.
2871         * target.c (target_detach): Use gdbarch_has_global_breakpoints
2872         instead of gdbarch_has_global_solist.
2873         * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
2874         of target_supports_multi_process.
2875
2876 2009-05-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
2877
2878         * objc-lang.c (find_methods): Plug a small memory leak.
2879
2880 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
2881
2882         * solib-svr4.c: Include observer.h.
2883         (debug_base, debug_loader_offset_p, debug_loader_offset)
2884         (debug_loader_name, main_lm_addr): Move these globals...
2885         (struct svr4_info): ... into this new structure.
2886         (svr4_info_p): New typedef.
2887         (svr4_info): New global.
2888         (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
2889         functions.
2890         (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
2891         (solib_svr4_r_ldsomap): Add svr4_info argument.  Adjust to
2892         per-inferior svr4.
2893         (open_symbol_file_object): Adjust to per-inferior svr4.
2894         (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
2895         Ditto.
2896         (enable_break): Add svr4_info argument.  Adjust to per-inferior
2897         svr4.
2898         (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
2899         Adjust to per-inferior svr4.
2900         (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
2901         observer.
2902
2903 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
2904
2905         * linux-nat.h (linux_proc_get_tgid): Declare.
2906         * linux-nat.c (linux_proc_get_tgid): New.
2907         * linux-thread-db.c (struct thread_db_info): New field
2908         `need_stale_parent_threads_check'.
2909         (add_thread_db_info): Set it.
2910         (find_new_threads_callback): Ignore stale fork parent threads.
2911         (thread_db_resume): New.
2912         (init_thread_db_ops): Install thread_db_resume.
2913
2914 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
2915
2916         * fork-child.c (fork_inferior): Only reset the thread list if this
2917         is the first inferior.
2918         (startup_inferior): If the target support multi-process, tell it
2919         to resume only the new process.
2920         * linux-nat.c (num_lwps): Delete global.
2921         (purge_lwp_list): New function.
2922         (num_lwps): New function.
2923         (add_lwp, delete_lwp): Adjust.
2924         (ptid_match): New.
2925         (iterate_over_lwps): Add filter argument.  Handle it.
2926         (linux_nat_attach): Remove FIXME note.
2927         (linux_nat_detach): Adjust to iterate over threads of the inferior
2928         we're detaching from.  Adjust to num_lwps being a function.  Don't
2929         assume the head of the lwp list is the main thread of the process
2930         we're detaching from.  Don't destroy the LWP list.
2931         (resume_callback): Add debug output.
2932         (linux_nat_resume): Handle resuming a single inferior.  Allow a
2933         wildcard resume in non-stop mode.
2934         (linux_handle_extended_wait): Don't assume inferior_ptid is the
2935         correct inferior of the parent LWP.
2936         (status_callback): Also check lp->waitstatus.
2937         (select_event_lwp): Add new filter parameter.  Handle it.
2938         (linux_nat_filter_event): Adjust to num_lwps being a function.
2939         (linux_nat_wait_1): When adding the first lwp of the inferior, use
2940         an is_lwp check instead of checking for the number of lwps.
2941         (linux_nat_wait_1): Handle waiting for a specific tgid.  Handle
2942         pending process exit statuses.
2943         (linux_nat_mourn_inferior): Don't destroy all the LWP info.
2944         Instead delete LWPs of the inferior that we're mourning.  Don't
2945         unregister from the event loop here.
2946         (linux_nat_pid_to_str): Use `num_lwps'.
2947         (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
2948         single inferior.
2949         (linux_nat_is_async_p): Check if async was masked out.
2950         (linux_multi_process): New global.
2951         (linux_nat_supports_multi_process): New.
2952         (linux_nat_stop_lwp): Remove LWP filtering.  It is done by the
2953         caller.
2954         (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
2955         LWP filtering.
2956         (linux_nat_close): New.
2957         (linux_nat_add_target): Register linux_nat_close and
2958         linux_nat_supports_multi_process.
2959         * linux-nat.h (iterate_over_lwps): Add filter argument.
2960         * linux-thread-db.c (thread_db_handle): Delete.
2961         (proc_handle, thread_agent, td_init_p, td_ta_new_p)
2962         (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
2963         (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
2964         (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
2965         (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
2966         longer globals, moved to...
2967         (struct thread_db_info): ... this new structure.
2968         (thread_db_list): New.
2969         (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
2970         New.
2971         (have_threads_callback): Filter out threads of all inferiors but
2972         the one specified by the ARGS argument.
2973         (have_threads): Add ptid argument specifying the inferior we're
2974         interested in.  Handle it.
2975         (struct thread_get_info_inout): New.
2976         (thread_get_info_callback, thread_from_lwp): Adjust to use it.
2977         (thread_db_attach_lwp): Check that inferior of the passed in
2978         thread is using thread-db.  Adjust.
2979         (enable_thread_event): Remove thread_agent parameter.  Instead,
2980         get it from the per-inferior thread-db info.
2981         (dladdr_to_soname): Move higher up.
2982         (enable_thread_event_reporting): Adjust to use per-inferior
2983         thread-db info.
2984         (try_thread_db_load_1): Replace `handle' parameter by a
2985         thread_db_info parameter.  Adjust to use per-inferior thread-db
2986         info.
2987         (try_thread_db_load): Adjust to use per-inferior thread-db info.
2988         (thread_db_load, disable_thread_event_reporting): Ditto.
2989         (check_for_thread_db): Remove conditional reporting of which
2990         libthread_db is in use.
2991         (thread_db_new_objfile): Add comment about inferior_ptid.
2992         (attach_thread): Adjust to use per-inferior thread-db info.
2993         (thread_db_detach): Adjust to use per-inferior thread-db info.
2994         Remove thread event breakpoints of the current inferior.  Only
2995         unpush the thread-db target if there are no more processes using
2996         it.
2997         (check_event): Adjust to use per-inferior thread-db info.
2998         (thread_db_wait): Adjust to use per-inferior thread-db info.  Only
2999         unpush the thread-db target if there are no more processes using
3000         it.
3001         (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
3002         info.  Mark breakpoints of the current inferior out before
3003         deleting them.  Only unpush the thread-db target if there are no
3004         more processes using it.
3005         (find_new_threads_callback): Adjust to use per-inferior thread_db
3006         info.
3007         (thread_db_find_new_threads_1): Add new ptid argument.  Adjust to
3008         use per-inferior thread-db info.
3009         (thread_db_find_new_threads): Adjust to use per-inferior thread-db
3010         info.
3011         (thread_db_get_thread_local_address): Adjust.
3012         (thread_db_get_ada_task_ptid): Adjust.
3013         * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
3014         if there no more processes left to debug.
3015         * thread.c (set_running, set_executing): Handle resuming all
3016         threads of a single inferior.
3017         * mi/mi-interp.c (mi_output_running_pid): New.
3018         (mi_inferior_count): New.
3019         (mi_on_resume): For backwards compatibility, if resuming all
3020         threads of an inferior, and there is only one inferior, output
3021         "all".
3022
3023 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
3024
3025         * ada-lang.c (ada_find_any_type): Move check for primitive types ...
3026         (to_fixed_range_type): ... to here.
3027
3028 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
3029
3030         * ada-lang.c (desc_data_type): Remove, replace by ...
3031         (desc_data_target_type): ... this.
3032         (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
3033         (ada_is_array_descriptor_type): Likewise.
3034         (ada_type_of_array): Likewise.
3035         (ada_coerce_to_simple_array_type): Likewise.
3036         (ada_array_element_type): Likewise.
3037
3038 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
3039
3040         * ada-valprint.c (ada_val_print_1): Use val_print_string to print
3041         result of ada_vax_float_print_function inferior call.
3042
3043 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
3044
3045         * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
3046         avoid creating a dummy value.
3047
3048 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
3049
3050         * p-valprint.c (pascal_val_print): Use extract_typed_address
3051         to extract reference value.
3052
3053 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
3054
3055         * doublest.c (NAN): Remove unused define.
3056         (extract_floating_by_length, deprecated_extract_floating): Remove.
3057         (store_floating_by_length, deprecated_store_floating): Remove.
3058         (extract_typed_floating): Do not call extract_floating_by_length.
3059         (store_typed_floating): Do not call store_floating_by_length.
3060         (convert_typed_floating): Remove redundant assertions.
3061         * doublest.h (deprecated_extract_floating): Remove.
3062         (deprecated_store_floating): Remove.
3063         * sh64-tdep.c (sh64_register_convert_to_raw): Call
3064         extract_typed_floating instead of deprecated_extract_floating.
3065
3066 2009-05-18  Jon Beniston <jon@beniston.com>
3067         
3068         * MAINTAINERS: Add lm32 target.        
3069         * Makefile.in: Add lm32 dependencies.        
3070         * NEWS: Indicate lm32 is a new target.
3071         * configure.tgt: Add lm32 targets.
3072         * lm32-tdep.c: New file.
3073
3074 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
3075
3076         * corelow.c (core_open): Flush the register cache before doing
3077         anything with registers.
3078
3079 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
3080
3081         * inflow.h (our_process_group): Remove declaration.
3082         (inferior_process_group): Delete global variable declaration.
3083         (inferior_process_group): New function declaration.
3084         * inflow.c: Include observer.h.
3085         (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
3086         Delete.
3087         (struct terminal_info): New struct.
3088         (our_terminal_info): New global.
3089         (inferior_process_group): New function.
3090         (inferior_thisrun_terminal): Extend description comment.
3091         (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
3092         instead of globals.
3093         (terminal_init_inferior_with_pgrp): Adjust to per-inferior
3094         terminal settings.
3095         (terminal_inferior): Ditto.
3096         (terminal_ours_1): Ditto.
3097         (inflow_new_inferior, inflow_inferior_exit): New functions.
3098         (child_terminal_info): Adjust to per-inferior terminal settings.
3099         (osig_set): New global.
3100         (set_sigint_trap): Adjust to per-inferior terminal settings.  Set
3101         or clear `osig_set' accordingly.
3102         (clear_sigint_trap): Check `osig_set' to decide wheater to restore
3103         SIGINT handler, instead of checking the current inferior (which
3104         may be none).
3105         (_initialize_inflow): Attach inflow_new_inferior and
3106         inflow_inferior_exit to the "new_inferior" and "inferior_exit"
3107         notifications, respectively.
3108         * inferior.h (struct terminal_info): Forward declare.
3109         (struct inferior): Add `terminal_info' field.
3110         * inferior.c (delete_inferior_1): Notify the inferior_exit
3111         observers before removing the inferior from the lists and deleting
3112         it.
3113         * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
3114         a function instead of a variable.  Adjust.
3115         * procfs.c (procfs_stop): Ditto.
3116
3117 2009-05-17  Pedro Alves  <pedro@codesourcery.com>
3118
3119         * infrun.c (handle_inferior_event): When handling a
3120         TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
3121         immediatelly.
3122         * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
3123         from the child if vforking.
3124         * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
3125         breakpoints from the child here.
3126
3127 2009-05-17  Pedro Alves  <pedro@codesourcery.com>
3128
3129         * infrun.c (pending_follow): Remove execd_pathname member.
3130         (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
3131         (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
3132         event, don't copy `execd_pathname' to pending_follow, use the
3133         event copy instead.  Release `execd_pathname' once done with
3134         handling the event.
3135
3136         * infrun.c (pending_follow): Remove mention of exec events.
3137
3138 2009-05-17  Hui Zhu  <teawater@gmail.com>
3139
3140         * i386-tdep.c (i386_process_record): Make it extern.
3141         (i386_gdbarch_init): Don't call set_gdbarch_process_record
3142         here.
3143         * i386-tdep.h (i386_process_record): Declare.
3144         * i386-linux-tdep.c (i386_linux_init_abi): Call
3145         set_gdbarch_process_record.
3146
3147 2009-05-17  Vladimir Prus  <vladimir@codesourcery.com>
3148
3149         Always report varobj as changed when in_scope attribute changes.
3150
3151         * varobj.c (install_new_value): If non-NULL-ness of value
3152         changed, return 1.
3153
3154 2009-05-15  Paul Pluzhnikov  <ppluzhnikov@google.com>
3155         
3156         * NEWS: Mention set/show libthread-db-search-path.
3157         * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
3158         (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
3159         * linux-thread-db.c (libthread_db_search_path): New setting.
3160         (thread_db_handle): New variable (replaces using_thread_db).
3161         (try_thread_db_load_1): New function.
3162         (try_thread_db_load, thread_db_load_search): Likewise.
3163         (dladdr_to_soname): Likewise.
3164         (thread_db_load): Iterate over possibly multiple libthread_db's.
3165         (check_for_thread_db): Attempt to load new libthread_db.
3166         (thread_db_detach, thread_db_wait): Unload libthread_db.
3167         (thread_db_mourn_inferior): Likewise.
3168         (_initialize_thread_db): Add new libthread-db-search-path option.
3169         Defer loading of libthread_db to check_for_thread_db.
3170         * solib.c (libpthread_name_p): New function.
3171         (libpthread_solib_p): Call it.
3172         * solib.h (libpthread_name_p): New prototype.
3173         
3174 2009-05-15  Pierre Muller  <muller@ics.u-strasbg.fr>
3175
3176         * MAINTAINERS: Update my email address.
3177         
3178 2009-05-14  Paul Pluzhnikov  <ppluzhnikov@google.com>
3179
3180         * breakpoint.h: Add breakpoint_re_set_objfile prototype.
3181         * breakpoint.c (create_overlay_event_breakpoint): Renamed
3182         from create_overlay_event_breakpoint_1, old
3183         create_overlay_event_breakpoint deleted.
3184         (breakpoint_re_set_objfile): Don't rescan all objfiles
3185         unnecessarily.
3186         (breakpoint_re_set): New function.
3187         * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
3188         instead of breakpoint_re_set.
3189         * objfiles.c (objfile_relocate): Likewise.
3190         
3191 2009-05-14  Joel Brobecker  <brobecker@adacore.com>
3192
3193         * gdbarch.sh: Add comment documenting the target_gdbarch global.
3194         gdbarch.h does NOT need to be regenerated as the corresponding
3195         change has already been made in a previous commit.
3196
3197 2009-05-14  Pierre Muller  <muller@ics.u-strasbg.fr>
3198
3199         Remove all i386 debug register low level macros in config nm files.
3200         (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
3201         (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
3202         (I386_USE_GENERIC_WATCHPOIINTS): Remove.
3203
3204         * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
3205         (struct i386_dr_low_type): New type.
3206         (i386_dr_low): New global variable.
3207         * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
3208         (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
3209         i386_dr_low struct variable fields.
3210         (i386_remove_aligned_watchpoint): Likewise.
3211         (i386_stopped_data_address): Likewise.
3212         (i386_stopped_by_hwbp): Likewise.
3213         (show_debug_regs_command_added): New static variable.
3214         (add_show_debug_regs_command): New static function.
3215         (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
3216         (i386_set_debug_register_length): New function.
3217         (_initialize_i386_nat): Delete.
3218         
3219         * amd64-linux-nat.c: Include "i386-nat.h".
3220         (amd64_linux_dr_set_control):  Change to static.
3221         (amd64_linux_dr_get_status): Change to static.
3222         (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
3223         (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
3224         
3225         * go32-nat.c: Include "i386-nat.h".
3226         (go32_set_addr): Change to static.
3227         (go32_set_dr7): Change to static. Change arg type to unisgned long.
3228         (go32_get_dr6): Change to static. Change return type to unisnged long.
3229         (init_go32_ops):  Set i386_dr_low variable fields.
3230         * i386-linux-nat.c: Include "i386-nat.h".
3231         (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
3232         (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
3233         (_initialize_i386_linux_nat):  Set i386_dr_low variable fields.
3234         * i386bsd-nat.h: Declare functions used for
3235         i386_dr_low fields in i386fbsd-nat.c.
3236         * i386fbsd-nat.c: Include "i386-nat.h".
3237         (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
3238         * windows-nat.c: Include "i386-nat.h".
3239         (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
3240         Change to static.
3241         (cygwin_get_dr6): Change return type to unisnged long.
3242         (cygwin_set_dr7): Change arg type to unisgned long.
3243         (init_windows_ops): Set i386_dr_low function fields.
3244
3245         * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call 
3246         i386_set_debug_register_length.
3247         * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
3248
3249         * config/i386/nm-cygwin.h: Remove all I386_* macros.
3250         * config/i386/nm-cygwin64.h: Likewise.
3251         * config/i386/nm-fbsd.h: Likewise.
3252         * config/i386/nm-linux.h: Likewise.
3253         * config/i386/nm-i386.h: Remove completely.
3254         * config/i386/nm-go32.h: Remove completely.
3255         * config/i386/nm-linux64.h: Remove completely.
3256         * config/i386/go32.mh (NAT_FILE): Remove entry.
3257         * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
3258
3259 2009-05-14  Jon Beniston  <jon@beniston.com>
3260
3261         * MAINTAINERS: Add Jon Beniston to write after approval list.
3262
3263 2009-05-13  Paul Pluzhnikov  <ppluzhnikov@google.com>
3264
3265         * objc-lang.c (objc_objfile_data): New variable.
3266         (find_methods): Skip objfiles without Obj-C methods.
3267         (_initialize_objc_lang): New function.
3268
3269 2009-05-13  Joel Brobecker  <brobecker@adacore.com>
3270
3271         * c-lang.c (print_wchar): Remove unnecessary cast.
3272
3273 2009-05-12  Jim Blandy  <jimb@red-bean.com>
3274
3275         * MAINTAINERS: Remove self as m32c target maintainer.
3276
3277 2009-05-12  Pedro Alves  <pedro@codesourcery.com>
3278
3279         * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
3280         * command.h (deprecated_add_set_cmd): Delete declaration.
3281         * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
3282         'set debug gnu-nat' and 'show debug gnu-nat'.
3283         * i386-nat.c (_initialize_i386_nat): Replace 'maint
3284         show-debug-registers' with 'maint set show-debug-registers' and
3285         'maint show show-debug-registers'.
3286         * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
3287         show-debug-registers' with 'maint set show-debug-registers' and
3288         'maint show show-debug-registers'.
3289
3290 2009-05-12  Joel Brobecker <brobecker@adacore.com>
3291
3292         * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
3293         pushing it on the output obstack.
3294
3295 2009-05-11  Joel Brobecker <brobecker@adacore.com>
3296
3297         Fix internal error on breaking at a multi-locations caller source line.
3298         * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
3299         command with no parameters.
3300
3301 2009-05-11  Pedro Alves  <pedro@codesourcery.com>
3302
3303         * linux-nat.c (enum sigchld_state): Delete.
3304         (linux_nat_async_events_state): Delete.
3305         (struct waitpid_result): Delete.
3306         (waitpid_queue): Delete.
3307         (queued_waitpid_1): Delete.
3308         (async_file_flush): New.
3309         (queued_waitpid, push_waitpid): Delete.
3310         (async_file_mark): New.
3311         (drain_queued_events): Delete.
3312         (my_waitpid): Remove locally queued events handling.
3313         (linux_test_for_tracefork): Upjust.
3314         (linux_child_follow_fork): Ditto.
3315         (sync_sigchld_action): Delete.
3316         (blocked_mask): Reinstate.
3317         (async_sigchld_action): Rename to...
3318         (sigchld_action): ... this.
3319         (block_child_signals): New.
3320         (restore_child_signals_mask): New.
3321         (lin_lwp_attach_lwp): Adjust.
3322         (linux_nat_create_inferior): Ditto.
3323         (linux_nat_attach): Also use lp->status in async mode.
3324         (get_pending_status): Don't use queued_waitpid.
3325         (linux_nat_detach): Don't drain locally queued events.
3326         (linux_nat_resume): Allow pending wait statuses stored lp->status
3327         in async mode.  If returning early due to a pending event,
3328         re-register the event source.
3329         (stop_wait_callback): Allow pending wait statuses stored
3330         lp->status in async mode.
3331         (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
3332         (linux_nat_wait): Rename to ...
3333         (linux_nat_wait_1): ... this.  Allow pending wait statuses stored
3334         lp->status in async mode.  Always add WNOHANG to the waitpid
3335         options in async mode.
3336         (linux_nat_wait): New.
3337         (kill_callback): Don't drain locally queued events.
3338         (sigchld_handler): Rewrite.
3339         (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
3340         refer to "set target-async".
3341         (linux_nat_async_mask): If in non-stop, and re-enabling async
3342         mode, re-register the target event source in the event loop.
3343         (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
3344         (get_pending_events, async_sigchld_handler)
3345         (linux_nat_async_events): Delete.
3346         (handle_target_event): New.
3347         (linux_nat_async_file_handler): Delete.
3348         (linux_async_pipe): New.
3349         (linux_nat_async): Only re-register in the event loop if not
3350         registered yet.  Always notify the event-loop once if enabling the
3351         event source.
3352         (linux_nat_stop_lwp): Rewrite to handle pending events stored in
3353         lp->status, not in the locally queued event list.
3354         (linux_nat_stop): Don't mask out async event handling.
3355         (linux_nat_setup_async): Delete.
3356         (_initialize_linux_nat): Adjust.
3357         (lin_thread_get_thread_signals): blocked_mask is global again.
3358         Adjust.
3359
3360 2009-05-11  Pierre Muller  <muller@ics.u-strasbg.fr>
3361
3362         Unify target macros.
3363
3364         * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
3365         (target_stoppped_by_watchpoint): New macro.
3366         (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
3367         (target_have_steppable_watchpoint): New macro.
3368         (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
3369         (target_have_continuable_watchpoint): New macro.
3370         (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
3371         (target_can_use_hardware_watchpoint): New macro.
3372         (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
3373         (target_region_ok_for_hw_watchpoint): New macro.
3374
3375         * breakpoint.c (update_watchpoint): Use new macros.
3376         (bpstat_alloc): Likewise.
3377         (create_breakpoint): Likewise.
3378         (watch_command_1): Likewise.
3379         (can_use_hardware_watchpoint): Likewise.
3380         (do_enable_breakpoint): Likewise.
3381         * infrun.c (handle_inferior_event): Adapt to new macros.
3382         * mips-tdep.c (mips_gdbarch_init): Update comments.
3383         * procfs.c (procfs_set_watchpoint): Update comment.
3384         (procfs_insert_watchpoint): Adapt to new macros.
3385         * remote-m32r-sdi.c (m32r_stop):
3386         * remote-mips.c (mips_remove_breakpoint):
3387         * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
3388         (debug_to_stopped_by_watchpoint): Likewise.
3389
3390
3391 2009-05-10  Pierre Muller  <muller@ics.u-strasbg.fr>
3392
3393         * src/gdb/target.h: Remove all tests for already defined
3394         macros. All macros defined here should not be set in config
3395         headers anymore.
3396
3397 2009-05-08  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
3398
3399         * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
3400         (have_ptrace_getsetfpregs): Likewise.
3401         fetch_all_gp_regs): New function.
3402         (fetch_gp_regs): New function.
3403         (fetch_all_fp_regs): Likewise.
3404         (fetch_fp_regs): New function.
3405         (fetch_ppc_registers): Using the new methods to fetch general-
3406         purpose and floating-pointer registers.
3407         (store_all_gp_regs): New function.
3408         (store_gp_regs): Likewise.
3409         (store_all_fp_regs): New function.
3410         (store_fp_regs): Likewise.
3411         (store_ppc_registers): Using the new methods to store general-
3412         purpose and floating-pointer registers.
3413
3414 2009-05-08  Doug Evans  <dje@google.com>
3415
3416         * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
3417
3418 2009-05-07  Sergio Durigan Junior  <sergiodj@linux.vnet.ibm.com>
3419
3420         * MAINTAINERS (Write After Approval): Add self.
3421
3422 2009-05-07  Joel Brobecker  <brobecker@adacore.com>
3423
3424         * gdbarch.h (target_gdbarch): Add comment documenting this global.
3425
3426 2009-05-06  Joel Brobecker  <brobecker@adacore.com>
3427
3428         * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
3429         system iconv.
3430         * configure: Regenerate.
3431
3432 2009-05-06  Joel Brobecker  <brobecker@adacore.com>
3433
3434         * utils.c: Add include of gdb_usleep.h.
3435         (defaulted_query): Detect false EOF conditions that happen
3436         on terminals opened with the O_NONBLOCK flag when there is
3437         nothing to read.
3438
3439 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
3440
3441         * inferior.c (add_inferior): Move observer_notify_new_inferior
3442         call to ...
3443         (add_inferior_silent): ... here.
3444
3445 2009-05-06  Pierre Muller  <muller@ics.u-strasbg.fr>
3446             Pedro Alves  <pedro@codesourcery.com>
3447
3448         * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
3449         (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
3450         functions.
3451         (procfs_stopped_by_watchpoint): Made static, ptid argument
3452         removed.
3453         (_initialize_procfs): Register new watchpoint related target
3454         functions.
3455         * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
3456         (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
3457         (HAVE_CONTINUABLE_WATCHPOINT): Delete.
3458         (target_insert_watchpoint, target_remove_watchpoint): Delete.
3459         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
3460         declarations.
3461         * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
3462         (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
3463         (target_insert_watchpoint, target_remove_watchpoint): Delete.
3464         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
3465         declarations.
3466         * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
3467         (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
3468         (target_insert_watchpoint, target_remove_watchpoint): Delete.
3469         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
3470         declarations.
3471
3472 2009-05-06  Hui Zhu  <teawater@gmail.com>
3473
3474         * i386-tdep.c (i386_process_record): Change bzero to memset.
3475
3476 2009-05-06  Hui Zhu  <teawater@gmail.com>
3477
3478         * NEWS: Add item for process record and replay.
3479
3480 2009-05-05  Maxim Grigoriev  <maxim2405@gmail.com>
3481
3482         * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
3483
3484 2009-05-05  Ulrich Weigand  <uweigand@de.ibm.com>
3485
3486         * inferior.h (read_pc, write_pc): Remove.
3487         * regcache.c (read_pc, write_pc): Remove.
3488
3489         * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
3490         of read_pc.
3491         (handle_inferior_event): Use regcache_read_pc instead of read_pc
3492         when determining value of stop_pc.  Replace subsequent uses of
3493         read_pc by inspecting already-retrieved stop_pc value.
3494         (keep_going): Use regcache_read_pc instead of read_pc.
3495
3496         * breakpoint.c (watchpoint_check): Use current frame architecture
3497         and PC instead of current_gdbarch and read_pc ().
3498         * tracepoint.c (set_traceframe_context): Replace PC argument
3499         with FRAME argument.
3500         (trace_start_command, finish_tfind_command): Update calls.
3501         (finish_tfind_command): Compare frame IDs to identify transitions
3502         between frames.
3503         (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
3504         * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
3505         of gdbarch.  Use regcache_read_pc and regcache_write_pc instead
3506         of read_pc and write_pc.
3507         (store_register): Make regcache argument non-const.  Update call
3508         to exec_one_dummy_insn.
3509
3510         * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
3511         * infcmd.c (post_create_inferior): Likewise.
3512         * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
3513         * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
3514         * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
3515         * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
3516         * linux-fork.c (fork_load_infrun_state): Likewise.
3517         * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
3518         * record.c (record_wait): Likewise.
3519         * procfs.c (procfs_wait): Likewise.
3520         * remote-mips.c (common_open, mips_wait): Likewise.
3521         * remote-m32r-sdi.c (m32r_resume): Likewise.
3522
3523         * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
3524         * monitor.c (monitor_create_inferior, monitor_load): Likewise.
3525         * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
3526         * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
3527         * remote-mips.c (mips_create_inferior, mips_load): Likewise.
3528
3529         * solib-darwin.c: Include "regcache.h".
3530         * solib-pa64.c: Include "regcache.h".
3531         * solib-svr4.c: Include "regcache.h.".
3532
3533         * symfile.c: Do not mention read_pc or write_pc in comments.
3534         * dink32-rom.c: Likewise.
3535         * m32r-rom.c: Likewise.
3536         * mips-tdep.c: Likewise.
3537
3538 2009-05-05  Ulrich Weigand  <uweigand@de.ibm.com>
3539
3540         * fork-child.c (startup_inferior): Move setting stop_pc ...
3541         * infcmd.c (post_create_inferior): ... to here.
3542
3543 2009-05-04  Michael Snyder  <msnyder@vmware.com>
3544
3545         * NEWS: Add item for reverse debugging commands.
3546
3547 2009-05-04  Pedro Alves  <pedro@codesourcery.com>
3548
3549         * go32-nat.c (go32_stop): Delete.
3550         (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
3551         (go32_create_inferior): Don't call go32_stop or
3552         go32_kill_inferior.
3553         (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
3554         here.
3555         (init_go32_ops): Don't register go32_stop.
3556
3557 2009-05-02  Eli Zaretskii  <eliz@gnu.org>
3558
3559         * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
3560         sym_name.
3561
3562         * infcall.c (find_function_addr): Avoid compiler warnings for
3563         funaddr.
3564
3565 2009-05-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3566
3567         * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
3568         (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
3569
3570 2009-05-01  Doug Evans  <dje@google.com>
3571
3572         * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
3573         to thread_info.
3574
3575 2009-05-01  Eli Zaretskii  <eliz@gnu.org>
3576
3577         * record.c (_initialize_record): Reformat and clarify doc strings
3578         for stop-at-limit and insn-number-max.
3579
3580         * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
3581
3582 2009-05-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3583
3584         Make specifiable the make_function_type type memory ownership.
3585         * gdbtypes.c (make_function_type): New parameter `objfile', use it
3586         explicitely instead of TYPE-initialized removed local variable
3587         `objfile'.  Describe `objfile' it in the function comment.
3588         (lookup_function_type): Update make_function_type callers.
3589         * gdbtypes.h (make_function_type): Update the prototype.
3590         * jv-lang.c (java_link_class_type): Update make_function_type callers.
3591         * dwarf2read.c (read_subroutine_type): Likewise.
3592         * stabsread.c (read_type): Likewise.
3593
3594 2009-05-01  Eli Zaretskii  <eliz@gnu.org>
3595
3596         * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
3597         printing a bogus "Thread <main>".
3598         (go32_thread_alive): Don't return 1 for null_ptid.
3599
3600         * i386-tdep.c (i386_go32_init_abi): Override the number of
3601         registers due to non-support of SSE.
3602
3603 2009-04-30  Anthony Green  <green@moxielogic.com>
3604
3605         * configure.tgt: Link the moxie simulator in with gdb.
3606
3607 2009-04-30  Paul Pluzhnikov  <ppluzhnikov@google.com>
3608
3609         * elfread.c (elf_symtab_read): Don't assume .data and .rodata
3610         are present.
3611
3612 2009-04-30  Hui Zhu  <teawater@gmail.com>
3613             Michael Snyder  <msnyder@vmware.com>
3614
3615         I386 Linux process record and replay support.
3616
3617         * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
3618         This struct has the argument for the function
3619         "record_linux_system_call".
3620         (i386_linux_intx80_sysenter_record): New function. Parse the
3621         system call instruction and call function
3622         "record_linux_system_call" to record execute log.
3623         (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
3624         Set "i386_linux_intx80_sysenter_record" to
3625         "i386_intx80_record" and "i386_sysenter_record".
3626
3627 2009-04-30  Hui Zhu  <teawater@gmail.com>
3628             Michael Snyder  <msnyder@vmware.com>
3629
3630         I386 architecture process record and replay support.
3631
3632         * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
3633         PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
3634         instruction set.
3635         (aflag, dflag, override, modrm, mod, reg, rm, ot,
3636         i386_record_pc): New variables. Ditto.
3637         (i386_record_modrm, i386_record_lea_modrm_addr,
3638         i386_record_lea_modrm): New functions. Ditto.
3639         (i386_process_record): New function. Parse the instruction in
3640         address "addr" and record the values of registers and memory
3641         that will be changed by this instruction.
3642         (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
3643         "process_record" interface.
3644         * i386-tdep.h (gdbarch_tdep): New function pointers
3645         "i386_intx80_record" and "i386_sysenter_record" that point to
3646         the function that can record "intx80" and "sysenter" execute
3647         log.
3648
3649 2009-04-30  Hui Zhu  <teawater@gmail.com>
3650             Michael Snyder  <msnyder@vmware.com>
3651
3652         * infrun.c (use_displaced_stepping): Return false if process
3653         record and replay target is used.
3654         (proceed): Call function "record_not_record_set" if pocess
3655         record and replay target is used.
3656
3657 2009-04-30  Hui Zhu  <teawater@gmail.com>
3658             Michael Snyder  <msnyder@vmware.com>
3659
3660         Linux process record and replay support.
3661
3662         * Makefile.in (ALLDEPFILES): Add linux-record.c.
3663         (ALL_TARGET_OBS): Add linux-record.o.
3664         * configure.tgt (x86_64-*-linux*): Add linux-record.o.
3665         (i[34567]86-*-linux*): Add linux-record.o.
3666         * linux-record.c, linux-record.h: New file.
3667
3668 2009-04-30  Hui Zhu  <teawater@gmail.com>
3669             Michael Snyder  <msnyder@vmware.com>
3670
3671         Process record and replay target.
3672
3673         * Makefile.in (SFILES): Add record.c.
3674         (COMMON_OBS): Add record.o.
3675         * record.c, record.h: New file.
3676
3677 2009-04-30  Hui Zhu  <teawater@gmail.com>
3678             Michael Snyder  <msnyder@vmware.com>
3679
3680         * target.h (strata): New stratum "record_stratum".
3681
3682 2009-04-30  Hui Zhu  <teawater@gmail.com>
3683             Michael Snyder  <msnyder@vmware.com>
3684
3685         GDBARCH interface for process record and replay.
3686
3687         * gdbarch.sh (process_record): This interface point to the
3688         function that records the inferior execute log.
3689
3690 2009-04-29  Doug Evans  <dje@google.com>
3691
3692         * i386-nat.c (child_post_startup_inferior): Delete, unused.
3693
3694 2009-04-29  Pedro Alves  <pedro@codesourcery.com>
3695
3696         * breakpoint.c (print_exception_catchpoint): Access `b' directly
3697         instead of `b->loc->owner'.
3698         (print_mention_exception_catchpoint): Ditto.
3699
3700 2009-04-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
3701
3702         * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
3703
3704 2009-04-27  Tom Tromey  <tromey@redhat.com>
3705
3706         * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
3707
3708 2009-04-27  Jerome Guitton  <guitton@adacore.com>
3709
3710         * symtab.c (append_exact_match_to_sals): New function, extracted
3711         from expand_line_sal.
3712         (expand_line_sal): Use append_exact_match_to_sals to append exact
3713         matches. If none found, append all best items.
3714
3715 2009-04-27  Jerome Guitton  <guitton@adacore.com>
3716
3717         * main.c (captured_main): Move gdbinit lookups after gdb_init.
3718
3719 2009-04-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
3720
3721         PR gdb/9675:
3722         * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
3723         (read_func_scope): Call inherit_abstract_dies.
3724
3725 2009-04-25  Eli Zaretskii  <eliz@gnu.org>
3726
3727         * Makefile.in (ALLDEPFILES): Remove duplicate entries for
3728         sparc-sol2-nat.c and sparc-sol2-tdep.c.
3729
3730         * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
3731
3732 2009-04-24  Pierre Muller  <muller@ics.u-strasbg.fr>
3733
3734         ARI change: Use "/* ARI: rule */" pattern.
3735         * utils.c: Update ARI patterns.
3736         * gdb_dirent.h: Likewise.
3737
3738 2009-04-23  Anthony Green  <green@moxielogic.com>
3739
3740         * MAINTAINERS: Add moxie target.
3741         * configure.tgt: Add moxie-*-elf target.
3742         * moxie-tdep.c: New file.
3743         * moxie-tdep.h: New file.
3744
3745 2009-04-23  Joel Brobecker  <brobecker@adacore.com>
3746
3747         * ada-lang.c: Remove an extra empty line. No code change.
3748
3749 2009-04-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3750
3751         Fix double free on error inserting the breakpoint instruction.
3752         * breakpoint.c (create_breakpoints): Move the
3753         update_global_location_list call to ...
3754         (break_command_really): ... here together with the second local call
3755         both unified after all the cleanups.
3756
3757 2009-04-23  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
3758             Tom Tromey  <tromey@redhat.com>
3759
3760         * configure, config.in: Regenerate.
3761         * configure.ac: Support for relocatable GDB datadir.  Use
3762         GDB_AC_WITH_DIR.  Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
3763         * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
3764         * top.c (init_main): Add "set data-directory".
3765         * defs.h (gdb_datadir): Declare.
3766         * main.c (gdb_datadir): New global.
3767         (captured_main): Initialize gdb_datadir.  Use relocate_directory.
3768         (relocate_path): New function.
3769         (relocate_directory): Likewise.
3770         (get_init_files): Use relocate_path.
3771         (README): Mention --with-gdb-datadir.
3772
3773 2009-04-23  Joel Brobecker  <brobecker@adacore.com>
3774
3775         * ada-tasks (task_command_1): Call target_find_new_threads.
3776
3777 2009-04-23  Joel Brobecker  <brobecker@adacore.com>
3778
3779         * stack.c (do_gdb_disassembly): Print the exception message if an
3780         error was thrown while trying to perform the disassembly.
3781
3782 2009-04-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
3783
3784         * varobj.c (free_variable): Replace free_current_contents by xfree.
3785
3786 2009-04-22  Kazu Hirata  <kazu@codesourcery.com>
3787
3788         * arm-linux-nat.c (fetch_register, store_register): Use
3789         ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
3790         * arm-linux-tdep.c (arm_linux_supply_gregset,
3791         arm_linux_collect_gregset): Likewise.
3792         * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
3793         * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
3794
3795 2009-04-22  Hui Zhu  <teawater@gmail.com>
3796
3797         * stack.c (_initialize_stack): Set the default of
3798         disassemble-next-line to off.
3799
3800 2009-04-21  Tom Tromey  <tromey@redhat.com>
3801
3802         * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
3803         * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
3804
3805 2009-04-21  Andreas Schwab  <schwab@linux-m68k.org>
3806
3807         * configure.ac: Add quotes to not lose brackets in help text.
3808         * configure: Rebuild.
3809
3810 2009-04-21  Andreas Schwab  <schwab@linux-m68k.org>
3811
3812         * configure.ac: Don't postprocess Makefile in config.status.
3813         Substitute GDB_NM_FILE.  Don't substitute nm_h.
3814         * Makefile.in (GDB_NM_FILE): Substitute.
3815         (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
3816         * configure: Regenerate.
3817         * gnulib/Makefile.in: Regenerate.
3818
3819 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
3820
3821         * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
3822         --with-htmldir): New.
3823         * configure: Regenerate.
3824
3825 2009-04-21  Tom Tromey  <tromey@redhat.com>
3826
3827         * configure: Rebuild.
3828         * configure.ac: Use lower case for start of help strings.  Clean
3829         up --with-sysroot help.
3830
3831 2009-04-21  Tom Tromey  <tromey@redhat.com>
3832
3833         * configure: Rebuild.
3834         * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
3835         * configure.ac: Use AC_HELP_STRING.  Use upper case for variables
3836         in help.
3837
3838 2009-04-21  Pierre Muller  <muller@ics.u-strasbg.fr>
3839
3840         ARI fix: remove "%p".
3841         * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
3842         (ia64_sigtramp_frame_this_id): Ditto.
3843         (ia64_libunwind_frame_this_id): Ditto.
3844         (ia64_libunwind_sigtramp_frame_this_id): Ditto.
3845         * symmisc.c (maintenance_info_psymtabs): Ditto.
3846
3847 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
3848
3849         * configure.ac (--with-relocated-sources): New.
3850         * configure, config.in: Regenerate.
3851         * source.c (add_substitute_path_rule): Remove static.
3852         * source.h (add_substitute_path_rule): Declare.
3853         * main.c: Include "source.h".
3854         (captured_main): Add substitution rule if RELOC_SRCDIR.
3855
3856 2009-04-21  Pierre Muller  <muller@ics.u-strasbg.fr>
3857
3858         * gnu-nat.h (proc_debug): Add missing continuation line in macro.
3859
3860 2009-04-20  David Daney  <ddaney@caviumnetworks.com>
3861
3862         * NEWS: Mention MIPS/Linux hardware watchpoint support.
3863
3864 2009-04-20  David Daney  <ddaney@caviumnetworks.com>
3865
3866         * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
3867         (maint_show_dr, super_close): New variables.
3868         (super_fetch_registers, super_store_registers): Make static.
3869         (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
3870         (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
3871         (pt_watch_style): Define new enum.
3872         (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
3873         Define new structs.
3874         (watch_readback_valid, watch_readback, current_watches, watch_mirror):
3875         New variables.
3876         (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
3877         (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
3878         (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
3879         (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
3880         (type_to_irw, fill_mask, try_one_watch)
3881         (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
3882         (mips_linux_new_thread, populate_regs_from_watches)
3883         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
3884         (mips_linux_close): New functions.
3885         (_initialize_mips_linux_nat): Register watchpoint functions with
3886         the target_ops.  Add show-debug-regs maintenance command.
3887
3888 2009-04-20  David Daney  <ddaney@caviumnetworks.com>
3889
3890         * infrun.c (handle_inferior_event): Move gegisters_changed call down.
3891
3892 2009-04-19  Pedro Alves  <pedro@codesourcery.com>
3893
3894         * NEWS: Mention gdbserver support for x86 Windows CE.
3895
3896 2009-04-19  Eli Zaretskii  <eliz@gnu.org>
3897
3898         * config/djgpp/fnchange.lst: Fix typos.
3899
3900         Set default host and target charsets in the DJGPP port.
3901
3902         * config/djgpp/config.sed (am_cv_langinfo_codeset)
3903         (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
3904         in all configure scripts that define ac_cv_env_CPP_value.
3905
3906         * go32-nat.c (dos_codepage, nl_langinfo): New functions.
3907         Include langinfo.h.
3908
3909         * config/djgpp/nl_types.h: New file.
3910
3911         * config/djgpp/langinfo.h: New file.
3912
3913         * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
3914
3915 2009-04-18  Carlos O'Donell  <carlos@codesourcery.com>
3916
3917         * Makefile.in (MAKEHTML): Set to makeinfo --html.
3918         (MAKEHTMLFLAGS): Set to empty.
3919
3920 2009-04-18  Eli Zaretskii  <eliz@gnu.org>
3921
3922         * NEWS: Mention all new set/show commands added since GDB 6.8 was
3923         released.
3924
3925         * go32-nat.c (go32_sysinfo): Check if the call to
3926         __dpmi_get_capabilities fills the buffer with information, and
3927         don't use the buffer if not.
3928
3929 2009-04-17  Tom Tromey  <tromey@redhat.com>
3930
3931         * charset.c (_initialize_charset): Add special case for "646".
3932
3933 2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>
3934
3935         * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
3936         * configure: Regenerate.
3937         * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
3938         configure substitutions.
3939         (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
3940
3941 2009-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
3942
3943         ARI fix: Do not use %p, replace by call to host_address_to_string
3944         for host pointers.
3945         * darwin-nat.c (darwin_xfer_partial): Apply change.
3946         * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
3947         * gnu-nat.h (proc_debug): Ditto.
3948         * symmisc.c (maintenance_info_symtabs): Ditto.
3949         (maintenance_info_psymtabs): Ditto.
3950         * windows-nat.c (handle_load_dll): Ditto.
3951         (handle_unload_dll, info_w32_command, handle_exception): Ditto.
3952         * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
3953
3954 2009-04-17  Joseph Myers  <joseph@codesourcery.com>
3955
3956         * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
3957         --enable-64-bit-bfd.
3958         (sparc-*-linux*): Likewise.
3959
3960 2009-04-17  Eli Zaretskii  <eliz@gnu.org>
3961
3962         * go32-nat.c (go32_sysinfo): Update list of Windows versions of
3963         the NT family.
3964
3965 2009-04-16  Pedro Alves  <pedro@codesourcery.com>
3966
3967         * remote.c (remote_query_attached): Fix pasto in packet_ok result
3968         checking.
3969
3970 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
3971
3972         * procfs.c (solib_mappings_callback, find_memory_regions_callback):
3973         Revert the previous change.  Might not be correct, actually.
3974
3975 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
3976
3977         * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
3978         (ada_get_current_task, ada_print_exception_breakpoint_nontask)
3979         (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
3980         Remove declaration. These are non-existent functions.
3981
3982 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
3983
3984         * procfs.c (solib_mappings_callback, find_memory_regions_callback):
3985         Fix a compilation warning on mips-irix due to casting from
3986         a pointer of different size.
3987
3988 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
3989
3990         * ada-lang.c (symtab_for_sym): Delete.
3991         (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
3992
3993 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
3994
3995         * ada-lang.c (extract_string): Delete.
3996         (ada_main_name): Reimplement using target_read_string instead of
3997         extract_string.
3998
3999 2009-04-16  Andreas Schwab  <schwab@linux-m68k.org>
4000
4001         * m68klinux-nat.c: Remove obsolete comment.
4002         (fetch_register, store_register): Don't call
4003         gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
4004         which are always nops here.
4005
4006 2009-04-14  Tom Tromey  <tromey@redhat.com>
4007
4008         * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
4009         (c_printstr): Likewise.
4010         * charset.c: Include gdb_wait.h.
4011         (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
4012         (find_charset_names): Use pexecute.  Handle libiconv's output.
4013         Detect errors.
4014         (_initialize_charset): Use xstrdup.
4015         * gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
4016         cases.
4017         (INTERMEDIATE_ENCODING): New define.
4018         * configure, config.in: Rebuild.
4019         * configure.ac: Check for btowc.
4020
4021 2009-04-15  Tom Tromey  <tromey@redhat.com>
4022
4023         * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
4024
4025 2009-04-15  Eli Zaretskii  <eliz@gnu.org>
4026
4027         * utils.c (parse_escape): Initialize target_char to pacify GCC.
4028
4029 2009-04-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4030
4031         * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
4032
4033 2009-04-14  Pierre Muller  <muller@ics.u-strasbg.fr>
4034
4035         ARI fix: sprintf rule.
4036         * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
4037         * ada-lang.c (add_angle_brackets): Use xstrprintf.
4038         (ada_decode): Replace sprintf by xsnprintf.
4039         (find_old_style_renaming_symbol): Ditto.
4040         (ada_to_fixed_type_1, ada_enum_name): Ditto.
4041
4042
4043 2009-04-14  Joel Brobecker  <brobecker@adacore.com>
4044
4045         * target.c (target_mourn_inferior): Call bfd_cache_close_all
4046         after having executed the target mourn_inferior routine.
4047
4048 2009-04-14  Eli Zaretskii  <eliz@gnu.org>
4049
4050         * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
4051         undefined.
4052
4053 2009-04-13  David Daney  <ddaney@caviumnetworks.com>
4054
4055         * infrun.c (maybe_software_singlestep): New function.
4056         (resume): Call maybe_software_singlestep.
4057         (handle_inferior_event): Same.
4058
4059 2009-04-13  Tom Tromey  <tromey@redhat.com>
4060
4061         * python/python-frame.c (frapy_richcompare): Return
4062         Py_NotImplemented, not an error.  Handle Py_NE as well.
4063
4064 2009-04-13  Eli Zaretskii  <eliz@gnu.org>
4065
4066         * charset.c (EILSEQ): Define if not defined by system headers.
4067
4068 2009-04-11  Eli Zaretskii  <eliz@gnu.org>
4069
4070         * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
4071         to be consistent with renaming config.intl.in into config_intl.in.
4072
4073         * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
4074         consistent with the change from 2008-11-09.
4075
4076 2009-04-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
4077
4078         * gdbtypes.c: Remove excessive parentheses at the return keywords.
4079         * varobj.c (varobj_invalidate): Fix indentation.
4080         * varobj.c (varobj_invalidate): Fix formatting text width.
4081
4082 2009-04-08  Vladimir Prus  <vladimir@codesourcery.com>
4083
4084         Implement -exec-jump.
4085
4086         * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
4087         * mi/mi-main.c (mi_cmd_exec_jump): New.
4088         * mi/mi-cmds.c (mi_cmds): Register exec-jump.
4089
4090 2009-04-07  Doug Evans  <dje@google.com>
4091
4092         * symfile.c (symbol_file_clear): Fix indentation.
4093
4094 2009-04-06  Mark Kettenis  <kettenis@gnu.org>
4095
4096         * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
4097
4098 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
4099
4100         * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
4101         (ppc_linux_auxv_parse): New function.
4102         (ppc_linux_read_description): Use ppc_linux_target_wordsize.
4103         (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
4104
4105 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
4106
4107         * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
4108         BFD to contents of SPU name note.
4109         (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
4110         with "from_tty" argument 1 instead of 0.
4111
4112 2009-04-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
4113
4114         * dwarf2read.c
4115         (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
4116         Create the symbol in local scope.
4117         * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
4118
4119 2009-04-02  Keith Seitz  <keiths@redhat.com>
4120
4121         * stabsread.c (read_member_functions): GCC may emit an extra space
4122         at the end of the names "__base_ctor" and "__base_dtor"; so ignore
4123         whitespace when looking for these functions.
4124
4125 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
4126
4127         Change the default value for "set print frame-arguments" to scalars.
4128
4129         * stack.c (print_frame_arguments): Set initial value to "scalars".
4130
4131 2009-04-01  Aleksandar Ristovski  <aristovski@qnx.com>
4132
4133         * mips-tdep.c (mips_numeric_register_alieses): New definition.
4134         (mips_gdbarch_init): Add user registers from
4135         mips_numeric_register_aliases.
4136
4137 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
4138
4139         * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
4140
4141 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
4142
4143         * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
4144         this is the last one.
4145
4146 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
4147
4148         * remote.c (append_resumption): New.
4149         (remote_vcont_resume): Use it.
4150
4151 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
4152
4153         * windows-nat.c (+windows_get_ada_task_ptid): New function.
4154         (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
4155
4156 2009-03-31  Daniel Jacobowitz  <dan@codesourcery.com>
4157             Keith Seitz  <keiths@redhat.com>
4158             Jan Kratochvil  <jan.kratochvil@redhat.com>
4159
4160         PR gdb/6817
4161         * Makefile.in (dbxread.o): Update.
4162         * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
4163         * dwarf2read.c (GDB_FORM_cached_string): New.
4164         (read_partial_die): Use dwarf2_canonicalize_name.
4165         (dwarf2_linkage_name): Use dwarf2_name.
4166         (dwarf2_canonicalize_name): New.
4167         (dwarf2_name): Use dwarf2_canonicalize_name.
4168         (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
4169         * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
4170         * symtab.c (lookup_symbol_in_language): Canonicalize input before
4171         searching.
4172         * cp-name-parser.y: operator() requires two parameters,
4173         according to libiberty.
4174         * minsyms.c (lookup_minimal_symbol): Canonicalize input
4175         before searching.
4176         * NEWS: Update.
4177
4178 2009-03-31  Joel Brobecker  <brobecker@adacore.com>
4179
4180         Provide support for (Ada) task-specific breakpoints.
4181
4182         * ada-lang.h (ada_get_task_number): Add declaration.
4183         (breakpoint_ada_task_match): Delete declaration.
4184         * ada-tasks.c (ada_get_task_number): Make non-static.
4185         * breakpoint.h (struct breakpoint): Add field "task".
4186         * breakpoint.c (print_one_breakpoint_location): Add handling of
4187         task-specific breakpoints.
4188         (create_breakpoint, create_breakpoints, find_condition_and_thread):
4189         New parameter "task".
4190         (break_command_really): Update calls to find_condition_and_thread
4191         and create_breakpoints.
4192         (breakpoint_re_set_one): Update call to find_condition_and_thread.
4193         Set b->task.
4194
4195 2009-03-31  Joel Brobecker  <brobecker@adacore.com>
4196
4197         * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
4198
4199 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
4200
4201         * remote.c (remote_notice_new_inferior): Use ptid_is_pid.  Check
4202         if the thread's ptid without a thread id field is in the list
4203         before calling thread_change_ptid.
4204         (extended_remote_attach_1): In non-stop mode, do not rely on
4205         querying the current thread, instead, query the thread list, and
4206         select the first thread of the process.
4207         * gdbthread.h (first_thread_of_process): Declare.
4208         * thread.c (first_thread_of_process): Define.
4209
4210 2009-03-30  Stan Shebs  <stan@codesourcery.com>
4211
4212         Make tracepoints into a type of breakpoint.
4213         * breakpoint.h (enum bptype): Add bp_tracepoint.
4214         (struct breakpoint): Add fields step_count, pass_count, actions.
4215         (get_tracepoint, get_tracepoint_by_number): Declare.
4216         (all_tracepoints): Declare.
4217         * breakpoint.c: Include tracepoint.h, readline.h.
4218         (ALL_TRACEPOINTS): Move here from tracepoint.c.
4219         (tracepoint_count): Ditto.
4220         (should_be_inserted): GDB does not insert tracepoints itself.
4221         (print_it_typical): Add tracepoint case.
4222         (bpstat_what): Ditto.
4223         (print_one_breakpoint_location): Ditto, and add printing for
4224         pass count, step count, and action list.
4225         (user_settable_breakpoint): Add tracepoint case.
4226         (allocate_bp_location): Ditto.
4227         (set_breakpoint_location_function): Ditto.
4228         (disable_breakpoints_in_shlibs): Ditto.
4229         (mention): Ditto.
4230         (break_command_really): Add argument traceflag, use to choose
4231         basic breakpoint type.
4232         (break_command_1): Pass extra argument.
4233         (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
4234         (breakpoint_re_set_one): Add tracepoint case.
4235         (disable_command, enable_command): Ditto.
4236         (set_tracepoint_count): Move here from tracepoint.c.
4237         (trace_command): Move here from tracepoint.c and use
4238         break_command_really.
4239         (tracepoints_info): Move here from tracepoint.c and call
4240         breakpoints_info.
4241         (enable_trace_command): Move here from tracepoint.c and call
4242         enable_command.
4243         (disable_trace_command): Move here from tracepoint.c and call
4244         disable_command.
4245         (delete_trace_command): Move here from tracepoint.c and call
4246         delete_breakpoint.
4247         (trace_pass_command): Move here from tracepoint.c.
4248         (get_tracepoint_by_number): Ditto.
4249         (tracepoint_save_command): Ditto.
4250         (get_tracepoint): New function.
4251         (all_tracepoints): New function.
4252         (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
4253         deprecate "enable trace" and "disable trace" commands.
4254         * tracepoint.h (struct tracepoint): Remove.
4255         (tracepoint_chain): Remove decl.
4256         (deprecated_create_tracepoint_hook): Remove decl.
4257         (deprecated_delete_tracepoint_hook): Remove decl.
4258         (deprecated_modify_tracepoint_hook): Remove decl.
4259         (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
4260         (free_actions): Update signature.
4261         (validate_actionline): Update signature.
4262         (end_actions_pseudocommand): Declare.
4263         (while_stepping_pseudocommand): Declare.
4264         * tracepoint.c: Include breakpoint.h.
4265         (tracepoint_chain, tracepoint_count): Remove.
4266         (free_actions, make_cleanup_free_actions): Update signature.
4267         (trace_command, set_raw_tracepoint): Remove.
4268         (trace_mention): Remove.
4269         (tracepoints_info): Remove.
4270         (tracepoint_operation, map_args_over_tracepoints): Remove.
4271         (get_tracepoint_by_number): Remove.
4272         (enable_trace_command, disable_trace_command): Remove.
4273         (delete_trace_command, trace_pass_command): Remove.
4274         (trace_actions_command, read_actions): Update signature.
4275         (validate_actionline): Update signature, use bp loc.
4276         (encode_actions): Ditto.
4277         (download_tracepoint): New function, body of trace_start_command.
4278         (trace_start_command): Call it, use all_tracepoints.
4279         (tracepoint_save_command): Remove.
4280         (tracepoint_dump_command): Use get_tracepoint.
4281         (end_actions_pseudocommand): Make globally visible.
4282         (while_stepping_pseudocommand): Ditto.
4283         (_initialize_tracepoint): Move command definitions to breakpoint.c.
4284
4285 2009-03-30  Thiago Jung Bauermann  <bauerman@br.ibm.com>
4286
4287         Expose frames to Python.
4288         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
4289         (SUBDIR_PYTHON_SRCS): Add python-frame.c.
4290         (python-frame.o): New target.
4291         * python/python-frame.c: New file.
4292         * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
4293         gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
4294         gdbpy_initialize_frames): New prototypes.
4295         * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
4296         (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
4297         entries.
4298         * stack.c (find_frame_funname): New function, factored out of
4299         print_frame.
4300         (print_frame): Call find_frame_funname.
4301         * stack.h (find_frame_funname): Add prototype.
4302
4303 2009-03-29  Thiago Jung Bauermann  <bauerman@br.ibm.com>
4304
4305         Remove unused value_object attribute `owned_by_gdb'.
4306         * python/python-value.c (value_object): Remove owned_by_gdb
4307         attribute.
4308         (valpy_dealloc): Remove reference to self->owned_by_gdb.
4309         (valpy_new): Likewise.
4310         (value_to_value_object): Likewise.
4311
4312 2009-03-29  Thiago Jung Bauermann  <bauerman@br.ibm.com>
4313
4314         Change gdb.Value.address from a method to an attribute.
4315         * python/python-value.c (value_object): Add `address' element.
4316         (valpy_dealloc): Decrement reference to self->address if set.
4317         (valpy_new): Initialize val_obj->address.
4318         (valpy_address): Rename to ...
4319         (valpy_get_address): ... this.  Change signature from method to
4320         attribute.  Update self->address if not set.
4321         (value_to_value_object): Initialize val_obj->address.
4322         (value_object_getset): Add `address' element.
4323         (value_object_methods): Remove `address' element.
4324
4325 2009-03-29  Andreas Schwab  <schwab@linux-m68k.org>
4326
4327         * observer.sh: Set LANG/LC_ALL to C, not c.
4328
4329 2009-03-28  Kevin Buettner  <kevinb@redhat.com>
4330
4331         * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
4332         `char' is unsigned.
4333
4334 2009-03-28  Pedro Alves  <pedro@codesourcery.com>
4335
4336         * remote.c (remote_stop_ns): If multi-process extensions are off,
4337         and GDB is requesting the whole process to stop, sent "vCont;t",
4338         not "vCont;t:-1"
4339
4340 2009-03-28  Pedro Alves  <pedro@codesourcery.com>
4341
4342         * inf-loop.c (inferior_event_handler): Avoid calling is_running on
4343         null inferior_ptid.
4344
4345 2009-03-27  Eli Zaretskii  <eliz@gnu.org>
4346
4347         * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
4348
4349 2009-03-26  Doug Evans  <dje@google.com>
4350
4351         * thread.c (do_restore_current_thread_cleanup): Redo test for
4352         whether to restore old->inferior_ptid.
4353
4354 2009-03-26  Tom Tromey  <tromey@redhat.com>
4355
4356         * breakpoint.c (resolve_sal_pc): Preserve original line number
4357         when skipping prologue.
4358
4359 2009-03-26  Doug Evans  <dje@google.com>
4360
4361         * thread.c (inferior_thread) Remove "extern" in definition.
4362
4363 2009-03-26  Thiago Jung Bauermann  <bauerman@br.ibm.com>
4364
4365         Add gdb.Value.is_optimized_out attribute.
4366         * python/python-value.c (valpy_get_is_optimized_out): New
4367         function.
4368         (value_object_getset): New variable.
4369         (value_object_type): Initialize tp_getset element.
4370
4371 2009-03-26  Joel Brobecker  <brobecker@adacore.com>
4372
4373         Recognize missing DW_AT_location as <value optimized out>.
4374         * dwarf2read.c
4375         (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
4376         Call add_symbol_to_list.
4377
4378 2009-03-25  Tom Tromey  <tromey@redhat.com>
4379
4380         * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
4381         * stack.c (print_this_frame_argument_p): Use check_typedef.
4382
4383 2009-03-25  Tom Tromey  <tromey@redhat.com>
4384
4385         * configure: Rebuild.
4386         * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
4387         Rearrange flags setting.  Add comments.
4388
4389 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
4390
4391         * config/i386/nm-i386.h: Remove code within
4392         I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
4393         * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
4394         macro.
4395         * config/i386/nm-cygwin64.h: Ditto.
4396         * config/i386/nm-fbsd.h: Ditto.
4397         * config/i386/nm-go32.h: Ditto.
4398         * config/i386/nm-linux.h: Ditto.
4399         * config/i386/nm-linux64.h: Ditto.
4400
4401 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
4402
4403         ARI fix: "xasprintf" rule.
4404         * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
4405
4406 2009-03-25  Pedro Alves  <pedro@codesourcery.com>
4407
4408         * remote.c (remote_start_remote): In non-stop mode, call
4409         init_wait_for_inferior before adding threads and inferiors.
4410
4411 2009-03-25  Joel Brobecker  <brobecker@adacore.com>
4412
4413         * breakpoint.c (breakpoint_thread_match): Split a large condition
4414         into several smaller conditions.  No behavior change.
4415
4416 2009-03-25  Pedro Alves  <pedro@codesourcery.com>
4417
4418         * infrun.c (infrun_thread_thread_exit): New.
4419         (_initialize_infrun): Attach it to the thread_exit observer.
4420         * thread.c (delete_thread_1): Always call the observer, passing it
4421         the silent flag.
4422         * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter.  If
4423         SILENT, return immediately.
4424
4425 2009-03-25  Pedro Alves  <pedro@codesourcery.com>
4426
4427         * infrun.c (normal_stop): Use has_stack_frames instead of
4428         target_has_stack.
4429         * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
4430         when there is no thread selected.
4431         (mi_cmd_execute): Don't special case commands that can run without
4432         a valid selected thread.
4433         * top.c (execute_command): Don't special case commands that can
4434         run without a valid selected thread.  Use has_stack_frames.
4435         * infcmd.c (ensure_valid_thread): New.
4436         (continue_1, step_1, jump_command, signal_command): Use it.
4437         (detach_command): Error out if there's no selected thread/inferior.
4438         * thread.c (print_thread_info): Allow having no thread selected.
4439         (switch_to_thread): Don't read the PC if there is no current thread.
4440         (do_restore_current_thread_cleanup): Don't record the current
4441         frame if there is no current thread.
4442         (make_cleanup_restore_current_thread): Don't read frame info if
4443         there is no selected thread.
4444         (_initialize_thread): Don't mark commands as
4445         "no_selected_thread_ok".
4446         * frame.c (get_current_frame): Error out if there is no valid
4447         selected thread.
4448         (has_stack_frames): Return false if there is no valid
4449         selected thread.
4450         * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
4451         "no_selected_thread_ok".
4452         * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
4453         (get_cmd_no_selected_thread_ok): Delete.
4454         * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
4455         (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
4456         Delete declaration.
4457         * stack.c (get_selected_block): Use has_stack_frames.
4458
4459 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
4460
4461         Fix size of FPSCR in Power 7 processors.
4462         * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
4463         (PPC_FEATURE_HAS_DFP): New #define.
4464         (ppc_linux_read_description): Check for DFP feature instead of
4465         ISA 2.05 to decide on size of the FPSCR.
4466
4467 2009-03-25  Kevin Buettner  <kevinb@redhat.com>
4468
4469         * mn10300-tdep.c (trad-frame.h): Don't include.
4470         (prologue-value.h): Include.
4471         (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
4472         (struct mn10300_prologue): Define.
4473         (push_reg, translate_rreg, check_for_saved): New functions.
4474         (mn10300_analyze_prologue): Rewrite, using prologue-value
4475         machinery.  Handle more instructions than before.  Permit
4476         instructions to occur in any order.
4477         (mn10300_skip_prologue): Find the extents of the function
4478         in question; mn10300_analyze_prologue no longer does this.
4479         (mn10300_analyze_frame_prologue): New function.
4480         (mn10300_frame_base): New function.
4481         (mn10300_frame_this_id): Rewrite, no longer using trad-frame
4482         implementation.
4483         (mn10300_frame_prev_register): Likewise.
4484         (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
4485         (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
4486         `this_frame'.
4487         (mn10300_frame_unwind_init): Don't call frame_base_set_default().
4488
4489 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
4490
4491         Fix completer problem for filename completion on the first try.
4492
4493         * gdb/completer.h (gdb_completion_word_break_characters): New function.
4494         * gdb/completer.c: Include gdb_assert.h.
4495         (complete_line_internal_reason): New enum.
4496         (complete_line_internal): Change last argument type to
4497         complete_line_internal_reason.
4498         Modify function to handle the different complete_line_internal_reason
4499         argument values.
4500         (complete_line): Adapt to change in complete_line_internal.
4501         (command_completer): Ditto.
4502         (gdb_completion_word_break_characters): Implement new function.
4503         * top.c (init_main): Set  rl_completion_word_break_hook to
4504         gdb_completion_word_break_characters.
4505
4506
4507 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
4508
4509         ARI fix: "strlen d_name" rule.
4510         * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
4511
4512
4513 2009-03-24  Tom Tromey  <tromey@redhat.com>
4514             Pedro Alves  <pedro@codesourcery.com>
4515
4516         * configure, config.in: Rebuild.
4517         * configure.ac: Check for libiconvlist.
4518         * charset.c: Check HAVE_LIBICONVLIST.
4519         * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
4520         LIBICONV_LIBDIR.  Update CPPFLAGS and LIBS.
4521         * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
4522         Remove.
4523         (INTERNAL_CFLAGS_BASE): Update.
4524         (INTERNAL_LDFLAGS): Update.
4525         (CLIBS): Update.
4526
4527 2009-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4528
4529         * configure.ac: Initialize the variable $PREFER_CURSES.
4530         * configure: Regenerated.
4531
4532 2009-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4533
4534         * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
4535         * configure: Regenerated.
4536
4537 2009-03-24  Pierre Muller  <muller@ics.u-strasbg.fr>
4538
4539         ARI fix: "strerror" rule.
4540         * darwin-nat.c (darwin_ptrace): Use safe_strerror.
4541         (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
4542
4543 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4544
4545         * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
4546         before looking up the fields inside our struct type.
4547
4548 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4549
4550         * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
4551         trying to resolve the type qualification.
4552
4553 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4554
4555         * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
4556         we try to apply the attribute on the real type, rather than
4557         its associated typedef.
4558
4559 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4560
4561         * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
4562         to make sure we try to get the modulus of the actual type, not the
4563         associated typedef.
4564
4565 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4566
4567         * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
4568         [OP_ATR_LENGTH]: When using the attribute on a type, make sure
4569         to get the real type, not the associated typedef.
4570
4571 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4572
4573         * ada-lang.c (ada_get_field_index): Add handling of the case
4574         when TYPE is a typedef of a struct.
4575
4576 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4577
4578         Add gdb_usleep as a portable version of usleep based on gdb_select.
4579         * gdb_usleep.h, gdb_usleep.c: New files.
4580         * Makefile.in (SFILES): Add gdb_usleep.c.
4581         (HFILES_NO_SRCDIR): Add gdb_usleep.h.
4582         (COMMON_OBS): Add gdb_usleep.o.
4583         * ser-unix.c (hardwire_send_break): Replace call to gdb_select
4584         by call to gdb_usleep.
4585
4586 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
4587
4588         * buildsym.c (end_symtab): If we ignore the subfiles, then
4589         unlink the associated symtabs if they were already allocated.
4590
4591 2009-03-23  Jerome Guitton  <guitton@adacore.com>
4592
4593         Provide a way to force building of GDB with libcurses.
4594         * configure.ac: Add --with-curses.
4595         * configure: Regenerated.
4596
4597 2009-03-23  Tom Tromey  <tromey@redhat.com>
4598
4599         * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
4600         error message.
4601
4602 2009-03-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
4603
4604         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
4605         solib_contains_address_p instead of searching.
4606
4607 2009-03-23  Tom Tromey  <tromey@redhat.com>
4608
4609         * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
4610         (iconv): Make 'inbuf' argument const.
4611         (convert_between_encodings): Use ICONV_CONST.
4612         (wchar_iterate): Likewise.
4613
4614 2009-03-22  Christopher Faylor  <me+cygwin@cgf.cx>
4615
4616         * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
4617         dynamically loaded function.
4618         (LookupPrivilegeValueA): Ditto.
4619         (OpenProcessToken): Ditto.
4620         (AdjustTokenPrivileges): Rename and define placeholder for address of
4621         dynamically loaded function.
4622         (LookupPrivilegeValueA): Ditto.
4623         (OpenProcessToken): Ditto.
4624         (set_process_privilege): Remove check for loaded functions.
4625         (bad_OpenProcessToken): Define.
4626         (_initialize_loadable): Load token functions from advapi here, setting
4627         OpenProcessToken function to a dummy static function which always return
4628         error if OS doesn't support this functionality.
4629
4630 2009-03-22   Nicolas Roche  <roche@adacore.com>
4631              Christopher Faylor <me+cygwin@cgf.cx>
4632
4633         * win32-nat.c (ctrl_c_handler): New function.
4634         (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
4635         is run in a separate console.
4636
4637 2009-03-22  Christopher Faylor  <me+cygwin@cgf.cx>
4638
4639         * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
4640         for dynamically loaded function.
4641         (DebugBreakProcess): Ditto.
4642         (DebugSetProcessKillOnExit): Ditto.
4643         (EnumProcessModules): Ditto.
4644         (GetModuleFileNameExA): Ditto.
4645         (GetModuleInformation): Ditto.
4646         (DebugActiveProcessStop): Rename and define placeholder for address of
4647         dynamically loaded function.
4648         (DebugBreakProcess): Ditto.
4649         (DebugSetProcessKillOnExit): Ditto.
4650         (EnumProcessModules): Ditto.
4651         (GetModuleFileNameExA): Ditto.
4652         (GetModuleInformation): Ditto.
4653         (psapi_loaded): Delete.
4654         (get_module_name): Don't check psapi_loaded, just rely on the fact that
4655         dynamically loaded functions will return failure if they weren't
4656         previously found.
4657         (has_detach_ability): Delete.
4658         (windows_attach): Remove call to has_detach_ability ().  Just rely on
4659         functions being callable.
4660         (bad_DebugActiveProcessStop): Define.
4661         (bad_DebugBreakProcess): Ditto.
4662         (bad_DebugSetProcessKillOnExit): Ditto.
4663         (bad_EnumProcessModules): Ditto.
4664         (bad_GetModuleFileNameExA): Ditto.
4665         (bad_GetModuleInformation): Ditto.
4666         (_initialize_loadable): Rename from _initialize_psapi.  Initialize all
4667         dynamic storage here, setting nonexistent functions to dummy static
4668         functions which always return error.
4669
4670 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
4671
4672         * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
4673         to the about_to_proceed observer notification.
4674         (mi_about_to_proceed): New.
4675         (mi_on_resume): Only output ^running and the prompt here if the
4676         target was proceeded.
4677         * breakpoint.c (breakpoint_proceeded): New static.
4678         (breakpoint_about_to_proceed): New.
4679         (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
4680         the about_to_proceed observer notification.
4681         * inferior.h (breakpoint_proceeded): Delete declaration.
4682         * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
4683         Notify the about_to_proceed observers.
4684         (struct inferior_status): Delete breakpoint_proceeded member.
4685         (save_inferior_status): Don't save it.
4686         (restore_inferior_status): Don't restore it.
4687         * mi-main.h (mi_proceeded): Declare.
4688         * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
4689         a command.
4690
4691 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
4692
4693         * gdbthread.h (struct thread_info): Add in_infcall member.
4694         * infcall.c (run_inferior_call): Save, set and restore in_infcall.
4695         Remove reverences to suppress_resume_observer.  Refresh
4696         `call_thread' after returning from `proceed'.
4697         * infcmd.c (suppress_resume_observer): Delete.
4698         * inferior.h (suppress_resume_observer): Delete declaration.
4699         * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
4700         inferior function.
4701         * thread.c (set_running): Remove references to
4702         suppress_resume_observer.
4703         * infrun.c (struct inferior_status): Add in_infcall member.
4704         (save_inferior_status): Save it.
4705         (restore_inferior_status): Restore it.
4706
4707 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
4708
4709         * infcall.c (run_inferior_call): Remove references to
4710         suppress_stop_observer.
4711         * infcmd.c (suppress_stop_observer): Delete.
4712         (finish_command_continuation): Remove NOTE.  Don't clear
4713         suppress_stop_observer anymore.
4714         (finish_command_continuation_free_arg): Likewise.
4715         (finish_forward): Remove references to suppress_stop_observer.
4716         Call normal_stop observer if we haven't already.
4717         * inferior.h (suppress_stop_observer): Delete.
4718         * infrun.c (normal_stop): When deciding to suppress the
4719         normal_stop observer, check for proceed_to_finish instead of
4720         suppress_stop_observer.
4721
4722 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
4723
4724         * symfile.c (symfile_relocate_debug_section): Remove check for
4725         SEC_DEBUGGING.
4726
4727 2009-03-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4728             Jim Blandy  <jimb@red-bean.com>
4729             Thiago Jung Bauermann  <bauerman@br.ibm.com>
4730             Tom Tromey  <tromey@redhat.com>
4731
4732         Miscellaneous fixes to the Python code.
4733         * python/python-cmd.c (cmdpy_init): Accept keyword
4734         arguments.
4735         * python/python-value.c (valpy_string): Accept keyword
4736         arguments.
4737         (valpy_binop): Use `break' to exit from the TRY_CATCH block.
4738         Do not call value_to_value_object on NULL RES_VAL.
4739         (value_object_methods): Change `string' entry to also accept
4740         keyword arguments.
4741         (convert_value_from_python): Return a copy of the value if obj is
4742         a gdb.Value object.
4743         (value_object_methods): Mark the `string' method as accepting
4744         keywords, and show method "prototype" in the doc string.
4745         * python/python.c (get_parameter): Don't return inside a
4746         TRY_CATCH.
4747
4748 2009-03-20  Tom Tromey  <tromey@redhat.com>
4749
4750         Add support for convenience functions in Python.
4751         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
4752         (SUBDIR_PYTHON_SRCS): Add python-function.c.
4753         (python-function.o): New target.
4754         * eval.c: Include "python/python.h" and <ctype.h>.
4755         (evaluate_subexp_standard): Handle values of type
4756         TYPE_CODE_INTERNAL_FUNCTION.
4757         * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
4758         * parse.c (write_exp_string): Remove duplicate word in comment.
4759         * python/python-function.c: New file.
4760         * python/python-internal.h (gdbpy_initialize_functions): Add
4761         prototype.
4762         * python/python.c (_initialize_python): Call
4763         gdbpy_initialize_functions.
4764         * valprint.c (value_check_printable): Handle values of type
4765         TYPE_CODE_INTERNAL_FUNCTION.
4766         * value.c: Include "cli/cli-decode.h".
4767         (internal_function): New struct.
4768         (functionlist, internal_fn_type): New static variables.
4769         (lookup_only_internalvar,
4770         lookup_internalvar): Add const qualifier to name argument.
4771         (create_internalvar): Likewise.  Initialize new field.
4772         (set_internal_var): Fix typo in comment.  Don't allow assignment
4773         to canonical variable.
4774         (value_create_internal_function, value_internal_function_name,
4775         call_internal_function, function_command, function_destroyer,
4776         add_internal_function): New functions.
4777         (_initialize_values): Create `function' placeholder command.
4778         Initialize internal_fn_type.
4779         * value.h (lookup_only_internalvar, create_internalvar,
4780         lookup_internalvar): Add const qualifier to name argument.
4781         (internal_function_fn, add_internal_function, call_internal_function,
4782         value_internal_function_name): Add prototypes.
4783         (struct internalvar) <canonical>: New field.
4784
4785 2009-03-20  Tom Tromey  <tromey@redhat.com>
4786
4787         * c-lang.c (evaluate_subexp_c): Call check_typedef.
4788
4789 2009-03-20  Tom Tromey  <tromey@redhat.com>
4790             Julian Brown  <julian@codesourcery.com>
4791
4792         PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
4793         PR i18n/9401, PR exp/9613:
4794         * NEWS: Update
4795         * value.h (value_typed_string): Declare.
4796         (val_print_string): Update.
4797         * valprint.h (print_char_chars): Update.
4798         * valprint.c (print_char_chars): Add type argument.  Update.
4799         (val_print_string): Likewise.
4800         * valops.c (value_typed_string): New function.
4801         * utils.c (host_char_to_target): New function.
4802         (parse_escape): Use host_char_to_target, host_hex_value.  Update.
4803         Remove '^' case.
4804         (no_control_char_error): Remove.
4805         * typeprint.c (print_type_scalar): Update.
4806         * scm-valprint.c (scm_scmval_print): Update.
4807         * scm-lang.h (scm_printchar, scm_printstr): Update.
4808         * scm-lang.c (scm_printchar): Add type argument.
4809         (scm_printstr): Likewise.
4810         * printcmd.c (print_formatted): Update.
4811         (print_scalar_formatted): Update.
4812         (printf_command) <wide_string_arg, wide_char_arg>: New constants.
4813         Handle '%lc' and '%ls'.
4814         * parser-defs.h (struct typed_stoken): New type.
4815         (struct stoken_vector): Likewise.
4816         (write_exp_string_vector): Declare.
4817         * parse.c (write_exp_string_vector): New function.
4818         * p-valprint.c (pascal_val_print): Update.
4819         * p-lang.h (is_pascal_string_type, pascal_printchar,
4820         pascal_printstr): Update.
4821         * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
4822         Add 'char_type' argument.
4823         (pascal_emit_char): Add type argument.
4824         (pascal_printchar): Likewise.
4825         (pascal_printstr): Likewise.
4826         * objc-lang.c (objc_emit_char): Add type argument.
4827         (objc_printchar): Likewise.
4828         (objc_printstr): Likewise.
4829         * macroexp.c (get_character_constant): Handle unicode characters.
4830         Use c_parse_escape.
4831         (get_string_literal): Handle unicode strings.  Use
4832         c_parse_escape.
4833         * m2-valprint.c (print_unpacked_pointer): Update.
4834         (m2_print_array_contents): Update.
4835         (m2_val_print): Update.
4836         * m2-lang.c (m2_emit_char): Add type argument.
4837         (m2_printchar): Likewise.
4838         (m2_printstr): Likewise.
4839         * language.h (struct language_defn) <la_printchar>: Add type
4840         argument.
4841         <la_printstr, la_emitchar>: Likewise.
4842         (LA_PRINT_CHAR): Likewise.
4843         (LA_PRINT_STRING): Likewise.
4844         (LA_EMIT_CHAR): Likewise.
4845         * language.c (unk_lang_emit_char): Add type argument.
4846         (unk_lang_printchar): Likewise.
4847         (unk_lang_printstr): Likewise.
4848         * jv-valprint.c (java_val_print): Update.
4849         * jv-lang.c (java_emit_char): Add type argument.
4850         * f-valprint.c (f_val_print): Update.
4851         * f-lang.c (f_emit_char): Add type argument.
4852         (f_printchar): Likewise.
4853         (f_printstr): Likewise.
4854         * expprint.c (print_subexp_standard): Update.
4855         * charset.h (target_wide_charset): Declare.
4856         (c_target_char_has_backslash_escape, c_parse_backslash,
4857         host_char_print_literally, host_char_to_target,
4858         target_char_to_host, target_char_to_control_char): Remove.
4859         (enum transliterations): New type.
4860         (convert_between_encodings): Declare.
4861         (HOST_ESCAPE_CHAR): New define.
4862         (host_letter_to_control_character, host_hex_value): Declare.
4863         (enum wchar_iterate_result): New enum.
4864         (struct wchar_iterator): Declare.
4865         (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
4866         wchar_push_back): Declare.
4867         * charset-list.h: New file.
4868         * c-valprint.c (textual_name): New function.
4869         (textual_element_type): Handle wide character types.
4870         (c_val_print): Pass original type to textual_element_type.  Handle
4871         wide character types.
4872         (c_value_print): Use textual_element_type.  Pass original type of
4873         value to val_print.
4874         * c-lang.h (enum c_string_type): New type.
4875         (c_printchar, c_printstr): Update.
4876         * c-lang.c (classify_type): New function.
4877         (print_wchar): Likewise.
4878         (c_emit_char): Add type argument.  Handle wide characters.
4879         (c_printchar): Likewise.
4880         (c_printstr): Add type argument.  Handle wide and multibyte
4881         character sets.
4882         (convert_ucn): New function.
4883         (emit_numeric_character): Likewise.
4884         (convert_octal): Likewise.
4885         (convert_hex): Likewise.
4886         (ADVANCE): New macro.
4887         (convert_escape): New function.
4888         (parse_one_string): Likewise.
4889         (evaluate_subexp_c): Likewise.
4890         (exp_descriptor_c): New global.
4891         (c_language_defn): Use exp_descriptor_c.
4892         (cplus_language_defn): Likewise.
4893         (asm_language_defn): Likewise.
4894         (minimal_language_defn): Likewise.
4895         (charset_for_string_type): New function.
4896         * c-exp.y (%union): Add 'svec' and 'tsval'.
4897         (CHAR): New token.
4898         (exp): Add CHAR production.
4899         (string_exp): Rewrite.
4900         (exp) <string_exp>: Rewrite.
4901         (tempbuf): Now global.
4902         (tempbuf_init): New global.
4903         (parse_string_or_char): New function.
4904         (yylex) <tempbuf>: Now global.
4905         <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
4906         Remove.
4907         Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
4908         (c_parse_escape): New function.
4909         * auxv.c (fprint_target_auxv): Update.
4910         * ada-valprint.c (ada_emit_char): Add type argument.
4911         (ada_printchar): Likewise.
4912         (ada_print_scalar): Update.
4913         (printstr): Add type argument.  Update calls to ada_emit_char.
4914         (ada_printstr): Add type argument.
4915         (ada_val_print_array): Update.
4916         (ada_val_print_1): Likewise.
4917         * ada-lang.c (emit_char): Add type argument.
4918         * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
4919         type arguments.
4920         * gdb_locale.h: Include langinfo.h.
4921         * charset.c (_initialize_charset): Set default host charset from
4922         the locale.  Don't register charsets.  Add target-wide-charset
4923         commands.  Call find_charset_names.
4924         (struct charset, struct translation): Remove.
4925         (GDB_DEFAULT_HOST_CHARSET): Remove.
4926         (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
4927         (target_wide_charset_name): New global.
4928         (show_host_charset_name): Handle "auto".
4929         (show_target_wide_charset_name): New function.
4930         (host_charset_enum, target_charset_enum): Remove.
4931         (charset_enum): New global.
4932         (all_charsets, register_charset, lookup_charset, all_translations,
4933         register_translation, lookup_translation): Remove.
4934         (simple_charset, ascii_print_literally, ascii_to_control): Remove.
4935         (iso_8859_print_literally, iso_8859_to_control,
4936         iso_8859_family_charset): Remove.
4937         (ebcdic_print_literally, ebcdic_to_control,
4938         ebcdic_family_charset): Remove.
4939         (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
4940         register_iconv_charsets): Remove.
4941         (target_wide_charset_be_name, target_wide_charset_le_name): New
4942         globals.
4943         (identity_either_char_to_other): Remove.
4944         (set_be_le_names, validate): New functions.
4945         (backslashable, backslashed, represented): Remove.
4946         (default_c_target_char_has_backslash_escape): Remove.
4947         (default_c_parse_backslash, iconv_convert): Remove.
4948         (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
4949         ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
4950         iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
4951         ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
4952         ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
4953         ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
4954         (table_convert_char, table_translation, simple_table_translation):
4955         Remove.
4956         (current_host_charset, current_target_charset,
4957         c_target_char_has_backslash_escape_func,
4958         c_target_char_has_backslash_escape_baton): Remove.
4959         (c_parse_backslash_func, c_parse_backslash_baton): Remove.
4960         (host_char_to_target_func, host_char_to_target_baton): Remove.
4961         (target_char_to_host_func, target_char_to_host_baton): Remove.
4962         (cached_iconv_host_to_target, cached_iconv_target_to_host):
4963         Remove.
4964         (lookup_charset_or_error, check_valid_host_charset): Remove.
4965         (set_host_and_target_charsets): Remove.
4966         (set_host_charset, set_target_charset): Remove.
4967         (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
4968         (set_target_wide_charset_sfunc): New function.
4969         (show_charset): Print target wide character set.
4970         (host_charset, target_charset): Rewrite.
4971         (target_wide_charset): New function.
4972         (c_target_char_has_backslash_escape): Remove.
4973         (c_parse_backslash): Remove.
4974         (host_letter_to_control_character): New function.
4975         (host_char_print_literally): Remove.
4976         (host_hex_value): New function.
4977         (target_char_to_control_char): Remove.
4978         (cleanup_iconv): New function.
4979         (convert_between_encodings): New function.
4980         (target_char_to_host): Remove.
4981         (struct wchar_iterator): Define.
4982         (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
4983         wchar_push_back): New functions.
4984         (do_cleanup_iterator): New function.
4985         (char_ptr): New typedef.
4986         (charsets): New global.
4987         (add_one, find_charset_names): New functions.
4988         (default_charset_names): New global.
4989         (auto_host_charset_name): Likewise.
4990         * aclocal.m4, config.in, configure: Rebuild.
4991         * configure.ac: Call AM_LANGINFO_CODESET.
4992         (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
4993         (AM_ICONV): Invoke earlier.
4994         * acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
4995         LIBICONV_LIBDIR.  Check for libiconv in build tree.
4996         * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
4997         (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
4998         (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
4999         * gdb_obstack.h (obstack_grow_wstr): New define.
5000         * gdb_wchar.h: New file.
5001         * defs.h: Include it.
5002
5003 2009-03-20  Tom Tromey  <tromey@redhat.com>
5004             Jan Kratochvil  <jan.kratochvil@redhat.com>
5005
5006         * dwarf2read.c (process_die): Handle DW_TAG_typedef.
5007         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
5008         typedef.
5009         * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
5010         SYMBOL_TYPE result.
5011         * ada-typeprint.c (print_array_type): Do the NULL check
5012         unconditionally.
5013
5014 2009-03-19  Tom Tromey  <tromey@redhat.com>
5015
5016         * utils.c (do_obstack_free): New function.
5017         (make_cleanup_obstack_free): Likewise.
5018         * defs.h (make_cleanup_obstack_free): Declare.
5019
5020 2009-03-18  Doug Evans  <dje@google.com>
5021
5022         * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
5023         int, not a long long.
5024         (linux_nat_info_proc_cmd): Store pid in long instead of long long.
5025
5026         * expprint.c (dump_raw_expression): Print note if non-NULL.
5027
5028         * printcmd.c (display_uses_solib_p): Redo loop, scan element list
5029         backwards.
5030
5031 2009-03-18  Nathan Sidwell  <nathan@codesourcery.com>
5032
5033         * Makefile.in: Update license to GPLv3.
5034         * ada-exp.y: Update license to GPLv3.
5035         * ada-lex.l: Update license to GPLv3.
5036         * c-exp.y: Update license to GPLv3.
5037         * cp-name-parser.y: Update license to GPLv3.
5038         * darwin-nat-info.c: Update license to GPLv3.
5039         * f-exp.y: Update license to GPLv3.
5040         * gdb_thread_db.h: Update license to GPLv3.
5041         * hppanbsd-nat.c: Update license to GPLv3.
5042         * hppanbsd-tdep.c: Update license to GPLv3.
5043         * hppaobsd-tdep.c: Update license to GPLv3.
5044         * jv-exp.y: Update license to GPLv3.
5045         * m2-exp.y: Update license to GPLv3.
5046         * objc-exp.y: Update license to GPLv3.
5047         * p-exp.y: Update license to GPLv3.
5048         * reply_mig_hack.awk: Update license to GPLv3.
5049         * reverse.c: Update license to GPLv3.
5050         * xtensa-xtregs.c: Update license to GPLv3.
5051
5052 2009-03-18  Pedro Alves  <pedro@codesourcery.com>
5053
5054         * remote.c (remote_close): Don't call generic_mourn_inferior.
5055         (remote_mourn_1): Call generic_mourn_inferior after closing the
5056         target.
5057
5058 2009-03-18  Pedro Alves  <pedro@codesourcery.com>
5059
5060         * remote.c (remote_start_remote): Add missing call to
5061         init_wait_for_inferior in non-stop mode.
5062
5063 2009-03-18  Pedro Alves  <pedro@codesourcery.com>
5064
5065         * breakpoint.c (bpstat_should_step): Only consider software
5066         watchpoints that have a location.
5067
5068 2009-03-17  Joel Brobecker  <brobecker@adacore.com>
5069
5070         Add a target_ops parameter to the to_kill method in struct target_ops.
5071
5072         * target.h (struct target_ops): Add a "target_ops *" parameter to
5073         method to_kill.
5074         (target_kill): Remove macro. Add declaration.
5075         * target.c (debug_to_kill): Delete, no longer necessary.
5076         (target_kill): New function.
5077         (update_current_target):  Stop inheriting the to_kill method.
5078         Do not de_fault it to no_process either.
5079         (setup_target_debug): Do not set current_target.to_kill.
5080         * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
5081         linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
5082         remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
5083         accordingly.
5084
5085 2009-03-17  Doug Evans  <dje@google.com>
5086
5087         * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
5088         glibc 2.3.2 and earlier.
5089
5090 2009-03-17  Joel Brobecker  <brobecker@adacore.com>
5091
5092         * frame.c (get_prev_frame_1): Do not perform the inner_frame
5093         sanity check if this_frame is not NORMAL.
5094         (frame_id_inner): Update the description of this function.
5095
5096 2009-03-17  Hui Zhu  <teawater@gmail.com>
5097
5098         * stack.c: Change the introduce of "disassemble-next-line".
5099
5100 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
5101
5102         * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
5103         declare as extern.
5104
5105 2009-03-17  Hui Zhu  <teawater@gmail.com>
5106
5107         * stack.c: Include valprint.h.
5108         (disassemble_next_line): New enum.
5109         (show_disassemble_next_line): New function.  Show the current
5110         value of disassemble-next-line.
5111         (gdb_disassembly_stub_args): New struct for argument passing
5112         between function do_gdb_disassembly and function
5113         gdb_disassembly_stub.
5114         (gdb_disassembly_stub): New function.  Helper for
5115         gdb_disassembly.
5116         (do_gdb_disassembly): New function.  Use TRY_CATCH to catch
5117         the exception from the gdb_disassembly because it will be
5118         broken by filter sometime.
5119         (print_frame_info): If disassemble-next-line is set to auto
5120         or on and doesn't have the line debug messages for $pc,
5121         output the next instruction.
5122         If disassemble-next-line is set to on and there is line debug
5123         messages, output assembly codes for next line.
5124         (_initialize_stack): Make the "set disassemble-next-line"
5125         command an auto-boolean command.  Change its class to
5126         class_stack.  Place it in the top level set list.  Extend help
5127         to describe the auto mode.
5128
5129 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
5130
5131         * infrun.c (normal_stop): Don't overwrite old_chain.
5132
5133 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
5134
5135         * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
5136         which is undefined, by call to regcache_invalidate, which should
5137         do what the original author wanted to do.
5138
5139 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
5140
5141         * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
5142         (mips_create_inferior): Likewise.
5143
5144 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
5145
5146         * go32-nat.c (go32_create_inferior): Add missing ops parameter.
5147
5148 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
5149
5150         * darwin-nat.c (darwin_resume): Fix a compiler warning when
5151         building on x86_64-darwin.
5152
5153 2009-03-16  Tristan Gingold  <gingold@adacore.com>
5154
5155         * configure.tgt: Add handling for x86_64-darwin.
5156
5157 2009-03-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
5158
5159         * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
5160
5161 2009-03-15  Joel Brobecker  <brobecker@adacore.com>
5162
5163         * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
5164         Use the ops parameter to get to the target beneath, rather than
5165         using the current_target global.  Using the current_target global
5166         was an unintended accident.
5167
5168 2009-03-15  Joel Brobecker  <brobecker@adacore.com>
5169
5170         Fix an error happening while loading symbols from a core file
5171         (on AIX).
5172
5173         * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
5174         to detect whether we're debugging a core file or not.
5175
5176 2009-03-15  Joel Brobecker  <brobecker@adacore.com>
5177
5178         Modernize the aix-thread later by getting rid of the base_target
5179         global.  This brings back to life the AIX port which was otherwise
5180         crashing all the time.
5181
5182         * aix-thread.c (base_target): Delete.
5183         (pd_enable): Do not set base_target.
5184         (aix_thread_attach): Use find_target_beneath instead of base_target.
5185         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
5186         (aix_thread_fetch_registers, aix_thread_store_registers),
5187         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
5188         (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
5189         (aix_thread_kill): Delete. Does not seem necessary.
5190         (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
5191
5192 2009-03-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5193
5194         * stack.c (return_command <retval_exp>): New variables retval_expr
5195         and old_chain.  Inline parse_and_eval to initialize retval_expr.  Check
5196         RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
5197         if RETURN_TYPE is NULL.
5198
5199 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
5200
5201         * remote.c (PACKET_qAttached): New.
5202         (remote_query_attached): New.
5203         (remote_add_inferior): Add new `attached' argument.  Handle it.
5204         (remote_notice_new_inferior, remote_start_remote): Adjust to pass
5205         -1 to remote_add_inferior in new parameter.
5206         (extended_remote_attach_1): Adjust to pass 1 to
5207         remote_add_inferior in the new parameter.
5208         (extended_remote_create_inferior_1): Adjust to pass 0 to
5209         remote_add_inferior in the new parameter.
5210         (_initialize_remote): Add "set/show remote query-attached-packet"
5211         commands.
5212
5213 2009-03-13  Tom Tromey  <tromey@redhat.com>
5214
5215         * symtab.c (lookup_symbol_in_language): Use a cleanup.
5216
5217 2009-03-13  Doug Evans  <dje@google.com>
5218
5219         * exceptions.h: Clean up some comments on catch_exceptions usage.
5220         * exceptions.c: Ditto.  Plus mark catch_errors as superseded by
5221         catch_exceptions.
5222
5223 2009-02-17  Joel Brobecker  <brobecker@adacore.com>
5224
5225         The following patch helps getting rid of a warning inside solib-som.c.
5226
5227         * source.c (source_full_path_of): Constify parameter filename.
5228         * defs.h (source_full_path_of): Update declaration accordingly.
5229
5230 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5231
5232         * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
5233         BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
5234         Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
5235
5236 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5237
5238         * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
5239         promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
5240
5241 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5242
5243         * ada-tasks.c (ada_task_is_alive): Move up and make static.
5244         * ada-lang.h (ada_task_is_alive): Remove declaration.
5245
5246 2009-03-12  Jerome Guitton  <guitton@adacore.com>
5247
5248         * ada-lang.c (ada_delta): Change the type of numerators and
5249         denominators to DOUBLEST, as they may not fit into a long.
5250         (scaling_factor): Ditto.
5251
5252 2009-03-12  Jerome Guitton  <guitton@adacore.com>
5253
5254         * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
5255
5256 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5257
5258         * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
5259         types, if we are unable to determine the actual symbol type
5260         from its tag, then use the static approximation instead.
5261
5262 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5263
5264         Fix crash printing packed record with packed array.
5265
5266         * ada-lang.c (ada_modulus_from_name): New function.
5267         (ada_modulus): In the case where the type length is bigger than
5268         the size of the type used to hold the bounds, try determining
5269         the modulus from the type name.
5270         (ada_value_primitive_packed_val): Fix bug in the computation of
5271         ntarg causing an out-of-buffer invalid access.
5272
5273 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5274
5275         Fix segfault when printing short_integer'last.
5276
5277         * ada-lang.c (ada_find_any_type): Search in the primitive types
5278         if a symbol could not be found.
5279
5280 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5281
5282         * ada-tasks.c (task_states,long_task_states): Add new states
5283         Activating and Acceptor_Delay_Sleep.  Update the description
5284         of state Acceptor_Sleep.
5285
5286 2009-03-12  Jonas Maebe <jonas.maebe@elis.ugent.be>  (obvious change)
5287
5288         Fix a build failure on Darwin following some changes in
5289         the profile of some target_ops methods.
5290
5291         * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
5292         where missing.
5293         (darwin_stop_inferior, darwin_detach): Likewise.
5294
5295 2009-03-12  Vladimir Prus  <vladimir@codesourcery.com>
5296
5297         Include token in ^running notification for CLI commands.
5298
5299         * mi/mi-main.c (mi_execute_command): Set current_token here.
5300         (mi_cmd_execute): Do not set current_token here.
5301
5302 2009-03-12  Vladimir Prus  <vladimir@codesourcery.com>
5303
5304         Fix MI timings.
5305
5306         * mi/mi-main.c (mi_print_timing_maybe): New.
5307         (captured_mi_execute_command): Simplify. Output timings to
5308         CLI commands, too.
5309         (mi_execute_async_cli_command): Do not print timings.
5310         * mi/mi-main.h (mi_print_timing_maybe): Declare.
5311         * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
5312
5313 2009-03-12  Jerome Guitton  <guitton@adacore.com>
5314
5315         * xcoffread.c (process_linenos): Check if the line in the
5316         include table refers to the main source file and, if so,
5317         add them to the main subfile.
5318
5319 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
5320
5321         Fix a build failure on AIX introduced after a change in the profile
5322         of some of the "methods" in the target_ops structure.
5323         * aix-thread.c: Add missing target_ops parameter throughout.
5324
5325         Implement Ada task switching on AIX.
5326         * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
5327         (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
5328
5329 2009-03-11  Daniel Jacobowitz  <dan@codesourcery.com>
5330
5331         * breakpoint.c (bpstat_check_breakpoint_conditions): Use
5332         value_mark and value_free_to_mark.
5333         * objfiles.c (free_objfile): Call objfile_free_data before
5334         freeing the BFD.
5335
5336 2009-03-10  Hui Zhu  <teawater@gmail.com>
5337
5338         * disasm.c (gdb_disassembly): Remove unused argument
5339         "line_num".
5340         * disasm.h (gdb_disassembly): Ditto.
5341         * cli/cli-cmds.c (print_disassembly): Ditto.
5342         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
5343
5344 2009-03-09  Paul Pluzhnikov  <ppluzhnikov@google.com>
5345
5346         * solib.c (solib_contains_address_p): New function.
5347         (solib_name_from_address): Use it.
5348         * printcmd.c (display_uses_solib_p): Use it.
5349         * solib.h (solib_contains_address_p): Declare it.
5350
5351 2009-03-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5352
5353         * varobj.c (free_variable): Call value_free.
5354
5355 2009-03-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5356
5357         PR gdb/9873:
5358         * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
5359         Move the variable `macinfo_type' out of the loop.  Create a new
5360         processing pass before the current one to pre-create `current_file'.
5361         New complaint on misplaced zero/non-zero definitions/includes.
5362         Skip first DW_MACINFO_start_file with `at_commandline' set.
5363
5364 2008-03-09  Vladimir Prus  <vladimir@codesourcery.com>
5365
5366        * solib.c (reload_shared_libraries): Give
5367        inferior a chance to reset solib breakpoint.
5368        Reinit frame cache.
5369
5370 2009-03-08  Christopher Faylor  <me+cygwin@cgf.cx>
5371
5372         * windows-nat.c (dr): Redefine to use largest possible integer which
5373         holds a pointer.
5374         (cygwin_set_dr): Avoid coercion.
5375
5376 2009-03-08  Oswald Buddenhagen  <oswald.buddenhagen@trolltech.de>
5377
5378         * windows-nat.c (windows_create_inferior): Implement --tty handling on
5379         non-cygwin.
5380
5381 2009-03-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
5382
5383         Rename solib_address to solib_name_from_address.
5384         * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
5385         (disable_breakpoints_in_unloaded_shlib): Update.
5386         * printcmd.c (display_uses_solib_p): Likewise.
5387         * stack.c (print_frame): Likewise.
5388         * solib.c: Rename.
5389         * solib.h: Rename.
5390
5391 2009-03-05  Paul Pluzhnikov  <ppluzhnikov@google.com>
5392
5393         * printcmd.c (do_one_display): Reparse exp_string.
5394         (display_uses_solib_p): New function.
5395         (clear_dangling_display_expressions): New function.
5396         (_initialize_printcmd): Add observer.
5397         * solib.c (no_shared_libraries): Swap order of calls to
5398         clear_solib and objfile_purge_solibs.
5399
5400 2009-03-05  Joel Brobecker  <brobecker@adacore.com>
5401
5402         Implement the target-specific part of Ada tasking support
5403         on Tru64.
5404
5405         * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
5406         (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
5407
5408 2009-03-05  Joel Brobecker  <brobecker@adacore.com>
5409
5410         Get rid of the global "base_target" and use "find_target_beneath"
5411         to find the underlying target.
5412         * dec-thread.c (base_target): Delete.
5413         (enable_dec_thread): Remove assignement to base_target.
5414         (dec_thread_detach, dec_thread_wait, dec_thread_wait)
5415         (dec_thread_fetch_registers, dec_thread_store_registers)
5416         (dec_thread_mourn_inferior, dec_thread_pid_to_str):
5417         Update the function profile if necessary.
5418         Use find_target_beneath to call the same method but from
5419         the underlying target, removing the need for "base_target".
5420
5421         * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
5422         Fix a copy/paste error in a few debug traces...
5423
5424         * solib-osf.c (init_so): Use a simpler method for computing
5425         the size of lm_info structure. This also gets rid of warning
5426         emitted by the compiler.
5427
5428 2009-03-05  Pedro Alves  <pedro@codesourcery.com>
5429
5430         * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
5431         duplicates of permanent breakpoints.
5432
5433 2009-03-04  Pedro Alves  <pedro@codesourcery.com>
5434
5435         * inferior.h (notice_new_inferior): Declare.
5436         * infcmd.c (notice_new_inferior): New.
5437         * remote.c (remote_add_inferior, remote_add_thread): New.
5438         (notice_new_inferiors): Rename to...
5439         (remote_notice_new_inferior): ... this.  Add RUNNING argument.
5440         Use remote_add_thread instead of add_thread, passing it the
5441         RUNNING argument.  Add an inferior with remote_add_inferior.  If
5442         we just learned about an inferior, call notice_new_inferior.
5443         (record_currthread): Adjust.
5444         (remote_threads_info): Adjust to use remote_notice_new_inferior.
5445         (remote_start_remote, extended_remote_attach_1): Use
5446         remote_add_inferior.
5447         (process_stop_reply): Adjust.  Call remote_notice_new_inferior
5448         after handling expedited registers and watchpoint state.
5449         (extended_remote_create_inferior_1): Use remote_add_inferior.
5450
5451 2009-03-04  Aleksandar Ristovski  <aristovski@qnx.com>
5452
5453         * infcmd.c (registers_info): Remove register number case.
5454
5455 2009-03-03  Pedro Alves  <pedro@codesourcery.com>
5456
5457         * top.c (quit_target): Check for target_has_execution before
5458         killing or detaching from inferiors.
5459
5460 2009-03-02  Joel Brobecker  <brobecker@adacore.com>
5461
5462         Remove some unused routines.
5463
5464         * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
5465         Delete.
5466         * ada-lang.c (ada_task_list_iterator_ftype)
5467         (iterate_over_live_ada_tasks): Delete.
5468         * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
5469         Delete.
5470
5471 2009-03-01  Doug Evans  <dje@google.com>
5472
5473         * symtab.c: Remove trailing whitespace throughout the file.
5474         (expand_line_sal): Fix some typos and whitespace.
5475
5476         * Makefile.in (clean): rm -f $(DEPDIR)/*.
5477
5478         * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
5479         (init.c): signals/ -> common/.
5480         (signals.o): Update.
5481         * target.h (target_signal_to_string,target_signal_to_string)
5482         (target_signal_from_name,target_signal_to_host_p)
5483         (target_signal_from_host,target_signal_to_host): Move to ...
5484         * common/gdb_signals.h: ... here.  New file.
5485         * common/signals.c: Moved here from signals/signals.c.
5486         #include gdb_signals.h, remove #include of target.h in gdb case.
5487         (target_signal_from_command,default_target_signal_to_host)
5488         (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
5489
5490         Include thread ID in target_wait debugging output.
5491         * infrun.c (print_target_wait_results): New function.
5492         (wait_for_inferior,fetch_inferior_event): Call it.
5493
5494 2009-02-27  Pedro Alves  <pedro@codesourcery.com>
5495
5496         * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
5497         with a ptid_t field.
5498         * linux-thread-db.c (thread_get_info_callback): Build the ptid
5499         using the pid stored in proc_handle.ptid.
5500         (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
5501         (check_for_thread_db, thread_db_detach, check_event)
5502         (thread_db_mourn_inferior, find_new_threads_callback)
5503         (thread_db_find_new_threads_1): Adjust.
5504         * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
5505         (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
5506
5507 2009-02-27  Phil Muldoon  <pmuldoon@redhat.com>
5508
5509         * valprint.c (read_string): Rework clean-up logic. Use
5510         free_current_contents to clean-up buffer.
5511
5512 2009-02-27  Andreas Schwab  <schwab@linux-m68k.org>
5513
5514         * MAINTAINERS: Update e-mail address.
5515
5516 2009-02-26  Phil Muldoon  <pmuldoon@redhat.com>
5517
5518         * python/python-utils.c (python_string_to_unicode): Always return
5519         a new reference.
5520         (python_string_to_target_string): Decrement transient python
5521         instance.
5522         (python_string_to_host_string): Likewise.
5523
5524 2007-02-26  Pedro Alves  <pedro@codesourcery.com>
5525
5526         * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
5527         call to super_fetch_registers.
5528         (mips64_linux_store_registers): Pass `ops' to call to
5529         super_store_registers.
5530
5531 2009-02-25  Doug Evans  <dje@google.com>
5532
5533         * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
5534         error message.
5535
5536         * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
5537         disabled_shlib_breaks, unused.
5538
5539         * printcmd.c (build_address_symbolic): Fix comment.
5540
5541 2009-02-25  Hui Zhu  <teawater@gmail.com>
5542
5543         * cli/cli-script.c (define_command): Add _() to query.
5544         * gnu-nat.c (inf_validate_task_sc): Ditto.
5545         * infcmd.c (kill_if_already_running): Ditto.
5546         (jump_command): Ditto.
5547         (attach_command): Ditto.
5548         * inflow.c (kill_command): Ditto.
5549         * infrun.c (handle_command): Ditto.
5550         * maint.c (maintenance_dump_me): Ditto.
5551         * memattr.c (mem_delete_command): Ditto.
5552         * monitor.c (monitor_interrupt_query): Ditto.
5553         * nto-procfs.c (interrupt_query): Ditto.
5554         * printcmd.c (undisplay_command): Ditto.
5555         * remote-mips.c (mips_kill): Ditto.
5556         * remote.c (interrupt_query): Ditto.
5557         * solib-irix.c (irix_open_symbol_file_object): Ditto.
5558         * solib-osf.c (osf_open_symbol_file_object): Ditto.
5559         * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
5560         * solib-som.c (som_open_symbol_file_object): Ditto.
5561         * solib-svr4.c (open_symbol_file_object): Ditto.
5562         * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
5563         * target.c (kill_or_be_killed): Ditto.
5564         * tracepoint.c (delete_trace_command): Ditto.
5565         * top.c (quit_confirm): Add _() to s that will be used
5566         in query.
5567
5568 2009-02-24  Pierre Muller  <muller@ics.u-strasbg.fr>
5569
5570         Fix windows-nat.c compilation failure.
5571
5572         * windows-nat.c (windows_thread_alive): Fix forward declaration.
5573         (get_windows_debug_event): Add ops parameter to call to windows_resume.
5574
5575 2009-02-23  Pedro Alves  <pedro@codesourcery.com>
5576
5577         * remote-sim.c (gdbsim_resume): Add target_ops* argument.
5578
5579 2009-02-23  Jay Krell  <jay.krell@cornell.edu>  (tiny change)
5580
5581         * symtab.c (find_line_symtab): Initialize exact to avoid
5582         a compiler warning.
5583
5584 2009-02-23  Pedro Alves  <pedro@codesourcery.com>
5585
5586         * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
5587         `ops' to recursive call.
5588
5589 2009-02-23  Pedro Alves  <pedro@codesourcery.com>
5590
5591         * corelow.c (get_core_registers): Adjust.
5592         (core_file_thread_alive): Rename to...
5593         (core_thread_alive): ... this.
5594         (core_pid_to_str): Try gdbarch_core_pid_to_str first.
5595         (init_core_ops): Adjust.
5596         (coreops_suppress_target): Delete.
5597         (_initialize_corelow): Unconditionally add core_ops.
5598         * procfs.c: Include "inf-child.h".
5599         (procfs_ops): Delete.
5600         (init_procfs_ops): Delete.  Reimplement as...
5601         (procfs_target): ... this, inheriting from inf-child.
5602         (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
5603         (procfs_prepare_to_store): Delete.
5604         (procfs_store_registers, procfs_resume): Adjust.
5605         (procfs_open): Delete.
5606         (procfs_suppress_run): Delete.
5607         (procfs_can_run): Delete.
5608         (procfs_mourn_inferior): Adjust.
5609         (procfs_init_inferior): Add target_ops parameter.  Adjust.
5610         (procfs_create_inferior): Don't pass procfs_init_inferior to
5611         fork_inferior.  Instead call it after fork_inferior returns.
5612         (procfs_find_new_threads): Adjust.
5613         (_initialize_procfs): Adjust to use procfs_target instead of
5614         init_procfs_ops.
5615         * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
5616         (lwp_to_thread): Use target_thread_alive.
5617         (sol_thread_open): Delete.
5618         (sol_thread_attach): Delete.
5619         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
5620         (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
5621         to use find_target_beneath.
5622         (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
5623         (sol_thread_xfer_partial): Adjust to use find_target_beneath.
5624         (sol_thread_files_info, sol_thread_kill_inferior): Delete.
5625         (check_for_thread_db): New.
5626         (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
5627         (sol_thread_new_objfile): Call check_for_thread_db.
5628         (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
5629         (sol_thread_can_run): Delete.
5630         (sol_thread_alive): Adjust to use find_target_beneath.
5631         (sol_thread_stop): Delete.
5632         (rw_common): Use target_write_memory or target_read_memory.
5633         (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
5634         (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
5635         (solaris_pid_to_str): Remove check for libthread_db initialization
5636         failing.
5637         (sol_find_new_threads): Remove check for libthread_db
5638         initialization failing, or for an invalid inferior_ptid.  Adjust
5639         to use find_target_beneath.
5640         (sol_core_open, sol_core_close, sol_core_detach,
5641         sol_core_files_info, sol_find_memory_regions,
5642         sol_make_note_section, ignore): Delete.
5643         (init_sol_thread_ops): Make it a thread_stratum target.  Remove
5644         unneeded callback settings.
5645         (init_sol_core_ops): Delete.
5646         (_initialize_sol_thread): No longer call init_sol_core_ops, set
5647         procfs_suppress_run, or hack with core_ops.
5648
5649         * target.h (struct target_ops): Add a target_ops * parameter to
5650         to_resume, to_fetch_registers, to_store_registers, to_thread_alive
5651         and to_find_new_threads.
5652         (target_fetch_registers, target_store_registers)
5653         (target_thread_alive, target_find_new_threads): Redeclare as
5654         function.
5655
5656         * target.c (update_current_target): Do not inherit or de_fault
5657         to_resume, to_fetch_registers, to_store_registers,
5658         to_thread_alive, to_find_new_threads.
5659         (target_resume): Adjust.
5660         (target_thread_alive, target_find_new_threads): New.
5661         (debug_to_resume, debug_to_fetch_registers): Delete.
5662         (target_fetch_registers): New.
5663         (debug_to_store_registers): Delete.
5664         (target_store_registers): New.
5665         (debug_to_thread_alive, debug_to_find_new_threads): Delete.
5666         (setup_target_debug): Adjust.
5667
5668         * gdbcore.h (core_ops): Delete declaration.
5669
5670         * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
5671         inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
5672         i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
5673         hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
5674         nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
5675         alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
5676         bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
5677         hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
5678         ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
5679         m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
5680         mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
5681         ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
5682         shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
5683         vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
5684
5685         * gdbarch.sh (core_pid_to_str): New gdbarch callback.
5686         * gdbarch.h, gdbarch.c: Regenerate.
5687
5688         * sol2-tdep.c: Include "inferior.h".
5689         (sol2_core_pid_to_str): New.
5690         * sol2-tdep.h (sol2_core_pid_to_str): Declare.
5691
5692         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
5693         * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
5694         * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
5695         * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
5696
5697 2009-02-22  Doug Evans  <dje@google.com>
5698
5699         * exec.c (exec_file_attach): Fix comment.
5700
5701 2009-02-22  Pedro Alves  <pedro@codesourcery.com>
5702
5703         Silence a few -Wmissing-prototypes warnings.
5704
5705         PR build/9877:
5706         * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
5707         it static.
5708         * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
5709         * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
5710         * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
5711         (_initialize_amd64nbsd_tdep): ... this.
5712         * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
5713         (_initialize_arm_linux_tdep): Declare.
5714         * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
5715         * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
5716         * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
5717         * avr-tdep.c (avr_return_value): Make it static.
5718         (avr_frame_unwind_cache): Ditto.
5719         * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
5720         (bsd_uthread_solib_loaded): Ditto.
5721         (bsd_uthread_solib_unloaded): Ditto.
5722         (bsd_uthread_target): Ditto.
5723         (_initialize_bsd_uthread): Declare.
5724         * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
5725         (cris_frame_unwind_cache): Ditto.
5726         * frv-tdep.c (frv_return_value): Ditto.
5727         * h8300-tdep.c (h8300_use_struct_convention): Ditto.
5728         (h8300h_use_struct_convention): Ditto.
5729         * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
5730         Ditto.
5731         * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
5732         declarations.
5733         * hppabsd-tdep.c: Include hppabsd-tdep.h.
5734         (hppabsd_find_global_pointer): Make it static.
5735         * hppabsd-tdep.h: New.
5736         * hppanbsd-tdep.c: Include hppabsd-tdep.h.
5737         (hppabsd_init_abi): Remove declaration.
5738         (_initialize_hppabsd_tdep): Remove declaration.
5739         (_initialize_hppanbsd_tdep): Declare.
5740         * hppaobsd-tdep.c: Include hppabsd-tdep.h.
5741         (hppabsd_init_abi): Delete declaration.
5742         (hppaobsd_init_abi): Make it static.
5743         * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
5744         * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
5745         * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
5746         * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
5747         * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
5748         * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
5749         (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
5750         (_initialize_m32c_tdep): Declare.
5751         * m32r-rom.c (_initialize_m32r_rom): Declare.
5752         * m32r-tdep.c (m32r_skip_prologue): Make it static.
5753         (m32r_return_value): Ditto.
5754         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
5755         (m68hc11_return_value): Ditto.
5756         * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
5757         * m88k-tdep.c (m88k_frame_cache): Make it static.
5758         * mep-tdep.c (mep_gdb_print_insn): Ditto.
5759         (mep_return_value): Ditto.
5760         (_initialize_mep_tdep): Declare.
5761         * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
5762         * mips-linux-tdep.c (supply_64bit_reg): Make it static.
5763         (mips_linux_syscall_next_pc): Ditto.
5764         (_initialize_mips_linux_tdep): Declare.
5765         * mips-tdep.c (mips_single_step_through_delay): Make it static.
5766         * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
5767         * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
5768         * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
5769         * mt-tdep.c (_initialize_mt_tdep): Declare.
5770         * nbsd-tdep.c: Include nbsd-tdep.h.
5771         * nto-tdep.c (find_load_phdr): Make it static.
5772         (_initialize_nto_tdep): Declare.
5773         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
5774         static.
5775         (_initialize_ppc_linux_tdep): Declare.
5776         * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
5777         (m32r_insert_watchpoint, m32r_remove_watchpoint)
5778         (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
5779         static.
5780         * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
5781         * rs6000-nat.c: Include xcoffread.h.
5782         (find_toc_address): Don't extern declare get_toc_offset.  Adjust
5783         to call xcoff_get_to_offset.
5784         * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
5785         (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
5786         (rs6000_skip_trampoline_code): Make static.
5787         * s390-tdep.c (s390_regset_from_core_section): Ditto.
5788         * sh-tdep.c (sh_register_reggroup_p): Ditto.
5789         * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
5790         (_initialize_shnbsd_tdep): Declare.
5791         * solib-frv.c (displacement_from_map): Make static.
5792         (_initialize_frv_solib): Declare.
5793         * solib-irix.c (fetch_lm_info): Make static.
5794         (_initialize_irix_solib): Declare.
5795         * solib-som.c: Include solib-som.h.
5796         (som_solib_select): Line break.
5797         * sparc-tdep.c (sparc_regset_from_core_section): Make static.
5798         * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
5799         (_initialize_sparcnbsd_tdep): ... this.
5800         * spu-tdep.c (spu_software_single_step): Make it static.
5801         (_initialize_spu_tdep): Declare.
5802         * vax-tdep.c (vax_frame_cache): Make it static.
5803         * xcoffread.c: Include xcoffread.h.
5804         (get_toc_offset): Rename to ...
5805         (xcoff_get_toc_offset): ... this.
5806         (_initialize_xcoffread): Declare.
5807         * xcoffread.h: New.
5808         * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
5809         * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
5810         static.
5811         (_initialize_xtensa_tdep): Declare.
5812
5813 2008-02-21  Pedro Alves  <pedro@codesorcery.com>
5814
5815         Silence a few -Wmissing-prototypes warnings.
5816
5817         PR build/9877:
5818         * amd64-nat.c: Include "amd64-nat.h".
5819         * fork-child.c (_initialize_fork_child): Ditto.
5820         * gcore.c (_initialize_gcore): Ditto.
5821         * inf-ptrace.c: Include "inf-ptrace.h".
5822         (inf_ptrace_store_registers): Make it static.
5823         * linux-nat.c (linux_nat_terminal_ours): Make it static.
5824         (_initialize_linux_nat): Declare before definition.
5825         * linux-tdep.c: Include "linux-tdep.h".
5826         * linux-thread-db.c (_initialize_thread_db): Declare before
5827         definition.
5828         * proc-service.c (_initialize_proc_service): Ditto.
5829         * remote.c (remote_send_printf): Make it static.
5830         * solib.c: Include "solib.h".
5831         * symfile-mem.c (_initialize_symfile_mem): Declare before
5832         definition.
5833         * ada-lang.c (ada_la_decode, ada_match_name)
5834         (ada_suppress_symbol_printing, ada_is_array_type)
5835         (ada_value_ptr_subscript, ada_array_length)
5836         (ada_to_static_fixed_value): Make them static.
5837         (_initialize_ada_language): Declare before definition.
5838         * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
5839         (ada_task_list_changed, ada_new_objfile_observer): Make them
5840         static.
5841         (_initialize_tasks): Declare before definition.
5842         * addrmap.c (_initialize_addrmap): Declare before definition.
5843         * auxv.c (default_auxv_parse): Make it static.
5844         * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
5845         them static.
5846         * breakpoint.c (remove_sal): Add line break.
5847         (expand_line_sal_maybe): Make it static.
5848         * cp-name-parser.y: Include "cp-support.h".
5849         * cp-valprint.c (cp_find_class_member): Make it static.
5850         * eval.c (value_f90_subarray): Ditto.
5851         * exceptions.c (print_any_exception): Ditto.
5852         * findcmd.c (_initialize_mem_search): Declare before definition.
5853         * frame.c (frame_observer_target_changed): Make it static.
5854         * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
5855         * inf-child.c: Include "inf-child.h".
5856         * inferior.h (valid_inferior_id): Rename to ...
5857         (valid_gdb_inferior_id): ... this.
5858         * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
5859         Make them static.
5860         * jv-lang.c (java_language_arch_info): Make it static.
5861         * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
5862         * osdata.c (info_osdata_command): Make it static.
5863         * regcache.c (regcache_observer_target_changed): Make it static.
5864         * reverse.c (_initialize_reverse): Declare before definition.
5865         * stabsread.c (cleanup_undefined_types_noname)
5866         (cleanup_undefined_types_1): Make them static.
5867         * symfile.c (place_section): Make it static.
5868         * symtab.c (find_pc_sect_psymtab_closer): Make it static.
5869         * target-descriptions.c (_initialize_target_descriptions): Declare
5870         before definition.
5871         * target.c (default_get_ada_task_ptid, find_default_can_async_p)
5872         (find_default_is_async_p, find_default_supports_non_stop): Make
5873         them static.
5874         (target_supports_non_stop): Add prototype.
5875         (dummy_pid_to_str): Make it static.
5876         * utils.c (_initialize_utils): Declare before definition.
5877         * ada-exp.y (_initialize_ada_exp): Declare before definition.
5878         * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
5879         * target.h (struct target_ops): Add a prototype to the
5880         to_can_execute_reverse callback.
5881         * macroscope.c (_initialize_macroscope): Declare before definition.
5882         * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
5883         * python/python.c (_initialize_python): Declare before definition.
5884         * tui/tui-command.c: Include "tui/tui-command.h".
5885         * tui/tui-data.c (init_content_element, init_win_info): Make them
5886         static.
5887         * tui/tui-disasm.c: Include "tui/tui-disasm.h".
5888         * tui/tui-interp.c (_initialize_tui_interp): Declare before
5889         definition.
5890         * tui/tui-layout.c: Include "tui/tui-layout.h".
5891         (_initialize_tui_layout): Declare before definition.
5892         * tui/tui-regs.c: Include "tui/tui-regs.h".
5893         (tui_display_reg_element_at_line): Make it static.
5894         (_initialize_tui_regs): Declare before definition.
5895         * tui/tui-stack.c (_initialize_tui_stack): Declare before
5896         definition.
5897         * tui/tui-win.c: Include "tui/tui-win.h".
5898         (_initialize_tui_win): Declare before definition.
5899         (tui_sigwinch_handler): Make it static.  Wrap in ifdef SIGWINCH.
5900         * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
5901         (tui_get_cmd_list): Add a prototype.
5902         * tui/tui-windata.c: Include tui-windata.h.
5903         * tui/tui-wingeneral.c (box_win): Make it static.
5904         * cli/cli-logging.c (show_logging_command): Make it static.
5905         (_initialize_cli_logging): Declare before definition.
5906         * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
5907         definition.
5908
5909 2009-02-20  Pierre Muller  <muller@ics.u-strasbg.fr>
5910
5911         Extend use of i386_use_watchpoints to all i386 native files
5912         using hardware watchpoints.
5913         * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
5914         * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
5915         * windows-nat.c (init_windows_ops): Ditto.
5916         * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
5917         * config/i386/nm-cygwin64.h: Ditto.
5918         * config/i386/nm-fbsd.h: Ditto.
5919         * config/i386/nm-go32.h: Ditto.
5920
5921 2009-02-19  Joel Brobecker  <brobecker@adacore.com>
5922
5923         * ada-typeprint.c (ada_typedef_print): Remove.  Unused.
5924
5925 2009-02-18  Vladimir Prus  <vladimir@codesourcery.com>
5926
5927         * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
5928         (mi_interpreter_init): Register the above.
5929         * solib.c (clear_solib): Notify solib unload.
5930         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
5931         disable breakpoints on a.out targets.
5932
5933 2009-02-17  Vladimir Prus  <vladimir@codesourcery.com>
5934
5935         * observer.c (observer_test_first_notification_function)
5936         (observer_test_second_notification_function)
5937         (observer_test_third_notification_function): Adjust prototype.
5938
5939 2009-02-17  Pedro Alves  <pedro@codesourcery.com>
5940
5941         * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
5942         (ALL_TARGET_OBS): Add dicos-tdep.o.
5943         (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
5944         * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
5945         gdb_target_obs.
5946         (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
5947         gdb_target_obs.
5948         * dicos-tdep.h, dicos-tdep.c: New.
5949         * amd64-dicos-tdep.c: New.
5950         * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
5951         inferior.h.  Include dicos-tdep.h.
5952         (i386_dicos_init_abi): Call dicos_init_abi.
5953         (i386_dicos_bfd_has_symbol_p): Delete.
5954         (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
5955
5956         * NEWS: Mention x86-64 DICOS target support.
5957
5958 2009-02-16  Doug Evans  <dje@google.com>
5959
5960         * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
5961         All callers updated.
5962         (amd64_get_insn_details): Handle more 3-byte opcode insns.
5963         (amd64_breakpoint_p): Delete.
5964         (amd64_displaced_step_fixup): When fixing up after stepping an int3,
5965         don't back up pc to the start of the int3.
5966         * i386-tdep.c: #include opcode/i386.h.
5967         (i386_skip_prefixes): New function.
5968         (i386_absolute_jmp_p): Constify argument.
5969         (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
5970         (i386_breakpoint_p): Delete.
5971         (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
5972         When fixing up after stepping an int3, don't back up pc to the start
5973         of the int3.
5974
5975 2009-02-16  Pedro Alves  <pedro@codesourcery.com>
5976
5977         * corelow.c (core_close): Don't hardcode the core's pid.
5978         (core_open): Find core threads before calling
5979         post_create_inferior.
5980         (add_to_thread_list, get_core_register_section): Take into account
5981         systems where the regset section names encode the pid of the
5982         inferior.
5983
5984         * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
5985         * gdbarch.h, gdbarch.c: Regenerate.
5986
5987         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
5988         * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
5989         * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
5990         * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
5991
5992 2009-02-14  Vladimir Prus  <vladimir@codesourcery.com>
5993
5994         Include frame information for *stopped due to CLI commands.
5995
5996         * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
5997         * infcmd.c (finish_command_continuation): Pass '1' for
5998         'print_frame' parameter to the observer.
5999         * infrun.c (normal_stop): Don't print mi-specific information
6000         here. Pass 'stop_print_frame' to the 'print_frame' parameter
6001         of the observer.
6002         * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
6003         If we need to print frame, and current uiout is not the MI one,
6004         print frame again.
6005
6006 2009-02-13  Pierre Muller  <muller@ics.u-strasbg.fr>
6007
6008         * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
6009         Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
6010
6011 2009-02-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6012
6013         PR fortran/9806
6014         * dwarf2read.c (process_die <DW_TAG_module>, read_module)
6015         (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
6016
6017 2009-02-11  Pierre Muller  <muller@ics.u-strasbg.fr>
6018
6019         * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
6020         for DW_ATE_signed_char and DW_ATE_unsigned_char
6021         for pascal language.
6022
6023 2009-02-11  Jim Meyering  <meyering@redhat.com>
6024             Jan Kratochvil  <jan.kratochvil@redhat.com>
6025
6026         Avoid NULL dereference.
6027         * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
6028         New variable func_type.
6029
6030 2009-02-11  Pedro Alves  <pedro@codesourcery.com>
6031
6032         * gdbarch.c: Regenerate.
6033
6034 2009-02-10  Pierre Muller  <muller@ics.u-strasbg.fr>
6035
6036         * p-lang.c (is_pascal_string_type): Fix comment.
6037         Determine exact size of char elements for GPC
6038         strings.
6039         (pascal_printstr): Handle char width of 2 or 4.
6040         * p-valprint.c (pascal_val_print): Handle char
6041         of width 2 or 4.
6042
6043 2009-02-07  Daniel Jacobowitz  <dan@codesourcery.com>
6044
6045         * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
6046         inside the loop.  Only call addrmap_set_empty if the compilation unit
6047         had DW_AT_high_pc and DW_AT_low_pc.  Update call to
6048         scan_partial_symbols.
6049         (scan_partial_symbols): Take NEED_PC argument and pass it along with
6050         LOWPC and HIGHPC.
6051         (add_partial_namespace): Take NEED_PC argument and pass it through.
6052         (add_partial_subprogram): Take NEED_PC argument.  Update the addrmap
6053         if necessary.
6054
6055 2009-02-07  Pedro Alves  <pedro@codesourcery.com>
6056
6057         * NEWS: Mention inspecting extra signal information, $_siginfo,
6058         and the qXfer:siginfo:read and qXfer:siginfo:write packets.
6059
6060 2009-02-07  Pedro Alves  <pedro@codesourcery.com>
6061
6062         * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
6063         isn't defined.
6064
6065 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6066
6067         * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
6068         (compat_timer_t, compat_clock_t, struct compat_timeval)
6069         (compat_sigval_t, compat_siginfo_t): New types.
6070         (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
6071         (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
6072         (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
6073         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6074         (amd64_linux_siginfo_fixup): New.
6075         * linux-nat.c (linux_nat_siginfo_fixup): New.
6076         (siginfo_fixup): New.
6077         (linux_xfer_siginfo): Use siginfo_fixup to convert between the
6078         siginfo layout expected by ptrace and the siginfo layout of the
6079         inferior.
6080         (linux_nat_set_siginfo_fixup): New.
6081         * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
6082
6083 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6084
6085         * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
6086         * infrun.c (siginfo_value_read, siginfo_value_write): New.
6087         (siginfo_value_funcs): New.
6088         (siginfo_make_value): New.
6089         (_initialize_infrun): Create the $_siginfo convenience variable.
6090         * gdbtypes.h (append_composite_type_field_aligned): Declare.
6091         * gdbtypes.c (append_composite_type_field): Rename to...
6092         (append_composite_type_field_aligned): ... this.  Add ALIGNMENT
6093         argument.  Handle it.
6094         (append_composite_type_field): Rewrite on top of
6095         append_composite_type_field_aligned.
6096         * value.h (internalvar_make_value): New typedef.
6097         (struct internalvar) <make_value>: New field.
6098         (create_internalvar_type_lazy): Declare.
6099         * value.c (create_internalvar): Clear make_value.
6100         (create_internalvar_type_lazy): New.
6101         (value_of_internalvar): If make_value is set use it.
6102         (preserve_values): Skip internal variables that don't have a
6103         value.
6104         * gdbarch.sh (get_siginfo_type): New.
6105         * gdbarch.h, gdbarch.c: Regenerate.
6106
6107         * linux-tdep.h, linux-tdep.c: New.
6108         * amd64-linux-tdep.c: Include "linux-tdep.h".
6109         (amd64_linux_init_abi): Register linux_get_siginfo_type and
6110         linux_get_siginfo_mapper.
6111         * i386-linux-tdep.c: Include "linux-tdep.h".
6112         (i386_linux_init_abi): Register linux_get_siginfo_type and
6113         linux_get_siginfo_mapper.
6114         * arm-linux-tdep.c: Include "linux-tdep.h".
6115         (i386_linux_init_abi): Register linux_get_siginfo_type and
6116         linux_get_siginfo_mapper.
6117
6118         * linux-nat.c (linux_xfer_siginfo): New.
6119         (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
6120         * remote.c (PACKET_qXfer_siginfo_read)
6121         (PACKET_qXfer_siginfo_write): New.
6122         (feature remote_protocol_features): Add "qXfer:siginfo:read" and
6123         "qXfer:siginfo:write" features.
6124         (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
6125         (_initialize_remote): Add "set/show remote read-siginfo-object"
6126         and "set/show remote write-siginfo-object" commands.
6127
6128         * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
6129         (HFILES_NO_SRCDIR): Add linux-tdep.h.
6130         (ALLDEPFILES): Add linux-tdep.c.
6131
6132         * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
6133         (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
6134         gdb_target_obs.
6135
6136 2009-02-06  Jim Blandy  <jimb@codesourcery.com>
6137             Daniel Jacobowitz  <dan@codesourcery.com>
6138             Vladimir Prus  <vladimir@codesourcery.com>
6139             Pedro Alves  <pedro@codesourcery.com>
6140
6141         * defs.h (enum lval_type): New value: lval_computed.
6142         * value.h (struct lval_funcs): New type.
6143         (allocate_computed_value, value_computed_funcs)
6144         (value_computed_closure): New declarations.
6145         * value.c (struct value): Add a structure to the location union
6146         for computed lvalues, containing 'funcs' and 'closure' members.
6147         (allocate_computed_value, value_computed_funcs)
6148         (value_computed_closure): New functions.
6149         (value_free): For computed lvalues, call the closure's
6150         'free_closure' function before freeing the value itself.
6151         (value_copy): If we're copying an lval_computed value, call the
6152         closure's 'copy_closure' function.
6153         (set_value_component_location): If the original value is a
6154         computed lvalue, then call the closure's 'copy_closure' function.
6155         (value_of_internalvar): If an internal variable's value is a
6156         computed lvalue, make retrieving its value produce an equivalent
6157         computed lvalue.
6158         * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
6159         their read function.
6160         (value_assign): Assign to computed lvalues by calling their write
6161         function.
6162
6163 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6164
6165         * linux-nat.c (linux_nat_wait): Adjust.
6166         (linux_nat_pid_to_str): Adjust.  Remove call to thread_db_init.
6167         * linux-nat.h (thread_db_init): Delete declaration.
6168         * linux-thread-db.c (target_beneath): Delete.
6169         (thread_db_init): Delete.
6170         (thread_db_detach): Use find_target_beneath.
6171         (thread_db_wait): Adjust interface.  Use find_target_beneath.
6172         (thread_db_mourn_inferior): Use find_target_beneath.
6173         (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
6174         (thread_db_async_mask): Delete.
6175         (thread_db_pid_to_str): Adjust interface.  Use
6176         find_target_beneath.
6177         (thread_db_get_thread_local_address): Adjust interface.  Use
6178         find_target_beneath.
6179         (init_thread_db_ops): Delete references to delete functions.
6180         * target.c (update_current_target): Don't inherit or default
6181         to_wait.  Don't inherit to_pid_to_str and
6182         to_get_thread_local_address.
6183         (target_translate_tls_address): Look for a pushed target that
6184         implements to_get_thread_local_address, and use it instead of
6185         checking for target_get_thread_local_address_p.
6186         (target_wait, target_pid_to_str): Reimplement as functions.
6187         (dummy_pid_to_str): New.
6188         (init_dummy_target): Register it.
6189         (debug_to_wait): Delete.
6190         * target.h (struct target_ops): Make to_wait, to_pid_to_str and
6191         to_get_thread_local_address accept a pointer to struct target_ops.
6192         (target_wait): Delete macro, and declare as function.
6193         (target_pid_to_str): Likewise.
6194         (target_get_thread_local_address)
6195         (target_get_thread_local_address_p): Delete.
6196         (noprocess): Add NORETURN and ATTR_NORETURN tags.
6197         * inf-ptrace.c (inf_ptrace_wait): Adjust.
6198         (inf_ptrace_pid_to_str): New.
6199         (inf_ptrace_target): Use inf_ptrace_pid_to_str.
6200         * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
6201         * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
6202         * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
6203         Adjust.
6204         * corelow.c (core_pid_to_str): Adjust.
6205         * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
6206         * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
6207         * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
6208         * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
6209         * hpux-thread.c (hpux_thread_wait): Adjust.
6210         * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
6211         * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
6212         * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
6213         * procfs.c (procfs_pid_to_str): Adjust.
6214         * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
6215         * remote-mips.c (mips_wait): Adjust.
6216         * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
6217         * remote.c (remote_wait, remote_pid_to_str)
6218         (remote_get_thread_local_address): Adjust.
6219         * rs6000-nat.c (rs6000_wait): Adjust.
6220         * sol-thread.c (procfs_pid_to_str): Adjust declaration.
6221         (sol_thread_wait, solaris_pid_to_str): Adjust.
6222         * spu-linux-nat.c (spu_child_wait): Adjust.
6223         * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
6224
6225 2009-02-06  Tom Tromey  <tromey@redhat.com>
6226
6227         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
6228         (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
6229         (python-cmd.o): New target.
6230         * cli/cli-decode.c (set_cmd_completer): Add self parameter to
6231         completer prototype.
6232         (add_cmd): Initialize destroyer member of cmd_list_element. Use
6233         make_symbol_completion_list_fn as completer.
6234         (delete_cmd): Call destroyer if one is set.
6235         * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
6236         completer member.  Add destroyer member.
6237         (set_cmd_completer): Add self parameter to
6238         completer prototype.
6239         * command.h (set_cmd_completer): Add cmd parameter to
6240         completer prototype.
6241         * completer.c (noop_completer, filename_completer,
6242         location_completer, expression_completer, command_completer): Adapt
6243         to new completer prototype.
6244         (complete_line_internal): Pass new parameter to completer function.
6245         * completer.h (noop_completer, filename_completer,
6246         location_completer, expression_completer, command_completer): Adapt
6247         prototypes to new completer prototype.
6248         * interps.c (interpreter_completer): Adapt to new completer
6249         prototype.
6250         * python/python-cmd.c: New file.
6251         * python/python-internal.h (gdbpy_initialize_commands): Add
6252         prototype.
6253         (gdbpy_doc_cst): Add forward declaration.
6254         * python/python.c (gdbpy_doc_cst): Declare.
6255         (_initialize_python): Call gdbpy_initialize_commands.  Initialize
6256         gdbpy_doc_cst.
6257         * symtab.c (make_symbol_completion_list_fn): New function.
6258         * symtab.h (make_symbol_completion_list_fn): Add prototype.
6259
6260 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6261
6262         * target.c (target_get_osdata): Check for equal or higher than
6263         process_stratum, not dummy_stratum.
6264
6265 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6266
6267         * remote.c (extended_remote_can_run): Delete.
6268         (init_remote_ops): Don't register it.
6269         * target.c (target_get_osdata): Don't check for target_can_run.
6270         Instead any target that has already been pushed, otherwise
6271         fallback to the default run target.
6272
6273 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
6274
6275         * target.c (target_create_inferior, target_detach)
6276         (target_mourn_inferior, target_attach, target_close): Do target
6277         debug output.
6278         (debug_to_attach, debug_to_detach, debug_to_create_inferior)
6279         (debug_to_mourn_inferior, debug_to_close): Delete.
6280         (setup_target_debug): Adjust.
6281
6282 2009-02-05  Pedro Alves  <pedro@codesourcery.com>
6283
6284         * target.h (target_stopped_data_address_p): Delete declaration,
6285         and don't define as macro.
6286         * target.c (target_stopped_data_address_p): Delete.
6287
6288 2009-02-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6289             Tom Tromey  <tromey@redhat.com>
6290
6291         * python/python-utils.c (target_string_to_unicode): New function.
6292         * python/python-internal.h (target_string_to_unicode): New prototype.
6293         * python/python-value.c (valpy_string): New function.
6294         (value_object_methods): Add `string' entry.
6295
6296 2009-02-05  Pedro Alves  <pedro@codesourcery.com>
6297
6298         * target.h (target_tid_to_str): Delete.
6299         * thread.c (print_thread_info, thread_apply_all_command)
6300         (thread_apply_command, thread_command, do_captured_thread_select):
6301         Use target_pid_to_str instead of target_tid_to_str.
6302         * linux-fork.c (delete_fork_command): Likewise.
6303
6304 2009-02-05  Pedro Alves  <pedro@codesourcery.com>
6305
6306         * frame.c (has_stack_frames): Make public.
6307         (get_prev_frame): Don't allow a NULL this_frame anymore.
6308         * frame.h (has_stack_frames): Declare.
6309         * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
6310         to get_prev_frame, instead start at get_current_frame.
6311         (varobj_create): Check has_stack_frames before getting any frame;
6312         eliminate one usage of deprecated_safe_get_selected_frame.
6313
6314 2009-02-05  Tom Tromey  <tromey@redhat.com>
6315             Thiago Jung Bauermann  <bauerman@br.ibm.com>
6316
6317         * python/python.c (GdbMethods): Move to bottom of file.
6318         (get_parameter, execute_gdb_command, gdbpy_write,
6319         gdbpy_flush): Remove forward declarations.
6320         (eval_python_from_control_command): Fix error checking of function
6321         PyRun_SimpleString.  Fix error string.
6322         (python_command): Likewise.
6323         (execute_gdb_command): Added from_tty argument.
6324
6325 2009-02-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6326
6327         * language.h (language_dfn): Add la_get_string member.
6328         (LA_GET_STRING): New macro.
6329         (default_get_string): New prototype.
6330         * language.c (default_get_string): New function.
6331         (unknown_language_defn, auto_language_defn, local_language_defn): Use
6332         default_get_string for la_get_string.
6333         * c-lang.c (c_get_string): New function.
6334         (c_language_defn, cplus_language_defn, asm_language_defn): Use
6335         c_get_string for la_get_string.
6336         (minimal_language_defn): Likewise
6337         * ada-lang.c (ada_language_defn): Likewise.
6338         * f-lang.c (f_language_defn): Use default_get_string for
6339         la_get_string.
6340         * jv-lang.c (java_language_defn): Likewise.
6341         * m2-lang.c (m2_language_defn): Likewise.
6342         * objc-lang.c (objc_language_defn): Likewise.
6343         * p-lang.c (p_language_defn): Likewise.
6344         * scm-lang.c (scm_language_defn): Likewise.
6345         * typeprint.c (type_to_string): New function.
6346         * value.h (type_to_string): New prototype.
6347         * valprint.c (val_print_string): Factor out code for reading string
6348         from the inferior into its own function.  Put 2 spaces after period
6349         in comments.
6350         (read_string): New function.
6351         * valprint.h (read_string): New prototype.
6352
6353 2009-01-07  Pierre Muller  <muller@ics.u-strasbg.fr>
6354             Tom Tromey  <tromey@redhat.com>
6355
6356         PR breakpoints/8079:
6357         * breakpoint.c (print_one_breakpoint): Use exp_string field
6358         to display expression of watchpoints.
6359         (mention): Likewise.
6360         (watch_command_1): Remove trailing whitespace from expression.
6361         * printcmd.c (struct display) <exp_string>: New field.
6362         (display_command): Set exp_string.
6363         (free_display): Free exp_string.
6364         (clear_displays): Use free_display.
6365         (do_one_display): Print exp_string.
6366         (display_info): Likewise.
6367
6368 2009-02-04  Tom Tromey  <tromey@redhat.com>
6369             Thiago Jung Bauermann  <bauerman@br.ibm.com>
6370             Phil Muldoon  <pmuldoon@redhat.com>
6371
6372         * python/python-internal.h (gdbpy_get_value_from_history): Rename
6373         prototype to gdbpy_history.
6374         (gdbpy_is_string): Declare.
6375         (python_string_to_host_string): Declare.
6376         * python/python-utils.c (gdbpy_is_string): New function.
6377         (unicode_to_encoded_string): New function.
6378         (unicode_to_target_string): Use it.
6379         (python_string_to_host_string): New function.
6380         * python/python-value.c (valpy_address): New function.
6381         (convert_value_from_python): Use gdbpy_is_string.  Change to throw
6382         Python exception instead of a GDB exception on error.  Properly check
6383         Python booleans.
6384         (valpy_getitem): Convert field name to host string.  Handle array
6385         accesses.  Adapt to new behaviour of convert_value_from_python.
6386         (valpy_new): Adapt to new behaviour of convert_value_from_python.
6387         (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
6388         VALPY_BITXOR, VALPY_BITOR>: New constants.
6389         (valpy_binop): Update.  Adapt to new behaviour of
6390         convert_value_from_python.
6391         (valpy_invert): New function.
6392         (valpy_lsh): Likewise.
6393         (valpy_rsh): Likewise.
6394         (valpy_and): Likewise.
6395         (valpy_or): Likewise.
6396         (valpy_xor): Likewise.
6397         (valpy_richcompare): Call convert_value_from_python instead of doing
6398         conversions itself.
6399         (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
6400         (gdbpy_get_value_from_history): Rename
6401         function to gdbpy_history.
6402         (gdbpy_initialize_values): Don't set tp_new.
6403         (value_object_type): Add valpy_new.
6404         (value_object_methods): Add `address' entry.
6405         (value_object_as_number): Update for new methods.
6406         * python/python.c (GdbMethods): Rename entry from
6407         `get_value_from_history' to `history'.
6408
6409 2009-02-04  Jerome Guitton  <guitton@adacore.com>
6410
6411         * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
6412         of type to guard against a crash.
6413
6414 2009-02-04  Jerome Guitton  <guitton@adacore.com>
6415
6416         * value.c (value_from_contents_and_address): Always return
6417         a lval_memory value, even if address is null.
6418
6419 2009-02-04  Tristan Gingold  <gingold@adacore.com>
6420
6421         * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
6422         (amd64_darwin_sigcontext_addr): Ditto.
6423         (darwin_dwarf_signal_frame_p): Ditto.
6424         (i386_darwin_init_abi): Handle signal frames, use the const for
6425         sc_num_regs.
6426         (x86_darwin_init_abi_64): Ditto.
6427
6428 2009-02-04  Tristan Gingold  <gingold@adacore.com>
6429
6430         * i386-tdep.c (i386_sigtramp_p): Make it public.
6431         * i386-tdep.h (i386_sigtramp_p): Declare.
6432
6433 2009-02-04  Tristan Gingold  <gingold@adacore.com>
6434
6435         * machoread.c (macho_symfile_read): Read minsymtab also from
6436         shared libraries.
6437         (macho_symfile_read): Try to read dwarf2 frame info from main
6438         object file, but not from OSO files.
6439         (macho_symfile_offsets): Update section names for latest BFD
6440         changes.
6441         * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
6442         (x86_darwin_init_abi_64): Ditto.
6443         * solib-darwin.c: New file.
6444         * solib-darwin.h: New file.
6445         * configure.tgt: Add solib.o solib-darwin.o for Darwin.
6446
6447 2009-02-04  Tristan Gingold  <gingold@adacore.com>
6448
6449         * solist.h (struct target_so_ops): Comment fallback behavior for
6450         operation same.
6451
6452 2009-02-03  Tom Tromey  <tromey@redhat.com>
6453
6454         * completer.c (add_struct_fields): Check type_name against NULL
6455         before use.
6456
6457 2009-02-03  Joel Brobecker  <brobecker@adacore.com>
6458
6459         * MAINTAINERS: Update Elena's email address.
6460
6461 2009-02-02  Joel Brobecker  <brobecker@adacore.com>
6462
6463         * breakpoint (update_watchpoint): Minor comment adjustment.
6464
6465 2009-02-02  Tom Tromey  <tromey@redhat.com>
6466
6467         PR gdb/9594:
6468         * completer.c (count_struct_fields): Count method names.
6469         (add_struct_fields): Add matching method names.
6470
6471 2009-02-02  Doug Evans  <dje@google.com>
6472
6473         * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
6474         doing any further tcl/tk configury.  Don't configure gdbtk if
6475         tcl or tk check fails.
6476         * aclocal.m4: Regenerate.
6477         * configure: Regenerate.
6478
6479 2009-02-02  Tom Tromey  <tromey@redhat.com>
6480
6481         PR exp/9059:
6482         * valops.c (find_overload_match): Follow typedefs before taking
6483         address of object argument.
6484
6485 2009-02-01  Doug Evans  <dje@google.com>
6486
6487         * target.h (target_waitstatus_to_string): Declare.
6488         * target.c (target_waitstatus_to_string): New function.  Copied from
6489         debug_to_wait.  Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
6490         TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
6491         TARGET_WAITKIND_NO_HISTORY.
6492         (debug_to_wait): Call it.
6493         * infrun.c (wait_for_inferior): If debug_infrun, print result of
6494         target_wait.
6495         (fetch_inferior_event): Ditto.
6496
6497 2009-01-30  Tom Tromey  <tromey@redhat.com>
6498
6499         * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
6500
6501 2009-01-30  Vladimir Prus  <vladimir@codesourcery.com>
6502
6503         PR 8145.
6504         * thread.c (do_captured_list_thread_ids): Report the current
6505         thread id.
6506
6507 2009-01-30  Vladimir Prus  <vladimir@codesourcery.com>
6508
6509         * breakpoint.c (create_breakpoint, create_breakpoints)
6510         (break_command_really, set_breakpoint): New parameter enabled.
6511         (create_breakpoint, break_command_really): Make breakpoint
6512         disabled if so requested.
6513         * breakpoint.h (set_breakpoint): New parameter enabled.
6514         * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
6515
6516 2009-01-28  Doug Evans  <dje@google.com>
6517
6518         * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
6519         (amd64_displaced_step_fixup): Declare.
6520         * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
6521         (amd64_arch_regmap): Move out of amd64_analyze_stack_align
6522         and make static global.
6523         (amd64_arch_regmap_len): New static global.
6524         (amd64_arch_reg_to_regnum): New function.
6525         (struct amd64_insn): New struct.
6526         (struct displaced_step_closure): New struct.
6527         (onebyte_has_modrm,twobyte_has_modrm): New static globals.
6528         (rex_prefix_p,skip_prefixes)
6529         (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
6530         (amd64_insn_length,amd64_get_unused_input_int_reg)
6531         (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
6532         (amd64_displaced_step_copy_insn)
6533         (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
6534         (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
6535         (amd64_displaced_step_fixup): New functions.
6536         * amd64-linux-tdep.c: #include arch-utils.h.
6537         (amd64_linux_init_abi): Install displaced stepping support.
6538
6539 2009-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
6540             Jerome Guitton  <guitton@adacore.com>
6541
6542         * configure, config.in: Regenerated.
6543         * configure.ac: Add --with-system-gdbinit.
6544         * main.c (get_init_files): New.
6545         (captured_main): Use get_init_files.  Load system gdbinit before
6546         $HOME/.gdbinit.
6547         (print_gdb_help): Print location of init files.
6548
6549 2009-01-28  Pedro Alves  <pedro@codesourcery.com>
6550
6551         * corefile.c (generic_search): Delete disabled code.
6552         * gdbcore.h (generic_search): Delete declaration.
6553
6554 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
6555
6556         * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
6557         parent to the child.
6558         * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
6559         * inf-ptrace.c (inf_ptrace_follow_fork): Likewise.  Use
6560         remove_breakpoints to remove breakpoints from the parent.
6561
6562 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
6563
6564         PR backtrace/9458, PR backtrace/8864:
6565         * frame.c (create_new_frame): Update the frame's cached PC before
6566         finding its unwinder.  Use frame_id_build to build the new frame's
6567         id.
6568         * stack.c (parse_frame_specification_1): Correct setting ``addrs''
6569         array values from the ``args'' array values.
6570
6571 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
6572
6573         * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
6574         (create_array_type, create_set_type, init_flags_type)
6575         (copy_type_recursive): Replace pairs of calls to XALLOC and memset
6576         with a call to XZALLOC or XCALLOC, and pairs of calls to
6577         obstack_alloc and memset with a call to OBSTACK_ZALLOC.
6578
6579 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
6580
6581         Add "maint set|show internal-error|internal-warning quit|corefile
6582         ask|yes|no" commands.
6583
6584         PR gdb/7580:
6585         * utils.c (internal_problem_ask, internal_problem_yes)
6586         (internal_problem_no, internal_problem_modes): New.
6587         (struct internal_problem): Remove FIXME.  Make should_quit and
6588         should_dump_core types to char *.
6589         (internal_vproblem, internal_error_problem)
6590         (internal_warning_problem): Adjust.
6591         (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
6592         functions.
6593         (add_internal_problem_command): New.
6594         (_initialize_utils): New.
6595
6596 2009-01-25  Pedro Alves  <pedro@codesourcery.com>
6597
6598         * infcmd.c (program_info): Use paddress instead of casting stop_pc
6599         to unsigned long.
6600
6601 2009-01-24  Pedro Alves  <pedro@codesourcery.com>
6602
6603         * infrun.c (normal_stop): Don't call
6604         deprecated_update_frame_pc_hack.
6605         * frame.c (deprecated_update_frame_pc_hack)
6606         (deprecated_update_frame_base_hack): Delete, and ...
6607         (create_new_frame): ... inline here.
6608         * frame.h (deprecated_update_frame_pc_hack)
6609         (deprecated_update_frame_base_hack): Delete declarations.
6610
6611 2009-01-23  Pedro Alves  <pedro@codesourcery.com>
6612
6613         * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
6614         * cli/cli-setshow.c (do_setshow_command): Handle it.
6615         * command.h (enum var_types): Add var_zuinteger.
6616         (add_setshow_zuinteger_cmd): Declare.
6617
6618         * valprint.c (_initialize_valprint): Change the set input-radix
6619         and set output-radix commands to zuinteger type.
6620
6621 2009-01-23  Pedro Alves  <pedro@codesourcery.com>
6622
6623         PR gdb/9664:
6624         * infrun.c (normal_stop): Tag threads as stopped, and run the
6625         hook-stop before printing the stack frame.
6626
6627 2009-01-22  Pedro Alves  <pedro@codesourcery.com>
6628
6629         PR c++/9631:
6630         * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
6631         vbasetype.
6632
6633 2009-01-20  Kazu Hirata  <kazu@codesourcery.com>
6634
6635         * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
6636         unsigned long.
6637
6638 2009-01-20  Daniel Jacobowitz  <dan@codesourcery.com>
6639
6640         PR gdb/9346
6641         * infcmd.c (signal_command): Do not specify a resume PC.
6642
6643 2009-01-19  Doug Evans  <dje@google.com>
6644
6645         * dummy-frame.c (dummy_frame): Replace regcache member with
6646         caller_state.
6647         (dummy_frame_push): Replace caller_regcache arg with caller_state.
6648         All callers updated.
6649         (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
6650         (dummy_frame_pop): Rewrite.  Verify requested frame is in the
6651         dummy frame stack.  Restore program state.
6652         (cleanup_dummy_frames): Rewrite.
6653         (dummy_frame_sniffer): Update.  Make static.
6654         * dummy-frame.h (regcache,frame_info): Delete forward decls.
6655         (inferior_thread_state): New forward decl.
6656         (dummy_frame_push): Update prototype.
6657         * frame.c (frame_pop): dummy_frame_pop now does all the work for
6658         DUMMY_FRAMEs.
6659         * infcall.c (breakpoint_auto_delete_contents): Delete.
6660         (get_function_name,run_inferior_call): New fns.
6661         (call_function_by_hand): Simplify by moving some code to
6662         get_function_name, run_inferior_call.  Inferior function call wrapped
6663         in TRY_CATCH so there's less need for cleanups and all exits from
6664         proceed are handled similarily.  Detect program exit.
6665         Detect program stopping in a different thread.
6666         Make error messages more consistent.
6667         * inferior.h (inferior_thread_state): Declare (opaque type).
6668         (save_inferior_thread_state,restore_inferior_thread_state,
6669         make_cleanup_restore_inferior_thread_state,
6670         discard_inferior_thread_state, get_inferior_thread_state_regcache):
6671         Declare.
6672         (save_inferior_status): Update prototype.
6673         * infrun.c: (normal_stop): When stopped for the completion of an
6674         inferior function call, verify the expected stack frame kind.
6675         (inferior_thread_state): New struct.
6676         (save_inferior_thread_state,restore_inferior_thread_state,
6677         do_restore_inferior_thread_state_cleanup,
6678         make_cleanup_restore_inferior_thread_state,
6679         discard_inferior_thread_state,
6680         get_inferior_thread_state_regcache): New functions.
6681         (inferior_status): Move stop_signal, stop_pc, registers to
6682         inferior_thread_state.  Remove restore_stack_info.
6683         (save_inferior_status): Remove arg restore_stack_info.
6684         All callers updated.  Remove saving of state now saved by
6685         save_inferior_thread_state.
6686         (restore_inferior_status): Remove restoration of state now done by
6687         restore_inferior_thread_state.
6688         (discard_inferior_status): Remove freeing of registers, now done by
6689         discard_inferior_thread_state.
6690
6691 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
6692
6693         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
6694         at a time, times NUM_TO_SCROLL.
6695         * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
6696         fetch the selected frame if there is no stack.
6697
6698 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
6699
6700         PR gdb/9747:
6701         * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
6702         Declare.
6703         * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
6704         * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
6705         is thrown while handling an event, finish the thread state.
6706         (normal_stop): Use finish_thread_state cleanup.
6707         * infcmd.c (run_command_1): If an error is thrown while starting
6708         the inferior, finish the thread state.
6709
6710 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
6711
6712         * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
6713         skip breakpoints without a location (pending breakpoints).
6714
6715 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
6716
6717         PR build/9186:
6718         * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
6719
6720 2009-01-18  Nick Roberts  <nickrob@snap.net.nz>
6721
6722         * thread.c (thread_command): Move call to annotate_thread_changed
6723         to...
6724         (do_captured_thread_select): ... here, to avoid printing an
6725         annotation if the thread change generates an exception.
6726
6727 2009-01-16  Joel Brobecker  <brobecker@adacore.com>
6728
6729         * NEWS: Document x86_64/MinGW as a new native configuration.
6730
6731 2009-01-16  Joel Brobecker  <brobecker@adacore.com>
6732
6733         * NEWS: Move the documentation of "info os processes" to
6734         the appropriate section (documenting the new commands).
6735
6736 2009-01-15  Doug Evans  <dje@google.com>
6737
6738         * target.h (target_signal_to_string): Make return type const char *.
6739         (target_signal_to_name): Ditto.
6740         (target_signal_from_name): Make arg const char *.
6741         * infrun.c (sig_print_info): Update.
6742         * signals/signals.c (signals): Make array and struct members const.
6743         (target_signal_to_string): Make return type const char *.
6744         (target_signal_to_name): Ditto.
6745         (target_signal_from_name): Make arg const char *.
6746
6747 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
6748             Tristan Gingold  <gingold@adacore.com>
6749
6750         * solist.h (struct target_so_ops): New member bfd_open.
6751         (solib_find): Add prototype.
6752         (solib_bfd_fopen): Add prototype.
6753         * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
6754         from solib_bfd_open.
6755         (solib_bfd_open): Use ops->bfd_open override if present.  Call
6756         solib_find and solib_bfd_open otherwise.
6757
6758         * objfiles.h (OBJF_KEEPBFD): New define.
6759         * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
6760         objfile flag is set.
6761         * solib.c (symbol_add_stub): Do not allocate second BFD for
6762         shared library; use OBJF_KEEPBFD flag on solib objfile.
6763
6764 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
6765
6766         * frame.c (get_frame_arch): Abort if called with NULL this_frame.
6767
6768 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
6769
6770         * value.h (address_of_variable): Add prototype.
6771         (locate_var_value): Remove prototype.
6772
6773         * findvar.c (read_var_value): Do not attempt to default frame
6774         to selected frame.
6775         (locate_var_value): Remove function.
6776         * valops.c (value_of_variable): Retrieve selected frame for
6777         symbols that require a frame when called with NULL block.
6778         * valops.c (address_of_variable): New function.
6779
6780         * eval.c (evaluate_subexp_for_address): Call address_of_variable
6781         instead of calling locate_var_value.
6782         (evaluate_subexp_with_coercion): Likewise.
6783
6784 2009-01-14  Daniel Jacobowitz  <dan@codesourcery.com>
6785
6786         * NEWS: Document "define" for prefixed commands.
6787         * cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
6788         show_user_1 for prefix commands.
6789         * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
6790         * cli/cli-script.c (validate_comname): Rewrite to handle prefix
6791         commands.  Return the containing command list.
6792         (define_command, document_command): Update to handle prefix commands.
6793         (show_user_1): Add prefix and name arguments.  Handle prefix
6794         commands.
6795         * cli/cli-script.h (show_user_1): Update prototype.
6796
6797 2009-01-14  Kai Tietz  <kai.tietz@onevision.com>
6798
6799         * ser-mingw.c (console_select_thread): Add return to make
6800         compiler happy.
6801         (pipe_select_thread): Likewise.
6802         (file_select_thread): Likewise.
6803
6804 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
6805
6806         * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
6807         previous change.
6808
6809 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
6810
6811         * remote.c (extended_remote_mourn_1): Invalidate our notion of
6812         current general thread.
6813
6814 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
6815
6816         * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
6817         without a live selected thread.
6818
6819 2009-01-14  Joel Brobecker  <brobecker@adacore.com>
6820
6821         Update the copyright notice of some of the files I missed
6822         in the previous copyright update.
6823
6824 2009-01-14  Joel Brobecker  <brobecker@adacore.com>
6825
6826         * windows-nat.c (handle_unload_dll): Use %p to print the DLL
6827         base address instead of casting it to DWORD.
6828
6829 2009-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
6830
6831         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
6832         for NULL frame pointers.
6833
6834 2009-01-13  Mark Kettenis  <kettenis@gnu.org>
6835
6836         * utils.c (host_address_to_string): Reimplement in a way that
6837         avoids the cast of the address to long.
6838
6839 2009-01-13  Joel Brobecker  <brobecker@adacore.com>
6840
6841         * mdebugread.c (parse_symbol): Save the symbol private data
6842         using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
6843         (psymtab_to_symtab_1): Likewise.
6844         (parse_procedure): Declare variable "e" only in the scope
6845         where it is used. Extract the symbol private data using
6846         SYMBOL_VALUE_BYTES.
6847
6848 2009-01-13  Jim Blandy  <jimb@codesourcery.com>
6849
6850         Abstract out common code for copying value locations.
6851
6852         * value.h (set_value_component_location): New declaration.
6853         * value.c (set_value_component_location): New function.
6854         (value_primitive_field): Use it.
6855         * valarith.c (value_subscript, value_subscripted_rvalue): Same.
6856         * valops.c (search_struct_field, value_slice): Same.
6857         * ada-lang.c (coerce_unspec_val_to_type)
6858         (ada_value_primitive_packed_val): Same.
6859
6860 2009-01-13  Joel Brobecker  <brobecker@adacore.com>
6861
6862         * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
6863
6864 2009-01-12  Christopher Faylor  <me+cygwin@cgf.cx>
6865
6866         * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
6867         throughout.
6868         * i386-cygwin-tdep.c: Ditto.
6869         * i386-windows-nat.c: Ditto.
6870         * windows-nat.h: Ditto.
6871         * windows-tdep.c: Ditto.
6872         * windows-tdep.h: Ditto.
6873         * windows-nat.c: Ditto.
6874         (cygwin_load_start): Redefine as CORE_ADDR.
6875         (cygwin_load_end): Ditto.
6876         (windows_make_so): Coerce result of address arithmetic to uintptr_t
6877         before coercing to CORE_ADDR to avoid a compiler warning.
6878         (handle_exception): Define addr as CORE_ADDR and coerce
6879         ExceptionAddress to uintptr_t before assigining to avoid a compiler
6880         warning.
6881         * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
6882         files.
6883
6884 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
6885
6886         Fix linking with --enable-targets=all:
6887         * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
6888         (HFILES_NO_SRCDIR): Add windows-tdep.h.
6889         (ALLDEPFILES): Add windows-tdep.c.
6890
6891 2009-01-11  Chris Faylor  <me.gdb@cgf.cx>
6892
6893         * win32-nat.h: Delete.
6894         * windows-nat.h: Rename from win32-nat.h.
6895         * win32-nat.c: Delete.
6896         * windows-nat.c: Rename from win32-nat.c.
6897         * win32-termcap.c: Delete.
6898         * windows-termcap.c: Rename from win32-termcap.c.
6899         * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
6900         * configure.ac: Handle rename from win32-termcap.c ->
6901         windows-termcap.c.
6902         * configure: Regenerate.
6903         * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
6904         -> windows-termcap.c.
6905         * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
6906         windows-tdep.h.
6907         * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
6908         * windows-nat.c: Ditto.  Also reflect rename from from win32-tdep.h ->
6909         windows-tdep.h.
6910         (win32_make_so): Handle cygwin compiler warning due to change of
6911         load_addr from DWORD to LPVOID.
6912         (handle_load_dll): Use %p in format string to properly print address
6913         and avoid a compiler warning.
6914         (DEBUG_EXCEPTION_SIMPLE): Ditto.
6915         (handle_exception): Ditto.
6916         * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
6917         * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
6918         windows-nat.o.
6919         * config/i386/mingw.mh: Ditto.
6920         * config/i386/mingw64.mh: Ditto.
6921
6922 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
6923
6924         * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
6925         arrayprint_recurse_level to a parameter.  Update all the callers.  New
6926         comment at autovariables.
6927
6928 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
6929
6930         * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
6931         coding style.
6932
6933 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
6934
6935         * target.c (target_xfer_partial): Use host_address_to_string to
6936         print the address of readbuf and writebuf. Cast the address of
6937         elements inside the myaddr buffer into intptr_t.
6938         (deprecated_debug_xfer_memory): Use paddress to print memaddr.
6939         Cast the address of elements inside the myaddr buffer into
6940         intptr_t.
6941
6942 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
6943
6944         * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
6945         * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
6946         * configure.host, configure.tgt: Add handling for x86_64/windows.
6947         * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
6948         and amd64-windows-tdep.c.
6949
6950 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
6951
6952         * win32-tdep.h, win32-tdep.c: New files.
6953         * i386-cygwin-tdep.h: Delete.
6954         * i386-cygwin-tdep.c: Include win32-tdep.h instead of
6955         i386-cygwin-tdep.h.
6956         (win32_xfer_shared_library): Delete.  Moved to win32-tdep.c.
6957         * win32-nat.c: Likewise.
6958         * configure.tgt: Add win32-tdep.o to the list of target object
6959         files for i386-cygwin and i386-mingw targets.
6960
6961 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
6962
6963         * win32-nat.h: New file.
6964         * win32-nat.c (mappings): Initialize to NULL.
6965         (win32_set_context_register_offsets): New function.
6966         * i386-windows-nat.c: New file.
6967         (mappings): Moved here from win32-nat.c.
6968         (_initialize_i386_windows_nat): New function.
6969         * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
6970         * config/i386/cygwin.mh (NATDEPFILES): Likewise.
6971
6972 2009-01-09  Andreas Schwab  <schwab@suse.de>
6973
6974         * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
6975
6976 2009-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
6977
6978         * gdbtypes.c (append_composite_type_field): Correct the location of
6979         appended fields.
6980
6981 2009-01-09  Pedro Alves  <pedro@codesourcery.com>
6982
6983         * defs.h (deprecated_error_hook): Delete declaration.
6984         * interps.c (clear_interpreter_hooks): Adjust.
6985         * remote-sim.c (gdb_os_error): Don't try to call
6986         deprecated_error_hook.  No need to call exit anymore.
6987         * top.c (deprecated_error_hook): Delete.
6988
6989 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
6990
6991         * arch-utils.c (gdbarch_update_p): Use host_address_to_string
6992         to print the address of the gdbarch pointer.
6993
6994 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
6995
6996         * gdbarch.sh: Fix all the compilation errors on amd64-windows
6997         due to casting a pointer to a long when printing a function
6998         address. Instead, use host_address_to_string to convert our
6999         address to a string.
7000         * gdbarch.c: Regenerate.
7001
7002 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7003
7004         * event-top.c (async_disconnect, async_stop_sig): use "raise"
7005         instead of "kill" to raise a signal.
7006
7007 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7008
7009         * win32-nat.c (get_module_name): Change the type of parameter
7010         "base_address" to LPVOID.  Remove unnecessary cast.
7011         (struct lm_info): Change type of load_addr to LPVOID.
7012         (win32_make_so): Change the type of parameter "load_addr"
7013         to LPVOID.  Remove some unnecessary casts.
7014         (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
7015         (win32_xfer_shared_libraries): Add missing cast.
7016
7017 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7018
7019         * win32-nat.c (has_detach_ability, set_process_privilege):
7020         Cast the result of GetProcAddress to (void *) to avoid
7021         a compilation warning.
7022
7023 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7024
7025         * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
7026         already defined.
7027
7028 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7029
7030         * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
7031         definition of local variable "done".
7032         (info_w32_command, handle_exception): Remove unnecessary cast.
7033
7034 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7035
7036         * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
7037         DebugSetProcessKillOnExit.  Update all uses in this file.
7038         (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
7039         Update all uses in this file.
7040
7041 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7042
7043         * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
7044         and use it when pushing the target.
7045         (win32_attach, win32_create_inferior): Update call to
7046         do_initial_win32_stuff.
7047         (win32_detach, win32_mourn_inferior): Use our ops parameter
7048         instead of the global win32_ops to unpush the target.
7049
7050 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7051
7052         * ser-mingw.c (ser_windows_open): Use proper type when casting
7053         in call to _open_osfhandle.
7054
7055 2009-01-09  Kai Tietz  <kai.tietz@onevision.com>
7056
7057         * coff-pe-read.c (read_pe_exported_syms): Fix typo.
7058
7059 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
7060
7061         * CONTRIBUTE: Minor reformatting.
7062
7063 2009-01-08  Kai Tietz  <kai.tietz@onevision.com>
7064
7065         * MAINTAINERS: Add myself to Write After Approval.
7066         * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
7067         export directory.
7068
7069 2009-01-08  Nathan Froyd  <froydnj@codesourcery.com>
7070
7071         * remote-sim.c (gdb_os_error): Mark as a noreturn function.
7072         Call exit to make it obvious to GCC.
7073
7074 2009-01-08  Tom Tromey  <tromey@redhat.com>
7075
7076         PR breakpoints/9350:
7077         * varobj.c (varobj_invalidate): Unconditionally free
7078         all_rootvarobj.
7079         * symfile.c (syms_from_objfile): Free local_addr when returning
7080         normally.
7081         * exec.c (exec_file_attach): Do cleanups before returning.
7082         (exec_file_command): Likewise.
7083         * corefile.c (reopen_exec_file): Do cleanups before returning.
7084         * breakpoint.c (insert_breakpoint_locations): Do cleanups before
7085         returning.
7086         (do_vec_free): New function.
7087         (update_global_location_list): Make a cleanup for old_locations.
7088         Do cleanups before returning.  Remove unused variable 'e'.
7089         (find_condition_and_thread): Free result of parsing the
7090         expression.
7091         (print_it_typical): Do cleanups before returning.
7092         (breakpoint_re_set_one): Always free sals.sals.
7093
7094 2009-01-08  Joel Brobecker  <brobecker@adacore.com>
7095             Emi Suzuki  <emi-suzuki@tjsys.co.jp>
7096
7097         * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
7098         watchpoints.
7099
7100 2009-01-07  Doug Evans  <dje@google.com>
7101
7102         * top.c (gdb_prompt_string): Delete, unused.
7103
7104 2009-01-07  Pedro Alves  <pedro@codesourcery.com>
7105
7106         Delete ONE_PROCESS_WRITETEXT leftovers.
7107
7108         * breakpoint.c (insert_bp_location): Delete process_warning
7109         argument.  Adjust.
7110         (insert_breakpoint_locations): Adjust.
7111         (reattach_breakpoints): Adjust.
7112         * infrun.c (normal_stop): Drop "It might be running in another
7113         process" notice.
7114
7115 2009-01-07  Stan Shebs  <stan@codesourcery.com>
7116
7117         * config/pa/linux.mh (XDEPFILES): Remove.
7118
7119 2009-01-07  Doug Evans  <dje@google.com>
7120
7121         * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
7122
7123 2009-01-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7124
7125         * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
7126         spacing, a regression from 2008-04-22.
7127
7128 2009-01-07  Joel Brobecker  <brobecker@adacore.com>
7129
7130         * utils.c (gdb_print_host_address): Adjust implementation to
7131         reuse host_address_to_string. Move comment explaining the conversion
7132         from host address to string from here...
7133         (host_address_to_string): ... to there.
7134
7135 2009-01-07  Emi Suzuki  <emi-suzuki@tjsys.co.jp>
7136
7137         * MAINTAINERS: Add myself for write after approval privileges.
7138
7139 2009-01-06  Tom Tromey  <tromey@redhat.com>
7140
7141         * value.c (set_internalvar): Use value_free, not xfree.
7142
7143 2009-01-06  Jim Blandy  <jimb@red-bean.com>
7144
7145         Check return values of functions declared with warn_unused_result
7146         attribute in GLIBC 2.8.
7147         * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
7148         * inflow.c (check_syscall): New function.
7149         (new_tty): Use check_syscall to check return values from open and dup.
7150         * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
7151         * main.c (captured_main): Call cwd after setting up gdb_stderr;
7152         check for errors from getcwd.
7153         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
7154         * ui-file.c (stdio_file_write): Ignore return value from fwrite.
7155         (stdio_file_fputs): Same.
7156         * utils.c (internal_vproblem): abort if last-ditch error message
7157         write fails.
7158
7159         * top.c (gdb_init): Don't set the current directory here; that's
7160         already been done in captured_main.
7161
7162 2009-01-06  Sandra Loosemore  <sandra@codesourcery.com>
7163
7164         * ser-tcp.c: Adjust includes.
7165         (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
7166         (tcp_auto_retry, tcp_retry_limit): Declare.
7167         (TIMEOUT): Remove, in favor of tcp_retry_limit.
7168         (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
7169         (wait_for_connect): New function.
7170         (net_open): Use it.  Add auto-retry logic.
7171         (set_tcp_cmd, show_tcp_cmd): New functions.
7172         (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
7173         and "set/show tcp connect-timeout" commands.
7174         * NEWS: Document new commands.
7175
7176 2009-01-05  Tom Tromey  <tromey@redhat.com>
7177
7178         * python/python-internal.h (Py_ssize_t): Define as int.
7179
7180 2009-01-05  Jim Blandy  <jimb@red-bean.com>
7181
7182         * MAINTAINERS: Fix my e-mail address as steering committee member.
7183
7184 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
7185
7186         Updated copyright notices for most files.
7187
7188 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
7189
7190         * top.c (print_gdb_version): Update copyright year.
7191
7192 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
7193
7194         * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
7195
7196 2009-01-01  Pedro Alves  <pedro@codesourcery.com>
7197
7198         PR breakpoints/9681:
7199         * exceptions.h (enum errors): New error type, MEMORY_ERROR.
7200         * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
7201         * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
7202         retrow all other exceptions.
7203
7204 For older changes see ChangeLog-2008.
7205 \f
7206 Local Variables:
7207 mode: change-log
7208 left-margin: 8
7209 fill-column: 74
7210 version-control: never
7211 coding: utf-8
7212 End: