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