]> Git Repo - binutils.git/blob - gdb/ChangeLog
2009-10-21 Andrew Stubbs <[email protected]>
[binutils.git] / gdb / ChangeLog
1 2009-10-21  Andrew Stubbs  <[email protected]>
2             Joel Brobecker  <[email protected]>
3
4         * Makefile.in (HFILES_NO_SRCDIR): Remove shnbsd-tdep.h
5         * configure.tgt (sh*-*-linux*): Add corelow.o to gdb_target_obs.
6         * sh-linux-tdep.c: Include sh-tdep.h.
7         (REGSx16): New macro.
8         (gregs_table, fpregs_table): New variables.
9         (sh_linux_init_abi): Set core_gregmap and fpregmap.
10         * sh-tdep.c: Include regset.h.
11         (sh_corefile_supply_regset): New function.
12         (sh_corefile_collect_regset): New function.
13         (sh_corefile_gregset, sh_corefile_fpregset): New variables.
14         (sh_regset_from_core_section): New function.
15         (sh_gdbarch_init): Set up tdep value.
16         Call set_gdbarch_regset_from_core_section.
17         * sh-tdep.h (PC_REGNUM): New enum value.
18         (struct sh_corefile_regs): New type.
19         (sh_corefile_gregset): Export variable.
20         (sh_corefile_supply_regset): New prototype.
21         (sh_corefile_collect_regset): New prototype.
22         * shnbsd-tdep.c: Remove include of regcache.h, gdb_assert.h and
23         shnbsd-tdep.h.
24         (regmap): Use new definition using struct sh_corefile_regs.
25         (shnbsd_supply_gregset, shnbsd_collect_gregset): Delete.
26         (shnbsd_gregset): Delete.
27         (shnbsd_regset_from_core_section): Delete.
28         (shnbsd_supply_reg, shnbsd_fill_reg): Use new regset interface.
29         (shnbsd_init_abi): Set core_gregmap.
30         (shnbsd_supply_reg): Delete.
31         (shnbsd_fill_reg): Delete.
32         (SHNBSD_SIZEOF_GREGS): Move ...
33         * shnbsd-nat.c (SHNBSD_SIZEOF_GREGS): ... to here.
34         Remove include of shnbsd-tdep.h.
35         (shnbsd_fetch_inferior_registers): Replace shnbsd_supply_reg call
36         with sh_corefile_supply_regset.
37         (shnbsd_store_inferior_registers): Replace shnbsd_fill_reg call with
38         sh_corefile_collect_regset.
39         * shnbsd-tdep.h: Delete file.
40
41 2009-10-21  Pierre Muller  <[email protected]>
42
43         * rs6000-nat.c (exec_one_dummy_insn): Add missing new ASPACE parameter
44         to depreacted_insert_raw_breakpoint function call.
45         * procfs.c (insert_dbx_link_bpt_in_file): Likewise.
46
47 2009-10-20  Michael Snyder  <[email protected]>
48
49         * record.c: Add some top-level comments for general explanation.
50
51 2009-10-20  Hui Zhu  <[email protected]>
52             Michael Snyder  <[email protected]>
53
54         * record.c (record_exec_insn): New function.  Emulate one
55         instruction, forward or backward.  Abstracted from record_wait.
56         (record_wait) Call record_exec_insn.
57
58 2009-10-20  Michael Snyder  <[email protected]>
59
60         * infrun.c (handle_inferior_event): Add pspace field to sal
61         for reverse execution cases.
62
63 2009-10-20  Ken Werner  <[email protected]>
64
65         * go32-nat.c (go32_create_inferior): Use inferior_appeared, not
66         inferior_appeared_silent.
67         * remote-sim.c (gdbsim_create_inferior): Ditto.
68
69 2009-10-20  Pedro Alves  <[email protected]>
70
71         * darwin-nat.c (cancel_breakpoint): Pass the regcache's address
72         space to breakpoint_inserted_here_p.
73
74 2009-10-20  Pedro Alves  <[email protected]>
75
76         * linux-nat.c (linux_nat_thread_address_space): New.
77         (linux_nat_add_target): Install it.
78         * progspace.c (address_space_num): New.
79         * progspace.h (address_space_num): Declare.
80         * target.c (target_thread_address_space): Really query the target.
81         * target.h (struct target_ops) <to_thread_address_space>: New
82         field.
83
84 2009-10-19  Joel Brobecker  <[email protected]>
85
86         * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Add comment.
87
88 2009-10-19  Pedro Alves  <[email protected]>
89             Stan Shebs  <[email protected]>
90
91         Add base multi-executable/process support to GDB.
92
93         * Makefile.in (SFILES): Add progspace.c.
94         (COMMON_OBS): Add progspace.o.
95         * progspace.h: New.
96         * progspace.c: New.
97
98         * breakpoint.h (struct bp_target_info) <placed_address_space>: New
99         field.
100         (struct bp_location) <pspace>: New field.
101         (struct breakpoint) <pspace>: New field.
102         (bpstat_stop_status, breakpoint_here_p)
103         (moribund_breakpoint_here_p, breakpoint_inserted_here_p)
104         (regular_breakpoint_inserted_here_p)
105         (software_breakpoint_inserted_here_p, breakpoint_thread_match)
106         (set_default_breakpoint): Adjust prototypes.
107         (remove_breakpoints_pid, breakpoint_program_space_exit): Declare.
108         (insert_single_step_breakpoint, deprecated_insert_raw_breakpoint):
109         Adjust prototypes.
110         * breakpoint.c (executing_startup): Delete.
111         (default_breakpoint_sspace): New.
112         (breakpoint_restore_shadows): Skip if the address space doesn't
113         match.
114         (update_watchpoint): Record the frame's program space in the
115         breakpoint location.
116         (insert_bp_location): Record the address space in target_info.
117         Adjust to pass the symbol space to solib_name_from_address.
118         (breakpoint_program_space_exit): New.
119         (insert_breakpoint_locations): Switch the symbol space and thread
120         when inserting breakpoints.  Don't insert breakpoints in a vfork
121         parent waiting for vfork done if we're not attached to the vfork
122         child.
123         (remove_breakpoints_pid): New.
124         (reattach_breakpoints): Switch to a thread of PID.  Ignore
125         breakpoints of other symbol spaces.
126         (create_internal_breakpoint): Store the symbol space in the sal.
127         (create_longjmp_master_breakpoint): Iterate over all symbol
128         spaces.
129         (update_breakpoints_after_exec): Ignore breakpoints for other
130         symbol spaces.
131         (remove_breakpoint): Rename to ...
132         (remove_breakpoint_1): ... this.  Pass the breakpoints symbol
133         space to solib_name_from_address.
134         (remove_breakpoint): New.
135         (mark_breakpoints_out): Ignore breakpoints from other symbol
136         spaces.
137         (breakpoint_init_inferior): Ditto.
138         (breakpoint_here_p): Add an address space argument and adjust to
139         use breakpoint_address_match.
140         (moribund_breakpoint_here_p): Ditto.
141         (regular_breakpoint_inserted_here_p): Ditto.
142         (breakpoint_inserted_here_p): Ditto.
143         (software_breakpoint_inserted_here_p): Ditto.
144         (breakpoint_thread_match): Ditto.
145         (bpstat_check_location): Ditto.
146         (bpstat_stop_status): Ditto.
147         (print_breakpoint_location): If there's a location to print,
148         switch the current symbol space.
149         (print_one_breakpoint_location): Add `allflag' argument.
150         (print_one_breakpoint): Ditto.  Adjust.
151         (do_captured_breakpoint_query): Adjust.
152         (breakpoint_1): Adjust.
153         (breakpoint_has_pc): Also match the symbol space.
154         (describe_other_breakpoints): Add a symbol space argument and
155         adjust.
156         (set_default_breakpoint): Add a symbol space argument.  Set
157         default_breakpoint_sspace.
158         (breakpoint_address_match): New.
159         (check_duplicates_for): Add an address space argument, and adjust.
160         (set_raw_breakpoint): Record the symbol space in the location and
161         in the breakpoint.
162         (set_longjmp_breakpoint): Skip longjmp master breakpoints from
163         other symbol spaces.
164         (remove_thread_event_breakpoints, remove_solib_event_breakpoints)
165         (disable_breakpoints_in_shlibs): Skip breakpoints from other
166         symbol spaces.
167         (disable_breakpoints_in_unloaded_shlib): Match symbol spaces.
168         (create_catchpoint): Set the symbol space in the sal.
169         (disable_breakpoints_before_startup): Skip breakpoints from other
170         symbol spaces.  Set executing_startup in the current symbol space.
171         (enable_breakpoints_after_startup): Clear executing_startup in the
172         current symbol space.  Skip breakpoints from other symbol spaces.
173         (clone_momentary_breakpoint): Also copy the symbol space.
174         (add_location_to_breakpoint): Set the location's symbol space.
175         (bp_loc_is_permanent): Switch thread and symbol space.
176         (create_breakpoint): Adjust.
177         (expand_line_sal_maybe): Expand comment to mention symbol spaces.
178         Switch thread and symbol space when reading memory.
179         (parse_breakpoint_sals): Set the symbol space in the sal.
180         (break_command_really): Ditto.
181         (skip_prologue_sal): Switch and space.
182         (resolve_sal_pc): Ditto.
183         (watch_command_1): Record the symbol space in the sal.
184         (create_ada_exception_breakpoint): Adjust.
185         (clear_command): Adjust.  Match symbol spaces.
186         (update_global_location_list): Use breakpoint_address_match.
187         (breakpoint_re_set_one): Switch thread and space.
188         (breakpoint_re_set): Save symbol space.
189         (breakpoint_re_set_thread): Also reset the symbol space.
190         (deprecated_insert_raw_breakpoint): Add an address space argument.
191         Adjust.
192         (insert_single_step_breakpoint): Ditto.
193         (single_step_breakpoint_inserted_here_p): Ditto.
194         (clear_syscall_counts): New.
195         (_initialize_breakpoint): Install it as inferior_exit observer.
196
197         * exec.h: Include "progspace.h".
198         (exec_bfd, exec_bfd_mtime): New defines.
199         (exec_close): Declare.
200         * exec.c: Include "gdbthread.h" and "progspace.h".
201         (exec_bfd, exec_bfd_mtime, current_target_sections_1): Delete.
202         (using_exec_ops): New.
203         (exec_close_1): Rename to exec_close, and make public.
204         (exec_close): Rename to exec_close_1, and adjust all callers.  Add
205         description.  Remove target sections and close executables from
206         all program spaces.
207         (exec_file_attach): Add comment.
208         (add_target_sections): Check on `using_exec_ops' to check if the
209         target should be pushed.
210         (remove_target_sections): Only unpush the target if there are no
211         more target sections in any symbol space.
212         * gdbcore.h: Include "exec.h".
213         (exec_bfd, exec_bfd_mtime): Remove declarations.
214
215         * frame.h (get_frame_program_space, get_frame_address_space)
216         (frame_unwind_program_space): Declare.
217         * frame.c (struct frame_info) <pspace, aspace>: New fields.
218         (create_sentinel_frame): Add program space argument.  Set the
219         pspace and aspace fields of the frame object.
220         (get_current_frame, create_new_frame): Adjust.
221         (get_frame_program_space): New.
222         (frame_unwind_program_space): New.
223         (get_frame_address_space): New.
224         * stack.c (print_frame_info): Adjust.
225         (print_frame): Use the frame's program space.
226
227         * gdbthread.h (any_live_thread_of_process): Declare.
228         * thread.c (any_live_thread_of_process): New.
229         (switch_to_thread): Switch the program space as well.
230         (restore_selected_frame): Don't warn if trying to restore frame
231         level 0.
232
233         * inferior.h: Include "progspace.h".
234         (detach_fork): Declare.
235         (struct inferior) <removable, aspace, pspace>
236         <vfork_parent, vfork_child, pending_detach>
237         <waiting_for_vfork_done>: New fields.
238         <terminal_info>: Remove field.
239         <data, num_data>: New fields.
240         (register_inferior_data, register_inferior_data_with_cleanup)
241         (clear_inferior_data, set_inferior_data, inferior_data): Declare.
242         (exit_inferior, exit_inferior_silent, exit_inferior_num_silent)
243         (inferior_appeared): Declare.
244         (find_inferior_pid): Typo.
245         (find_inferior_id, find_inferior_for_program_space): Declare.
246         (set_current_inferior, save_current_inferior, prune_inferiors)
247         (number_of_inferiors): Declare.
248         (inferior_list): Declare.
249         * inferior.c: Include "gdbcore.h" and "symfile.h".
250         (inferior_list): Make public.
251         (delete_inferior_1): Always delete thread silently.
252         (find_inferior_id): Make public.
253         (current_inferior_): New.
254         (current_inferior): Use it.
255         (set_current_inferior): New.
256         (restore_inferior): New.
257         (save_current_inferior): New.
258         (free_inferior): Free the per-inferior data.
259         (add_inferior_silent): Allocate per-inferior data.
260         Call inferior_appeared.
261         (delete_threads_of_inferior): New.
262         (delete_inferior_1): Adjust interface to take an inferior pointer.
263         (delete_inferior): Adjust.
264         (delete_inferior_silent): Adjust.
265         (exit_inferior_1): New.
266         (exit_inferior): New.
267         (exit_inferior_silent): New.
268         (exit_inferior_num_silent): New.
269         (detach_inferior): Adjust.
270         (inferior_appeared): New.
271         (discard_all_inferiors): Adjust.
272         (find_inferior_id): Make public.  Assert pid is not zero.
273         (find_inferior_for_program_space): New.
274         (have_inferiors): Check if we have any inferior with pid not zero.
275         (have_live_inferiors): Go over all pushed targets looking for
276         process_stratum.
277         (prune_inferiors): New.
278         (number_of_inferiors): New.
279         (print_inferior): Add executable column.  Print vfork parent/child
280         relationships.
281         (inferior_command): Adjust to cope with not running inferiors.
282         (remove_inferior_command): New.
283         (add_inferior_command): New.
284         (clone_inferior_command): New.
285         (struct inferior_data): New.
286         (struct inferior_data_registration): New.
287         (struct inferior_data_registry): New.
288         (inferior_data_registry): New.
289         (register_inferior_data_with_cleanup): New.
290         (register_inferior_data): New.
291         (inferior_alloc_data): New.
292         (inferior_free_data): New.
293         (clear_inferior_data): New.
294         (set_inferior_data): New.
295         (inferior_data): New.
296         (initialize_inferiors): New.
297         (_initialize_inferiors): Register "add-inferior",
298         "remove-inferior" and "clone-inferior" commands.
299
300         * objfiles.h: Include "progspace.h".
301         (struct objfile) <pspace>: New field.
302         (symfile_objfile, object_files): Don't declare.
303         (ALL_PSPACE_OBJFILES): New.
304         (ALL_PSPACE_OBJFILES_SAFE): New.
305         (ALL_OBJFILES, ALL_OBJFILES_SAFE): Adjust.
306         (ALL_PSPACE_SYMTABS): New.
307         (ALL_PRIMARY_SYMTABS): Adjust.
308         (ALL_PSPACE_PRIMARY_SYMTABS): New.
309         (ALL_PSYMTABS): Adjust.
310         (ALL_PSPACE_PSYMTABS): New.
311         * objfiles.c (object_files, symfile_objfile): Delete.
312         (struct objfile_sspace_info): New.
313         (objfiles_pspace_data): New.
314         (objfiles_pspace_data_cleanup): New.
315         (get_objfile_pspace_data): New.
316         (objfiles_changed_p): Delete.
317         (allocate_objfile): Set the objfile's program space.  Adjust to
318         reference objfiles_changed_p in pspace data.
319         (free_objfile): Adjust to reference objfiles_changed_p in pspace
320         data.
321         (objfile_relocate): Ditto.
322         (update_section_map): Add pspace argument.  Adjust to iterate over
323         objfiles in the passed in pspace.
324         (find_pc_section): Delete sections and num_sections statics.
325         Adjust to refer to program space's objfiles_changed_p.  Adjust to
326         refer to sections and num_sections store in the objfile's pspace
327         data.
328         (objfiles_changed): Adjust to reference objfiles_changed_p in
329         pspace data.
330         (_initialize_objfiles): New.
331         * linespec.c (decode_all_digits, decode_dollar): Set the sal's
332         program space.
333         * source.c (current_source_pspace): New.
334         (get_current_source_symtab_and_line): Set the sal's program space.
335         (set_current_source_symtab_and_line): Set current_source_pspace.
336         (select_source_symtab): Ditto.  Use ALL_OBJFILES.
337         (forget_cached_source_info): Iterate over all program spaces.
338         * symfile.c (clear_symtab_users): Adjust.
339         * symmisc.c (print_symbol_bcache_statistics): Iterate over all
340         program spaces.
341         (print_objfile_statistics): Ditto.
342         (maintenance_print_msymbols): Ditto.
343         (maintenance_print_objfiles): Ditto.
344         (maintenance_info_symtabs): Ditto.
345         (maintenance_info_psymtabs): Ditto.
346         * symtab.h (SYMTAB_PSPACE): New.
347         (struct symtab_and_line) <pspace>: New field.
348         * symtab.c (init_sal): Clear the sal's program space.
349         (find_pc_sect_symtab): Set the sal's program space.  Switch thread
350         and space.
351         (append_expanded_sal): Add program space argument.  Iterate over
352         all program spaces.
353         (expand_line_sal): Iterate over all program spaces.  Switch
354         program space.
355
356         * target.h (enum target_waitkind) <TARGET_WAITKIND_VFORK_DONE>: New.
357         (struct target_ops) <to_thread_address_space>: New field.
358         (target_thread_address_space): Define.
359         * target.c (target_detach): Only remove breakpoints from the
360         inferior we're detaching.
361         (target_thread_address_space): New.
362
363         * defs.h (initialize_progspace): Declare.
364         * top.c (gdb_init): Call it.
365
366         * solist.h (struct so_list) <sspace>: New field.
367         * solib.h (struct program_space): Forward declare.
368         (solib_name_from_address): Adjust prototype.
369         * solib.c (so_list_head): Replace with a macro referencing the
370         program space.
371         (update_solib_list): Set the so's program space.
372         (solib_name_from_address): Add a program space argument and adjust.
373
374         * solib-svr4.c (struct svr4_info) <pid>: Delete field.
375         <interp_text_sect_low, interp_text_sect_high, interp_plt_sect_low>
376         <interp_plt_sect_high>: New fields.
377         (svr4_info_p, svr4_info): Delete.
378         (solib_svr4_sspace_data): New.
379         (get_svr4_info): Rewrite.
380         (svr4_sspace_data_cleanup): New.
381         (open_symbol_file_object): Adjust.
382         (svr4_default_sos): Adjust.
383         (svr4_fetch_objfile_link_map): Adjust.
384         (interp_text_sect_low, interp_text_sect_high, interp_plt_sect_low)
385         (interp_plt_sect_high): Delete.
386         (svr4_in_dynsym_resolve_code): Adjust.
387         (enable_break): Adjust.
388         (svr4_clear_solib): Revert bit that removed the svr4_info here,
389         and reinstate clearing debug_base, debug_loader_offset_p,
390         debug_loader_offset and debug_loader_name.
391         (_initialize_svr4_solib): Register solib_svr4_pspace_data.  Don't
392         install an inferior_exit observer anymore.
393
394         * printcmd.c (struct display) <pspace>: New field.
395         (display_command): Set the display's sspace.
396         (do_one_display): Match the display's sspace.
397         (display_uses_solib_p): Ditto.
398
399         * linux-fork.c (detach_fork): Moved to infrun.c.
400         (_initialize_linux_fork): Moved "detach-on-fork" command to
401         infrun.c.
402         * infrun.c (detach_fork): Moved from linux-fork.c.
403         (proceed_after_vfork_done): New.
404         (handle_vfork_child_exec_or_exit): New.
405         (follow_exec_mode_replace, follow_exec_mode_keep)
406         (follow_exec_mode_names, follow_exec_mode_string)
407         (show_follow_exec_mode_string): New.
408         (follow_exec): New.  Reinstate the mark_breakpoints_out call.
409         Remove shared libraries before attaching new executable.  If user
410         wants to keep the inferior, keep it.
411         (displaced_step_fixup): Adjust to pass an address space to the
412         breakpoints module.
413         (resume): Ditto.
414         (clear_proceed_status): In all-stop mode, always clear the proceed
415         status of all threads.
416         (prepare_to_proceed): Adjust to pass an address space to the
417         breakpoints module.
418         (proceed): Ditto.
419         (adjust_pc_after_break): Ditto.
420         (handle_inferior_event): When handling a process exit, switch the
421         program space to the inferior's that had exited.  Call
422         handle_vfork_child_exec_or_exit.  Adjust to pass an address space
423         to the breakpoints module.  In non-stop mode, when following a
424         fork and detach-fork is off, also resume the other branch.  Handle
425         TARGET_WAITKIND_VFORK_DONE.  Set the program space in sals.
426         (normal_stop): Prune inferiors.
427         (_initialize_infrun): Install the new "follow-exec-mode" command.
428         "detach-on-fork" moved here.
429
430         * regcache.h (get_regcache_aspace): Declare.
431         * regcache.c (struct regcache) <aspace>: New field.
432         (regcache_xmalloc): Clear the aspace.
433         (get_regcache_aspace): New.
434         (regcache_cpy): Copy the aspace field.
435         (regcache_cpy_no_passthrough): Ditto.
436         (get_thread_regcache): Fetch the thread's address space from the
437         target, and store it in the regcache.
438
439         * infcall.c (call_function_by_hand): Set the sal's pspace.
440
441         * arch-utils.c (default_has_shared_address_space): New.
442         * arch-utils.h (default_has_shared_address_space): Declare.
443
444         * gdbarch.sh (has_shared_address_space): New.
445         * gdbarch.h, gdbarch.c: Regenerate.
446
447         * linux-tdep.c: Include auxv.h, target.h, elf/common.h.
448         (linux_has_shared_address_space): New.
449         (_initialize_linux_tdep): Declare.
450
451         * arm-tdep.c (arm_software_single_step): Pass the frame's address
452         space to insert_single_step_breakpoint.
453         * arm-linux-tdep.c (arm_linux_software_single_step): Pass the
454         frame's pspace to breakpoint functions.
455         * cris-tdep.c (crisv32_single_step_through_delay): Ditto.
456         (cris_software_single_step): Ditto.
457         * mips-tdep.c (deal_with_atomic_sequence): Add frame argument.
458         Pass the frame's pspace to breakpoint functions.
459         (mips_software_single_step): Adjust.
460         (mips_single_step_through_delay): Adjust.
461         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
462         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
463         * solib-irix.c (enable_break): Adjust to pass the current frame's
464         address space to breakpoint functions.
465         * sparc-tdep.c (sparc_software_single_step): Ditto.
466         * spu-tdep.c (spu_software_single_step): Ditto.
467         * alpha-tdep.c (alpha_software_single_step): Ditto.
468         * record.c (record_wait): Adjust to pass an address space to the
469         breakpoints module.
470
471         * fork-child.c (fork_inferior): Set the new inferior's program and
472         address spaces.
473         * inf-ptrace.c (inf_ptrace_follow_fork): Copy the parent's program
474         and address spaces.
475         (inf_ptrace_attach): Set the inferior's program and address spaces.
476         * linux-nat.c: Include "solib.h".
477         (linux_child_follow_fork): Manage parent and child's program and
478         address spaces.  Clone the parent's program space if necessary.
479         Don't wait for the vfork to be done here.  Refuse to resume if
480         following the vfork parent while leaving the child stopped.
481         (resume_callback): Don't resume a vfork parent.
482         (linux_nat_resume): Also check for pending events in the
483         lp->waitstatus field.
484         (linux_handle_extended_wait): Report TARGET_WAITKIND_VFORK_DONE
485         events to the core.
486         (stop_wait_callback): Don't wait for SIGSTOP on vfork parents.
487         (cancel_breakpoint): Adjust.
488         * linux-thread-db.c (thread_db_wait): Don't remove thread event
489         breakpoints here.
490         (thread_db_mourn_inferior): Don't mark breakpoints out here.
491         Remove thread event breakpoints after mourning.
492         * corelow.c: Include progspace.h.
493         (core_open): Set the inferior's program and address spaces.
494         * remote.c (remote_add_inferior): Set the new inferior's program
495         and address spaces.
496         (remote_start_remote): Update address spaces.
497         (extended_remote_create_inferior_1): Don't init the thread list if
498         we already debugging other inferiors.
499         * darwin-nat.c (darwin_attach): Set the new inferior's program and
500         address spaces.
501         * gnu-nat.c (gnu_attach): Ditto.
502         * go32-nat.c (go32_create_inferior): Ditto.
503         * inf-ttrace.c (inf_ttrace_follow_fork, inf_ttrace_attach): Ditto.
504         * monitor.c (monitor_open): Ditto.
505         * nto-procfs.c (procfs_attach, procfs_create_inferior): Ditto.
506         * procfs.c (do_attach): Ditto.
507         * windows-nat.c (do_initial_windows_stuff): Ditto.
508
509         * inflow.c (inferior_process_group)
510         (terminal_init_inferior_with_pgrp, terminal_inferior,
511         (terminal_ours_1, inflow_inferior_exit, copy_terminal_info)
512         (child_terminal_info, new_tty_postfork, set_sigint_trap): Adjust
513         to use per-inferior data instead of inferior->terminal_info.
514         (inflow_inferior_data): New.
515         (inflow_new_inferior): Delete.
516         (inflow_inferior_data_cleanup): New.
517         (get_inflow_inferior_data): New.
518
519         * mi/mi-interp.c (mi_new_inferior): Rename to...
520         (mi_inferior_appeared): ... this.
521         (mi_interpreter_init): Adjust.
522
523         * tui/tui-disasm.c: Include "progspace.h".
524         (tui_set_disassem_content): Pass an address space to
525         breakpoint_here_p.
526
527         * NEWS: Mention multi-program debugging support.  Mention new
528         commands "add-inferior", "clone-inferior", "remove-inferior",
529         "maint info program-spaces", and new option "set
530         follow-exec-mode".
531
532 2009-10-19  Don Lee  <[email protected]>
533
534         * score-tdep.c: Delete dead codes.
535
536 2009-10-15  Michael Snyder  <[email protected]>
537
538         * record.c (struct record_reg_entry): Replace ptr with union 
539         of ptr and buf.
540         (struct record_mem_entry): Ditto.
541         (record_reg_alloc): Don't alloc ptr if reg will fit into buf.
542         (record_mem_alloc): Ditto.
543         (record_reg_release): Don't free ptr if reg was stored in buf.
544         (record_mem_release): Ditto.
545         (record_get_loc): New function.  Return a pointer to where the
546         value (mem or reg) is to be stored.
547         (record_arch_list_add_reg): Call record_get_loc instead of using ptr.
548         (record_arch_list_add_mem): Ditto.
549         (record_wait): Ditto.
550
551 2009-10-16  Michael Eager  <[email protected]>
552
553         * microblaze-linux-tdep.c:
554         microblaze_linux_memory_remove_breakpoint(): Add gdbarch to param,
555         replace frame_pc_unwind with get_frame_address_in_block.
556         * microblaze-tdep.c: Remove MICROBLAZE_REGISTER_SIZE.
557         * microblaze-tdep.h: Add MICROBLAZE_REGISTER_SIZE.
558
559 2008-10-15  Steven G. Kargl  <[email protected]>  (tiny patch)
560
561         * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Conditionally compile in
562         support for pcb->pcb_{fs,ds,es,gs} on FreeBSD older than 8.0.
563
564 2009-10-15  Michael Eager  <[email protected]>
565
566         * config/djgpp/fnchange.lst: Add translations for cpu-microblaze.c,
567         elf32-microblaze.c, microblaze-rom.c, microblaze-linux-tdep.c,
568         microblaze-tdep.h, microblaze-tdep.c, microblaze-opc.h,
569         microblaze-opcm.h, microblaze-dis.c, microblaze-dis.h, sim/microblaze,
570         microblaze.h, and microblaze.isa.
571         * configure.tgt: Add targets microblaze*-linux-*, microblaze*-xilinx-*.
572         * Makefile.in: Build microblaze-tdep.o, microblaze-linux-tdep.o.
573         HFILES_NO_SRCDIR: Add microblaze-tdep.h.
574         * microblaze-linux-tdep.c: New.
575         * microblaze-tdep.c: New.
576         * microblaze-tdep.h: New.
577         * NEWS: Announce Xilinx MicroBlaze support.
578
579 2009-10-15  Paul Pluzhnikov  <[email protected]>
580
581         PR gdb/10757
582         * linux-nat.c (linux_nat_post_attach_wait): Adjust assert.
583         (lin_lwp_attach_lwp, linux_nat_attach): Handle disappearing LWP.
584         
585 2009-10-15  Michael Snyder  <[email protected]>
586
587         * record.c (record_insn_max_num): Make unsigned.
588         (_initialize_record): Use uinteger instead of zinteger for
589         set command, so that it will report "unlimited" for zero.
590
591 2009-10-15  Michael Snyder  <[email protected]>
592
593         * record.c (record_reg_alloc): New function.
594         (record_reg_release): New function.
595         (record_mem_alloc): New function.
596         (record_mem_release): New function.
597         (record_end_alloc): New function.
598         (record_end_release): New function.
599         (record_entry_release): New function.
600         (record_list_release): Simplify, call record_entry_release.
601         (record_list_release_next): Rename to record_list_release_following.
602         Simplify and call record_entry_release.
603         (record_list_release_first): Simplify, comment, and use
604         record_entry_release.
605         (record_arch_list_add_reg): Simplify, call record_reg_alloc.
606         (record_arch_list_add_mem): Simplify, call record_mem_alloc.
607         (record_arch_list_add_end): Simplify, call record_end_alloc.
608
609 2009-10-14  Michael Snyder  <[email protected]>
610
611         * record.c (record_list_release_first): Do not decrement
612         record_insn_num.
613         (set_insn_num_max): Remove printf.
614         Decrement record_insn_num in the loop.
615
616 2009-10-14  Cary Coutant  <[email protected]>
617
618         * dwarf2read.c (read_import_statement): Call follow_die_ref_or_sig.
619
620 2009-10-14  Keith Seitz  <[email protected]>
621
622         * dwarf2read.c (dwarf2_const_value): Fix order of arguments to
623         store_unsigned_integer.
624
625 2009-10-14  Pedro Alves  <[email protected]>
626
627         * configure.ac (build_warnings): Add -Wunused-value.
628         * configure: Regenerate.
629
630 2009-10-14  Tristan Gingold  <[email protected]>
631
632         * solib-darwin.c: Remove trailing whitespaces.
633         (darwin_dyld_version_ok): Fix typo.
634
635 2009-10-14  Andrew Stubbs  <[email protected]>
636
637         * sh-tdep.c (sh_gdbarch_init): Add show_regs settings for
638         bfd_mach_sh3_nommu, bfd_mach_sh2a_nofpu_or_sh3_nommu,
639         bfd_mach_sh2a_or_sh3e, bfd_mach_sh2a_or_sh4, bfd_mach_sh4_nommu_nofpu,
640         and bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu.
641         Move bfd_mach_sh2a_or_sh4 to use the same configuration as
642         bfd_mach_sh4.
643
644 2009-10-13  Daniel Jacobowitz  <[email protected]>
645
646         * arm-tdep.c (arm_push_dummy_call): Set the low bit of LR for
647         a Thumb entry point.
648         (thumb_get_next_pc): Handle Thumb-2 and ARM v6 instructions.  Refuse
649         to single step into IT blocks.
650
651 2009-10-13  Pedro Alves  <[email protected]>
652
653         * infcall.c (call_function_by_hand): Formatting.
654
655 2009-10-13  Tristan Gingold  <[email protected]>
656
657         * solib-darwin.c: Add an empty line after comment for functions.
658         (struct gdb_dyld_all_image_infos): Improve comment.
659         (DYLD_VERSION): Removed and replaced by ...
660         (DYLD_VERSION_MAX, DYLD_VERSION_MIN): ... New macros.
661         (darwin_dyld_version_ok): New function.
662         (darwin_load_image_infos): Call darwin_dyld_version_ok.
663         (darwin_current_sos): Ditto.
664         (darwin_solib_create_inferior_hook): Ditto.
665
666 2009-10-13  Tristan Gingold  <[email protected]>
667
668         * machoread.c: Add an empty line after comment for functions.
669         (oso_el_compare_name): New function.
670         (macho_add_oso_symfile): New function.
671         (macho_oso_symfile): Use macho_add_oso_symfile.  Sort the oso
672         and optimize accesses to libraries.
673
674 2009-10-13  Tristan Gingold  <[email protected]>
675
676         * objfiles.c (objfile_has_symbols): New function.
677         * objfiles.h (objfile_has_symbols): Add prototype.
678         * symfile.c (symbol_file_add_with_addrs_or_offsets): Call
679         objfile_has_symbols.
680         (reread_symbols): Ditto.
681
682 2009-10-12  Jiang Jilin  <[email protected]>
683
684         * i386-tdep.c (i386_process_record): Add xgetbv/xsetbv
685         instructions support.
686
687 2009-10-11  Pedro Alves  <[email protected]>
688
689         * procfs.c (procfs_make_note_section): Go back to only outputing
690         an NT_PSTATUS note when UNIXWARE is defined.
691
692 2009-10-11  Daniel Jacobowitz  <[email protected]>
693
694         * features/xinclude.dtd: Correct EMPTY typo.
695
696 2009-10-10  Michael Snyder  <[email protected]>
697
698         * i386-tdep.c (i386_process_record): Or-equals, not not-equals.
699
700 2009-10-10  Pedro Alves  <[email protected]>
701
702         * mi/mi-cmd-stack.c (list_args_or_locals): Use internal_error.
703         Put "break" statements on their own line.
704
705 2009-10-09  Pedro Alves  <[email protected]>
706
707         * linux-nat.c (linux_nat_wait_1): Bail out, if TARGET_WNOHANG and
708         we found no event while waiting for a specific LWP.
709         * infrun.c (handle_inferior_event): Handle TARGET_WAITKIND_IGNORE
710         before anything else.
711
712 2009-10-09  Pedro Alves  <[email protected]>
713
714         * procfs.c (procfs_make_note_section): Always output a NT_PSTATUS
715         note when NEW_PROC_API is defined.
716
717 2009-10-09  Pedro Alves  <[email protected]>
718
719         * corelow.c (core_has_fake_pid): New.
720         (core_close): Clear it.
721         (add_to_thread_list): Fake a pid if one is not found on a Solaris
722         core.  Add the inferior here.  Always add the thread, don't use
723         thread_change_ptid.
724         (core_open): Don't add the main thread or the inferior here unless
725         we find that the core had no .reg/NN sections.
726         (get_core_register_section): Handle Solaris cores with fake pids.
727
728         * corelow.c (add_to_thread_list): Fix typo.
729
730 2009-10-08  Paul Pluzhnikov  <[email protected]>
731
732         PR gdb/10457
733         * elfread.c (elf_symtab_read): Don't use alloca in a loop.
734         
735 2009-10-07  Jan Kratochvil  <[email protected]>
736
737         * i386-nat.c (i386_stopped_by_hwbp): Remove.
738
739 2009-10-07  Joel Brobecker  <[email protected]>
740
741         * NEWS: Update following the GDB 7.0 release.
742
743 2009-10-07  Pierre Muller  <[email protected]>
744
745         ARI fix: OP eol rule.
746         * doublest.c (floatformat_from_length): Avoid operator at end of line.
747         * dwarf2-frame.c (dwarf2_build_frame_info): Idem.
748         * dwarf2read.c (read_array_order, dwarf_decode_macros): Idem.
749         * eval.c (evaluate_subexp_standard): Idem.
750         * event-loop.c (create_timer, handle_timer_event): Idem.
751         * expprint.c (print_subexp_standard): Idem.
752         * f-exp.y (variable): Idem.
753         * f-typeprint.c (f_print_type): Idem.
754
755 2009-10-06  Pierre Muller  <[email protected]>
756
757         ARI fix: OP eol rule.
758         * blockframe.c (find_pc_partial_function): Avoid operator at end of
759         line.
760         * buildsym.c (find_symbol_in_list): Idem.
761         (start_subfile, patch_subfile_names): Idem.
762         * c-exp.y (variable, yylex): Idem.
763         * c-typeprint.c (c_print_type, c_type_print_base): Idem.
764         * c-valprint.c (c_val_print): Idem.
765         * coffread.c (patch_opaque_types, process_coff_symbol): Idem.
766         * corelow.c (core_open): Idem.
767         * cris-tdep.c (move_reg_to_mem_movem_op): Idem.
768         * cli/cli-decode.c (help_cmd_list, find_command_name_length): Idem.
769
770 2009-10-06  Pierre Muller  <[email protected]>
771
772         ARI fix: OP eol rule.
773         * ada-exp.y (block_lookup): Avoid operator at end of line.
774         * aix-thread.c (pd_enable): Idem.
775         * alpha-tdep.c (alpha_next_pc): Idem.
776         * arm-tdep.c (arm_skip_prologue, arm_scan_prologue): Idem.
777         (condition_true, coff_sym_is_thumb): Idem.
778
779 2009-10-06  Joel Brobecker  <[email protected]>
780
781         GDB 7.0 released.
782
783 2009-10-06  Pierre Muller  <[email protected]>
784
785         ARI fix: "%p" rule.
786         * target.c (debug_to_thread_architecture): Replace %p by %s using
787         host_address_to_string function.
788
789 2009-10-06  Tristan Gingold  <[email protected]>
790
791         * darwin-nat.c: Add __TEXT __info_plist content.
792         (darwin_attach_pid): Update error message.
793
794 2009-10-06  Joel Brobecker  <[email protected]>
795
796         * MAINTAINERS: Add Tristan Gingold as Maintainer of the Darwin port.
797
798 2009-10-06  Joel Brobecker  <[email protected]>
799
800         * MAINTAINERS: Add Jan Kratochvil as Maintainer of the ia64 target.
801
802 2009-10-05  Pedro Alves  <[email protected]>
803
804         Revert:
805         2009-10-04  Pedro Alves  <[email protected]>
806         * gdbinit.in: Set data-directory to @srcdir@.
807
808 2009-10-04  Pedro Alves  <[email protected]>
809
810         * NEWS: Mention non-stop mode.
811
812 2009-10-04  Pedro Alves  <[email protected]>
813
814         * gdbinit.in: Set data-directory to @srcdir@.
815
816 2009-10-02  Pedro Alves  <[email protected]>
817
818         * linux-nat.c (TRAP_IS_SYSCALL, TRAP_REMOVE_SYSCALL_FLAG): Delete.
819         (SYSCALL_SIGTRAP): New.
820         (status_to_str): Adjust.
821         (get_pending_status): Pending events in lp->waitstatus don't map
822         to any signal.  Simplify.
823         (linux_handle_syscall_trap): New.
824         (linux_handle_extended_wait): When handling PTRACE_EVENT_CLONE
825         events, use linux_ops->to_resume instead of direct ptrace with
826         PTRACE_CONT.  Remove all TRAP_IS_SYSCALL handling.
827         (wait_lwp): Handle syscall traps with linux_handle_syscall_trap,
828         and clear the sysgood bit.
829         (status_callback): Make it clearer and add comments.
830         (cancel_breakpoints_callback): Ignore if LP has waitstatus set.
831         (linux_nat_filter_event): Handle syscall traps with
832         linux_handle_syscall_trap, and clear the sysgood bit.  Move the
833         check for storing siginfo to after handling extended statuses and
834         syscall traps.  Store status in the lwp object.
835         (linux_wait_1): Don't swap the pending status out of the lwp
836         object until after deciding we found an lwp with an interesting
837         event.  Requeue a new pending signal if we find one while getting
838         rid or a pending SIGSTOP we sent ourselves.  Don't clear the
839         sysgood bit here.
840
841         * infrun.c (deal_with_syscall_event): Rename to ...
842         (handle_syscall_event): ... this.  Always context switch and set
843         stop_pc, even if not catching the syscall.  If not catching the
844         syscall, always resume with keep_going.
845         (handle_inferior_event): Adjust.
846
847 2009-10-02  Jan Kratochvil  <[email protected]>
848
849         Fix compatibility of --with-system-readline and readline-6.0+.
850         * configure.ac <--with-system-readline> (for readline_echoing_p): New
851         test.
852         * config.in: Regenerate.
853         * configure: Regenerate.
854
855 2009-10-01  Joel Brobecker  <[email protected]>
856
857         * MAINTAINERS: Move Don Lee to the correct section (Write After
858         Approval).
859
860 2009-10-01  Phil Muldoon  <[email protected]>
861
862         * infcall.c (call_function_by_hand): Add a new cleanup branch for
863         std::terminate breakpoints.
864
865 2009-09-29  Jan Kratochvil  <[email protected]>
866
867         * ia64-tdep.c (ia64_convert_from_func_ptr_addr): New variable buf.
868         Check first the descriptor memory is readable.
869
870 2009-09-29  Tom Tromey  <[email protected]>
871
872         * python/py-value.c (valpy_string): NULL-terminate 'keywords'.
873
874 2009-09-29  Ulrich Weigand  <[email protected]>
875
876         * s390-tdep.c (s390_displaced_step_fixup): Use type ULONGEST
877         instead of CORE_ADDR for "amode".
878
879 2009-09-29  Joel Brobecker  <[email protected]>
880
881         * ia64-tdep.c: Update the comments on how we insert/remove
882         breakpoints for L-X instructions.
883         (ia64_memory_insert_breakpoint, ia64_memory_remove_breakpoint):
884         Update the comments inside these functions.
885
886 2009-09-28  Ulrich Weigand  <[email protected]>
887
888         * gdbarch.sh (displaced_step_hw_singlestep): New callback.
889         * gdbarch.c, gdbarch.h: Regenerate.
890         * arch-utils.c (default_displaced_step_hw_singlestep): New function.
891         * arch-utils.h (default_displaced_step_hw_singlestep): Add prototype.
892
893         * ppc-linux-tdep.c (ppc_displaced_step_hw_singlestep): New function.
894         (rs6000_gdbarch_init): Install it.
895
896         * infrun.c (displaced_step_fixup): Use new callback to determine
897         whether to "step" or "continue" displaced copy.
898         (resume): Likewise.  Do not call maybe_software_singlestep
899         for displaced stepping.
900         (maybe_software_singlestep): Do not handle displaced stepping.
901
902 2009-09-28  Ulrich Weigand  <[email protected]>
903
904         * eval.c (evaluate_subexp_standard) [OP_OBJC_MSGCALL]: Support
905         platforms that use function descriptors.  Prefer to use function
906         pointer types instead of function types.
907         * linespec.c (decode_objc): Support function descriptors.  Fully
908         initialize SAL result.
909         * objc-lang.c (find_methods): Support function descriptors.
910         Do not require function symbol to point to text section.
911
912         * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): When calling
913         via a function pointer, use the descriptor it points to.
914
915 2009-09-28  Jan Kratochvil  <[email protected]>
916
917         Fix ia64 breakpoints in the L-X slot.
918         * ia64-tdep.c (ia64_memory_insert_breakpoint): Extend the comment.
919         New variable shadow_slotnum, use it appropriately instead of slotnum.
920         Move shadow_len initialization before SLOTNUM adjustment, cover now the
921         whole remaining bundle.  Error now on breakpoints requested for the
922         slot 2 of L-X bundles.  Better sanity check the requested slot 1 of L-X
923         bundles.
924         (ia64_memory_remove_breakpoint): New variable shadow_slotnum, use it
925         appropriately instead of slotnum.  Warn now on breakpoints requested
926         for the slot 2 of L-X bundles.  Better sanity check the requested slot
927         1 of L-X bundles.  Update the assertio check of PLACED_SIZE.
928         (ia64_breakpoint_from_pc): New variable shadow_slotnum, use it
929         appropriately instead of slotnum.  Move *lenptr initialization before
930         SLOTNUM adjustment, cover now the whole remaining bundle.  Error now
931         on breakpoints requested for the slot 2 of L-X bundles.  Better sanity
932         check the requested slot 1 of L-X bundles.  Simplify the returned
933         expression.
934
935 2009-09-28  Joel Brobecker  <[email protected]>
936
937         * ia64-tdep.c (ia64_memory_insert_breakpoint): Check the slotnum
938         and the type of instruction before deciding which slot to save
939         in the breakpoint shadown contents.
940
941 2009-09-28  Doug Evans  <[email protected]>
942
943         * linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
944         (TRAP_REMOVE_SYSCALL_FLAG): New macro.
945         (linux_nat_wait_1): Mask off is-syscall bit in wait status for
946         TRAP_IS_SYSCALL before passing value to caller.
947
948 2009-09-28  Ulrich Weigand  <[email protected]>
949
950         * valops.c (value_assign): Respect parent offset when
951         assigning to a bitfield.
952
953 2009-09-28  Hui Zhu  <[email protected]>
954
955         * i386-tdep.c (i386_process_record): Remove "0x" that
956         don't need.
957
958 2009-09-27  Ulrich Weigand  <[email protected]>
959
960         * s390-tdep.c (op_bctr, op_bctgr, op_bct, op1_bctg, op2_bctg,
961         op_bxh, op1_bxhg, op2_bxhg, op_bxle, op1_bxleg, op2_bxleg,
962         op1_brct, op2_brct, op1_brctg, op2_brctg, op_brxh, op1_brxhg,
963         op2_brxhg, op_brxle, op1_brxlg, op2_brxlg): New enum values.
964         (is_rsi, is_rie): New insn format decoder routines.
965         (s390_displaced_step_fixup): New function.
966         (s390_gdbarch_init): Install displaced stepping routines.
967
968 2009-09-27  Ulrich Weigand  <[email protected]>
969
970         * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*):
971         Add linux-tdep.o to gdb_target_obs.
972         (s390*-*-*): Likewise.
973
974 2009-09-27  Don Lee  <[email protected]>
975
976         * score-tdep.c: Comment out some simulator dependent codes.
977         * score-tdep.h: Delete some simulator dependent macro definitions.
978
979 2009-09-27  Hui Zhu  <[email protected]>
980
981         * record.c (record_open): Change "query" to "error".
982         (cmd_record_stop): Change "query" to "printf_unfiltered".
983
984 2009-09-26  Pierre Muller  <[email protected]>
985
986         * i386-nat.c (i386_stopped_data_address): Also check that
987         hitted watch register is not vacant.
988
989 2009-09-25  Tom Tromey  <[email protected]>
990
991         PR python/10664:
992         * language.h (struct language_defn) <la_get_string>: Add
993         'char_type' argument.
994         (LA_GET_STRING): Likewise.
995         (default_get_string, c_get_string): Update.
996         * language.c (default_get_string): Add 'char_type' argument.
997         * c-valprint.c (c_textual_element_type): Rename from
998         textual_element_type.  No longer static.  Update callers.
999         * c-lang.h (c_textual_element_type): Declare.
1000         * c-lang.c (c_get_string): Add 'char_type' argument.
1001
1002 2009-09-25  Tom Tromey  <[email protected]>
1003
1004         * charset.c (iconv_open): Use UTF-16 and UTF-32, not UCS-2 and
1005         UCS-4.
1006         (iconv): Rename 'ucs_flag'.
1007         (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
1008         * c-lang.c (charset_for_string_type): Use UTF-16 and UTF-32, not
1009         UCS-2 and UCS-4.
1010         (convert_ucn): Use UTF-32.
1011
1012 2009-09-25  Nick Roberts  <[email protected]>
1013
1014         * mi/gdb-mi.el: Remove file.
1015
1016 2009-09-23  Joel Brobecker  <[email protected]>
1017
1018         * record.c (record_open, record_store_registers, record_xfer_partial):
1019         Replace calls to nquery by calls to query.
1020
1021 2009-09-23  John Wright  <[email protected]>
1022
1023         PR gdb/10684:
1024         * event-top.c (command_line_handler): Terminate linebuffer before
1025         xstrdup.
1026
1027 2009-09-22  Joel Brobecker  <[email protected]>
1028
1029         * solib.c (solib_bfd_open): Relax a bit the compatibility check.
1030
1031 2009-09-22  Daniel Jacobowitz  <[email protected]>
1032
1033         * source.c (forget_cached_source_info): Clear last_source_visited.
1034         (init_last_source_visited): Delete.
1035         (directory_command): Do not clear last_source_visited.  Call
1036         forget_cached_source_info only if required.
1037         (unset_substitute_path_command, set_substitute_path_command): Call
1038         forget_cached_source_info.
1039         * mi/mi-cmd-env.c (mi_cmd_env_dir): Do not call
1040         init_last_source_visited.
1041         * defs.h (init_last_source_visited): Delete declaration.
1042
1043 2009-09-22  Tom Tromey  <[email protected]>
1044
1045         PR gdb/10583:
1046         * python/py-value.c (valpy_int): Use PyLong_FromLongLong.
1047         (valpy_long): Likewise.
1048
1049 2009-09-22  Tom Tromey  <[email protected]>
1050
1051         PR python/10680:
1052         * eval.c (evaluate_subexp_standard) <do_call_it>: Handle internal
1053         functions in EVAL_AVOID_SIDE_EFFECTS case.
1054
1055 2009-09-22  Jie Zhang  <[email protected]>
1056
1057         * MAINTAINERS: Add myself under Write After Approval.
1058
1059 2009-09-22  Pierre Muller  <[email protected]>
1060
1061         * windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT.
1062
1063 2009-09-18  Keith Seitz  <[email protected]>
1064
1065         * cp-support.h (cp_validate_operator): Declare new function.
1066         * cp-support.c (cp_validate_operator): New function.
1067         * linespec.c (decode_compound): For C++ check for a valid operator.
1068
1069 2009-09-21  Keith Seitz  <[email protected]>
1070
1071         * c-exp.y (qualified_name): Call CHECK_TYPEDEF before deciding
1072         that a type is not an aggregate type.
1073
1074 2009-09-21  Jason Orendorff  <[email protected]>
1075
1076         PR python/10666:
1077         * python/py-function.c (fnpy_init): Use xstrdup.
1078
1079 2009-09-21  Jie Zhang  <[email protected]>
1080
1081         * doc/gdb.texinfo: Escape "{" and "}".
1082
1083 2009-09-21  Phil Muldoon <[email protected]>
1084
1085         PR python/10633
1086
1087         * c-lang.c (c_printstr): Do not loop past  options->print_max when
1088         iterating with wchar_iterate.
1089
1090 2009-09-21  Phil Muldoon <[email protected]>
1091
1092         * python/py-value.c (valpy_getitem): Test value before allowing
1093         subscript operation.
1094
1095 2009-09-21  Hui Zhu  <[email protected]>
1096             Michael Snyder  <[email protected]>
1097
1098         * amd64-linux-tdep.c (amd64_all_but_ip_registers_record): New
1099         function.
1100         (amd64_linux_syscall_record): Call
1101         amd64_all_but_ip_registers_record if syscall is
1102         sys_rt_sigreturn.
1103         (AMD64_LINUX_redzone, AMD64_LINUX_xstate,
1104         AMD64_LINUX_frame_size): New macros.
1105         (amd64_linux_record_signal): New function.
1106         (amd64_linux_init_abi): Call set_gdbarch_process_record_signal.
1107
1108 2009-09-21  Hui Zhu  <[email protected]>
1109             Michael Snyder  <[email protected]>
1110
1111         * i386-linux-tdep.c (i386_all_but_ip_registers_record): New
1112         function.
1113         (i386_linux_intx80_sysenter_record): Call
1114         i386_all_but_ip_registers_record if syscall is sys_sigreturn
1115         or sys_rt_sigreturn.
1116         (I386_LINUX_xstate, I386_LINUX_frame_size): New macros.
1117         (i386_linux_record_signal): New function.
1118         (i386_linux_init_abi): Call set_gdbarch_process_record_signal.
1119
1120 2009-09-21  Hui Zhu  <[email protected]>
1121             Michael Snyder  <[email protected]>
1122
1123         * record.c (record_end_entry): New struct.
1124         (record_type): Add end.
1125         (record_arch_list_add_end): Set rec->u.end.sigval to
1126         TARGET_SIGNAL_0.
1127         (record_message_args): New struct.
1128         (record_message): Call gdbarch_process_record_signal.
1129         (do_record_message): Add argument "signal".
1130         (record_resume): Ditto.
1131         (record_wait): Ditto.  Check record_list->u.end.sigval
1132         in replay mode.
1133
1134 2009-09-21  Hui Zhu  <[email protected]>
1135             Michael Snyder  <[email protected]>
1136
1137         * gdbarch.sh (process_record_signal): New interface.
1138
1139 2009-09-19  Matt Rice <[email protected]>  (tiny change)
1140
1141         Checked in by Joel Brobecker  <[email protected]>
1142         * varobj.c (varobj_update): Initialize children_changed.
1143
1144 2009-09-19  Vladimir Prus  <[email protected]>
1145
1146         * mi/mi-cmd-stack.c (list_args_or_locals): Workaround
1147         gcc warning.
1148
1149 2009-09-19  Vladimir Prus  <[email protected]>
1150
1151         * mi/mi-cmds.h (mi_cmd_stack_list_variables): Declare.
1152         * mi/mi-cmds.c (mi_cmds): Register -stack-list-variables.
1153         * mi/mi-cmd-stack.c (enum what_to_list): New.
1154         (list_args_or_locals): Accept what_to_list parameter.
1155         Use 'variables' as output name of all are requested.
1156         (mi_cmd_stack_list_variables): New.
1157         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Adjust.
1158
1159 2009-09-19  Eli Zaretskii  <[email protected]>
1160
1161         * config/djgpp/fnchange.lst: Add missing edits.
1162
1163 2009-09-18  Maxim Grigoriev  <[email protected]>
1164
1165         * xtensa-tdep.c (call0_analyze_prologue): Replace INT_MAX by UNIT_MAX.
1166
1167 2009-09-18  Jan Kratochvil  <[email protected]>
1168
1169         * objfiles.c (free_objfile): Clear SYMFILE_OBJFILE if it is OBJFILE.
1170         * rs6000-nat.c (vmap_ldinfo): Only assertion check SYMFILE_OBJFILE now.
1171         * symfile.c (syms_from_objfile, symbol_file_clear): Likewise.
1172
1173 2009-09-18  Ulrich Weigand  <[email protected]>
1174
1175         * rs6000-tdep.c (rs6000_builtin_type_vec128): Add v2_double
1176         union member.
1177
1178 2009-09-17  Joel Brobecker  <[email protected]>
1179
1180         Fix a build failure on pa-hpux:
1181         * gdb_ptrace.h (PT_SYSCALL): Define here if not already defined.
1182         * inf-ttrace.c (inf_ttrace_wait): Fix compilation failure
1183         introduced after field syscall_id inside struct target_waitstatus
1184         has been renamed into syscall_number.
1185
1186 2009-09-16  H.J. Lu  <[email protected]>
1187
1188         PR gdb/10649
1189         * Makefile.in (GDB_DATADIR_PATH): Renamed to ...
1190         (GDB_DATADIR): This.
1191         (xml-syscall-install): Updated.
1192
1193 2009-09-16  Joel Brobecker  <[email protected]>
1194
1195         GDB 7.0 branch created (branch timestamp: 2009-09-16 19:00 UTC)
1196         * version.in: Bump version to 7.0.50.20090916-cvs.
1197
1198 2009-09-15  Tom Tromey  <[email protected]>
1199
1200         * varobj.h (varobj_update_result_t) <new>: New field.
1201         (varobj_get_child_range, varobj_set_child_range): Declare.
1202         (varobj_list_children): Update.
1203         (varobj_enable_pretty_printing, varobj_has_more)
1204         (varobj_pretty_printed_p): Declare.
1205         * varobj.c (pretty_printing): New global.
1206         (varobj_enable_pretty_printing): New function.
1207         (struct varobj_root) <from, to, constructor, child_iter,
1208         saved_item>: New fields.
1209         (varobj_create): Don't call install_default_visualizer.
1210         (instantiate_pretty_printer): Don't use value_copy.
1211         (varobj_has_more): New function.
1212         (restrict_range): New function.
1213         (install_dynamic_child): Likewise.
1214         (dynamic_varobj_has_child_method): Likewise.
1215         (update_dynamic_varobj_children): Remove 'new_and_unchanged'
1216         argument; add 'new', 'unchanged', 'from', and 'to' arguments.
1217         Rewrite.
1218         (varobj_get_num_children): Call update_dynamic_varobj_children.
1219         (varobj_list_children): Add 'from' and 'to' arguments.  Ignore
1220         result of update_dynamic_varobj_children.  Don't call
1221         install_default_visualizer.  Restrict result range.
1222         (varobj_add_child): Don't call install_default_visualizer.
1223         (varobj_pretty_printed_p): New function.
1224         (install_visualizer): Rewrite.  Move earlier in file.
1225         (install_default_visualizer): Likewise.
1226         (construct_visualizer): New function.
1227         (install_new_value_visualizer): Likewise.
1228         (install_new_value): Don't call release_value.  Special case
1229         pretty-printed objects.  Use value_incref.  Rearrange "changed"
1230         logic.
1231         (varobj_get_child_range): New function.
1232         (varobj_set_child_range): Likewise.
1233         (varobj_set_visualizer): Rewrite.
1234         (varobj_update): Rewrite pretty-printing logic.
1235         (new_variable): Initialize new fields.
1236         (free_variable): Destroy new fields.
1237         (value_of_root): Copy 'from' and 'to'.
1238         (my_value_of_variable): Handle pretty-printers.
1239         (value_get_print_value): Rework pretty-printing logic.
1240         (cplus_describe_child): Don't use release_value.
1241         * mi/mi-cmds.h (mi_cmd_enable_pretty_printing)
1242         (mi_cmd_var_set_update_range): Declare.
1243         * mi/mi-cmds.c (mi_cmds): Add enable-pretty-printing and
1244         var-set-update-range.
1245         * mi/mi-cmd-var.c (print_varobj): Update.  Emit "dynamic"
1246         attribute.
1247         (mi_cmd_var_create): Emit "has_more" attribute.
1248         (mi_cmd_var_set_format): Plug memory leak.
1249         (mi_print_value_p): Replace 'type' argument with 'var'.  Handle
1250         pretty-printed varobjs.
1251         (mi_cmd_var_list_children): Accept 'from' and 'to' arguments.
1252         Emit "has_more" attribute.
1253         (mi_cmd_var_evaluate_expression): Plug memory leak.
1254         (mi_cmd_var_assign): Likewise.
1255         (varobj_update_one): Likewise.  Emit "dynamic", "has_more", and
1256         "new_children" attributes.
1257         (mi_cmd_enable_pretty_printing): New function.
1258         (mi_cmd_var_set_update_range): Likewise.
1259
1260 2009-09-15  Doug Evans  <[email protected]>
1261
1262         * dwarf2expr.h (dwarf_value_location): Add more comments describing
1263         enum values.
1264         (struct dwarf_stack_value): New struct.
1265         (struct dwarf_expr_context): Change type of `stack' from CORE_ADDR*
1266         to struct dwarf_stack_value*.
1267         (struct dwarf_expr_piece): Move `v.value' into its own struct, v.expr,
1268         all uses updated.  Add v.expr.in_stack_memory.
1269         (dwarf_expr_push): Update declaration.
1270         (dwarf_expr_fetch_in_stack_memory): Declare.
1271         * dwarf2expr.c (dwarf_expr_grow_stack): Update calculation of
1272         size of stack value.
1273         (dwarf_expr_push): New arg in_stack_memory, all callers updated.
1274         (dwarf_expr_fetch_in_stack_memory): New function.
1275         (add_piece): Set in_stack_memory for non-literal values.
1276         (execute_stack_op): Allow ops to specify whether the value is on the
1277         program's stack.
1278         (execute_stack_op, case DW_OP_fbreg): Mark value as in stack memory.
1279         (execute_stack_op, case DW_OP_call_frame_cfa): Ditto.
1280         (execute_stack_op, case DW_OP_dup): Copy in_stack_memory flag.
1281         (execute_stack_op, cases DW_OP_pick, DW_OP_over): Ditto.
1282         (execute_stack_op, cases DW_OP_swap, DW_OP_rot): Update type of
1283         dwarf stack value.
1284         * dwarf2loc.c (read_pieced_value): Call read_stack for values known
1285         to be on the program's stack.
1286         (dwarf2_evaluate_loc_desc, case DWARF_VALUE_MEMORY): Call
1287         set_value_stack only for objects known to be in stack memory.
1288         * dwarf2-frame.c (execute_stack_op): New arg initial_in_stack_memory,
1289         all callers updated.
1290
1291         * target.c (memory_xfer_partial): Pass correct length to dcache_update.
1292
1293 2009-09-15  Jan Kratochvil  <[email protected]>
1294
1295         Fix gcc-4.5 HEAD warnings for enum ada_operator.
1296         * Makefile.in (HFILES_NO_SRCDIR): Add ada-operator.inc.
1297         * ada-lang.h (enum ada_operator): Move it to ...
1298         * ada-operator.inc: ... a new file.
1299         * expression.h (enum exp_opcode): Include ada-operator.inc.
1300         New element OP_UNUSED_LAST.  Update comment for OP_EXTENDED0.
1301
1302         Fix gcc-4.5 HEAD warnings for GDB_FORM_cached_string.
1303         * dwarf2read.c (GDB_FORM_cached_string)
1304         (dwarf_form_name <GDB_FORM_cached_string>): Remove.
1305         (struct attribute <dwarf_form>): Reduce the bit width.
1306         (struct attribute <string_is_canonical>, DW_STRING_IS_CANONICAL): New.
1307         (read_attribute_value <DW_FORM_string>)
1308         (read_attribute_value <DW_FORM_strp>): Initialize
1309         DW_STRING_IS_CANONICAL.
1310         (dwarf2_name, dump_die_shallow <DW_FORM_string>)
1311         (dump_die_shallow <DW_FORM_strp>): Update the code using former
1312         GDB_FORM_cached_string.
1313
1314 2009-09-14  Sergio Durigan Junior <[email protected]>
1315
1316         * amd64-linux-tdep.c: Include xml-syscall.h header, define the XML
1317         syscall name for the architecture.
1318         (amd64_linux_get_syscall_number): New function.
1319         (amd64_linux_init_abi): Register the correct functions for syscall
1320         catchpoint; set the correct syscall file name.
1321         * breakpoint.c: New include: xml-syscall.h.
1322         (set_raw_breakpoint_without_location): Setting the parameters
1323         for the catch syscall feature.
1324         (insert_catch_syscall): New.
1325         (remove_catch_syscall): New.
1326         (breakpoint_hit_catch_syscall): New.
1327         (print_it_catch_syscall): New.
1328         (print_one_catch_syscall): New.
1329         (print_mention_catch_syscall): New.
1330         (catch_syscall_breakpoint_ops): New.
1331         (syscall_catchpoint_p): New.
1332         (create_catchpoint_without_mention): New.
1333         (create_catchpoint): Modified in order to use
1334         create_catchpoint_without_mention.
1335         (create_syscall_event_catchpoint): New.
1336         (clean_up_filters): New.
1337         (catch_syscall_split_args): New.
1338         (catch_syscall_command_1): New.
1339         (delete_breakpoint): Add cleanup for catch syscall.
1340         (is_syscall_catchpoint_enabled): New.
1341         (catch_syscall_enabled): New.
1342         (catching_syscall_number): New.
1343         (catch_syscall_completer): New completer function.
1344         (add_catch_command): Add the completer function for catchpoints.
1345         * breakpoint.h (syscalls_to_be_caught): New vector.
1346         (catch_syscall_enabled): New.
1347         (catching_syscall_number): New.
1348         * gdbarch.c: Regenerated.
1349         * gdbarch.h: Regenerated.
1350         * gdbarch.sh: Add syscall catchpoint functions and structures.
1351         (get_syscall_number): New.
1352         (UNKNOWN_SYSCALL): New definition.
1353         * i386-linux-nat.c (i386_linux_resume): Select the proper request
1354         to be made for ptrace() considering if we are catching syscalls
1355         or not.
1356         * i386-linux-tdep.c: Include xml-syscall.h header, define the XML
1357         syscall name for the architecture.
1358         (i386_linux_get_syscall_number): New.
1359         (i386_linux_init_abi): Register the correct functions for syscall
1360         catchpoint; set the correct syscall file name.
1361         * inf-child.c (inf_child_set_syscall_catchpoint): New.
1362         (inf_child_target): Assign default values to target_ops.
1363         * inf-ptrace.c (inf_ptrace_resume): Select the proper request
1364         to be made for ptrace() considering if we are catching syscalls
1365         or not.
1366         * inferior.h (struct inferior): Included new variables
1367         any_syscall_count, syscalls_counts and total_syscalls_count,
1368         used to keep track of requested syscall catchpoints.
1369         * infrun.c (resume): Add syscall catchpoint.
1370         (deal_with_syscall_event): New.
1371         (handle_inferior_event): Add syscall entry/return events.
1372         (inferior_has_called_syscall): New.
1373         * linux-nat.c: Define some helpful variables to track wether we have
1374         support for the needed ptrace option.
1375         (linux_test_for_tracesysgood): New.
1376         (linux_supports_tracesysgood): New.
1377         (linux_enable_tracesysgood): New.
1378         (linux_enable_event_reporting): Save the current used ptrace
1379         options.
1380         (linux_child_post_attach): Calling linux_enable_tracesysgood.
1381         (linux_child_post_startup_inferior): Likewise.
1382         (linux_child_set_syscall_catchpoint): New function.
1383         (linux_handle_extended_wait): Handle the case which the inferior stops
1384         because it has called or returned from a syscall.
1385         (linux_target_install_ops): Install the necessary functions to handle
1386         syscall catchpoints.
1387         * linux-nat.h (struct lwp_info): Include syscall_state into the
1388         structure, which indicates if we are in a syscall entry or return.
1389         * ppc-linux-tdep.c: Include xml-syscall.h header, define the XML
1390         syscall filename for the arch.
1391         (ppc_linux_get_syscall_number): New.
1392         (ppc_linux_init_abi): Register the correct functions for syscall
1393         catchpoint; setting the correct name for the XML syscall file.
1394         * target.c (update_current_target): Update/copy functions related to
1395         syscall catchpoint.
1396         (target_waitstatus_to_string): Add syscall catchpoint entry/return
1397         events.
1398         * target.h (struct target_waitstatus): Add syscall number.
1399         (struct syscall): New struct to hold information about syscalls
1400         in the system.
1401         (struct target_ops): Add ops for syscall catchpoint.
1402         (inferior_has_called_syscall): New.
1403         (target_set_syscall_catchpoint): New.
1404         * xml-support.c (xml_fetch_content_from_file): New function,
1405         transferred from xml-tdesc.c.
1406         * xml-support.h (xml_fetch_content_from_file): New.
1407         * xml-tdesc.c (fetch_xml_from_file): Function removed;
1408         transferred to xml-support.c.
1409         (file_read_description_xml): Updated to use the new
1410         xml_fetch_content_from_file function.
1411         * syscalls/gdb-syscalls.dtd: New definition file for syscall's XML
1412         support.
1413         * syscalls/amd64-linux.xml: New file containing information about
1414         syscalls for GNU/Linux systems that use amd64 architecture.
1415         * syscalls/i386-linux.xml: New file containing information about
1416         syscalls for GNU/Linux systems that use i386 architecture.
1417         * syscalls/ppc-linux.xml: New file containing information about
1418         syscalls for GNU/Linux systems that use PPC architecture.
1419         * syscalls/ppc64-linux.xml: New file containing information about
1420         syscalls for GNU/Linux systems that use PPC64 architecture.
1421         * xml-syscall.c: New file containing functions for manipulating
1422         syscall's XML files.
1423         * xml-syscall.h: New file, exporting the functions above mentioned.
1424         * Makefile.in: Support for relocatable GDB datadir and XML
1425         syscall.
1426         * NEWS: Added information about the catch syscall feature.
1427
1428 2009-09-14  Doug Evans  <[email protected]>
1429
1430         * target.c (memory_xfer_partial): Only update dcache after we know
1431         the write succeeded.
1432
1433 2009-09-14  Paul Pluzhnikov  <[email protected]>
1434
1435         *minsyms.c (lookup_minimal_symbol_by_pc_section_1): Assert non-NULL
1436         section.
1437         (lookup_minimal_symbol_by_pc_section): Check for NULL section.
1438         (lookup_minimal_symbol_by_pc): Adjust.
1439
1440 2009-09-14  Paul Pluzhnikov  <[email protected]>
1441
1442         * objfiles.c (qsort_cmp): Remove asserts.
1443         (insert_section_p, filter_debuginfo_sections): New function.
1444         (filter_overlapping_sections): Likewise.
1445         (update_section_map): Adjust.   
1446
1447 2009-09-13  Daniel Jacobowitz  <[email protected]>
1448
1449         * frame.c (get_frame_id): Default to outer_frame_id if the this_id
1450         method does not supply an ID.  Assert that the result is not
1451         null_frame_id.
1452         (outer_frame_id): New.
1453         (frame_id_p): Accept outer_frame_id.
1454         (frame_id_eq): Allow outer_frame_id to be equal to itself.
1455         (frame_find_by_id): Revert previous local workarounds.
1456         (get_prev_frame_1): Adjust end-of-stack check to test outer_frame_id.
1457         * frame.h (null_frame_id, frame_id_p): Update comments.
1458         (outer_frame_id): Declare.
1459         * infrun.c (handle_inferior_event): Do not treat all steps from the
1460         outermost frame as subroutine calls.
1461
1462         * libunwind-frame.c (libunwind_frame_this_id): Do not clear THIS_ID.
1463         * hppa-tdep.c (hppa_stub_frame_this_id): Likewise.
1464         * ia64-tdep.c (ia64_frame_this_id): Likewise.
1465         (ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id):
1466         Use outer_frame_id instead of null_frame_id.
1467         * amd64obsd-tdep.c (amd64obsd_trapframe_cache): Use outer_frame_id.
1468         * i386obsd-tdep.c (i386obsd_trapframe_cache): Likewise.
1469         * inline-frame.c (inline_frame_this_id): Refuse outer_frame_id.
1470         * thread.c (restore_selected_frame): Update comment and remove
1471         frame_id_p check.
1472
1473 2009-09-11  Doug Evans  <[email protected]>
1474
1475         * dwarf2expr.c (execute_stack_op, case DW_OP_piece): Delete unused
1476         local addr_or_regnum.
1477
1478         * objfiles.c (struct objfile_data): Delete member cleanup and replace
1479         with save, free.
1480         (register_objfile_data_with_cleanup): Delete arg cleanup and replace
1481         with save, free.  All callers updated.
1482         (clear_objfile_data): Replace cleanup loop with separate save and
1483         free loops.
1484         * objfiles.h (register_objfile_data_with_cleanup): Update.
1485         * arm-tdep.c (arm_objfile_data_free): Renamed from
1486         arm_objfile_data_cleanup, all callers updated.
1487         * dwarf2read.c (dwarf2_per_objfile_free): Renamed from
1488         dwarf2_per_objfile_cleanup, all callers updated.
1489         * python/py-objfile.c (py_free_objfile): Renamed from clean_up_objfile,
1490         all callers updated.
1491         * python/py-type.c (save_objfile_types): Renamed from
1492         clean_up_objfile_types, all callers updated.
1493
1494 2009-09-11  Tom Tromey  <[email protected]>
1495
1496         * dwarf2loc.c (struct piece_closure) <arch>: New field.
1497         (dwarf2_evaluate_loc_desc): Update.
1498         (dwarf2_loc_desc_needs_frame): Likewise.
1499         (allocate_piece_closure): Initialize new field.
1500         (read_pieced_value): Update.
1501         (write_pieced_value): Update.
1502         (copy_pieced_value_closure): Update.
1503         * dwarf2expr.h (enum dwarf_value_location): New.
1504         (struct dwarf_expr_context) <in_reg>: Remove.
1505         <location, len, data>: New fields.
1506         (struct dwarf_expr_piece) <in_reg, value>: Remove.
1507         <location, v>: New fields.
1508         * dwarf2expr.c (add_piece): Remove in_reg, value arguments.
1509         Update.
1510         (require_composition): New function.
1511         (execute_stack_op): Update.
1512         <DW_OP_implicit_value, DW_OP_stack_value>: New cases.
1513         <DW_OP_reg0>: Set location, not in_reg.
1514         <DW_OP_regx>: Likewise.  Use require_composition.
1515         <DW_OP_fbreg>: Update.
1516         <DW_OP_piece>: Likewise.
1517         * dwarf2-frame.c (execute_stack_op): Update.
1518
1519 2009-09-10  Anthony Green  <[email protected]>
1520
1521         * moxie-tdep.c (moxie_analyze_prologue): Recognize new prologue
1522         sequences.
1523
1524 2009-09-10  Michael Snyder  <[email protected]>
1525
1526         * remote.c (PACKET_bc, PACKET_bs): New enums.
1527         (remote_protocol_features): Add ReverseStep, ReverseContinue.
1528         (remote_resume): Check for reverse capability.
1529         (_initialize_remote): Add packet config for "bs" and "bc" packets.
1530         * NEWS (new options): Mention set/show for "bs" and "bc" packets.
1531
1532 2009-09-10  Joel Brobecker  <[email protected]>
1533
1534         * top.c (interactive_mode): New static variable.
1535         (show_interactive_mode): New function.
1536         (input_from_terminal_p): If interactive_mode is not auto, then
1537         use that rather than checking the stdin settings.
1538         (init_main): Add "set/show interactive-mode" command.
1539         * NEWS: Add entry for new "set/show interactive-mode" command.
1540
1541 2009-09-10  Joel Brobecker  <[email protected]>
1542
1543         * configure.ac: Fix the names of the python source and object files
1544         following the renaming done in an earlier change.
1545         * configure: Regenerate.
1546
1547 2009-09-08  Joel Brobecker  <[email protected]>
1548
1549         Fix a build failure on AIX.
1550         * rs6000-nat.c (vmap_exec): Rewrite using target_get_section_table
1551         instead of relying on the to_sections/to_section_end target_ops
1552         field, since the latter have been removed in a previous patch.
1553
1554 2009-09-08  Thiago Jung Bauermann  <[email protected]>
1555
1556         * Makefile.in (py-cmd.o): Renamed from python-cmd.o.  Updated
1557         references.
1558         (py-frame.o): Renamed from python-frame.o.  Updated references.
1559         (py-function.o): Renamed from python-function.o.  Updated references.
1560         (py-objfile.o): Renamed from python-objfile.o.  Updated references.
1561         (py-prettyprint.o): Renamed from python-prettyprint.o.  Updated
1562         references.
1563         (py-type.o): Renamed from python-type.o.  Updated references.
1564         (py-utils.o): Renamed from python-utils.o.  Updated references.
1565         (py-value.o): Renamed from python-value.o.  Updated references.
1566         * py-cmd.c: Renamed from python-cmd.c.
1567         * py-frame.c: Renamed from python-frame.c.
1568         * py-function.c: Renamed from python-function.c.
1569         * py-objfile.c: Renamed from python-objfile.c.
1570         * py-prettyprint.c: Renamed from python-prettyprint.c.
1571         * py-type.c: Renamed from python-type.c.
1572         * py-utils.c: Renamed from python-utils.c.
1573         * py-value.c: Renamed from python-value.c.
1574
1575 2009-09-08  Joel Brobecker  <[email protected]>
1576
1577         Avoid quadratic behavior when computing the value of a register.
1578         * frame.c (frame_stash): New static constant.
1579         (frame_stash_add, frame_stash_find, frame_stash_invalidate):
1580         New functions.
1581         (get_frame_id): Minor reformatting. Add the frame to the frame stash.
1582         (frame_find_by_id): Search the frame stash first before walking all
1583         frames starting from te current_frame.
1584         (reinit_frame_stash): Add call to frame_stash_invalidate ();
1585
1586 2009-09-08  Joel Brobecker  <[email protected]>
1587
1588         * block.c (contained_in): Return zero for nested functions.
1589         * blockframe.c (block_innermost_frame): Delete unreferenced local
1590         variable.
1591
1592 2009-09-08  Doug Evans  <[email protected]>
1593
1594         * target.c (initialize_targets): Fix thinko in stack_cache_enabled_p.
1595
1596 2009-09-08  Michael Snyder  <[email protected]>
1597
1598         * amd64-linux-tdep.h (enum amd64_syscall): New enum consts, 
1599         to replace literal consts used in amd64-linux-tdep.c
1600         * linux-record.h (enum gdb_syscall): New enum consts, to replace
1601         literal consts used in amd64-linux-tdep.c and linux-record.c.
1602         * amd64-linux-tdep.c (amd64_canonicalize_syscall): New function,
1603         translate from native amd64 Linux syscall id to internal gdb id.
1604         (amd64_linux_syscall_record): Switch statement abstracted out 
1605         and replaced with a call to amd64_canonicalize_syscall.
1606         * linux-record.c (record_linux_system_call): Replace literal
1607         consts with enum consts.
1608         * i386-linux-tdep.c (i386_canonicalize_syscall): New function,
1609         trivially translate from native i386 Linux syscalls to gdb syscalls.
1610         (i386_linux_intx80_sysenter_record): 
1611
1612 2009-09-08  Ralf Wildenhues  <[email protected]>
1613
1614         * gdb/Makefile.in (check//%): Parse 'config.status --version'
1615         output to recreate the configuration from the testsuite directory,
1616         rather than running 'config.status --recheck' from a different
1617         build directory.  Let configure do the recursion rather than
1618         doing it manually.
1619
1620 2009-09-08  Jan Kratochvil  <[email protected]>
1621
1622         * ia64-tdep.c (ia64_memory_remove_breakpoint): Call do_cleanups
1623         before a return.
1624
1625 2009-09-08  Jan Kratochvil  <[email protected]>
1626
1627         * ia64-tdep.c (ia64_memory_insert_breakpoint)
1628         (ia64_memory_remove_breakpoint): Return immediately if any of memory
1629         reads fail.  Do not combine the VAL values.
1630
1631 2009-09-08  Jan Kratochvil  <[email protected]>
1632
1633         Fix ia64 shadowing of breakpoints in multiple slots of a single bundle.
1634         * ia64-tdep.c (ia64_memory_insert_breakpoint): New call
1635         of make_show_memory_breakpoints_cleanup with parameter 0.  Move the
1636         reading of SHADOW_CONTENTS to this memory state point of code.  Update
1637         comment for the memory re-read.
1638
1639 2009-09-07  Michael Snyder  <[email protected]>
1640
1641         * record.c: Minor comment and white space fix-ups.
1642
1643 2009-09-07  Jan Kratochvil  <[email protected]>
1644
1645         * m68k-tdep.c (m68k_gdbarch_init): Allocate TDEP as cleared.
1646         * sparc-tdep.c (sparc32_gdbarch_init): Allocate TDEP as cleared.
1647         Remove explicit clearing of TDEP fields.
1648
1649 2009-09-06  Hui Zhu  <[email protected]>
1650
1651         * i386-tdep.c (i386_record_check_override): Deleted.
1652         (i386_record_lea_modrm): Ditto.
1653         (i386_process_record): Ditto.
1654
1655 2009-09-05  Eli Zaretskii  <[email protected]>
1656
1657         * config/djgpp/djconfig.sh: Fix for Autoconf 2.64.
1658         * config/djgpp/config.sed: Fix for Autoconf 2.64.
1659
1660 2009-09-05  Hui Zhu  <[email protected]>
1661
1662         * i386-tdep.c (i386_record_s): Add orig_addr.
1663         (i386_record_check_override): New function.
1664         (i386_record_lea_modrm): Call i386_record_check_override.
1665         (i386_process_record): Ditto.
1666
1667 2009-09-03  Nathan Froyd  <[email protected]>
1668
1669         * dwarf2loc.c (struct piece_closure): New.
1670         (allocate_piece_closure): New function.
1671         (read_pieced_value): New function.
1672         (write_pieced_value): New function.
1673         (copy_pieced_value_closure): New function.
1674         (free_pieced_value_closure): New function.
1675         (pieced_value_funcs): Define.
1676         (dwarf2_evaluate_loc_desc): Return a computed value for a variable
1677         described with pieces.
1678
1679 2009-09-03  Pierre Muller <[email protected]>
1680             Richard Earnshaw <[email protected]>
1681
1682         * arm-tdep.c (displaced_write_reg): Replace call to abort by call
1683         to internal_error.
1684
1685 2009-09-02  Tom Tromey  <[email protected]>
1686
1687         * frame.h (frame_unwinder_is): Declare.
1688         * frame.c (frame_unwinder_is): New function.
1689         * dwarf2loc.c: Include dwarf2-frame.h.
1690         (dwarf_expr_frame_cfa): New function.
1691         (dwarf2_evaluate_loc_desc): Use it.
1692         (needs_frame_frame_cfa): New function.
1693         (dwarf2_loc_desc_needs_frame): Use it.
1694         * dwarf2expr.h (struct dwarf_expr_context) <get_frame_cfa>: New
1695         field.
1696         * dwarf2expr.c (execute_stack_op) <DW_OP_call_frame_cfa>: New
1697         case.
1698         * dwarf2-frame.h (dwarf2_frame_cfa): Declare.
1699         * dwarf2-frame.c (no_get_frame_cfa): New function.
1700         (execute_stack_op): Use it.
1701         (dwarf2_frame_cfa): New function.
1702
1703 2009-09-02  Hui Zhu  <[email protected]>
1704
1705         * record.c (record_resume): Change "signal" to "siggnal".
1706
1707 2009-09-01  Hui Zhu  <[email protected]>
1708
1709         * record.c (record_resume): Change "siggnal" to "signal".
1710
1711 2009-09-01  Hui Zhu  <[email protected]>
1712
1713         * record.c (record_resume_siggnal): Deleted.
1714         (record_resume): Ditto.
1715         (record_wait): Change record_resume_siggnal to
1716         TARGET_SIGNAL_0.
1717
1718 2009-08-31  Jacob Potter  <[email protected]>
1719             Doug Evans  <[email protected]>
1720
1721         Implement TARGET_OBJECT_STACK_MEMORY.
1722         * NEWS: Add note on new "set stack-cache" option.
1723         * corefile.c (read_stack): New function.
1724         * dcache.c (dcache_struct): New member ptid.
1725         (dcache_enable_p): Mark as obsolete.
1726         (show_dcache_enabled_p): Flag option as deprecated.
1727         (dcache_invalidate): Update ptid.
1728         (dcache_invalidate_line): New function.
1729         (dcache_read_line): No longer check cacheable attribute, stack
1730         accesses get cached despite attribute.
1731         (dcache_init): Set ptid.
1732         (dcache_xfer_memory): Flush cache if from different ptid than before.
1733         Update cache after write.
1734         (dcache_update): New function.
1735         (dcache_info): Report ptid.
1736         (_initialize_dcache): Update text for `remotecache' to indicate it
1737         is obsolete.
1738         * dcache.h (dcache_update): Declare.
1739         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Mark values on stack with
1740         set_value_stack.
1741         * frame-unwind.c (frame_unwind_got_memory): Ditto.
1742         * gdbcore.h (read_stack): Declare.
1743         * memattr.c (mem_enable_command): Call target_dcache_invalidate
1744         instead of dcache_invalidate.
1745         (mem_disable_command, mem_delete_command): Ditto.
1746         * target.c (stack_cache_enabled_p_1): New static global.
1747         (stack_cache_enabled_p): New static global.
1748         (set_stack_cache_enabled_p): New function.
1749         (show_stack_cache_enabled_p): New function.
1750         (target_dcache): Make static.
1751         (target_dcache_invalidate): New function.
1752         (target_load, target_resume): Call target_dcache_invalidate
1753         instead of dcache_invalidate.
1754         (memory_xfer_partial): New arg object, all callers updated.
1755         Check for existing inferior before calling dcache routines.
1756         When writing non-TARGET_OBJECT_STACK_MEMORY, notify dcache.
1757         (target_xfer_partial): Call memory_xfer_partial for
1758         TARGET_OBJECT_STACK_MEMORY.
1759         (target_read_stack): New function.
1760         (initialize_targets): Install new option `stack-cache'.
1761         * target.h: Remove #include of dcache.h.
1762         (enum target_object): New value TARGET_OBJECT_STACK_MEMORY.
1763         (target_dcache): Delete.
1764         (target_dcache_invalidate): Declare.
1765         (target_read_stack): Declare.
1766         * top.c (prepare_execute_command): New function.
1767         (execute_command): Call prepare_execute_command
1768         instead of free_all_values.
1769         * top.h (prepare_execute_command): Declare.
1770         * valops.c (get_value_at): New function.
1771         (value_at): Guts moved to get_value_at.
1772         (value_at_lazy): Similarly.
1773         (value_fetch_lazy): Call read_stack for stack values.
1774         * value.c (struct value): New member `stack'.
1775         (value_stack, set_value_stack): New functions.
1776         * value.h (value_stack, set_value_stack): Declare.
1777         * mi/mi-main.c (mi_cmd_execute): Call prepare_execute_command
1778         instead of free_all_values.
1779
1780 2009-08-29  Hui Zhu  <[email protected]>
1781
1782         * i386-tdep.c (i386_process_record): Fix the error of string
1783         ops instructions's handler.
1784
1785 2009-08-28  Doug Evans  <[email protected]>
1786
1787         * top.c (execute_command): Remove redundant comment.
1788
1789 2009-08-28  Daniel Jacobowitz  <[email protected]>
1790
1791         PR gdb/10565
1792
1793         * value.c (value_primitive_field): Do not save value_offset for
1794         bitfields.
1795         (unpack_bits_as_long): Do not read an entire ULONGEST.
1796
1797 2009-08-28  Jan Kratochvil  <[email protected]>
1798
1799         Support constant DW_AT_data_member_location by GCC PR debug/40659.
1800         * dwarf2read.c
1801         (dwarf2_add_field <DW_TAG_member> <DW_AT_data_member_location>):
1802         Initialize BYTE_OFFSET to 0 by default.  Explicitly check if
1803         attr_form_is_block.
1804         (dwarf2_add_field <DW_TAG_inheritance> <DW_AT_data_member_location>)
1805         (read_common_block <DW_AT_data_member_location>): New variable
1806         byte_offset.  Fix crash on non-DW_BLOCK ATTR values.
1807
1808 2009-08-28  Hui Zhu  <[email protected]>
1809
1810         * record.c (record_list_release_next): Change the first
1811         record_reg to record_end.
1812
1813 2009-08-27  Doug Evans  <[email protected]>
1814
1815         * value.c (free_all_values): Tweak comment.
1816
1817         * NEWS: Add note on "info sharedlibrary".
1818         Remove note on "set print symbol-loading".
1819         * main.c (captured_main): Pass !batch for from_tty when calling
1820         symbol_file_add_main.
1821         * objfiles.h (objfile_has_partial_symbols): Declare.
1822         (objfile_has_full_symbols): Declare.
1823         * objfiles.c (objfile_has_partial_symbols): New function.
1824         (have_partial_symbols): Use it.
1825         (objfile_has_full_symbols): New function.
1826         (have_full_symbols): Use it.
1827         * solib.c: Include interps.h.
1828         (solib_read_symbols): Back out patch of 2008-07-10.
1829         Add test for info_verbose for symbol loading messages for
1830         consistency with symfile.c.
1831         (info_sharedlibrary_command): Handle optional parameter of regex of
1832         libraries to list.  Inform user of libraries without debugging info.
1833         Rewrite to use ui_out routines to format output.
1834         * symfile.c (print_symbol_loading): Delete.
1835         (symbol_file_add_with_addrs_or_offsets): Back out patch of 2008-07-10.
1836         Print "no debugging symbols found" only if from_tty || info_verbose;
1837         and only check file being loaded, not all files.
1838         (reread_symbols): Test file being loaded for whether it has symbols,
1839         not all files.
1840         (__initialize_symfile): Delete `set print symbol-loading'.
1841         * symfile.h (print_symbol_loading): Delete.
1842
1843 2009-08-27  Jan Kratochvil  <[email protected]>
1844
1845         * varobj.c (varobj_create): Error if the specified frame was not found
1846         and it is needed.
1847
1848 2009-08-26  Michael Snyder  <[email protected]>
1849
1850         * i386-tdep.c (i386_process_record): Break out of prefix loop
1851         if not amd64.  Otherwise inc/dec instructions are lost.
1852
1853 2009-08-25  Keith Seitz  <[email protected]>
1854
1855         * c-exp.y (yylex): Add cxx_only check for tokentab2 and tokentab3
1856         searches. 
1857         (tokentab3): Add cxx_only for DOT_STAR.
1858
1859 2009-08-25  Pedro Alves  <[email protected]>
1860
1861         * inferior.c (print_inferior): Align columns left.  Remove header
1862         for the the "current" column.  Rename column "Id" to "Num".
1863         Rename column "PID" to "Description".  Print if there's no selected
1864         inferior.
1865
1866 2009-08-25  Jan Kratochvil  <[email protected]>
1867
1868         Fix ia64 start crash when GDB built with -lmcheck.
1869         * ia64-tdep.c (ia64_gdbarch_init): Allocate TDEP as cleared.  Remove
1870         specific clearing of TDEP SIGCONTEXT_REGISTER_ADDRESS and
1871         PC_IN_SIGTRAMP.
1872
1873 2009-08-24  Keith Seitz  <[email protected]>
1874
1875         * c-exp.y (tokentab3): Add new token, ARROW_STAR. Changed all users.
1876         (tokentab2): Add new token, DOT_STAR. Changed all users.
1877
1878 2009-08-24  Keith Seitz  <[email protected]>
1879
1880         * symtab.c (default_make_symbol_completion_list): Keep
1881         ':', too, so that we can limit searches in namespaces
1882         and classes. 
1883
1884 2009-08-24  Tom Tromey  <[email protected]>
1885
1886         * python/python-value.c (valpy_richcompare): Don't return from
1887         inside a TRY_CATCH.
1888
1889 2009-08-22  Ralf Wildenhues  <[email protected]>
1890
1891         * CONTRIBUTE: Bump documented Autoconf version.
1892         * configure.ac: Do not substitute datarootdir, htmldir,
1893         pdfdir, docdir.  Do not process --with-datarootdir,
1894         --with-htmldir, --with-pdfdir, --with-docdir.
1895         * configure: Regenerate.
1896
1897         * aclocal.m4: Regenerate.
1898         * config.in: Likewise.
1899         * configure: Likewise.
1900         * gnulib/Makefile.in: Likewise.
1901
1902         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of
1903         AC_GNU_SOURCE, AC_AIX, AC_ISC_POSIX.
1904
1905 2009-08-21  Paul Pluzhnikov  <[email protected]>
1906
1907         * objfiles.h (gdb_bfd_ref): New prototype.
1908         * objfiles.c (gdb_bfd_ref): New function.
1909         (allocate_objfile): Call it.
1910         (gdb_bfd_unref): Adjust assertion.
1911         * solib.c (solib_map_sections): Add reference.
1912         (symbol_add_stub): Don't add reference here.
1913         * symfile.c (reread_symbols): Add reference.
1914
1915 2009-08-21  Ken Werner <[email protected]>
1916             Doug Evans  <[email protected]>
1917
1918         * jit.c (jit_event_handler): Use paddress to print target addresses.
1919         Wrap printf string in _().
1920
1921 2009-08-21  Doug Evans  <[email protected]>
1922
1923         * jit.c (jit_read_descriptor): New arg gdbarch, all callers updated.
1924         (jit_read_code_entry, jit_register_code): Ditto.
1925         (jit_event_handler): Ditto.
1926         (jit_inferior_init): Renamed from previous jit_inferior_created_hook.
1927         (jit_inferior_created_hook, jit_breakpoint_re_set): New functions.
1928         (jit_inferior_created_observer): Renamed from
1929         jit_inferior_created_hook1, all callers updated.
1930         * jit.h (jit_breakpoint_re_set): Declare.
1931         (jit_event_handler): Update prototype.
1932         * breakpoint.c (breakpoint_re_set): Call jit_breakpoint_re_set instead
1933         of jit_inferior_created_hook.
1934
1935 2009-08-21  Hui Zhu  <[email protected]>
1936
1937         * record.c (record_wait): Change the argument of
1938         record_beneath_to_wait to options.
1939
1940 2009-08-20  Jacob Potter  <[email protected]>
1941
1942         Replace dcache with splay tree.
1943         Remove partially implemented writeback support.
1944         * dcache.c: Include splay-tree.h.
1945         (LINE_SIZE_POWER): Change from 5 to 6.
1946         (DCACHE_SIZE): Change from 64 to 4096.
1947         (ENTRY_INVALID, ENTRY_VALID, ENTRY_DIRTY): Delete.
1948         (state_chars): Delete.
1949         (struct dcache_block): Clean up; remove state and anydirty fields.
1950         (struct dcache_struct): Redefine as a splay tree and linked list.
1951         (last_cache): Make static.
1952         (dcache_invalidate, dcache_hit): Rewrite for new cache structure.
1953         (dcache_read_line, dcache_alloc): Rewrite for new cache structure.
1954         (dcache_write_line): Delete.
1955         (dcache_writeback): Delete.
1956         (dcache_peek_byte): Clean up; remove "invalid" state check.
1957         (dcache_poke_byte): Rewrite for new cache structure; clarify comment.
1958         (dcache_splay_tree_compare): New function.
1959         (dcache_init, dcache_free): Rewrite for new cache structure.
1960         (dcache_xfer_memory): Rewrite for new write-through cache structure.
1961         (dcache_print_line): New function.
1962         (dcache_info): Rewrite for new cache structure.
1963         (_initialize_dcache): Update "info dcache" help text.
1964         * dcache.h (dcache_xfer_memory): Update declaration.
1965         * target.c (memory_xfer_partial): Update calls to dcache_xfer_memory.
1966
1967 2009-08-19  Reid Kleckner  <[email protected]>
1968
1969         Add interface for JIT code generation.
1970         * NEWS: Announce JIT interface.
1971         * Makefile.in (SFILES): Add jit.c.
1972         (HFILES_NO_SRCDIR): Add jit.h.
1973         (COMMON_OBS): Add jit.o.
1974         * jit.c: New file.
1975         * jit.h: New file.
1976         * breakpoint.h (enum bptype): Add bp_jit_event to enum.
1977         * breakpoint.c:
1978         (update_breakpoints_after_exec): Delete jit breakpoints after exec.
1979         (bpstat_what): Update event table for bp_jit_event.
1980         (print_it_typical): Added case for bp_jit_event.
1981         (print_one_breakpoint_location): Added case for bp_jit_event.
1982         (allocate_bp_location): Added case for bp_jit_event.
1983         (mention): Added case for bp_jit_event.
1984         (delete_command): Added case for bp_jit_event.
1985         (breakpoint_re_set_one): Added case for bp_jit_event.
1986         (breakpoint_re_set): Added call to jit_inferior_created_hook.
1987         (create_jit_event_breakpoint): New.
1988         * infrun.c (handle_inferior_event): Add handler for jit event.
1989         (follow_exec): Add call to jit_inferior_created_hook.
1990
1991 2009-08-19  Ulrich Weigand  <[email protected]>
1992
1993         * value.c (enum internalvar_kind): Replace INTERNALVAR_SCALAR by
1994         INTERNALVAR_INTEGER and INTERNALVAR_POINTER.
1995         (union internalvar_data): Replace "scalar" member by "integer"
1996         and "pointer".
1997         (value_of_internalvar): Handle INTERNALVAR_INTEGER and
1998         INTERNALVAR_POINTER instead of INTERNALVAR_SCALAR.
1999         (get_internalvar_integer): Likewise.
2000         (set_internalvar): Likewise.
2001         (set_internalvar_integer): Likewise.
2002         (preserve_one_internalvar): Likewise.
2003         (value_from_pointer): Handle typedef'd pointer types.
2004
2005 2009-08-18  Tom Tromey  <[email protected]>
2006
2007         * utils.c (add_internal_problem_command): Free set_doc and
2008         show_doc.
2009         * remote.c (add_packet_config_cmd): Free set_doc and show_doc.
2010         * language.c (add_language): Free language_set_doc.
2011
2012 2009-08-18  Tom Tromey  <[email protected]>
2013
2014         * Makefile.in (ALL_TARGET_OBS): Remove prologue-value.o, solib.o.
2015
2016 2009-08-17  Ulrich Weigand  <[email protected]>
2017
2018         * symfile.c (reread_symbols): Call objfiles_changed *before*
2019         calling clear_symtab_users.
2020
2021 2009-08-17  Michael Snyder  <[email protected]>
2022
2023         * amd64-tdep.c: Add a frame unwinder for function epilogues.
2024         (amd64_in_function_epilogue_p): New function.
2025         (amd64_epilogue_frame_sniffer): New function.
2026         (amd64_epilogue_frame_cache): New function.
2027         (amd64_epilogue_frame_this_id): New function.
2028         (amd64_epilogue_frame_unwind): New struct frame_unwind.
2029         (amd64_init_abi): Hook the new unwinder.
2030
2031         * amd64-linux-tdep.c (amd64_linux_init_abi): Set gdbarch to use
2032         SVR4 method for skip_trampoline_code.
2033
2034 2009-08-17  Pedro Alves  <[email protected]>>
2035
2036         * objfiles.c (objfile_relocate): Relocate the entry point before
2037         relocating the section offsets.  Flush the section map before
2038         resetting breakpoints.
2039
2040 2009-08-14  Doug Evans  <[email protected]>
2041
2042         * symfile.c (find_separate_debug_file): Remove double free of
2043         canon_name.
2044
2045 2009-08-14  Pedro Alves  <[email protected]>
2046
2047         * top.c (any_thread_of): Delete.
2048         (kill_or_detach): Use any_thread_of_process.
2049         * top.c (print_inferior_quit_action): New.
2050         (quit_confirm): Rewrite to print info about all inferiors.
2051         * target.c (dispose_inferior): New.
2052         (target_preopen): Use it.
2053
2054 2009-08-14  Pedro Alves  <[email protected]>
2055
2056         * ui-file.h (ui_file_xstrdup): Mention that the length argument
2057         may be NULL.
2058         * ui-file.c (ui_file_xstrdup): Don't dereference LENGTH if it is
2059         NULL.
2060         * aix-thread.c (aix_thread_extra_thread_info): Pass NULL as length
2061         parameter to ui_file_xstrdup.
2062         * arm-tdep.c (_initialize_arm_tdep): Ditto.
2063         * infrun.c (print_target_wait_results): Ditto.
2064         * language.c (add_language): Ditto.
2065         * linespec.c (cplusplus_error): Ditto.
2066         * remote.c (escape_buffer): Ditto.
2067         * typeprint.c (type_to_string): Ditto.
2068         * utils.c (error_stream): Ditto.
2069         * varobj.c (value_get_print_value): Ditto.
2070         * xtensa-tdep.c (xtensa_verify_config): Replace `dummy' local with
2071         `length' local.  Pass it to ui_file_xstrdup, and avoid an strlen
2072         call.
2073         * gdbarch.sh (verify_gdbarch): Ditto.
2074         * gdbarch.c: Regenerate.
2075         * cli/cli-setshow.c (do_setshow_command): Pass NULL as length
2076         parameter to ui_file_xstrdup.
2077         * python/python-frame.c (frapy_str): Ditto.
2078         * python/python-type.c (typy_str): Use the length local instead of
2079         calling strlen.
2080         * python/python-value.c (valpy_str): Pass NULL as length parameter
2081         to ui_file_xstrdup.
2082
2083 2009-08-13  Doug Evans  <[email protected]>
2084
2085         * utils.c (gnu_debuglink_crc32): Store crc32_table as unsigned int
2086         instead of unsigned long.
2087
2088 2009-08-13  Tom Tromey  <[email protected]>
2089
2090         * varobj.c (update_dynamic_varobj_children): Don't use
2091         value_copy.
2092         * value.h: (preserve_one_value): Declare.
2093         (value_prepend_to_list, value_remove_from_list): Remove.
2094         * value.c (preserve_one_value): No longer static.
2095         (preserve_values): Call preserve_python_values.
2096         (value_prepend_to_list): Remove.
2097         (value_remove_from_list): Remove.
2098         * python/python.h (values_in_python): Don't declare.
2099         (preserve_python_values): Declare.
2100         * python/python-value.c (values_in_python): Change type.  Move
2101         lower.  Now static.
2102         (struct value_object): Add struct tag.
2103         <next, prev>: New fields.
2104         (valpy_dealloc): Update.
2105         (note_value): New function.
2106         (valpy_new): Use value_incref, note_value.
2107         (preserve_python_values): New function.
2108         (valpy_positive): Don't use value_copy.
2109         (value_to_value_object): Use value_incref, note_value.
2110         (convert_value_from_python): Update comment.
2111
2112 2009-08-13  Pedro Alves  <[email protected]>
2113
2114         * remote.c (remote_pid_to_str): If printing a process id and we
2115         don't know what the remote pid could be, output "Remote target";
2116         otherwise, use normal_pid_to_str.
2117
2118 2009-08-13  Tom Tromey  <[email protected]>
2119
2120         * language.h (longest_raw_hex_string): Remove unused declaration.
2121
2122 2009-08-13  Pedro Alves  <[email protected]>
2123
2124         PR gdb/8869:
2125
2126         * language.c (language, type, range, case_sensitive): Make const.
2127         (show_language_command): Don't call deprecated_show_value_hack.
2128         Special case "auto".
2129         (set_language_command): An unrecognized language is now an
2130         internal error instead of a user error.  Don't call set_lang_str.
2131         (show_type_command): Don't call deprecated_show_value_hack.
2132         Special case "auto".  Use warning.
2133         (set_type_command): An unrecognized type is now an internal error
2134         instead of a user error.  Output type check mismatch with language
2135         here.  Don't call set_type_str.
2136         (show_range_command): Don't call deprecated_show_value_hack.
2137         Special case "auto".  Use warning.
2138         (set_range_command): An unrecognized range check is now an
2139         internal error instead of a warning.  Output range check mismatch
2140         with language here.  Don't call set_range_str.
2141         (show_case_command): Don't call deprecated_show_value_hack.
2142         Special case "auto".  Use warning.
2143         (set_case_command): Don't call set_case_str.  An unrecognized case
2144         check is now an internal error instead of a warning.  Output range
2145         check mismatch with language here.  Don't call set_case_str.
2146         (set_type_range_case): Don't call set_type_str, set_range_str or
2147         set_case_str here.
2148         (set_lang_str, set_type_str, set_range_str, set_case_str): Delete.
2149         (add_language): Install or reinstall the "set language" command
2150         here, and make it an enum command.  Build the enumeration and the
2151         help string from the current list of known languages.
2152         (_initialize_language): Don't install "set language" here.  Make
2153         "set check type", "set check range" and "set case-sensitive" enum
2154         commands.  Register the "auto" "local" and "unknown" languages in
2155         that order.
2156
2157 2009-08-13  Pedro Alves  <[email protected]>
2158
2159         Revert 2009-08-07 changes for PR gdb/8869:
2160
2161         * language.c (set_language_command): Strip whitespace.
2162         (set_type_command): Likewise.
2163         (set_range_command): Likewise.
2164
2165         * language.c (language_completer): New function.
2166         (range_or_type_completer): New function.
2167         (case_completer): New function.
2168         (_initialize_language): Set completers.
2169         * cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
2170         command.
2171         (add_setshow_string_noescape_cmd): Likewise.
2172         (add_setshow_integer_cmd): Likewise.
2173         (add_setshow_uinteger_cmd): Likewise.
2174         (add_setshow_zinteger_cmd): Likewise.
2175         (add_setshow_zuinteger_cmd): Likewise.
2176         * command.h (add_setshow_string_cmd,
2177         add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
2178         add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
2179
2180 2009-08-12  Michael Snyder  <[email protected]>
2181
2182         * remote.c (remote_add_inferior): Remove unused local.
2183         (remote_add_thread): Ditto.
2184         (read_ptid): Ditto.
2185         (remote_current_thread): Ditto.
2186         (remote_stop_ns): Ditto.
2187         (remote_parse_stop_reply): Ditto.
2188         (remote_get_pending_stop_replies): Ditto.
2189         (remote_wait_ns): Ditto.
2190         (remote_wait_as): Ditto.
2191         (send_g_packet): Ditto.
2192         (remote_fetch_registers): Ditto.
2193         (store_register_using_P): Ditto.
2194         (remote_store_registers): Ditto.
2195         (remote_remove_breakpoint): Ditto.
2196         (remote_write_qxfer): Ditto.
2197         (remote_read_qxfer): Ditto.
2198
2199 2009-08-11  Tom Tromey  <[email protected]>
2200
2201         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Make a cleanup.
2202         (dwarf2_loc_desc_needs_frame): Likewise.
2203         * dwarf2expr.h (make_cleanup_free_dwarf_expr_context): Declare.
2204         * dwarf2expr.c (free_dwarf_expr_context_cleanup): New function.
2205         (make_cleanup_free_dwarf_expr_context): Likewise.
2206         * dwarf2-frame.c (execute_stack_op): Make a cleanup.
2207
2208 2009-08-10  Jan Kratochvil  <[email protected]>
2209
2210         * objfiles.c (gdb_bfd_unref): Use the bfd_usrdata accessor.
2211         * solib.c (symbol_add_stub): Likewise.
2212         * symfile.c (symfile_bfd_open): Assert BFD_USRDATA is NULL.
2213
2214 2009-08-10  Paul Pluzhnikov  <[email protected]>
2215
2216         * objfiles.c (qsort_cmp): Remove assert.
2217         (preferred_obj_section): New function.
2218         (update_section_map): Filter duplicates.
2219         
2220 2009-08-10  Tristan Gingold  <[email protected]>
2221
2222         * solib-darwin.c (find_program_interpreter): Simplify the code by
2223         looking up for the load_dylinker command instead of reading the
2224         corresponding (but deprecated) section.
2225         (darwin_solib_create_inferior_hook): Adjust: do not free the
2226         interpreter path.
2227
2228 2009-08-10  Tristan Gingold  <[email protected]>
2229
2230         * i386-darwin-tdep.c (i386_m128_p): New function.
2231         (i386_darwin_arg_type_alignment): Ditto.
2232         (i386_darwin_push_dummy_call): Ditto.
2233         (i386_darwin_init_abi): Define Darwin specific push_dummy_call.
2234         Adjust long_double size.  Adjust pc offset in setjump buffer.
2235
2236 2009-08-10  Hui Zhu  <[email protected]>
2237
2238         Add Linux AMD64 process record support.
2239
2240         * amd64-linux-tdep.c (amd64_linux_record_tdep): New variable.
2241         This struct has the argument for the function
2242         "record_linux_system_call".
2243         (amd64_linux_syscall_record): New function. Parse the
2244         system call instruction and call function
2245         "record_linux_system_call" to record execute log.
2246         (i386_linux_init_abi): Initialize "amd64_linux_record_tdep".
2247         Set "amd64_linux_syscall_record" to "i386_syscall_record".
2248
2249 2009-08-10  Hui Zhu  <[email protected]>
2250
2251         Add process record Linux system call 64 bits support.
2252
2253         * linux-record.h (linux_record_tdep): Add size_pointer,
2254         size_size_t, size_iovec and arg6.  Change the values of
2255         size_int, size_long and size_ulong to
2256         gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
2257         gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT,
2258         gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT.
2259         * i386-linux-tdep.c (i386_linux_init_abi): Ditto.
2260         (i386_linux_intx80_sysenter_record): Add a check for system
2261         call number.
2262         * linux-record.c (record_linux_system_call): Make this
2263         function support 64 bits.
2264
2265 2009-08-10  Hui Zhu  <[email protected]>
2266
2267         Add AMD64 process record instruction set support.
2268
2269         * i386-tdep.h (gdbarch_tdep): Add record_regmap for registers
2270         because the AMD64's registers order in GDB is not same with
2271         I386 instructions.
2272         Add i386_syscall_record to be the syscall function handle
2273         interface.
2274         (record_i386_regnum): Number for record_regmap.
2275         * i386-tdep.c (OT_QUAD): For 64 bits.
2276         (i386_record_s): Add rex_x, rex_b, rip_offset and
2277         popl_esp_hack for AMD64 instruction set. And regmap for
2278         record_regmap.
2279         (i386_record_lea_modrm_addr): Support AMD64 instruction set
2280         64 bits lea.
2281         (i386_record_lea_modrm): Ditto.
2282         (i386_record_push): New function.  Record the execution log
2283         of push.
2284         (I386_RECORD_ARCH_LIST_ADD_REG): New macro to record the
2285         register.
2286         (i386_process_record): Support AMD64 instruction set.
2287         * amd64-tdep.c (amd64_record_regmap): For record_regmap.
2288         (amd64_init_abi): Set amd64_record_regmap to record_regmap.
2289
2290 2009-08-08  Pedro Alves  <[email protected]>
2291
2292         * bfd-target.c (struct target_bfd_data): New.
2293         (target_bfd_xfer_partial): Adjust to get at the section table from
2294         the new structure.
2295         (target_bfd_get_section_table): Ditto.
2296         (target_bfd_xclose): Ditto.  Get the bfd pointer from the
2297         target_bfd_data structure, from the section table.
2298         (target_bfd_reopen): Store a struct target_bfd_data in the
2299         target_ops to_data field, instead of a target_section_table.
2300
2301 2009-08-08  Aleksandar Ristovski  <[email protected]>
2302             Hui Zhu  <[email protected]>
2303
2304         * record.c (record_store_registers): Remove unused variable.
2305
2306 2009-08-07  Tom Tromey  <[email protected]>
2307
2308         * language.c (set_language_command): Strip whitespace.
2309         (set_type_command): Likewise.
2310         (set_range_command): Likewise.
2311
2312 2009-08-07  Tom Tromey  <[email protected]>
2313
2314         PR gdb/8869:
2315         * language.c (language_completer): New function.
2316         (range_or_type_completer): New function.
2317         (case_completer): New function.
2318         (_initialize_language): Set completers.
2319         * cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
2320         command.
2321         (add_setshow_string_noescape_cmd): Likewise.
2322         (add_setshow_integer_cmd): Likewise.
2323         (add_setshow_uinteger_cmd): Likewise.
2324         (add_setshow_zinteger_cmd): Likewise.
2325         (add_setshow_zuinteger_cmd): Likewise.
2326         * command.h (add_setshow_string_cmd,
2327         add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
2328         add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
2329
2330 2009-08-06  Paul Pluzhnikov  <[email protected]>
2331         
2332         gold/10400
2333         * dwarf2-frame.c (qsort_fde_cmp): Use stable sort.      
2334         
2335 2009-08-06  Paul Pluzhnikov  <[email protected]>
2336
2337         * dwarf2-frame.c (struct dwarf2_cie): Remove 'next'.
2338         (struct dwarf2_cie_table): New.
2339         (struct dwarf2_fde): Remove 'next'.
2340         (struct dwarf2_fde_table): New.
2341         (struct comp_unit): Remove 'cie'.
2342         (bsearch_cie_cmp, bsearch_fde_cmp): New function.
2343         (find_cie, dwarf2_frame_find_fde): Use bsearch.
2344         (add_cie, add_fde): Use array instead of linked list.
2345         (decode_frame_entry, decode_frame_entry_1): New parameters.
2346         (qsort_fde_cmp): New function.
2347         (dwarf2_build_frame_info): Adjust.
2348         
2349 2009-08-06  Don Lee <[email protected]>
2350
2351         * score-tdep.c: Support a new Sunplus CT S+core variant, S+core 3.
2352         * score-tdep.h: Ditto.
2353         * NEWS: Ditto.
2354         * configure.tgt: Test do we have a simulator.
2355         * MAINTAINERS: Add myself under target score
2356
2357 2009-08-06  Nick Roberts  <[email protected]>
2358
2359         * utils.c (defaulted_query): Don't ask for confirmation if server
2360         prefix is used.
2361
2362 2009-08-05  Tom Tromey  <[email protected]>
2363
2364         * spu-tdep.h (SPUADDR_SPU): Cast result to int.
2365
2366 2009-08-04  Paul Pluzhnikov  <[email protected]>
2367
2368         * objfiles.h (OBJF_KEEPBFD): Delete.
2369         (gdb_bfd_unref): New prototype.
2370         * objfiles.c (gdb_bfd_unref): New function.
2371         (free_objfile): Call gdb_bfd_unref.
2372         * solib.c (free_so): Likewise.
2373         (symbol_add_stub): Set refcount.
2374
2375 2009-08-04  Hui Zhu  <[email protected]>
2376             Michael Snyder  <[email protected]>
2377
2378         * record.c (record_mem_entry): New field 'mem_entry_not_accessible'.
2379         (record_arch_list_add_mem): Initialize 'mem_entry_not_accessible'.
2380         (record_wait): Set 'mem_entry_not_accessible' flag if target
2381         memory not readable.  Don't try to change target memory if
2382         'mem_entry_not_accessible' is set.
2383
2384 2009-08-03  Richard Guenther  <[email protected]>
2385             Jan Kratochvil  <[email protected]>
2386
2387         Fix memory corruption on reread of file through a symbolic link.
2388         * symfile.c (find_separate_debug_file): Initialize CANON_NAME earlier.
2389         Allocate DEBUGFILE with length based on CANON_NAME.  Free CANON_NAME on
2390         all the return paths.
2391
2392 2009-08-03  Jim Ingham  <[email protected]>
2393             Vladimir Prus  <[email protected]>
2394
2395         Implement -break-commands
2396
2397         * breakpoint.c (get_breakpoint, breakpoint_set_commands): New.
2398         (commands_command): Use breakpoint_set_commands.
2399         * breakpoint.h (get_breakpoint, breakpoint_set_commands): Declare.
2400
2401         * mi/mi-cmds.h (mi_cmd_break_commands): New.
2402         * mi/mi-cmds.c: Register -break-commands.
2403         * mi/mi-cmd-break.c (mi_cmd_break_commands, mi_read_next_line)
2404         (mi_command_line_array, mi_command_line_array_cnt)
2405         (mi_command_line_array_ptr): New.
2406
2407 2009-08-03  Jim Ingham  <[email protected]>
2408             Vladimir Prus  <[email protected]>
2409
2410         Refactor reading of commands
2411
2412         * defs.h (read_command_lines_1): Declare.
2413         * cli/cli-script.c (read_next_line): Only return string,
2414         do not process.
2415         (process_next_line): New, extracted from read_next_line.
2416         (recurse_read_control_structure): Take a function pointer to the
2417         read function.
2418         (get_command_line) Pass the read_next_line as reader function
2419         into recurse_read_control_structure.
2420         (read_command_lines_1): New, extracted from...
2421         (read_command_lines): ...here.
2422
2423 2009-07-31  Kazu Hirata  <[email protected]>
2424
2425         * procfs.c (proc_set_current_signal): Populate mysinfo before
2426         copying it to arg.
2427         (proc_clear_current_signal): Likewise.
2428         (proc_set_watchpoint): Populate pwatch before copying it to arg.
2429
2430 2009-07-31  Michael Snyder  <[email protected]>
2431
2432         * remote.c (store_register_using_P): Call putpkt and getpkt
2433         directly instead of calling remote_send.
2434         (store_registers_using_G): Ditto.
2435         (fetch_register_using_p): Ditto.
2436
2437         * remote.c (store_register_using_P): Make error msg more verbose.
2438         (store_registers_using_G): Ditto.
2439         (fetch_register_using_p): Ditto.
2440
2441 2009-07-31  Ulrich Weigand  <[email protected]>
2442
2443         * spu-tdep.c: Include "infcall.h".
2444         (spu_address_class_type_flags): New function.
2445         (spu_address_class_type_flags_to_name): Likewise.
2446         (spu_address_class_name_to_type_flags): Likewise.
2447         (spu_pointer_to_address): Handle __ea pointers.
2448         (spu_auto_flush_cache_p): New static variable.
2449         (spu_objfile_from_frame): New function.
2450         (flush_ea_cache, spu_attach_normal_stop): Likewise.
2451         (show_spu_auto_flush_cache): Likewise.
2452         (spu_gdbarch_init): Install address class handlers.
2453         (_initialize_spu_tdep): Attach to normal_stop observer.
2454         Install "set spu auto-flush-cache" / "show spu auto-flush-cache"
2455         commands.
2456
2457         * NEWS: Mention "set/show spu auto-flush-cache" commands.
2458
2459 2009-07-31  Ulrich Weigand  <[email protected]>
2460
2461         * spu-tdep.c: Include "block.h".
2462         (setspucmdlist, showspucmdlist): New static variables.
2463         (spu_stop_on_load_p): Likewise.
2464         (spu_catch_start): New function.
2465         (show_spu_command, set_spu_command): New functions.
2466         (show_spu_stop_on_load): Likewise.
2467         (_initialize_spu_tdep): Attach spu_catch_start to new_objfile observer.
2468         Install "set spu" / "show spu" prefix command handler.
2469         Install "set spu stop-on-load" / "show spu stop-on-load" command.
2470
2471         * NEWS: Mention "set/show spu stop-on-load" commands.
2472
2473 2009-07-31  Ulrich Weigand  <[email protected]>
2474
2475         * ppc-linux-tdep.c: Include "solib.h", "solist.h", "exceptions.h",
2476         "arch-utils.h", and "spu-tdep.h".
2477         (spu_context_objfile, spe_context_lm_addr, spe_context_offset):
2478         New static variables.
2479         (spe_context_cache_ptid, spe_context_cache_address): Likewise.
2480         (ppc_linux_spe_context_lookup): New function.
2481         (ppc_linux_spe_context_inferior_created): Likewise.
2482         (ppc_linux_spe_context_solib_loaded): Likewise.
2483         (ppc_linux_spe_context_solib_unloaded): Likewise.
2484         (ppc_linux_spe_context): Likewise.
2485         (struct ppu2spu_cache, struct ppu2spu_data): New data types.
2486         (ppu2spu_prev_arch, ppu2spu_this_id, ppu2spu_prev_register,
2487         ppu2spu_unwind_register, ppu2spu_sniffer,
2488         ppu2spu_dealloc_cache): New functions.
2489         (ppu2spu_unwind): New static variable.
2490         (ppc_linux_init_abi): Install cross-architecture unwinder.
2491         (_initialize_ppc_linux_tdep): Attach to observers.
2492
2493         * spu-tdep.c (struct spu2ppu_cache): New data type.
2494         (spu2ppu_prev_arch, spu2ppu_this_id, spu2ppu_prev_register,
2495         spu2ppu_sniffer, spu2ppu_dealloc_cache): New functions.
2496         (spu2ppu_unwind): New static variable.
2497         (spu_gdbarch_init): Install cross-architecture unwinder.
2498
2499 2009-07-31  Ulrich Weigand  <[email protected]>
2500
2501         * target.h (enum strata): New value arch_stratum.
2502         * target.c (target_require_runnable): Skip arch_stratum targets.
2503
2504         * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
2505         solib-spu.o and spu-multiarch.o to gdb_target_obs.
2506         * Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o.
2507         (ALLDEPFILES): Add solib-spu.c and spu-multiarch.c.
2508
2509         * solib-spu.c: New file.
2510         * solib-spu.h: New file.
2511         * spu-multiarch.c: New file.
2512
2513         * spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros.
2514
2515         * spu-tdep.c (struct gdbarch_tdep): New member id.
2516         (spu_gdbarch_id): New function.
2517         (spu_lslr): New function.
2518
2519         (spu_address_to_pointer): New function.
2520         (spu_pointer_to_address): Support SPU ID address encoding.  Use
2521         spu_gdbarch_id and spu_lslr.
2522         (spu_integer_to_address): Likewise.
2523         (spu_frame_unwind_cache): Update for encoded addresses.
2524         (spu_unwind_pc, spu_unwind_sp): Likewise.
2525         (spu_read_pc, spu_write_pc): Likewise.
2526         (spu_push_dummy_call): Likewise.
2527         (spu_software_single_step): Likewise.
2528         (spu_get_longjmp_target): Likewise.
2529         (spu_overlay_update_osect): Likewise.
2530
2531         (spu_dis_asm_print_address): New function.
2532         (gdb_print_insn_spu): Likewise.
2533
2534         (spu_gdbarch_init): Store SPU ID in tdep structure.
2535         Install spu_address_to_pointer and gdb_print_insn_spu.
2536
2537         * ppc-linux-tdep.c: Include "observer.h", "auxv.h", "elf/common.h"
2538         and "solib-spu.h".
2539         (ppc_linux_entry_point_addr): New static variable.
2540         (ppc_linux_inferior_created): New function.
2541         (ppc_linux_displaced_step_location): Likewise.
2542         (ppc_linux_init_abi): Enable Cell/B.E. support if supported
2543         by the target.
2544         (_initialize_ppc_linux_tdep): Attach to inferior_created observer.
2545
2546         * NEWS: Mention multi-architecture and Cell/B.E. debugging
2547         capabilities.
2548
2549 2009-07-31  Ulrich Weigand  <[email protected]>
2550
2551         * linux-nat.c: Include <sys/vfs.h>.
2552         (SPUFS_MAGIC): Define.
2553         (spu_enumerate_spu_ids): New function.
2554         (linux_proc_xfer_spu): New function.
2555         (linux_xfer_partial): Handle TARGET_OBJECT_SPU.
2556
2557         (iterate_over_spus): New function.
2558         (struct linux_spu_corefile_data): New data type.
2559         (linux_spu_corefile_callback): New function.
2560         (linux_spu_make_corefile_notes): New function.
2561         (linux_nat_make_corefile_notes): Call it.
2562
2563         * corelow.c (struct spuid_list): New data type.
2564         (add_to_spuid_list): New function.
2565         (core_xfer_partial): Handle TARGET_OBJECT_SPU.
2566
2567 2009-07-31  Ulrich Weigand  <[email protected]>
2568
2569         * features/Makefile: Allow sub-platform specific expedite settings.
2570         (WHICH): Add rs6000/powerpc-cell32l and rs6000/powerpc-cell64l.
2571         (rs6000/powerpc-cell32l-expedite): Define.
2572         (rs6000/powerpc-cell64l-expedite): Likewise.
2573         * features/rs6000/powerpc-cell32l.xml: New file.
2574         * features/rs6000/powerpc-cell64l.xml: New file.
2575         * features/rs6000/powerpc-cell32l.c: New generated file.
2576         * features/rs6000/powerpc-cell64l.c: New generated file.
2577
2578         * regformats/rs6000/powerpc-cell32l.dat: New generated file.
2579         * regformats/rs6000/powerpc-cell64l.dat: New generated file.
2580
2581         * config/djgpp/fnchange.lst: Add mappings for new files.
2582
2583         * ppc-linux-tdep.h (tdesc_powerpc_cell32l): Add prototype.
2584         (tdesc_powerpc_cell64l): Likewise.
2585         * ppc-linux-tdep.c: Include "features/rs6000/powerpc-cell32l.c"
2586         and "features/rs6000/powerpc-cell64l.c".
2587         (_initialize_ppc_linux_tdep): Initialize target descriptions.
2588         (ppc_linux_spu_section): New function.
2589         (ppc_linux_core_read_description): Detect Cell/B.E. core files.
2590         * ppc-linux-nat.c (PPC_FEATURE_CELL): Define.
2591         (ppc_linux_read_description): Detect Cell/B.E. architecture.
2592
2593         * rs6000-tdep.c (rs6000_gdbarch_init): Do not trust BFD wordsize
2594         if exec file is not PowerPC architecture.
2595
2596 2009-07-31  Ulrich Weigand  <[email protected]>
2597
2598         * features/gdb-target.dtd (target): Accept optional
2599         <compatible> elements.
2600         (compatible): Define element.
2601
2602         * target-descriptions.h (tdesc_compatible_p): New.
2603         (tdesc_add_compatible): New.
2604         * target-descriptions.c (arch_p): New VEC_P type.
2605         (struct target_desc): New member compatible.
2606         (free_target_description): Handle it.
2607         (maint_print_c_tdesc_cmd): Likewise.
2608         (tdesc_compatible_p): New function.
2609         (tdesc_add_compatible): New function.
2610
2611         * xml-tdesc.c (tdesc_end_compatible): New function.
2612         (target_children): Handle <compatible> element.
2613
2614         * arch-utils.c (choose_architecture_for_target): Accept target
2615         description instead of BFD architecture as input.  Query target
2616         description for compatible architectures.
2617         (gdbarch_info_fill): Update call.
2618
2619         * NEWS: Mention <compatible> element of target descriptions.
2620
2621 2009-07-31  Ulrich Weigand  <[email protected]>
2622
2623         * breakpoint.c (remove_breakpoints): If removing one breakpoint
2624         location fails, still continue to remove other locations.
2625         (remove_hw_watchpoints): Likewise.
2626         (detach_breakpoints): Likewise.
2627
2628 2009-07-31  Ulrich Weigand  <[email protected]>
2629
2630         * breakpoint.h (enum enable_state): Add bp_startup_disabled.
2631         (disable_breakpoints_before_startup): Add prototype.
2632         (enable_breakpoints_after_startup): Likewise.
2633
2634         * breakpoint.c (executing_startup): New static variable.
2635         (describe_other_breakpoints): Handle bp_startup_disabled.
2636         (check_duplicates_for): Likewise.
2637         (disable_breakpoints_before_startup): New function.
2638         (enable_breakpoints_after_startup): New function.
2639         (create_breakpoint): Mark new breakpoints as bp_startup_disabled
2640         if executing_startup flag is true.
2641         (break_command_really): Likewise.
2642         (breakpoint_re_set_one): Skip bp_startup_disabled breakpoints.
2643
2644 2009-07-31  Julian Brown  <[email protected]>
2645
2646         * arm-linux-tdep.c (arch-utils.h, inferior.h, gdbthread.h, symfile.h):
2647         Include files.
2648         (arm_linux_cleanup_svc, arm_linux_copy_svc): New.
2649         (cleanup_kernel_helper_return, arm_catch_kernel_helper_return): New.
2650         (arm_linux_displaced_step_copy_insn): New.
2651         (arm_linux_init_abi): Initialise displaced stepping callbacks.
2652         * arm-tdep.c (DISPLACED_STEPPING_ARCH_VERSION): New macro.
2653         (ARM_NOP): New.
2654         (displaced_read_reg, displaced_in_arm_mode, branch_write_pc)
2655         (bx_write_pc, load_write_pc, alu_write_pc, displaced_write_reg)
2656         (insn_references_pc, copy_unmodified, cleanup_preload, copy_preload)
2657         (copy_preload_reg, cleanup_copro_load_store, copy_copro_load_store)
2658         (cleanup_branch, copy_b_bl_blx, copy_bx_blx_reg, cleanup_alu_imm)
2659         (copy_alu_imm, cleanup_alu_reg, copy_alu_reg)
2660         (cleanup_alu_shifted_reg, copy_alu_shifted_reg, cleanup_load)
2661         (cleanup_store, copy_extra_ld_st, copy_ldr_str_ldrb_strb)
2662         (cleanup_block_load_all, cleanup_block_store_pc)
2663         (cleanup_block_load_pc, copy_block_xfer, cleanup_svc, copy_svc)
2664         (copy_undef, copy_unpred): New.
2665         (decode_misc_memhint_neon, decode_unconditional)
2666         (decode_miscellaneous, decode_dp_misc, decode_ld_st_word_ubyte)
2667         (decode_media, decode_b_bl_ldmstm, decode_ext_reg_ld_st)
2668         (decode_svc_copro, arm_process_displaced_insn)
2669         (arm_displaced_init_closure, arm_displaced_step_copy_insn)
2670         (arm_displaced_step_fixup): New.
2671         (arm_gdbarch_init): Initialise max insn length field.
2672         * arm-tdep.h (DISPLACED_TEMPS, DISPLACED_MODIFIED_INSNS): New
2673         macros.
2674         (displaced_step_closure, pc_write_style): New.
2675         (arm_displaced_init_closure, displaced_read_reg)
2676         (arm_process_displaced_insn, arm_displaced_init_closure)
2677         (displaced_read_reg, displaced_write_reg, arm_displaced_step_copy_insn)
2678         (arm_displaced_step_fixup): Add prototypes.
2679
2680 2009-07-31  Pedro Alves  <[email protected]>
2681             Julian Brown  <[email protected]>
2682
2683         * infrun.c (displaced_step_fixup): If this is a software
2684         single-stepping arch, don't tell the target to single-step.
2685         (maybe_software_singlestep): Return 0 if we're using displaced
2686         stepping.
2687         (resume): If this is a software single-stepping arch, and
2688         displaced-stepping is enabled, use it for all single-step
2689         requests.
2690
2691 2009-07-30  Ralf Wildenhues  <[email protected]>
2692
2693         * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
2694         (AUTOCONF, configure_deps, AUTOHEADER): New variables.
2695         ($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
2696         (am--refresh): New rules.
2697         (stamp-h, config.status): List config.in and configure including
2698         $(srcdir)/ prefix.
2699         * aclocal.m4: Regenerate.
2700         * configure: Regenerate.
2701
2702 2009-07-30  Thomas Schwinge  <[email protected]>
2703
2704         * gnu-nat.c (add_task_commands) <stopped>: Register the correct
2705         callback function.
2706
2707 2009-07-30  H.J. Lu  <[email protected]>
2708
2709         * ia64-tdep.c (ia64_access_reg): Correct paddress.
2710
2711 2009-07-30  Jan Kratochvil  <[email protected]>
2712
2713         Replace public function varobj_list by all_root_varobjs iterator.
2714         * mi/mi-cmd-var.c (struct mi_cmd_var_update, mi_cmd_var_update_iter):
2715         New.
2716         (mi_cmd_var_update): Replace the varobj_list call by all_root_varobjs.
2717         Remove the variables rootlist, cr.  New variable data.
2718         * varobj.c (rootcount, varobj_list): Remove.
2719         (install_variable, uninstall_variable): Remove the rootcount updates.
2720         (all_root_varobjs): New function.
2721         (varobj_invalidate): Use the all_root_varobjs call.  Move the code to...
2722         (varobj_invalidate_iter): ... a new function.
2723         * varobj.h (varobj_list): Remove the prototype.
2724         (all_root_varobjs): New prototype.
2725
2726 2009-07-29  Paul Pluzhnikov  <[email protected]>
2727
2728         PR gdb/6817
2729         * dbxread.c (read_dbx_symtab): Reduce stack use.
2730         
2731 2009-07-29  Jan Kratochvil  <[email protected]>
2732
2733         Fix gcc-4.5 HEAD warnings.
2734         * cp-name-parser.y (%union <typed_val_int>, %token GLOBAL)
2735         (GLOBAL_CONSTRUCTORS, GLOBAL_DESTRUCTORS, demangler_special <GLOBAL>):
2736         Remove.
2737         (yylex <"global constructors keyed to ">)
2738         (yylex <"global destructors keyed to ">): Base it on DEMANGLER_SPECIAL.
2739         (cp_comp_to_string): Remove variables str, prefix and buf.  Remove the
2740         GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS handling.
2741         (cp_print): Remove the GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS
2742         handling.
2743
2744 2009-07-28  Daniel Jacobowitz  <[email protected]>
2745
2746         * NEWS: Mention ARM VFP support.
2747         * target-descriptions.c (tdesc_register_type): Make public.
2748         (tdesc_unnumbered_register): New function.
2749         (tdesc_register_reggroup_p): Allow missing
2750         pseudo_register_reggroup_p.
2751         * target-descriptions.h (tdesc_register_type): Declare.
2752         (tdesc_unnumbered_register): Declare.
2753         * arm-tdep.c (arm_neon_quad_read, arm_neon_quad_write): New functions.
2754         (arm_push_dummy_call): Use arm_neon_quad_write.
2755         (arm_neon_double_type, arm_neon_quad_type): New functions.
2756         (arm_register_type): Handle VFP and NEON registers.  Override the
2757         types of double-precision registers for NEON.  Disable FPA registers
2758         if they are not present.
2759         (arm_dwarf_reg_to_regnum): Add current VFP and NEON register numbers.
2760         (arm_return_value): Use arm_neon_quad_write and arm_neon_quad_read.
2761         (arm_register_name): Handle VFP single and NEON quad registers.
2762         (arm_pseudo_read, arm_pseudo_write): New functions.
2763         (arm_gdbarch_init): Check for VFP and NEON in the target description.
2764         Assign numbers to double-precision registers.  Register VFP and NEON
2765         pseudo registers.  Remove a shadowed "i" variable.
2766         * arm-tdep.h (enum gdb_regnum): Add ARM_D0_REGNUM and
2767         ARM_D31_REGNUM.
2768         (struct gdbarch_tdep): Add have_neon_pseudos, have_neon,
2769         have_vfp_registers, have_vfp_pseudos, neon_double_type,
2770         and neon_quad_type.
2771
2772         * features/Makefile: Make expedite settings only architecture
2773         specific.
2774         (WHICH): Add new ARM descriptions.
2775         * features/arm-with-neon.xml, features/arm-with-vfpv2.c,
2776         features/arm-with-vfpv3.c, features/arm-vfpv2.xml,
2777         features/arm-vfpv3.xml, features/arm-with-vfpv2.xml,
2778         features/arm-with-vfpv3.xml, features/arm-with-neon.c: New files.
2779         * regformats/arm-with-neon.dat, regformats/arm-with-vfpv2.dat,
2780         regformats/arm-with-vfpv3.dat: Generate.
2781
2782 2009-07-28  Daniel Jacobowitz  <[email protected]>
2783
2784         * infrun.c (handle_inferior_event): Clear trap_expected after
2785         stepping past a single-step breakpoint.
2786
2787 2009-07-28  Joseph Myers  <[email protected]>
2788
2789         * arm-tdep.c (enum arm_vfp_cprc_base_type,
2790         arm_vfp_cprc_unit_length, arm_vfp_cprc_reg_char,
2791         arm_vfp_cprc_sub_candidate, arm_vfp_call_candidate,
2792         arm_vfp_abi_for_function): New.
2793         (arm_push_dummy_call): Handle VFP ABI.
2794         (arm_extract_return_value, arm_store_return_value): Handle
2795         ARM_FLOAT_VFP case.
2796         (arm_return_value): Handle VFP ABI.
2797         (arm_gdbarch_init): Default fp_model based on Tag_ABI_VFP_args for
2798         EABI binaries.
2799
2800 2009-07-28  Daniel Jacobowitz  <[email protected]>
2801
2802         * arch-utils.c (displaced_step_at_entry_point): Do not call
2803         gdbarch_convert_from_func_ptr_addr.
2804         * cris-tdep.c: Remove outdated comment.
2805         * infcall.c (call_function_by_hand): Do not call
2806         gdbarch_convert_from_func_ptr_addr after entry_point_address.
2807         * objfiles.c (entry_point_address): Call both
2808         gdbarch_convert_from_func_ptr_addr and
2809         gdbarch_addr_bits_remove.
2810
2811 2009-07-28  Aleksandar Ristovski  <[email protected]>
2812
2813         * nto-tdep.c (nto_thread_state_str): New array.
2814         (nto_extra_thread_info): New function definition.
2815         * nto-tdep.h (gdbthread.h): New include.
2816         (private_thread_info): New struct.
2817         (nto_extra_thread_info): New declaration.
2818         * nto-procfs.c (procfs_thread_alive): Properly check if
2819         thread is still alive.
2820         (update_thread_private_data_name, update_thread_private_data): New
2821         function definition.
2822         (procfs_find_new_threads): Fetch thread private data.
2823         (init_procfs_ops): Register to_extra_thread_info.
2824
2825 2009-07-25  Pedro Alves  <[email protected]>
2826
2827         * stack.c (backtrace_command_1): Remove dead check of NULL current
2828         frame.
2829
2830 2009-07-23  Keith Seitz  <[email protected]>
2831
2832         * source.c (forward_search_command): Don't fclose the stream,
2833         just run the cleanups.
2834         (reverse_search_command): Likewise.
2835
2836 2009-07-23  Paul Pluzhnikov  <[email protected]>
2837
2838         * symtab.c (search_symbols): Add QUIT.
2839         
2840 2009-07-22  Paul Pluzhnikov  <[email protected]>
2841
2842         * symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.
2843         
2844 2009-07-22  Paul Pluzhnikov  <[email protected]>
2845
2846         * objfiles.h (objfiles_changed): New prototype.
2847         * objfiles.c (objfiles_updated_p): Rename to objfiles_changed_p.
2848         (allocate_objfile, free_objfile): Must rebuild section map.
2849         (objfile_relocate): Likewise.
2850         (update_section_map, find_pc_section): Adjust.
2851         (set_objfiles_updated_on_exe_change): Remove.
2852         (set_objfiles_updated_on_solib_activity): Remove.
2853         (_initialize_objfiles): Remove.
2854         (objfiles_changed): New function.
2855         * symfile.c (reread_symbols): Call objfiles_changed.    
2856         
2857 2009-07-22  Hui Zhu  <[email protected]>
2858
2859         * record.c (record_xfer_partial): Call error When nquery
2860         return "n".
2861
2862 2009-07-21  Paul Pluzhnikov  <[email protected]>
2863         
2864         * objfiles.c (objfiles_updated_p): New variable.
2865         (qsort_cmp, bsearch_cmp, update_section_map): New function.
2866         (find_pc_section): Use bsearch.
2867         (set_objfiles_updated_on_exe_change): New function.
2868         (set_objfiles_updated_on_solib_activity): New function.
2869         (_initialize_objfiles): New function.
2870         
2871 2009-07-21 Michael Eager <[email protected]>
2872
2873         * features/rs6000/powerpc-405.xml: New.
2874         * rs6000-tdep.c: Add include & initialize for
2875         powerpc-405.c, add 405 to variants.
2876         * features/rs6000/powerpc-405.c: Generate.
2877
2878 2009-07-21  Paul Pluzhnikov  <[email protected]>
2879
2880         * utils.c (internal_vproblem): Always print failure message.
2881
2882 2009-07-21  Daniel Jacobowitz  <[email protected]>
2883             Vladimir Prus <[email protected]>
2884
2885         * valops.c (value_fetch_lazy): Handle bitfields explicitly.
2886         (value_assign): Remove unnecessary FIXME.  Honor the container
2887         type of bitfields if possible.
2888         * value.c (struct value): Add parent field.
2889         (value_parent): New function.
2890         (value_free): Free the parent also.
2891         (value_copy): Copy the parent also.
2892         (value_primitive_field): Do not read the contents of a lazy
2893         value to create a child bitfield value.  Set bitpos and offset
2894         according to the container type if possible.
2895         (unpack_bits_as_long): Rename from unpack_field_as_long.  Take
2896         field_type, bitpos, and bitsize instead of type and fieldno.
2897         (unpack_field_as_long): Use unpack_bits_as_long.
2898         * value.h (value_parent, unpack_bits_as_long): New prototypes.
2899
2900 2009-07-21  Daniel Jacobowitz  <[email protected]>
2901
2902         * value.c (struct value): Add reference_count field.
2903         (allocate_value_lazy): Initialize reference_count.
2904         (value_incref): New function.
2905         (value_free): Check the reference count.
2906         * value.h (value_incref): New prototype.
2907
2908 2009-07-20  Marc Khouzam  <[email protected]>
2909
2910         * utils.c (defaulted_query): Update comment and remove dead code.
2911
2912 2009-07-20  Doug Evans  <[email protected]>
2913
2914         Add support for "comdat types" from DWARF4.
2915         * dwarf2read.c (dwarf2_per_objfile): New member types,
2916         signatured_types.
2917         (TYPES_SECTION): New macro.
2918         (dwarf2_per_cu_data): Change size of length field from 30 bits
2919         to 29 bits.  New member from_debug_types.
2920         (signatured_type): New struct.
2921         (struct attribute): New union member signatured_type.
2922         (DW_SIGNATURED_TYPE): New macro.
2923         (dwarf2_attr_no_follow): New function.
2924         (read_type_unit_scope): New function.
2925         (follow_die_ref_or_sig, follow_die_sig): New functions.
2926         (dwarf2_locate_sectoins): Handle .debug_types.
2927         (dwarf2_build_psymtabs): Read .debug_types.
2928         (read_type_comp_unit_head): New function.
2929         (hash_type_signature, eq_type_signature): New functions.
2930         (create_debug_types_hash_table): New function.
2931         (lookup_signatured_type): New function.
2932         (process_psymtab_comp_unit): Handle type units too.
2933         (process_type_comp_unit, build_type_psymtabs): New functions.
2934         (dwarf2_build_psymtabs_hard): Call build_type_psymtabs.
2935         (load_partial_comp_unit): Assert not called for a type unit.
2936         (skip_one_die): Handle DW_FORM_sig8.
2937         (queue_comp_unit): Don't call load_full_comp_unit here, or
2938         update read_in_chain.
2939         (psymtab_to_symtab_1): Call read_signatured_type_at_offset for
2940         type units, or load_full_comp_unit for comp units after
2941         queue_comp_unit returns.
2942         (load_full_comp_unit): Assert not called for type units.
2943         (load_full_comp_unit): Update read_in_chain here.
2944         (process_die): Handle DW_TAG_type_unit.
2945         (read_structure_type): Look for signatured types.
2946         (read_enumeration_type): Ditto.
2947         (init_cu_die_reader): Handle .debug_types.
2948         (read_comp_unit): Assert hash not computed yet.
2949         (read_die_and_children): Expand debugging printf to handle .debug_types.
2950         (read_partial_die): Handle DW_TAG_type_unit:
2951         (find_patial_die): Handle .debug_types.
2952         (read_attribute_value): Handle DW_FORM_sig8.
2953         (die_type): Call follow_die_ref_or_sig instead of follow_die_ref.
2954         (die_containing_type): Ditto.
2955         (dwarf_tag_name): Handle DW_TAG_type_unit.
2956         (dwarf_attr_name): Handle DW_AT_signature.
2957         (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
2958         DW_FORM_flag_present, DW_FORM_sig8.
2959         (dump_die_shallow): Handlel DW_FORM_sig8.
2960         (maybe_queue_comp_unit): Change return type to int from void.
2961         All callers updated.
2962         (follow_die_ref): Handle .debug_types.
2963         (lookup_signatured_type_at_offset): New function.
2964         (read_signatured_type_at_offset): New function.
2965         (read_signatured_type): New function.
2966
2967 2009-07-20  Ulrich Weigand  <[email protected]>
2968
2969         * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT
2970         if the macro is defined.
2971
2972 2009-07-20  Pedro Alves  <[email protected]>
2973
2974         * features/gdb-target.dtd (target): Accept an optional 'osabi'
2975         element.
2976         (osabi): Define element.
2977         * features/mips-linux.xml (target): Add an osabi subelement set to
2978         GNU/Linux.
2979         * regformats/regdat.sh (xmlarch, xmlosabi): New variables.  Don't
2980         write the architecture into $xmltarget.  Store it in $xmlarch.
2981         Handle the 'osabi' type.  Handle outputting the osabi element of
2982         the target description.
2983         * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
2984         * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
2985
2986         * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
2987         * target-descriptions.c (struct target_desc) <osabi>: New field.
2988         (tdesc_osabi): New function.
2989         (set_tdesc_osabi): New function.
2990         * xml-tdesc.c: Include osabi.h.
2991         (tdesc_end_osabi): New.
2992         (target_children): Parse "osabi" elements.
2993         * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
2994         target description if the user didn't override it or it is not
2995         extractable from the bfd.  If that still fails, fallback to the
2996         configured in default.
2997         * osabi.h (osabi_from_tdesc_string): Declare.
2998         * osabi.c (osabi_from_tdesc_string): New.
2999         (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
3000         GDB_OSABI_DEFAULT.
3001
3002         * NEWS: Mention that target descriptions can now describe the
3003         target OS ABI.
3004
3005 2009-07-20  Mike Frysinger  <[email protected]>
3006
3007         * configure.ac (AC_CHECK_FUNCS): Check for pipe.
3008         * config.in, configure: Regenerate.
3009         * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
3010
3011 2009-07-20  Pedro Alves  <[email protected]>
3012
3013         * gnu-nat.c: Include "inf-child.h".
3014         (gnu_mourn_inferior): Use the passed in target_ops
3015         instead of the gnu_ops global.
3016         (gnu_create_inferior): Inline `attach_to_child', use the passed in
3017         target_ops instead of the gnu_ops global.
3018         (gnu_can_run): Delete.
3019         (gnu_attach): Use the passed in target_ops instead of the gnu_ops
3020         global.
3021         (gnu_detach): Ditto.
3022         (gnu_prepare_to_store, gnu_open): Delete.
3023         (gnu_store_registers, gnu_fetch_registers): Delete declarations.
3024         (gnu_ops): Delete.
3025         (init_gnu_ops): Delete.
3026         (gnu_target): New.
3027         (_initialize_gnu_nat): Don't call init_gnu_ops or add_target here.
3028         * gnu-nat.h (gnu_target): Declare.
3029         * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Make
3030         static.
3031         (_initialize_i386gnu_nat): New.
3032
3033 2009-07-20  Ulrich Weigand  <[email protected]>
3034
3035         * dwarf2loc.c (find_location_expression): Retrieve beginning and
3036         ending address offsets in location list entries as integers,
3037         not as addresses.
3038
3039 2009-07-20  Ulrich Weigand  <[email protected]>
3040
3041         * infrun.c (wait_for_inferior): Invalidate registers and overlay
3042         cache every time before calling target_wait.
3043         (handle_inferior_event): Make static. Always reset waiton_ptid.
3044         Never call registers_changed.
3045         (prepare_to_wait): Do not invaliate registers or overlay cache
3046         (moved to wait_for_inferior).  Do not reset waiton_ptid (moved
3047         to handle_inferior_event).
3048         (fetch_inferior_event): Remove check for always-true condition.  
3049
3050 2009-07-20  Thomas Schwinge  <[email protected]>
3051
3052         * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Adjust to
3053         2009-02-23 target_ops changes.
3054
3055 2009-07-18  Michael Snyder  <[email protected]>
3056
3057         * infrun.c (handle_inferior_event): Remove an execution_direction
3058         check in the "check for subroutine calls" test, and add some 
3059         additional handling for reverse-stepping through shared libraries.
3060
3061 2009-07-18  Anthony Green  <[email protected]>
3062
3063         * moxie-tdep.c (moxie_analyze_prologue): Take gdbarch as last
3064         parameter instead of frame_info.
3065         (moxie_frame_cache): Call moxie_analyze_prologue with different
3066         args.
3067
3068 2009-07-17  Ulrich Weigand  <[email protected]>
3069
3070         * solib.c (solib_bfd_open): Do not call ops->bfd_open.
3071         (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
3072         * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
3073         * solib-irix.c (_initialize_irix_solib): Likewise.
3074         * solib-null.c (_initialize_null_solib): Likewise.
3075         * solib-osf.c (_initialize_osf_solib): Likewise.
3076         * solib-pa64.c (_initialize_pa64_solib): Likewise.
3077         * solib-som.c (_initialize_som_solib): Likewise.
3078         * solib-sunos.c (_initialize_sunos_solib): Likewise.
3079         * solib-svr4.c (_initialize_svr4_solib): Likewise.
3080         * solib-target.c (_initialize_solib_target): Likewise.
3081
3082 2009-07-17  Ulrich Weigand  <[email protected]>
3083
3084         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
3085
3086 2009-07-16  Doug Evans  <[email protected]>
3087
3088         * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
3089
3090 2007-07-16  Paul Pluzhnikov  <[email protected]>
3091
3092         * linux-thread-db.c (thread_db_find_new_threads_silently):
3093         New function.
3094         (try_thread_db_load_1): Call it.
3095
3096 2009-07-15  Doug Evans  <[email protected]>
3097
3098         Code reorg in preparation for adding comdat types support.
3099         * dwarf2read.c (struct die_reader_specs): New struct.
3100         (locate_pdi_sibling): New arg buffer.  All callers updated.
3101         (load_partial_dies, read_partial_die): Ditto.
3102         (read_8_bytes): Change return type to ULONGEST.
3103         (read_comp_unit): Delete arg abfd.  All callers updated.
3104         (read_die_and_children_1): Delete args abfd, cu.  New arg reader.
3105         All callers updated.
3106         (read_die_and_children, read_die_and_siblings): Ditto.
3107         (read_full_die): Ditto.  Move closer to callers.
3108         (skip_one_die): New arg buffer.  All callers updated.
3109         (load_full_comp_unit): Change return type to void.  All callers
3110         updated.
3111         (partial_read_comp_unit_head): New args buffer, buffer_size.
3112         All callers updated.
3113         (process_psymtab_comp_unit): New function, split out from
3114         dwarf2_build_psymtabs_hard.
3115         (dwarf2_build_psymtabs_hard): Call it.
3116         (load_partial_comp_unit): Renamed from load_comp_unit.
3117         All callers updated.
3118         (skip_children): New arg buffer.  All callers updated.
3119         (init_cu_die_reader): New function.
3120         (is_ref_attr): New function.
3121         (dwarf2_get_ref_die_offset): Call it.
3122         (alloc_one_comp_unit): New function.
3123
3124 2009-07-14  Stan Shebs  <[email protected]>
3125
3126         * MAINTAINERS (Global Maintainers): Add Doug Evans.
3127
3128 2009-07-14  Stan Shebs  <[email protected]>
3129
3130         Conditional tracepoints.
3131         * ax-gdb.h (gen_eval_for_expr): Declare.
3132         * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
3133         and other comparisons.
3134         (gen_eval_for_expr): New function.
3135         (agent_eval_command): New maintenance command.
3136         (_initialize_ax_gdb): Define the command.
3137         * remote.c (struct remote_state): New field cond_tracepoints.
3138         (PACKET_ConditionalTracepoints): New packet config type.
3139         (remote_cond_tracepoint_feature): New function.
3140         (remote_protocol_features): Add ConditionalTracepoints.
3141         (remote_supports_cond_tracepoints): New function.
3142         (_initialize_remote): Add ConditionalTracepoints.
3143         * tracepoint.c (download_tracepoint): Add conditional.
3144         * NEWS: Mention conditional tracepoints.
3145
3146 2009-07-14  Ulrich Weigand  <[email protected]>
3147
3148         * objfiles.c (objfile_relocate): Do not relocate the same
3149         BLOCKVECTOR_MAP address map multiple times.
3150
3151 2009-07-14  Ulrich Weigand  <[email protected]>
3152
3153         * remote.c (process_stop_reply): Access expedited target registers
3154         in target_gdbarch.
3155
3156 2009-07-13  Jan Kratochvil  <[email protected]>
3157
3158         Fix memory access from signed 32bit inferior registers on 64bit GDB.
3159         * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
3160         addr_bit.  Mask OFFSET by the ADDR_BIT width.
3161
3162 2009-07-13  Anthony Green  <[email protected]>
3163
3164         * moxie-tdep.c (moxie_gdbarch_init): Call
3165         set_gdbarch_process_record.
3166         (moxie_process_record): New.
3167         (moxie_process_readu): New.
3168
3169 2009-07-12  Michael Snyder  <[email protected]>
3170
3171         * i386-tdep.c: Add a frame unwinder for function epilogues.
3172         (i386_in_function_epilogue_p): New function.
3173         (i386_epilogue_frame_sniffer): New function.
3174         (i386_epilogue_frame_cache): New function.
3175         (i386_epilogue_frame_this_id): New function.
3176         (i386_epilogue_frame_unwind): New struct frame_unwind.
3177         (i386_gdbarch_init): Hook the new unwinder.
3178
3179 2009-07-11  Hui Zhu  <[email protected]>
3180
3181         * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
3182         to "disassemble" command to print the raw instructions in hex as
3183         well as in symbolic form.
3184         (init_cli_cmds): Ditto.
3185         (print_disassembly): Change "mixed" to "flags" to translate
3186         the behavior of disassemble.
3187         (disassemble_current_function): Ditto.
3188         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
3189         * stack.c (gdb_disassembly_stub): Ditto.
3190         * disasm.c (do_mixed_source_and_assembly): Ditto.
3191         (do_mixed_source_and_assembly): Ditto.
3192         (do_assembly_only): Ditto.
3193         (gdb_disassembly): Ditto.
3194         (dump_insns): print the raw instructions in hex as well as in
3195         symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
3196         * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
3197         assembly if it and flags is true.
3198         (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
3199         the assembly if it and flags is true.
3200         (gdb_disassembly): Update extern.
3201         * NEWS: Document disassemble/r support.
3202
3203 2009-07-10  Tom Tromey  <[email protected]>
3204
3205         * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
3206         * dwarf2expr.c: Likewise.
3207         * dwarf2loc.c: Likewise.
3208         * dwarf2read.c: Likewise.
3209         * sh-tdep.c: Likewise.
3210         * xtensa-tdep.c: Likewise.
3211
3212 2009-07-10  Jan Kratochvil  <[email protected]>
3213
3214         Tidy up the code.
3215         * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv.  Move
3216         variables var, rootlist and cr to their local sub-block.  Move the
3217         make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
3218         and do_cleanups calls to the common base block.  Remove the zero NV
3219         check.
3220
3221 2009-07-10 Phil Muldoon  <[email protected]>
3222
3223         * python/python-internal.h (apply_varobj_pretty_printer): Update
3224         definition.
3225         (python_string_to_target_python_string): Add definition.
3226         * python/python-utils.c (unicode_to_encoded_python_string)
3227         (unicode_to_target_python_string)
3228         (python_string_to_target_python_string): New Functions.
3229         * python/python-prettyprint.c (pretty_print_one_value): Likewise.
3230         (print_string_repr): Refactor to logic to account for PyObject
3231         returned strings.
3232         (apply_varobj_pretty_printer): Likewise.
3233         * python/python-value.c (valpy_string): Parse length keyword. Use
3234         length keyword in LA_GET_STRING.
3235         * varobj.c (value_get_print_value): Refactor logic to account for
3236         PyObject returned strings.
3237         * c-lang.c (c_get_string): If the length parameter is specified,
3238         use that. Return value in characters. Update comments.
3239         * language.h: Update c_get_string prototype comments.
3240
3241 2009-07-09  Doug Evans  <[email protected]>
3242
3243         * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
3244         to read_memory_unsigned_integer.
3245
3246 2009-07-09  Jan Kratochvil  <[email protected]>
3247
3248         Report error on inaccessible memory.
3249         * cli/cli-dump.c: Include gdbcore.h.
3250         (dump_memory_to_file): Call read_memory instead of target_read_memory.
3251
3252 2009-07-09  Hui Zhu  <[email protected]>
3253
3254         * solib.c (solib_bfd_open): Output a warning if solib's
3255         architecture is not compatible with inferior's architecture.
3256
3257 2009-07-09  Ulrich Weigand  <[email protected]>
3258             Jan Kratochvil  <[email protected]>
3259
3260         * target.h (struct target_ops <to_thread_architecture>): Describe it.
3261         (target_thread_architecture): Refer to to_thread_architecture.
3262
3263 2009-07-08  Pierre Muller  <[email protected]>
3264
3265         * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
3266
3267 2009-07-07  Ulrich Weigand  <[email protected]>
3268
3269         * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
3270
3271 2009-07-07  Pierre Muller  <[email protected]>
3272
3273         * breakpoint.c (set_raw_breakpoint): Remove static modifier.
3274
3275 2009-07-07  Tom Tromey  <[email protected]>
3276
3277         * c-lang.c (convert_octal): Only allow 3 octal digits.
3278         (print_wchar): Prefer 3-digit octal form.  Fall back to hex if
3279         needed.
3280         * c-exp.y (c_parse_escape): Only allow 3 octal digits.
3281
3282 2009-07-07  Paul Pluzhnikov  <[email protected]>
3283
3284         * python/python-value.c (valpy_getitem): Remove incorrect assert.
3285         
3286 2009-07-07  Paul Pluzhnikov  <[email protected]>
3287
3288         * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
3289
3290 2009-07-07  Sami Wagiaalla  <[email protected]>
3291
3292         * cp-support.h (struct using_direct): Rename members inner and
3293         outer to import_src, and import_dest respectively.
3294         * cp-namespace.c (cp_add_using_directive): Update.
3295         (cp_add_using): Update.
3296         (cp_copy_usings): Update.
3297         (cp_lookup_symbol_namespace): Update.
3298         (cp_scan_for_anonymous_namespaces): Update.
3299         * cp-support.c (make_symbol_overload_list_using): Update.
3300         * cp-support.h (cp_add_using_directive, cp_add_using): Rename
3301         arguments from inner and outer to src and dest respectively.
3302         * cp-namespace.c (cp_add_using_directive): Ditto.
3303         (cp_add_using): Ditto.
3304
3305 2009-07-07  Jan Kratochvil  <[email protected]>
3306
3307         * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
3308         * varobj.c (varobj_invalidate): Replace a while loop by for loop.
3309
3310 2009-07-07  Vladimir Prus  <[email protected]>
3311
3312         Fix hang in floating varobjs.
3313
3314         * varobj.c (varobj_invalidate): Advance to next
3315         element when processing floating varobj.
3316
3317 2009-07-07  Vladimir Prus  <[email protected]>
3318
3319         * varobj.c: Remove unnecessary include.
3320
3321 2009-07-07  Tristan Gingold  <[email protected]>
3322
3323         * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
3324         Remove excServer.c target.  Remove _all target.
3325         * darwin.defs: Removed.
3326
3327 2009-07-06  Aleksandar Ristovski  <[email protected]>
3328
3329         * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
3330
3331 2009-07-06  Jan Kratochvil  <[email protected]>
3332
3333         * source.c (find_and_open_source): Remove the `objfile' parameter.
3334         Update the function comment.
3335         (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
3336         find_and_open_source callers.
3337
3338 2009-07-05  Pedro Alves  <[email protected]>
3339
3340         * coff-pe-read.c (read_pe_exported_syms): Recognize
3341         "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
3342         targets.
3343
3344 2009-07-05  Pedro Alves  <[email protected]>
3345
3346         * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
3347         (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
3348         callback.
3349
3350 2009-06-29  Tristan Gingold  <[email protected]>
3351
3352         * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
3353         (amd64_darwin_thread_state_num_regs)
3354         (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
3355         amd64-darwin-tdep.c
3356         (_initialize_i386_darwin_tdep): Remove 64 bits parts.
3357         (darwin_dwarf_signal_frame_p): Make public.
3358         * amd64-darwin-tdep.c: New file with most chunks from
3359         i386-darwin-tdep.c      
3360         * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
3361         (amd64_darwin_thread_state_reg_offset)
3362         (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
3363         * amd64-darwin-tdep.h: New file.
3364         * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
3365         if BFD64 is defined.
3366         (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
3367         64 bits parts.
3368         (i386_darwin_store_inferior_registers): Ditto.
3369         (darwin_set_sstep): Ditto.
3370         (darwin_complete_target): Ditto.
3371         (amd64_darwin_sstep_at_sigreturn): Ditto.
3372         * configure.tgt: Create a separate entry for x86_64-*-darwin.
3373         Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
3374         * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
3375         i386-darwin-tdep.c i386-darwin-nat.c
3376         (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
3377         
3378 2009-07-02  Pedro Alves  <[email protected]>
3379
3380         * linux-fork.c (forks_exist_p): Drop unnecessary extern.
3381         (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
3382         (linux_fork_detach): Ditto.
3383         (delete_fork_command): Rename to ...
3384         (delete_checkpoint_command): ... this.
3385         (detach_fork_command): Rename to ...
3386         (detach_checkpoint_command): ... this.
3387         (info_forks_command): Rename to ...
3388         (info_checkpoints_command): ... this.
3389         (_initialize_linux_fork): Remove stale comments.  Adjust.
3390
3391 2009-07-02  Pedro Alves  <[email protected]>
3392
3393         * linux-nat.c (linux_child_follow_fork): If we're staying attached
3394         to the child process, enable event reporting on it.  Don't handle
3395         checkpoints here.  Instead, add the child fork to the lwp thread
3396         and inferior lists without clobbering the previous inferior.  Let
3397         the thread_db layer learn about a new child process, even if
3398         following the parent.
3399         (linux_nat_switch_fork): Delete lwps of the current inferior only,
3400         instead of clearing the whole list.  Use thread_change_ptid to
3401         give the core the illusion the new checkpoint is still the same
3402         inferior.  Clear the register cache.
3403         (linux_handle_extended_wait): Handle checkpoints here.
3404         (linux_multi_process): Turn on.
3405         * linux-fork.c (struct fork_info) <pc>: Remove field.
3406         (init_fork_list): Do not delete the checkpoint from the inferior
3407         list (it is not there).
3408         (fork_load_infrun_state): Don't switch inferior_ptid here.  Pass
3409         the new checkpoint's ptid to linux_nat_switch_fork.
3410         (fork_save_infrun_state): Make static.  Don't stop the pc field of
3411         fork_info, it's gone.
3412         (linux_fork_mourn_inferior): Don't delete the checkpoint from the
3413         inferior list, it's not there.
3414         (linux_fork_detach): Ditto.
3415         (delete_fork_command): Replace mention of fork/checkpoint by
3416         checkpoint only.
3417         (detach_fork_command): Likewise.  Don't delete the checkpoint from
3418         the inferior list.
3419         (info_forks_command): Adjust.
3420         (restore_detach_fork): Delete.
3421         (checkpointing_pid): New.
3422         (linux_fork_checkpointing_p): New.
3423         (save_detach_fork): Delete.
3424         (checkpoint_command): Delete temp_detach_fork.  Don't remove
3425         breakpoints, that's a nop.  Store the pid of the process we're
3426         checkpointing, and use make_cleanup_restore_integer to restore it.
3427         Don't reinsert breakpoints here.
3428         (process_command, fork_command): Delete.
3429         (restart_command): Update comments to only mention checkpoints,
3430         not forks.
3431         (_initialize_linux_fork): Delete "fork", "process", "info forks"
3432         commands.
3433         * linux-fork.h (fork_save_infrun_state, fork_list): Delete
3434         declarations.
3435         (linux_fork_checkpointing_p): Declare.
3436         * cli/cli-cmds.c (killlist): New.
3437         * cli/cli-cmds.h (killlist): Declare.
3438         * gdbcmd.h (killlist): Declare.
3439         * inferior.c: Include "gdbthread.h".
3440         (detach_inferior_command, kill_inferior_command)
3441         (inferior_command): New.
3442         (info_inferiors_command): Allow specifying a specific inferior id.
3443         (_initialize_inferiors): Register "inferior", "kill inferior" and
3444         "detach inferior" commands.
3445         * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
3446         * gdbthread.h (any_thread_of_process): Declare.
3447         * thread.c (any_thread_of_process): New.
3448
3449         * NEWS: Mention multi-inferior debugging.  Mention 'info
3450         inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
3451         new commands.
3452         (Removed commands): New section, mentioning that 'info forks',
3453         'fork', 'process', 'delete fork' and 'detach fork' are now gone.
3454
3455 2009-07-02  Ulrich Weigand  <[email protected]>
3456
3457         * gdbarch.sh (current_gdbarch): Remove global variable.
3458         (find_arch_by_info): Remove, inline into ...
3459         (gdbarch_find_by_info): ... this.  Remove current_gdbarch swapping.
3460         (deprecated_current_gdbarch_select_hack): Rename to ...
3461         (deprecated_target_gdbarch_select_hack): ... this.  Do not set
3462         or access current_gdbarch.
3463         * gdbarch.c, gdbarch.h: Regenerate.
3464
3465         * arch-utils.c (gdbarch_update_p): Update call.
3466         (set_gdbarch_from_file): Likewise.
3467
3468 2009-07-02  Ulrich Weigand  <[email protected]>
3469
3470         * defs.h (extract_signed_integer, extract_unsigned_integer,
3471         extract_long_unsigned_integer, store_signed_integer,
3472         store_unsigned_integer): Add BYTE_ORDER parameter.
3473         * findvar.c (extract_signed_integer, extract_unsigned_integer,
3474         extract_long_unsigned_integer, store_signed_integer,
3475         store_unsigned_integer): Add BYTE_ORDER parameter.  Use it
3476         instead of current_gdbarch.
3477
3478         * gdbcore.h (read_memory_integer, safe_read_memory_integer,
3479         read_memory_unsigned_integer, write_memory_signed_integer,
3480         write_memory_unsigned_integer): Add BYTE_ORDER parameter.
3481         * corefile.c (struct captured_read_memory_integer_arguments): Add
3482         BYTE_ORDER member.
3483         (safe_read_memory_integer): Add BYTE_ORDER parameter.  Store it into
3484         struct captured_read_memory_integer_arguments.
3485         (do_captured_read_memory_integer): Pass it to read_memory_integer.
3486         (read_memory_integer): Add BYTE_ORDER parameter.  Pass it to
3487         extract_signed_integer.
3488         (read_memory_unsigned_integer): Add BYTE_ORDER parameter.  Pass it to
3489         extract_unsigned_integer.
3490         (write_memory_signed_integer): Add BYTE_ORDER parameter.  Pass it
3491         to store_signed_integer.
3492         (write_memory_unsigned_integer): Add BYTE_ORDER parameter.  Pass it
3493         to store_unsigned_integer.
3494
3495         * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
3496         * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
3497         Pass it to extract_unsigned_integer.
3498
3499
3500         Update calls to extract_signed_integer, extract_unsigned_integer,
3501         extract_long_unsigned_integer, store_signed_integer,
3502         store_unsigned_integer, read_memory_integer,
3503         read_memory_unsigned_integer, safe_read_memory_integer,
3504         write_memory_signed_integer, write_memory_unsigned_integer, and
3505         get_target_memory_unsigned to pass byte order:
3506         * ada-lang.c (ada_value_binop): Update.
3507         * ada-valprint.c (char_at): Update.
3508         * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
3509         * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
3510         alpha_extract_return_value, alpha_read_insn,
3511         alpha_get_longjmp_target): Update.
3512         * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
3513         * amd64obsd-tdep.c (amd64obsd_supply_uthread,
3514         amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
3515         * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
3516         amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
3517         amd64_displaced_step_fixup): Update.
3518         * arm-linux-tdep.c (arm_linux_sigreturn_init,
3519         arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
3520         * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
3521         arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
3522         arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
3523         arm_return_value): Update.
3524         * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
3525         * auxv.c (default_auxv_parse): Update.
3526         * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
3527         avr_scan_prologue, avr_extract_return_value,
3528         avr_frame_prev_register, avr_push_dummy_call): Update.
3529         * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
3530         bsd_uthread_wait, bsd_uthread_thread_alive,
3531         bsd_uthread_extra_thread_info): Update.
3532         * c-lang.c (c_printstr, print_wchar): Update.
3533         * cp-valprint.c (cp_print_class_member): Update.
3534         * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
3535         cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
3536         cris_extract_return_value, find_step_target, dip_prefix,
3537         sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
3538         move_mem_to_reg_movem_op, get_data_from_address): Update.
3539         * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
3540         * dwarf2-frame.c (execute_cfa_program): Update.
3541         * dwarf2loc.c (find_location_expression): Update.
3542         * dwarf2read.c (dwarf2_const_value): Update.
3543         * expprint.c (print_subexp_standard): Update.
3544         * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
3545         unsigned_address_to_pointer, address_to_signed_pointer,
3546         read_var_value): Update.
3547         * frame.c (frame_unwind_register_signed,
3548         frame_unwind_register_unsigned, get_frame_memory_signed,
3549         get_frame_memory_unsigned): Update.
3550         * frame-unwind.c (frame_unwind_got_constant): Update.
3551         * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
3552         frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
3553         Update.
3554         * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
3555         frv_extract_return_value, find_func_descr,
3556         frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
3557         * f-valprint.c (f_val_print): Update.
3558         * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
3559         Update.
3560         * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
3561         h8300_push_dummy_call, h8300_extract_return_value,
3562         h8300h_extract_return_value, h8300_store_return_value,
3563         h8300h_store_return_value): Update.
3564         * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
3565         * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
3566         Update.
3567         * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
3568         hppa64_hpux_in_solib_call_trampoline,
3569         hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
3570         hppa_hpux_sigtramp_frame_unwind_cache,
3571         hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
3572         hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
3573         hppa32_hpux_search_dummy_call_sequence,
3574         hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
3575         hppa_hpux_unwind_adjust_stub): Update.
3576         * hppa-linux-tdep.c (insns_match_pattern,
3577         hppa_linux_find_global_pointer): Update.
3578         * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
3579         hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
3580         skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
3581         hppa_pseudo_register_read, hppa_frame_prev_register_helper,
3582         hppa_match_insns): Update.
3583         * hpux-thread.c (hpux_thread_fetch_registers): Update.
3584         * i386-tdep.c (i386bsd_sigcontext_addr): Update.
3585         * i386-cygwin-tdep.c (core_process_module_section): Update.
3586         * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
3587         amd64_darwin_sstep_at_sigreturn): Update.
3588         * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
3589         amd64_darwin_sigcontext_addr): Likewise.
3590         * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
3591         * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
3592         * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
3593         * i386obsd-nat.c (i386obsd_supply_pcb): Update.
3594         * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
3595         i386obsd_trapframe_cache): Update.
3596         * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
3597         i386_analyze_frame_setup, i386_analyze_prologue,
3598         i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
3599         i386_get_longjmp_target, i386_push_dummy_call,
3600         i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
3601         i386_fetch_pointer_argument): Update.
3602         * i387-tdep.c (i387_supply_fsave): Update.
3603         * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
3604         * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
3605         examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
3606         ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
3607         ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
3608         ia64_libunwind_frame_prev_register,
3609         ia64_libunwind_sigtramp_frame_this_id,
3610         ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
3611         find_extant_func_descr, find_func_descr,
3612         ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
3613         ia64_unwind_pc): Update.
3614         * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
3615         iq2000_scan_prologue, iq2000_extract_return_value,
3616         iq2000_push_dummy_call): Update.
3617         * irix5nat.c (fill_gregset): Update.
3618         * jv-lang.c (evaluate_subexp_java): Update.
3619         * jv-valprint.c (java_value_print): Update.
3620         * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call, 
3621         lm32_extract_return_value, lm32_store_return_value): Update.
3622         * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
3623         m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
3624         m32c_m16c_pointer_to_address): Update.
3625         * m32r-tdep.c (m32r_store_return_value, decode_prologue,
3626         m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
3627         Update.
3628         * m68hc11-tdep.c (m68hc11_pseudo_register_read,
3629         m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
3630         m68hc11_push_dummy_call): Update.
3631         * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
3632         m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
3633         Update.
3634         * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
3635         m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
3636         m68k_get_longjmp_target): Update.
3637         * m88k-tdep.c (m88k_fetch_instruction): Update.
3638         * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
3639         mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
3640         * mi/mi-main.c (mi_cmd_data_write_memory): Update.
3641         * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
3642         mips64_linux_get_longjmp_target, mips64_fill_gregset,
3643         mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
3644         * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
3645         * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
3646         mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
3647         mips_o32_push_dummy_call, mips_o64_push_dummy_call, 
3648         mips_single_step_through_delay, mips_skip_pic_trampoline_code,
3649         mips_integer_to_address): Update.
3650         * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
3651         Update.
3652         * monitor.c (monitor_supply_register, monitor_write_memory,
3653         monitor_read_memory_single): Update.
3654         * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
3655         moxie_analyze_prologue): Update.
3656         * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
3657         mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
3658         mt_push_dummy_call): Update.
3659         * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
3660         read_objc_methlist_method, read_objc_object, read_objc_super,
3661         read_objc_class, find_implementation_from_class): Update.
3662         * ppc64-linux-tdep.c (ppc64_desc_entry_point,
3663         ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
3664         Update.
3665         * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
3666         ppcobsd_sigtramp_frame_cache): Update.
3667         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
3668         do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
3669         ppc64_sysv_abi_return_value): Update.
3670         * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
3671         * procfs.c (procfs_auxv_parse): Update.
3672         * p-valprint.c (pascal_val_print): Update.
3673         * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
3674         regcache_raw_write_signed, regcache_raw_write_unsigned,
3675         regcache_cooked_read_signed, regcache_cooked_read_unsigned,
3676         regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
3677         * remote-m32r-sdi.c (m32r_fetch_register): Update.
3678         * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
3679         Update.
3680         * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
3681         rs6000_convert_from_func_ptr_addr, branch_dest, 
3682         rs6000_software_single_step): Update.
3683         * rs6000-tdep.c (rs6000_in_function_epilogue_p,
3684         ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
3685         bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
3686         rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
3687         rs6000_frame_cache): Update.
3688         * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
3689         s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
3690         s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
3691         extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
3692         * scm-exp.c (scm_lreadr): Update.
3693         * scm-lang.c (scm_get_field, scm_unpack): Update.
3694         * scm-valprint.c (scm_val_print): Update.
3695         * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
3696         score_fetch_inst): Update.
3697         * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
3698         sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
3699         sh64_pseudo_register_read, sh64_pseudo_register_write,
3700         sh64_frame_prev_register): Update:
3701         * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
3702         sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
3703         sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
3704         * solib-darwin.c (darwin_load_image_infos): Update.
3705         * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
3706         find_canonical_descriptor_in_load_object): Update.
3707         * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
3708         irix_open_symbol_file_object): Update.
3709         * solib-som.c (som_solib_create_inferior_hook, link_map_start,
3710         som_current_sos, som_open_symbol_file_object): Update.
3711         * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
3712         Update.
3713         * solib-svr4.c (read_program_header, scan_dyntag_auxv,
3714         solib_svr4_r_ldsomap): Update.
3715         * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
3716         * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
3717         sparc64obsd_collect_uthread): Update.
3718         * sparc64-tdep.c (sparc64_pseudo_register_read,
3719         sparc64_pseudo_register_write, sparc64_supply_gregset,
3720         sparc64_collect_gregset): Update.
3721         * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
3722         * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
3723         sparc32obsd_collect_uthread): Update.
3724         * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
3725         sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
3726         sparc_collect_rwindow): Update.
3727         * spu-linux-nat.c (parse_spufs_run): Update.
3728         * spu-tdep.c (spu_pseudo_register_read_spu,
3729         spu_pseudo_register_write_spu, spu_pointer_to_address,
3730         spu_analyze_prologue, spu_in_function_epilogue_p,
3731         spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
3732         spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
3733         info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
3734         info_spu_dma_command, info_spu_proxydma_command): Update.
3735         * stack.c (print_frame_nameless_args, frame_info): Update.
3736         * symfile.c (read_target_long_array, simple_read_overlay_table,
3737         simple_read_overlay_region_table): Update.
3738         * target.c (debug_print_register): Update.
3739         * tramp-frame.c (tramp_frame_start): Update.
3740         * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
3741         v850_extract_return_value, v850_store_return_value, 
3742         * valarith.c (value_binop, value_bit_index): Update.
3743         * valops.c (value_cast): Update.
3744         * valprint.c (val_print_type_code_int, val_print_string,
3745         read_string): Update.
3746         * value.c (unpack_long, unpack_double, unpack_field_as_long,
3747         modify_field, pack_long): Update.
3748         * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
3749         vax_skip_prologue): Update.
3750         * xstormy16-tdep.c (xstormy16_push_dummy_call,
3751         xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
3752         xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
3753         xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
3754         * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
3755         xtensa_pseudo_register_write, xtensa_frame_cache,
3756         xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
3757
3758
3759         * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
3760         decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
3761         BYTE_ORDER parameter.
3762         (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
3763         parameters.
3764         (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
3765         (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
3766         * dfp.c (match_endianness): Add BYTE_ORDER parameter.  Use it
3767         instead of current_gdbarch.
3768         (decimal_to_string, decimal_from_integral, decimal_from_floating,
3769         decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
3770         Pass it to match_endianness.
3771         (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
3772         parameters.  Pass them to match_endianness.
3773         (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
3774         Pass them to match_endianness.
3775         (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
3776         Pass them to match_endianness.
3777         * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
3778         BYTE_ORDER_Y output parameters.
3779         (value_binop): Update call to value_args_as_decimal.
3780
3781         Update calls to decimal_to_string, decimal_from_string,
3782         decimal_from_integral, decimal_from_floating, decimal_to_doublest,
3783         decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
3784         to pass/receive byte order:
3785         * c-exp.y (parse_number): Update.
3786         * printcmd.c (printf_command): Update.
3787         * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
3788         value_equal, value_less): Update.
3789         * valops.c (value_cast, value_one): Update.
3790         * valprint.c (print_decimal_floating): Update.
3791         * value.c (unpack_long, unpack_double): Update.
3792         * python/python-value.c (valpy_nonzero): Update.
3793
3794
3795         * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
3796         (printstr): Update calls to char_at.
3797         (ada_val_print_array): Likewise.
3798         * valprint.c (read_string): Add BYTE_ORDER parameter.
3799         (val_print_string): Update call to read_string.
3800         * c-lang.c (c_get_string): Likewise.
3801         * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
3802         * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
3803         Use it instead of current_gdbarch.
3804         * printcmd.c (printf_command): Update calls to target_wide_charset.
3805         * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
3806         Pass to target_wide_charset.  Use it instead of current_gdbarch.
3807         (classify_type): Add BYTE_ORDER parameter.  Pass to
3808         charset_for_string_type.  Allow NULL encoding pointer.
3809         (print_wchar): Add BYTE_ORDER parameter.
3810         (c_emit_char): Update calls to classify_type and print_wchar.
3811         (c_printchar, c_printstr): Likewise.
3812
3813
3814         * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
3815         * gdbarch.c, gdbarch.h: Regenerate.
3816         * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
3817         parameter.
3818         * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
3819         * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
3820         * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
3821         (rs6000_skip_trampoline_code): Update call.
3822
3823         * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
3824         dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
3825         (alpha_read_insn): Add GDBARCH parameter.
3826         * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
3827         (alpha_register_to_value): Pass architecture to alpha_sts.
3828         (alpha_extract_return_value): Likewise.
3829         (alpha_value_to_register): Pass architecture to alpha_lds.
3830         (alpha_store_return_value): Likewise.
3831         (alpha_read_insn): Add GDBARCH parameter.
3832         (alpha_skip_prologue): Pass architecture to alpha_read_insn.
3833         (alpha_heuristic_proc_start): Likewise.
3834         (alpha_heuristic_frame_unwind_cache): Likewise.
3835         (alpha_next_pc): Likewise.
3836         (alpha_sigtramp_frame_this_id): Pass architecture to
3837         tdep->dynamic_sigtramp_offset callback.
3838         (alpha_sigtramp_frame_sniffer): Pass architecture to
3839         tdep->pc_in_sigtramp callback.
3840         * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
3841         (alphafbsd_sigtramp_offset): Likewise.
3842         * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
3843         parameter.  Pass to alpha_read_insn.
3844         (alpha_linux_sigtramp_offset): Add GDBARCH parameter.  Pass to
3845         alpha_linux_sigtramp_offset_1.
3846         (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
3847         alpha_linux_sigtramp_offset.
3848         (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
3849         and alpha_linux_sigtramp_offset.
3850         * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
3851         (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
3852         alphanbsd_sigtramp_offset.
3853         * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
3854         (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
3855         alpha_read_insn.
3856         (alphaobsd_sigcontext_addr): Pass architecture to
3857         alphaobsd_sigtramp_offset.
3858         * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
3859         parameter.
3860
3861         * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
3862         (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
3863         (amd64_frame_cache): Likewise.
3864
3865         * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
3866         (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
3867         thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
3868         * arm-wince-tdep.c: Include "frame.h".
3869
3870         * avr-tdep.c (EXTRACT_INSN): Remove.
3871         (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
3872         (avr_skip_prologue): Pass architecture to avr_scan_prologue.
3873         (avr_frame_unwind_cache): Likewise.
3874
3875         * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
3876         (find_step_target): Initialize it.
3877         (get_data_from_address): Add BYTE_ORDER parameter.
3878         (bdap_prefix): Pass byte order to get_data_from_address.
3879         (handle_prefix_assign_mode_for_aritm_op): Likewise.
3880         (three_operand_add_sub_cmp_and_or_op): Likewise.
3881         (handle_inc_and_index_mode_for_aritm_op): Likewise.
3882
3883         * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
3884         (frv_linux_sigcontext_reg_addr): Pass architecture to
3885         frv_linux_pc_in_sigtramp.
3886         (frv_linux_sigtramp_frame_sniffer): Likewise.
3887
3888         * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
3889         (h8300_analyze_prologue): Add GDBARCH parameter.  Pass to
3890         h8300_is_argument_spill.
3891         (h8300_frame_cache, h8300_skip_prologue): Pass architecture
3892         to h8300_analyze_prologue.
3893
3894         * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
3895         in_solib_call_trampoline callback.
3896         (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
3897         * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
3898         parameter.
3899         (hppa64_push_dummy_call): Pass architecture to
3900         hppa64_convert_code_addr_to_fptr.
3901         (hppa_match_insns): Add GDBARCH parameter.
3902         (hppa_match_insns_relaxed): Add GDBARCH parameter.  Pass to
3903         hppa_match_insns.
3904         (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
3905         (hppa_in_solib_call_trampoline): Add GDBARCH parameter.  Pass to
3906         hppa_match_insns_relaxed.
3907         (hppa_stub_unwind_sniffer): Pass architecture to
3908         tdep->in_solib_call_trampoline callback.
3909         * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
3910         (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
3911         hppa_hpux_search_pattern.
3912         * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
3913         (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
3914         Pass to insns_match_pattern.
3915         (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
3916         hppa_linux_sigtramp_find_sigcontext.
3917         (hppa_linux_sigtramp_frame_sniffer): Likewise.
3918         (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
3919         (hppa64_hpux_in_solib_call_trampoline): Likewise.
3920
3921         * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
3922         (i386_analyze_frame_setup): Add GDBARCH parameter.
3923         (i386_analyze_prologue): Add GDBARCH parameter.  Pass to
3924         i386_follow_jump and i386_analyze_frame_setup.
3925         (i386_skip_prologue): Pass architecture to i386_analyze_prologue
3926         and i386_follow_jump.
3927         (i386_frame_cache): Pass architecture to i386_analyze_prologue.
3928         (i386_pe_skip_trampoline_code): Add FRAME parameter.
3929         * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
3930         * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
3931         frame to i386_pe_skip_trampoline_code.
3932
3933         * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
3934         to sigcontext_register_address callback.
3935         * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
3936         (ia64_find_unwind_table): Pass architecture to
3937         ia64_find_global_pointer.
3938         (find_extant_func_descr): Add GDBARCH parameter.
3939         (find_func_descr): Pass architecture to find_extant_func_descr
3940         and ia64_find_global_pointer.
3941         (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
3942         tdep->sigcontext_register_address callback.
3943         * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
3944         GDBARCH parameter.
3945
3946         * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
3947         (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
3948
3949         * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
3950         (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
3951         lm32_analyze_prologue.
3952
3953         * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
3954         (m32r_skip_prologue): Pass architecture to decode_prologue.
3955
3956         * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
3957         (m68hc11_scan_prologue): Pass architecture to
3958         m68hc11_analyze_instruction.
3959
3960         * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
3961         (m68k_analyze_prologue): Pass architecture to
3962         m68k_analyze_frame_setup.
3963
3964         * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
3965         (m88k_analyze_prologue): Add GDBARCH parameter.  Pass byte order
3966         to m88k_fetch_instruction.
3967         (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
3968         (m88k_frame_cache): Likewise.
3969
3970         * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
3971         (mep_analyze_prologue): Pass architecture to mep_get_insn.
3972
3973         * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
3974         (mips32_next_pc): Pass architecture to mips_fetch_instruction.
3975         (deal_with_atomic_sequence): Likewise.
3976         (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
3977         (mips16_scan_prologue): Likewise.
3978         (mips32_scan_prologue): Likewise.
3979         (mips16_in_function_epilogue_p): Likewise.
3980         (mips32_in_function_epilogue_p): Likewise.
3981         (mips_about_to_return): Likewise.
3982         (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
3983         (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
3984         (mips_skip_prologue): Pass architecture to mips16_scan_prologue
3985         and mips32_scan_prologue.
3986         (mips_in_function_epilogue_p): Pass architecture to
3987         mips16_in_function_epilogue_p and
3988         mips32_in_function_epilogue_p.
3989         (heuristic_proc_start): Pass architecture to mips_fetch_instruction
3990         and mips_about_to_return.
3991         (mips_skip_mips16_trampoline_code): Pass architecture to
3992         mips_fetch_instruction.
3993         (fetch_mips_16): Add GDBARCH parameter.
3994         (mips16_next_pc): Pass architecture to fetch_mips_16.
3995         (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
3996         fetch_mips_16.
3997
3998         * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
3999         read_objc_methlist_method, read_objc_object, read_objc_super,
4000         read_objc_class): Add GDBARCH parameter.
4001         (find_implementation_from_class): Add GDBARCH parameter, pass
4002         to read_objc_class, read_objc_methlist_nmethods, and
4003         read_objc_methlist_method.
4004         (find_implementation): Add GDBARCH parameter, pass to
4005         read_objc_object and find_implementation_from_class.
4006         (resolve_msgsend, resolve_msgsend_stret): Pass architecture
4007         to find_implementation.
4008         (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
4009         architecture to read_objc_super and find_implementation_from_class.
4010
4011         * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
4012         (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
4013         ppc64_standard_linkage3_target): Pass architecture to
4014         ppc64_desc_entry_point.
4015         * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
4016         (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
4017         (rs6000_fetch_instruction): Add GDBARCH parameter.
4018         (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
4019         rs6000_fetch_instruction.
4020         (skip_prologue): Pass architecture to rs6000_fetch_instruction.
4021         
4022         * remote-mips.c (mips_store_word): Return old_contents as host
4023         integer value instead of target bytes.
4024
4025         * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
4026         (s390_analyze_prologue): Initialize it.
4027         (extend_simple_arg): Add GDBARCH parameter.
4028         (s390_push_dummy_call): Pass architecture to extend_simple_arg.
4029
4030         * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
4031         * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
4032         (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
4033         * scm-valprint.c (scm_scmval_print): Likewise.
4034         (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
4035         SCM_BYTE_ORDER.
4036
4037         * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
4038         (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
4039         look_for_args_moves.
4040         (sh64_skip_prologue): Pass architecture to
4041         sh64_skip_prologue_hard_way.
4042         * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
4043         (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
4044         (sh_frame_cache): Likewise.
4045
4046         * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
4047         (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
4048         Pass architecture to extract_mips_address.
4049
4050         * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
4051         * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
4052         (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
4053         to sparc_fetch_wcookie.
4054         (sparc32_frame_prev_register): Likewise.
4055         * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
4056         * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
4057         * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
4058
4059         * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
4060         (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
4061         (spu_virtual_frame_pointer): Likewise.
4062         (spu_frame_unwind_cache): Likewise.
4063         (info_spu_mailbox_list): Add BYTE_ORER parameter.
4064         (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
4065         (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
4066         (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
4067         to info_spu_dma_cmdlist.
4068
4069         * symfile.c (read_target_long_array): Add GDBARCH parameter.
4070         (simple_read_overlay_table, simple_read_overlay_region_table,
4071         simple_overlay_update_1): Pass architecture to read_target_long_array.
4072
4073         * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
4074         (v850_frame_cache): Pass architecture to v850_analyze_prologue.
4075
4076         * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
4077         parameter.
4078         (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
4079         to xstormy16_analyze_prologue.
4080         (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
4081         (xstormy16_find_jmp_table_entry): Likewise.
4082         (xstormy16_skip_trampoline_code): Pass architecture to
4083         xstormy16_resolve_jmp_table_entry.
4084         (xstormy16_pointer_to_address): Likewise.
4085         (xstormy16_address_to_pointer): Pass architecture to
4086         xstormy16_find_jmp_table_entry.
4087
4088         * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
4089         (call0_analyze_prologue): Add GDBARCH parameter, pass to
4090         call0_track_op.
4091         (call0_frame_cache): Pass architecture to call0_analyze_prologue.
4092         (xtensa_skip_prologue): Likewise.
4093
4094 2009-07-02  Ulrich Weigand  <[email protected]>
4095
4096         * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
4097         (paddress): Add GDBARCH parameter.
4098         * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
4099         (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
4100         * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
4101         * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
4102         use it instead of current_gdbarch.
4103
4104         Update calls to ui_out_field_core_addr to pass architecture:
4105         * ada-lang.c (print_one_exception): Update.
4106         * breakpoint.c (print_one_breakpoint_location,
4107         print_one_exception_catchpoint): Update.
4108         * disasm.c (dump_insns): Update.
4109         * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
4110         * mi/mi-main.c (mi_cmd_data_read_memory): Update.
4111         * mi/mi-symbol-cmds.c: Include "objfiles.h".
4112         (mi_cmd_symbol_list_lines): Update.
4113         * stack.c (print_frame_info, print_frame): Update.
4114
4115         Update callers of paddress to pass architecture:
4116         * ada-tasks.c (info_task): Update.
4117         * ada-valprint.c (ada_val_print_1): Update.
4118         * annotate.c (annotate_source, annotate_frame_begin): Update.
4119         * breakpoint.c (insert_bp_location, describe_other_breakpoints,
4120         mention): Update.
4121         * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
4122         Update.
4123         * corefile.c (memory_error): Update.
4124         * c-valprint.c (print_function_pointer_address, c_val_print): Update.
4125         * disasm.c (dis_asm_print_address): Update.
4126         * exec.c (print_section_info): Update.
4127         * f-valprint.c (f_val_print): Update.
4128         * infcmd.c: Include "arch-utils.h".
4129         (jump_command, program_info): Update.
4130         * linux-fork.c: Include "arch-utils.h".
4131         (info_forks_command): Update.
4132         * m2-valprint.c (print_function_pointer_address,
4133         print_unpacked_pointer, print_variable_at_address,
4134         m2_val_print): Update.
4135         * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
4136         Update.
4137         * printcmd.c (print_address, print_address_demangle, address_info):
4138         Update.
4139         * p-valprint.c (pascal_val_print): Update.
4140         * source.c: Include "arch-utils.h".
4141         (line_info): Update.
4142         * stack.c (frame_info, print_block_frame_labels): Update.
4143         * symfile.c (add_symbol_file_command, list_overlays_command): Update.
4144         * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
4145         print_symbol, print_partial_symbols, maintenance_info_psymtabs,
4146         maintenance_check_symtabs): Update.
4147         * symtab.c (find_pc_sect_symtab): Update.
4148         * target.c (deprecated_debug_xfer_memory): Update.
4149         * tracepoint.c (scope_info): Update.
4150         * tui/tui-stack.c (tui_make_status_line): Update.
4151         * valprint.c (val_print_string): Update.
4152
4153         Update callers of paddr_nz to use paddress instead (keeping
4154         user-visible output identical):
4155         * alpha-tdep.c (alpha_heuristic_proc_start): Update.
4156         * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
4157         amd64_displaced_step_fixup): Update.
4158         * arch-utils.c (simple_displaced_step_copy_insn): Update.
4159         * auxv.c (fprint_target_auxv): Update.
4160         * breakpoint.c (insert_single_step_breakpoint): Update.
4161         * buildsym.c (finish_block): Update.
4162         * cli/cli-dump.c (restore_section_callback): Update.
4163         * fbsd-nat.c (fbsd_find_memory_regions): Update.
4164         * frame.c (frame_unwind_register_value): Update.
4165         * gcore.c (gcore_create_callback): Update.
4166         * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
4167         * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
4168         i386_record_lea_modrm_addr, i386_record_lea_modrm,
4169         i386_process_record): Update.
4170         * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
4171         ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
4172         ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
4173         * infrun.c (displaced_step_prepare, displaced_step_fixup,
4174         handle_inferior_event, insert_step_resume_breakpoint_at_sal,
4175         insert_longjmp_resume_breakpoint): Update.
4176         * linux-nat.c (linux_nat_find_memory_regions): Update.
4177         * linux-record.c (record_linux_system_call): Update.
4178         * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
4179         mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
4180         mips_o64_push_dummy_call): Update.
4181         * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
4182         * record.c (record_arch_list_add_mem, record_wait,
4183         record_xfer_partial): Update.
4184         * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
4185         mips_common_breakpoint): Update.
4186         * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
4187         * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
4188         * solib-som.c (som_current_sos): Update.
4189         * symfile.c (load_progress, generic_load): Update.
4190         * symfile-mem.c (add_vsyscall_page): Update.
4191         * valops.c (value_fetch_lazy): Update.
4192         * windows-tdep.c (windows_xfer_shared_library): Update.
4193
4194         Update callers of paddr_nz to use paddress instead (changing
4195         user-visible output to make it more correct):
4196         * dwarf2loc.c (locexpr_describe_location): Update.
4197         * ia64-tdep.c (ia64_memory_insert_breakpoint,
4198         ia64_memory_remove_breakpoint): Update.
4199         * jv-valprint.c (java_value_print): Update.
4200         * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
4201         * monitor.c (monitor_read_memory): Update.
4202
4203         Update callers of paddr to use paddress instead (changing
4204         user-visible output to make it more correct):
4205         * arm-tdep.c (arm_push_dummy_call): Update.
4206         * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
4207         create_breakpoint): Update.
4208         * darwin-nat-info.c (darwin_debug_regions): Update.
4209         * dcache.c (dcache_info): Update.
4210         * dsrec.c (load_srec, make_srec): Update.
4211         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
4212         dwarf2_frame_cache): Update.
4213         * gcore.c (gcore_copy_callback): Update.
4214         * gnu-nat.c (gnu_xfer_memory): Update.
4215         * mips-linux-nat.c (mips_show_dr): Update.
4216         * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
4217         monitor_remove_breakpoint): Update.
4218         * remote.c (compare_sections_command): Update.
4219         * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
4220         m32r_remove_breakpoint, m32r_insert_watchpoint,
4221         m32r_remove_watchpoint): Update.
4222         * sol-thread.c (info_cb): Update.
4223         * symfile.c (load_progress): Update.
4224
4225         Update callers of paddress or paddr_nz to use hex_string instead
4226         (changes output of internal/error/debug messages only):
4227         * dwarf2read.c (dump_die_shallow): Update.
4228         * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
4229         get_frame_func, create_new_frame): Update.
4230         * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
4231         * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
4232         ia64_get_dyn_info_list): Update.
4233         * maint.c (maintenance_translate_address): Update.
4234         * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
4235         * target.c (target_flash_erase): Update.
4236
4237         Update callers of paddr/paddr_nz to use phex/phex_nz instead,
4238         using an appropriate address size.  Remove use of strlen_paddr.
4239         * exec.c (exec_files_info): Update.
4240         * i386-nat.c (i386_show_dr): Update.
4241         * remote.c (remote_flash_erase): Update.
4242         * m32r-rom.c (m32r_load_section): Update.
4243         * monitor.c (monitor_vsprintf, monitor_store_register): Update.
4244         * remote.c (remote_check_symbols, remote_search_memory): Update.
4245         * remote-mips.c (mips_request, mips_common_breakpoint): Update.
4246         * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
4247         * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
4248         * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
4249         sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
4250         sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
4251         sh_dsp_show_regs): Update.
4252         * xcoffsolib.c (sharedlibrary_command): Update.
4253
4254
4255         * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
4256         Use hex_string_custom instead of paddr.
4257         (print_bfd_section_info): Pass address size.
4258         (print_objfile_section_info): Likewise.
4259
4260         * annotate.h (annotate_source): Add GDBARCH parameter.
4261         (annotate_frame_begin): Likewise.
4262         * annotate.c (annotate_source): Add GDBARCH parameter.
4263         (annotate_frame_begin): Likewise.
4264         * source.c (identify_source_line): Update call to annotate_source.
4265         * stack.c (print_frame_info, print_frame): Update call to
4266         annotate_frame_begin.
4267
4268         * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
4269         (create_breakpoint, create_ada_exception_breakpoint): Update call.
4270
4271         * stack.c (print_block_frame_labels): Add GDBARCH parameter.
4272         (print_frame_label_vars): Update call.
4273
4274         * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
4275         (dump_psymtab): Update call to print_partial_symbols.
4276         (struct print_symbol_args): Add GDBARCH member.
4277         (dump_symtab_1): Set print_symbol_args architecture member.
4278         (print_symbol): Use it.
4279
4280         * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
4281         parameter.
4282         * windows-tdep.c (windows_xfer_shared_library): Likewise.
4283         * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
4284         (core_process_module_section): Pass architecture from cpms_data to
4285         windows_xfer_shared_library.
4286         (windows_core_xfer_shared_libraries): Initialize cmps_data 
4287         architecture member.
4288         * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
4289         to windows_xfer_shared_library.
4290
4291         * defs.h (print_address): Add GDBARCH parameter.
4292         * printcmd.c (print_address): Add GDBARCH parameter.
4293         (print_scalar_formatted, do_examine): Update call.
4294         * findcmd.c (find_command): Update call.
4295         * tracepoint.c: Include "arch-utils.h".
4296         (trace_find_line_command): Update call.
4297         * tui/tui-disasm.c (tui_disassemble): Update call.
4298
4299         * value.h (print_address_demangle): Add GDBARCH parameter.
4300         * printcmd.c (print_address_demangle): Add GDBARCH parameter.
4301         * c-valprint.c (print_function_pointer_address, c_val_print):
4302         Update call.
4303         * f-valprint.c (f_val_print): Update call.
4304         * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
4305         * jv-valprint.c (java_val_print): Update call.
4306         * m2-valprint.c (print_function_pointer_address, m2_val_print):
4307         Update call.
4308         * p-valprint.c (pascal_val_print): Update call.
4309
4310         * disasm.c (gdb_disassemble_info): Install architecture into
4311         di.application_data field.
4312
4313 2009-07-02  Ulrich Weigand  <[email protected]>
4314
4315         * disasm.h (gdb_disassembly): Add GDBARCH parameter.
4316         (gdb_print_insn): Likewise.
4317         * disasm.c (dump_insns): Add GDBARCH parameter.  Use it instead
4318         of current_gdbarch.
4319         (do_mixed_source_and_assembly): Add GDBARCH parameter.  Pass to
4320         dump_insns.
4321         (do_assembly_only): Likewise.
4322         (gdb_disassembly): Add GDBARCH parameter.  Use it instead of
4323         current_gdbarch.  Pass to subroutines.
4324         (gdb_print_insn): Add GDBARCH parameter.  Use it instead of
4325         current_gdbarch.
4326
4327         * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
4328         (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
4329         (do_gdb_disassembly): Add GDBARCH argument.  Store into args.
4330         (print_frame_info): Pass architecture to do_gdb_disassembly.
4331
4332         * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
4333
4334         * mi/mi-cmd-disas.c: Include "arch-utils.h"
4335         (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
4336
4337         * cli/cli-cmds.c: Include "arch-utils.h".
4338         (print_disassembly): Add GDBARCH parameter.  Pass to gdb_disassembly
4339         and tui_show_assembly.
4340         (disassemble_current_function): Pass architecture to
4341         tui_get_low_disassembly_address and print_disassembly.
4342         (disassemble_command): Pass architecture to
4343         tui_get_low_disassembly_address and print_disassembly.
4344
4345         * tui/tui.c (tui_show_assembly): Add GDBARCH parameter.  Pass to
4346         tui_update_source_windows_with_addr.
4347
4348         * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
4349         (struct tui_source_info): Likewise.
4350         * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
4351
4352         * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
4353         Pass to gdb_print_insn.
4354         (tui_find_disassembly_address): Add GDBARCH parameter.  Pass to
4355         tui_disassemble.
4356         (tui_set_disassem_content): Add GDBARCH parameter.  Install into
4357         source_info.gdbarch.  Pass to tui_disassemble.
4358         (tui_show_disassem): Add GDBARCH parameter.  Pass to 
4359         tui_update_source_window.
4360         (tui_show_disassem_and_update_source): Add GDBARCH parameter.  Pass to
4361         tui_show_disassem and tui_update_source_window.
4362
4363         (tui_get_begin_asm_address): Return locator architecture in addition
4364         to locator PC value.
4365
4366         (tui_get_low_disassembly_address): Add GDBARCH parameter.   Pass to
4367         tui_get_low_disassembly_address.
4368
4369         (tui_vertical_disassem_scroll): Pass architecture to subroutines.
4370
4371         * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
4372         (tui_show_disassem): Likewise.
4373         (tui_show_disassem_and_update_source): Likewise.
4374         (tui_get_begin_asm_address): Return architecture and PC value.
4375
4376         * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
4377         (tui_show_assembly): Add GDBARCH parameter.
4378
4379         * tui/tui-layout.c (extract_display_start_addr): Return current window
4380         architecture in addition to current PC value.
4381
4382         (tui_set_layout): Update calls to tui_get_low_disassembly_address and
4383         extract_display_start_addr.  Pass architecture to
4384         tui_update_source_windows_with_addr.
4385
4386         * tui/tui-source.c: Include "objfiles.h".
4387         (tui_set_source_content): Initialize window architecture.
4388         (tui_show_symtab_source): Add GDBARCH parameter.  Pass to
4389         tui_update_source_window_as_is
4390
4391         * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
4392
4393         * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
4394         Install locator architecture.
4395         (tui_set_locator_filename): Update call.
4396         (tui_show_frame_info): Pass architecture to tui_set_locator_info
4397         and subroutines.
4398
4399         * tui/tui-win.c (make_visible_with_new_height): Pass architecture
4400         to tui_update_source_window.
4401
4402         * tui/tui-winsource.c: Include "objfiles.h".
4403         (tui_display_main): Update call to tui_get_begin_asm_address.
4404         Pass architecture to tui_update_source_windows_with_addr.
4405         (tui_update_source_window): Add GDBARCH parameter.  Pass to
4406         tui_update_source_window_as_is.
4407         (tui_update_source_window_as_is): Add GDBARCH parameter.
4408         Pass to tui_set_disassem_content.
4409         (tui_update_source_windows_with_addr): Add GDBARCH parameter.
4410         Pass to subroutines.
4411         (tui_update_source_windows_with_line): Pass objfile architecture
4412         to subroutines.
4413         (tui_horizontal_source_scroll): Pass architecture to 
4414         tui_update_source_window_as_is.
4415         
4416         * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
4417         parameter.
4418         (tui_update_source_window_as_is): Likewise.
4419         (tui_update_source_windows_with_addr): Likewise.
4420
4421 2009-07-02  Ulrich Weigand  <[email protected]>
4422
4423         * breakpoint.h (struct breakpoint): New member GDBARCH.
4424         * breakpoint.c: Include "arch-utils.h".
4425         (set_raw_breakpoint_without_location): Add GDBARCH parameter.
4426         Use it to set breakpoint architecture.
4427         (set_raw_breakpoint): Add GDBARCH parameter.
4428         (create_internal_breakpoint): Likewise.
4429         (create_catchpoint): Likewise.
4430         (create_fork_vfork_event_catchpoint): Likewise.
4431         (create_breakpoint): Likewise.
4432         (create_breakpoints): Likewise.
4433         (break_command_really): Likewise.
4434         (create_ada_exception_breakpoint): Likewise.
4435         Update local callers to pass architecture:
4436         (create_internal_breakpoint): Update.
4437         (create_overlay_event_breakpoint): Update.
4438         (create_longjmp_master_breakpoint): Update.
4439         (create_thread_event_breakpoint): Update.
4440         (create_solib_event_breakpoint): Update.
4441         (create_catchpoint): Update.
4442         (create_fork_vfork_event_catchpoint): Update.
4443         (set_momentary_breakpoint): Update.
4444         (clone_momentary_breakpoint): Update.
4445         (create_breakpoint): Update.
4446         (create_breakpoints): Update.
4447         (break_command_really): Update.
4448         (break_command_1): Update.
4449         (set_breakpoint): Update.
4450         (watch_command_1): Update.
4451         (catch_fork_command_1): Update.
4452         (catch_exec_commnd_1): Update.
4453         (handle_gnu_v3_exceptions): Update.
4454         (create_ada_exception_breakpoint): Update.
4455         (catch_ada_exception_command): Update.
4456         (catch_assert_command): Update.
4457         (trace_command): Update.
4458
4459         * breakpoint.h (struct bp_location): New member GDBARCH.
4460         * breakpoint.c (get_sal_arch): New function.
4461         (set_raw_breakpoint): Set location architecture.
4462         (add_location_to_breakpoint): Likewise.
4463         (clone_momentary_breakpoint): Likewise.
4464         (watch_command_1): Likewise.
4465         (update_watchpoint): Likewise.
4466         (bp_loc_is_permanent): Use location architecture instead of
4467         current_gdbarch.
4468         (adjust_breakpoint_address): Add GDBARCH parameter; use it
4469         instead of current_gdbarch.
4470         Update callers of adjust_breakpoint_address to pass
4471         breakpoint location architecture:
4472         (set_raw_breakpoint): Update.
4473         (watch_command_1): Update.
4474
4475         * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
4476         of current_gdbarch.
4477         (add_local_symbols): Add GDBARCH parameter.  Pass to collect_symbol.
4478         (encode_actions): Pass tracepoint architecture to add_local_symbols
4479         (encode_actions): Use tracepoint architecture instead of
4480         current_gdbarch.  Pass it to add_local_symbols and collect_symbol.
4481
4482         * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
4483         of print_one callback with last_loc.
4484         * breakpoint.c (print_one_breakpoint_location): Replace last_addr
4485         parameter with last_loc.
4486         (print_one_breakpoint): Likewise.
4487         (do_captured_breakpoint_query): Update call.
4488         (breakpoint_1): Pass last_loc instead of last_addr to
4489         print_one_breakpoint.  Pass last location architecture instead of
4490         current_gdbarch to set_next_address.
4491         Update all implementations of the print_one callback:
4492         * breakpoint.c (print_one_catch_fork): Update.
4493         (print_one_catch_vfork): Update.
4494         (print_one_catch_exec): Update.
4495         (print_one_exception_catchpoint): Update.
4496         * ada-lang.c (print_one_exception): Update.
4497         (print_one_catch_exception): Update.
4498         (print_one_catch_exception_unhandled): Update.
4499         (print_one_catch_assert): Update.
4500
4501         * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
4502         parameter.  Use it instead of gdbarch_addr_bit (current_gdbarch).
4503         (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
4504         to print_one_breakpoint_location.
4505         (breakpoint_address_bits): New function.
4506         (do_captured_breakpoint_query): Compute number of address bits to print
4507         and pass it to print_one_breakpoint.
4508         (breakpoint_1): Likewise.  Use it instead of current_gdbarch.
4509
4510         * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
4511         * breakpoint.c (create_thread_event_breakpoint): Likewise.
4512         Update callers to create_thread_event_breakpoint:
4513         * aix-thread.c (pd_enable): Update.
4514         * linux-thread-db.c (enable_thread_event): Update.
4515
4516         * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
4517         * breakpoint.c (create_solib_event_breakpoint): Likewise.
4518         Update callers to create_solib_event_breakpoint:
4519         * solib-frv.c (enable_break, enable_break2): Update.
4520         * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
4521         * solib-som.c (som_solib_create_inferior_hook): Update.
4522         * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
4523         * solib-svr4.c (enable_break): Update.
4524
4525         * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
4526         * breakpoint.c (insert_single_step_breakpoint): Likewise.
4527         Update callers to insert_single_step_breakpoint:
4528         * alpha-tdep.c (alpha_software_single_step): Update.
4529         * arm-linux-tdep.c (arm_linux_software_single_step): Update.
4530         * arm-tdep.c (arm_software_single_step): Update.
4531         * cris-tdep.c (cris_software_single_step): Update.
4532         * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
4533         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
4534         * sparc-tdep.c (sparc_software_single_step): Update.
4535         * spu-tdep.c (spu_software_single_step): Update.
4536         * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
4537         Pass it to insert_single_step_breakpoint.
4538         (mips_software_single_step): Pass architecture to
4539         deal_with_atomic_sequence and insert_single_step_breakpoint.
4540
4541         * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
4542         (deprecated_remove_raw_breakpoint): Likewise.
4543         * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
4544         (deprecated_remove_raw_breakpoint): Likewise.
4545         Update callers to deprecated_insert_raw_breakpoint and
4546         deprecated_remove_raw_breakpoint:
4547         * breakpoint.c (single_step_gdbarch): New static variable.
4548         (insert_single_step_breakpoint): Pass GDBARCH parameter to
4549         deprecated_insert_raw_breakpoint.  Store it in single_step_gdbarch.
4550         (remove_single_step_breakpoints): Pass architecture stored in
4551         single_step_gdbarch to deprecated_remove_raw_breakpoint.
4552         * rs6000-nat.c (exec_one_dummy_insn): Update.
4553         * solib-irix.c (enable_break, disable_break): Update.
4554         * procfs.c (procfs_mourn_inferior): Update.
4555         (remove_dbx_link_breakpoint): Update.
4556
4557         * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
4558         (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
4559         * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
4560         (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
4561         Update callers to set_breakpoint, set_momentary_breakpoint and
4562         set_momentary_breakpoint_at_pc:
4563         * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
4564         (until_break_command): Update.
4565         * infcall.c (call_function_by_hand): Update.
4566         * infcmd.c (finish_backward, finish_forward): Update.
4567         * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
4568         parameter.  Pass it to set_momentary_breakpoint.
4569         (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
4570         Pass it to set_momentary_breakpoint_at_pc.
4571         (handle_inferior_event): Update.
4572         (insert_step_resume_breakpoint_at_frame): Update.
4573         (insert_step_resume_breakpoint_at_caller): Update..
4574         * mi/mi-cmd-break.c: Include "arch-utils.h".
4575         (mi_cmd_break_insert): Update.
4576
4577         * target.h (struct target_ops): Add GDBARCH parameter to
4578         to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
4579         and to_remove_hw_breakpoint members.
4580         (target_insert_breakpoint, target_remove_breakpoint,
4581         target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
4582         parameter, pass to target routine.
4583         (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
4584         parameter.
4585         * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
4586         debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
4587         GDBARCH parameter, pass to target routine.
4588         (update_current_target): Update function signature.
4589         * breakpoint.c (insert_bp_location, remove_breakpoint,
4590         deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
4591         Pass architecture to target_ routines.
4592         Update all implementations of the target breakpoint routines to take
4593         GDBARCH parameter and use it instead of GDBARCH as appropriate:
4594         * corelow.c (ignore): Update.
4595         * exec.c (ignore): Update.
4596         * mem-break.c (memory_insert_breakpoint): Update.
4597         (memory_remove_breakpoint): Update.
4598         * monitor.c (monitor_insert_breakpoint): Update.
4599         (monitor_remove_breakpoint): Update.
4600         * record.c (record_insert_breakpoint): Update.
4601         (record_beneath_to_insert_breakpoint): Update.
4602         (record_remove_breakpoint): Update.
4603         (record_beneath_to_remove_breakpoint): Update.
4604         * remote.c (remote_insert_breakpoint): Update.
4605         (remote_remove_breakpoint): Update.
4606         (remote_insert_hw_breakpoint): Update.
4607         (remote_remove_hw_breakpoint): Update.
4608         * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
4609         (m32r_remove_breakpoint): Update.
4610         * remote-mips.c (mips_insert_breakpoint): Update.
4611         (mips_remove_breakpoint): Update.
4612         * i386-nat.c (i386_insert_hw_breakpoint): Update.
4613         (i386_remove_hw_breakpoint): Update.
4614         * nto-procfs.c (procfs_insert_breakpoint):  Update.
4615         (procfs_remove_breakpoint): Update.
4616         (procfs_insert_hw_breakpoint): Update.
4617         (procfs_remove_hw_breakpoint): Update.
4618
4619 2009-07-02  Ulrich Weigand  <[email protected]>
4620
4621         * frame.h (frame_unwind_arch): New.
4622         (frame_unwind_caller_arch): Likewise.
4623         * frame-unwind.h (frame_prev_arch_ftype): New type.
4624         (struct frame_unwind): New member prev_arch.
4625         * frame.c (struct frame_info): New member prev_arch.
4626         (frame_unwind_arch): New function.
4627         (frame_unwind_caller_arch): Likewise..
4628         (get_frame_arch): Reimplement in terms of frame_unwind_arch.
4629         * sentinel-frame.c (sentinel_frame_prev_arch): New function.
4630         (sentinel_frame_unwinder): Install it.
4631
4632         * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
4633         of get_frame_arch.
4634         (frame_unwind_register_value): Likewise.
4635         (frame_unwind_register_signed): Likewise.
4636         (frame_unwind_register_unsigned): Likewise.
4637         * frame-unwind.c (frame_unwind_got_optimized): Likewise.
4638         (frame_unwind_got_register): Likewise.
4639         (frame_unwind_got_constant): Likewise.
4640         (frame_unwind_got_bytes): Likewise.
4641         (frame_unwind_got_address): Likewise.
4642
4643         * frame.h (enum frame_type): New value ARCH_FRAME.
4644         * frame.c (fprint_frame_type): Handle ARCH_FRAME.
4645         * stack.c (print_frame_info): Likewise.
4646
4647 2009-07-02  Ulrich Weigand  <[email protected]>
4648
4649         * target.h (struct target_ops): New member to_thread_architecture.
4650         (target_thread_architecture): New macro.
4651         * target.c (update_current_target): Inherit to_thread_architecture.
4652         (default_thread_architecture): New function.
4653         (debug_to_thread_architecture): New function.
4654         (setup_target_debug): Handle to_thread_architecture.
4655
4656         * regcache.h (get_thread_arch_regcache): New.
4657         * regcache.c (struct regcache_list): New data type.
4658         (current_regcache): Hold regcache list instead of single regcache.
4659         (current_thread_ptid, current_thread_arch): New static variables.
4660         (get_thread_arch_regcache): New function.
4661         (get_thread_regcache): Use it.  Call target_thread_architecture.
4662         (regcache_thread_ptid_changed): Update to current_regcache changes.
4663         (registers_changed): Likewise.  Reset current_thread_arch and
4664         current_thread_ptid.
4665
4666         * remote.c (remote_wait): Access target registers in target_gdbarch.
4667         * linux-nat.c (linux_nat_do_thread_registers): Likewise.
4668         * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
4669         (ps_lgetfpregs, ps_lsetfpregs): Likewise.
4670         * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
4671         (ps_lgetfpregs, ps_lsetfpregs): Likewise.
4672         * solib-svr4.c (enable_break): Likewise.
4673         (svr4_relocate_main_executable): Likewise.
4674
4675 2009-07-02  Ulrich Weigand  <[email protected]>
4676
4677         * python/python-internal.h (struct language_defn): Declare.
4678         (python_gdbarch, python_language): Likewise.
4679         (ensure_python_env): Add prototype.
4680         (make_cleanup_py_restore_gil): Remove prototype.
4681
4682         * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
4683         (python_gdbarch, python_language): New global variables.
4684         (struct python_env): New data type.
4685         (ensure_python_env, restore_python_env): New functions.
4686         (eval_python_from_control_command): Call ensure_python_env to
4687         install current architecture and language.
4688         (python_command, gdbpy_new_objfile): Likewise.
4689         * python/python-cmd.c: Include "arch-utils.h" and "language.h".
4690         (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
4691         ensure_python_env.
4692         * python/python-type.c (clean_up_objfile_types): Likewise.
4693         * python/python-objfile.c: Include "language.h".
4694         (clean_up_objfile): Call ensure_python_env.
4695         * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
4696         (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
4697         * varobj.c (varobj_ensure_python_env): New helper function.
4698         (varobj_get_display_hint, update_dynamic_varobj_children,
4699         install_default_visualizer, varobj_set_visualizer, free_variable,
4700         value_get_print_value): Call it.
4701         (value_get_print_value): Add varobj argument instead of pretty
4702         printer argument.  Update all callers.
4703
4704         * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
4705         Remove.
4706
4707         * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
4708         (call_internal_function): Likewise.
4709         * value.c (call_internal_function): Likewise.  Pass to handler.
4710         * eval.c (evaluate_subexp_standard): Update call.
4711         * python/python-function.c: Include "language.h".
4712         (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
4713         make_cleanup_python_env.
4714
4715         * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
4716         builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
4717         valpy_str): Use python_gdbarch and python_language instead of
4718         current_gdbarch and current_language.
4719         * python/python-type.c (typy_lookup_typename): Likewise.
4720
4721 2009-07-02  Ulrich Weigand  <[email protected]>
4722
4723         * arch-utils.c (selected_byte_order): Return target_byte_order_user.
4724         (show_endian): Use target_byte_order_user if specified; otherwise
4725         use get_current_arch () instead of current_gdbarch.
4726         (show_architecture): Use set_architecture_string if specified;
4727         otherwise use get_current_arch () instead of current_gdbarch.
4728         (get_current_arch): New function.
4729         * arch-utils.h (get_current_arch): Add prototype.
4730
4731         * osabi.c (show_osabi): Use get_current_arch () instead of
4732         current_gdbarch.
4733
4734         * findcmd.c: Include "arch-utils.h".
4735         (parse_find_args): Add BIG_P argument.  Use it instead of byte order
4736         of current_gdbarch.
4737         (find_command): Use get_current_arch () instead of current_gdbarch.
4738         Pass byte order to parse_find_args.
4739
4740         * maint.c: Include "arch-utils.h".
4741         (maintenance_print_architecture): Use get_current_arch () instead
4742         of current_gdbarch.
4743
4744         * reggroups.c: Include "arch-utils.h".
4745         (maintenance_print_reggroups): Use get_current_arch () instead
4746         of current_gdbarch.
4747
4748         * symfile.c: Include "arch-utils.h".
4749         (overlay_load_command): Use get_current_arch () instead of
4750         current_gdbarch.
4751
4752         * value.c: Include "arch-utils.h".
4753         (show_convenience): Use get_current_arch () instead of
4754         current_gdbarch.
4755
4756         * tui/tui-regs.c: Include "arch-utils.h".
4757         (tui_reg_next_command): Use get_current_arch () instead of
4758         current_gdbarch.
4759
4760         * mi/mi-main.c: Include "arch-utils.h".
4761         (mi_cmd_data_read_memory): Use get_current_arch () instead of
4762         current_gdbarch.
4763
4764         * parse.c: Include "arch-utils.h".
4765         (parse_exp_in_context): Use get_current_arch () instead of
4766         current_gdbarch.
4767
4768 2009-07-02  Ulrich Weigand  <[email protected]>
4769
4770         * gdbtypes.c (make_pointer_type, make_reference_type,
4771         smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
4772         Use type architecture instead of current_gdbarch.
4773
4774         * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
4775         Add GDBARCH paramter.
4776         * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
4777         Add GDBARCH parameter.   Use it instead of current_gdbarch.
4778         * c-typeprint.c (c_type_print_modifier): Update call.
4779         * parse.c (push_type_address_space): Likewise.
4780
4781         * findvar.c (extract_typed_address, store_typed_address): Use type
4782         architecture instead of current_gdbarch.
4783
4784         * value.c (value_as_address, unpack_field_as_long): Use type architecture
4785         instead of current_gdbarch.
4786
4787         * doublest.c (floatformat_from_length): Add GDBARCH argument.  Use it
4788         instead of current_gdbarch.
4789         (floatformat_from_type): Pass type architecture.
4790
4791         * infcall.c (find_function_addr): Use type architecture instead
4792         of current_gdbarch.
4793
4794         * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
4795         value_bit_index): Use type architecture instead of current_gdbarch.
4796         * valops.c (value_cast, value_slice): Likewise.
4797
4798         * value.h (modify_field): Add TYPE argument.
4799         * value.c (modify_field): Add TYPE argument.  Use type architecture
4800         instead of current_gdbarch.
4801         (set_internalvar_component): Likewise.
4802         * eval.c (evaluate_struct_tuple): Update call.
4803         * valops.c (value_assign): Likewise.
4804         * ada-lang.c (modify_general_field): Likewise.  Add TYPE argument.
4805         (make_array_descriptor): Update calls.
4806         (move_bits): Add BITS_BIG_ENDIAN_P argument.  Use it instead of
4807         current_gdbarch.
4808         (ada_value_assign, value_assign_to_component): Update calls.
4809         (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
4810         value_assign_to_component): Use type arch instead of current_gdbarch.
4811
4812         * printcmd.c (float_type_from_length): Remove GDBARCH argument,
4813         use type architecture instead.
4814         (print_scalar_formatted, printf_command): Update calls.  Use type
4815         architecture instead of current_gdbarch.
4816         * valprint.c (val_print_type_code_int): Use type architecture
4817         instead of current_gdbarch.
4818         * varobj.c (value_get_print_value): Likewise.
4819         * python/python-prettyprint.c (print_string_repr): Add GDBARCH
4820         argument.  Use it instead of current_gdbarch.
4821         (apply_val_pretty_printer): Update call.
4822
4823         * ada-valprint.c (ada_val_print_1): Use type architecture instead
4824         of current_gdbarch.
4825         * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
4826         Use it instead of current_gdbarch.
4827         (c_val_print): Update calls passing type architecture.
4828         * f-valprint.c (f_val_print): Use type architecture instead of
4829         current_gdbarch.
4830         * jv-valprint (java_value_print): Likewise.
4831         * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
4832         Use it instead of current_gdbarch.
4833         (print_unpacked_pointer): Update calls passing type architecture.
4834         * scm-valprint.c (scm_scmval_print): Use type architecture instead of
4835         current_gdbarch.
4836
4837         * gnu-v3-abi.c (get_class_arch): Remove.
4838         (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch.  Remove
4839         special-case check for Java classes.
4840         (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
4841         gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
4842         Use get_type_arch instead of get_class_arch.
4843
4844 2009-07-02  Ulrich Weigand  <[email protected]>
4845
4846         * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
4847         (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
4848         (alloc_type_arch): Add prototype.
4849         (alloc_type_copy): Likewise.
4850         (get_type_arch): Likewise.
4851         (arch_type): Likewise.
4852         (arch_integer_type): Likewise.
4853         (arch_character_type): Likewise.
4854         (arch_boolean_type): Likewise.
4855         (init_float_type): Remove, replace by ...
4856         (arch_float_type): ... this.
4857         (init_complex_type): Remove, replace by ...
4858         (arch_complex_type): ... this.
4859         (init_flags_type): Remove, replace by ...
4860         (arch_flags_type): ... this.
4861         (init_composite_type): Remove, replace by ...
4862         (arch_composite_type): ... this.
4863
4864         * gdbtypes.c (alloc_type): No longer support NULL objfile.
4865         (init_type): Likewise.
4866         (alloc_type_arch): New function.
4867         (alloc_type_copy): New function.
4868         (get_type_arch): New function.
4869
4870         (smash_type): Preserve type ownership information.
4871         (make_pointer_type, make_reference_type, make_function_type,
4872         smash_to_memberptr_type, smash_to_method_type): No longer
4873         preserve OBJFILE across smash_type calls.
4874         (make_pointer_type, make_reference_type, make_function_type,
4875         lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
4876         create_range_type, create_array_type, create_set_type, copy_type):
4877         Use alloc_type_copy when allocating types.
4878         (check_typedef): Use alloc_type_arch.
4879         (copy_type_recursive): Likewise.  Preserve type ownership data
4880         after copying type.
4881         (recursive_dump_type): Dump type ownership data.
4882         (alloc_type_instance): Update type ownership check.
4883         (copy_type, copy_type_recursive): Likewise.
4884
4885         (arch_type): New function.
4886         (arch_integer_type): Likewise.
4887         (arch_character_type): Likewise.
4888         (arch_boolean_type): Likewise.
4889         (init_float_type): Remove, replace by ...
4890         (arch_float_type): ... this.
4891         (init_complex_type): Remove, replace by ...
4892         (arch_complex_type): ... this.
4893         (init_flags_type): Remove, replace by ...
4894         (arch_flags_type): ... this.
4895         (append_flags_type_flag): Move down.
4896         (init_composite_type): Remove, replace by ...
4897         (arch_composite_type): ... this.
4898         (append_composite_type_field_aligned,
4899         append_composite_type_field): Move down.
4900
4901         * gdbarch.c (gdbtypes_post_init): Allocate all types
4902         using per-architecture routines.
4903         * ada-lang.c (ada_language_arch_info): Likewise.
4904         * f-lang.c (build_fortran_types): Likewise.
4905         * jv-lang.c (build_java_types): Likewise.
4906         * m2-lang.c (build_m2_types): Likewise.
4907         * scm-lang.c (build_scm_types): Likewise.
4908
4909         * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
4910         (packed_array_type): Likewise.
4911         (ada_template_to_fixed_record_type_1): Likewise.
4912         (template_to_static_fixed_type): Likewise.
4913         (to_record_with_fixed_variant_part): Likewise.
4914         (to_fixed_variant_branch_type): Likewise.
4915         (to_fixed_array_type): Likewise.
4916         (to_fixed_range_type): Likewise.
4917         (empty_record): Use type instead of objfile argument.
4918         Use alloc_type_copy.
4919         (to_fixed_variant_branch_type): Update call to empty_record.
4920         * jv-lang.c (type_from_class): Use alloc_type_arch.
4921
4922         * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
4923         * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
4924         i386_mmx_type, i386_sse_type): Likewise.
4925         * ia64-tdep.c (ia64_ext_type): Likewise.
4926         * m32c-tdep.c (make_types): Likewise.
4927         * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
4928         * rs6000-tdep.c (rs6000_builtin_type_vec64,
4929         rs6000_builtin_type_vec128): Likewise.
4930         * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
4931         * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
4932         sparc64_fprs_type): Likewise.
4933         * spu-tdep.c (spu_builtin_type_vec128): Likewise.
4934         * xtensa-tdep.c (xtensa_register_type): Likewise.
4935         * linux-tdep.c (linux_get_siginfo_type): Likewise.
4936         * target-descriptions.c (tdesc_gdb_type): Likewise.
4937         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4938
4939 2009-07-02  Ulrich Weigand  <[email protected]>
4940
4941         * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
4942         i386_mxcsr_type members.
4943         (i386_eflags_type): Make into function.
4944         (i386_mxcsr_type): Likewise.
4945         * i386-tdep.c (i386_eflags_type): Make into function.
4946         (i386_mxcsr_type): Likewise.
4947         (i386_register_type): Update uses.
4948         (i386_init_types): Remove.
4949         (_initialize_i386_tdep): Do not call it.
4950         * amd64-tdep.c (amd64_register_type): Update uses.
4951
4952         * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
4953         * m68k-tdep.c (m68k_ps_type): Make into function.
4954         (m68k_register_type): Update use.
4955         (m68k_init_types): Remove.
4956         (_initialize_m68k_tdep): Do not call it.
4957
4958         * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
4959         sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
4960         sparc64_fprs_type members.
4961         * sparc-tdep.c (sparc_psr_type): Make into function.
4962         (sparc_fsr_type): Likewise.
4963         (sparc32_register_type): Update uses.
4964         (sparc_init_types): Remove.
4965         (_initialize_sparc_tdep): Do not call it.
4966         * sparc64-tdep.c (sparc64_pstate_type): Make into function.
4967         (sparc64_fsr_type): Likewise.
4968         (sparc64_fprs_type): Likewise.
4969         (sparc64_register_type): Update uses.
4970         (sparc64_init_types): Remove.
4971         (_initialize_sparc64_tdep): Likewise.
4972
4973 2009-07-02  Ulrich Weigand  <[email protected]>
4974
4975         * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
4976         builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
4977         builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
4978         (init_float_type, init_complex_type): Add prototypes.
4979         * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
4980         builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
4981         builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
4982         (_initialize_gdbtypes): Do not initialize them.
4983         (build_flt): Rename to ...
4984         (init_float_type): ... this.  Make global.
4985         (build_complex): Rename to ...
4986         (init_complex_type): ... this.  Make global.  Remove BIT argument.
4987         (gdbtypes_post_init): Update calls.
4988
4989         * ada-lang.c (ada_language_arch_info): Use init_float_type.
4990         * jv-lang.c (build_java_types): Likewise.
4991         * m2-lang.c (build_m2_types): Likewise.
4992         * f-lang.c (build_fortran_types): Use init_float_type and
4993         init_complex_type.
4994
4995         * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
4996         of using builtin_type_ieee_single, builtin_type_ieee_double, or
4997         builtin_type_arm_ext.
4998
4999         * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
5000         * ia64-tdep.c (builtin_type_ia64_ext): Remove.
5001         (_initialize_ia64_tdep): Do not initialize it.
5002         (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
5003         Move up.
5004         (ia64_ext_type): New function.
5005         (ia64_register_reggroup_p, ia64_convert_register_p,
5006         ia64_register_to_value, ia64_value_to_register,
5007         ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
5008         instead of builtin_type_ia64_ext.
5009
5010         * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
5011         (i387_ext_type): Add prototype.
5012         * i386-tdep.c (i387_ext_type): New function.
5013         (i386_extract_return_value, i386_store_return_value,
5014         i386_register_type): Use it instead of builtin_type_i387_ext.
5015         * amd64-tdep.c (amd64_register_type): Likewise.
5016         * i387-tdep.c (print_i387_value, i387_register_to_value,
5017         i387_value_to_register): Likewise.
5018         (print_i387_value, print_i387_ext): Add GDBARCH argument.
5019         (print_i387_ext, i387_print_float_info): Pass to subroutines.
5020
5021         * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
5022         * m68k-tdep.c (m68881_ext_type): New function.
5023         (m68k_register_type, m68k_convert_register_p): Use it instead
5024         of builtin_type_m68881_ext.
5025
5026         * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
5027         * arm-tdep.c (arm_ext_type): New function.
5028         (arm_register_type): Use it instead of builtin_type_arm_ext.
5029
5030         * alpha-tdep.c (alpha_register_type): Use builtin types
5031         instead of builtin_type_ieee_double.
5032
5033         * mips-tdep.c (mips_float_register_type, mips_double_register_type):
5034         Remove.
5035         (mips_register_type): Use builtin types instead of
5036         builtin_type_ieee_single and builtin_type_ieee_double.
5037         (mips_print_fp_register): Use builtin types instead of
5038         mips_float_register_type and mips_double_register_type.
5039
5040         * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
5041         Use builtin types instead of builtin_type_ieee_single and
5042         builtin_type_ieee_double.
5043
5044 2009-07-02  Ulrich Weigand  <[email protected]>
5045
5046         * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
5047         builtin_type_int16, builtin_type_uint16, builtin_type_int32,
5048         builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
5049         builtin_type_int128, builtin_type_uint128): Remove.
5050         (struct builtin_type): New members builtin_int0, builtin_int8,
5051         builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
5052         builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
5053         and builtin_uint128.
5054         * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
5055         builtin_type_int16, builtin_type_uint16, builtin_type_int32,
5056         builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
5057         builtin_type_int128, builtin_type_uint128): Remove.
5058         (_initialize_gdbtypes): Do not initialize them.
5059         (gdbtypes_post_init): Initialize fixed-size integer types.
5060
5061         * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
5062         GDBARCH argument.  Return platform-specific type.
5063         (dwarf2_read_address, execute_stack_op): Update calls.
5064
5065         * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
5066         instead of global builtin_int_... variables.
5067         * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
5068         * printcmd.c (do_examine): Likewise.
5069         * jv-exp.y (parse_number): Likewise.
5070
5071         * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
5072         alpha_store_return_value): Likewise.
5073         * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
5074         * amd64-tdep.c (amd64_register_type): Likewise.
5075         * arm-tdep.c (arm_register_type): Likewise.
5076         * avr-tdep.c (avr_register_type): Likewise.
5077         * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
5078         * frv-tdep.c (frv_register_type): Likewise.
5079         * h8300-tdep.c h8300_register_type): Likewise.
5080         * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
5081         hppa64_register_type): Likewise.
5082         * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
5083         * iq2000-tdep.c (iq2000_register_type): Likewise.
5084         * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
5085         * m32r-tdep.c (m32r_register_type): Likewise.
5086         * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
5087         m68hc11_pseudo_register_write): Likewise.
5088         * m68k-tdep.c (m68k_register_type): Likewise.
5089         * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
5090         * mep-tdep.c (mep_register_type): Likewise.
5091         * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
5092         mips_print_fp_register): Likewise.
5093         * moxie-tdep.c (moxie_register_type): Likewise.
5094         * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
5095         * rs6000-tdep.c (rs6000_builtin_type_vec64,
5096         rs6000_builtin_type_vec128): Likewise.
5097         * score-tdep.c (score_register_type): Likewise.
5098         * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
5099         Likewise.
5100         * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
5101         Likewise.
5102         * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
5103         * v850-tdep.c (v850_register_type): Likewise.
5104         * xstormy16-tdep.c (xstormy16_register_type): Likewise.
5105         * xtensa-tdep.c (xtensa_register_type): Likewise.
5106
5107         * mt-tdep.c (struct gdbarch_tdep): New data structure.
5108         (mt_gdbarch_init): Alloc TDEP structures.
5109         (mt_register_type): Cache coprocessor type in TDEP instead of
5110         static global variable.
5111
5112         * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
5113         * xtensa-tdep.c (type_entries): Remove.
5114         (xtensa_register_type): Cache fixed-size types in TDEP instead
5115         of in global variable.
5116
5117 2009-07-02  Ulrich Weigand  <[email protected]>
5118
5119         * gdbtypes.h (builtin_type_true_char): Remove.
5120         (builtin_type_true_unsigned_char): Likewise.
5121         (struct builtin_type): Add builtin_true_char and
5122         builtin_true_unsigned_char members.
5123         * gdbtypes.c (builtin_type_true_char): Remove.
5124         (builtin_type_true_unsigned_char): Likewise.
5125         (_initialize_gdbtypes): Do not initialize them.
5126         (gdbtypes_post_init): Initialize builtin_true_char and
5127         builtin_true_unsigned_char members of builtin_type.
5128
5129         * printcmd.c (print_scalar_formatted): Use builtin_type
5130         members instead of builtin_type_true_char and
5131         builtin_type_true_unsigned_char.
5132         * ada-valprint.c (ada_val_print_1): Likewise.
5133
5134 2009-07-02  Ulrich Weigand  <[email protected]>
5135
5136         * gdbtypes.h (builtin_type_void): Remove.
5137         * gdbtypes.c (builtin_type_void): Remove.
5138         (_initialize_gdbtypes): Do not initialize it.
5139
5140         (safe_parse_type): Add GDBARCH argument.  Use it to construct
5141         void return type.
5142         (check_stub_method): Update call.
5143
5144         * infcall.c (call_function_by_hand): Use platform-specific type
5145         instead of builtin_type_void.
5146         * valops.c (value_cast): Use input void type instead of
5147         builtin_type_void.
5148
5149 2009-07-02  Ulrich Weigand  <[email protected]>
5150
5151         * ada-lang.c (assign_component): Use platform-specific integer type
5152         instead of builtin_type_int32 type.
5153         (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
5154
5155         * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
5156         instead of builtin_type_int8 type.
5157         * valarith.c (value_x_unop): Likewise.
5158         * python/python-value.c (valpy_absolute): Avoid reference to
5159         builtin_type_int8 type.
5160
5161         * eval.c (evaluate_subexp_standard): Use platform-specific integer
5162         type instead of builtin_type_int8 as EVAL_SKIP return value type.
5163         * ada-lang.c (ada_evaluate_subexp): Likewise.
5164         * jv-lang.c (evaluate_subexp_java): Likewise.
5165         * m2-lang.c (evaluate_subexp_modula2): Likewise.
5166         * scm-lang.c (evaluate_exp): Likewise.
5167
5168         * value.h (value_bitstring): Add INDEX_TYPE argument.
5169         * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
5170         of builtin_type_int32 as base range type.
5171         * eval.c (evaluate_subexp_standard): Update value_bitstring call.
5172
5173 2009-07-02  Ulrich Weigand  <[email protected]>
5174
5175         * gdbtypes.c (lookup_array_range_type): Add prototype.
5176         (lookup_string_range_type): Likewise.
5177         * gdbtypes.c (lookup_array_range_type): New function.
5178         (lookup_string_range_type): Likewise.
5179
5180         * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
5181         * parse.c (follow_types): Likewise.
5182         * jv-lang.c (java_array_type): Likewise.
5183         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5184         * mt-tdep.c (mt_register_type): Likewise.
5185         * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
5186         * sh64-tdep.c (sh64_build_float_register_type): Likewise.
5187         * value.c (allocate_repeat_value): Likewise.
5188         * valops.c (value_array, value_cstring): Likewise.
5189         * valops.c (value_string): Use lookup_string_range_type.
5190
5191 2009-07-02  Ulrich Weigand  <[email protected]>
5192
5193         * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
5194         redundant check for NULL TYPE_TARGET_TYPE.
5195         * m2-valprint.c (m2_print_long_set): Likewise.
5196         * p-valprint.c (pascal_type_print_base): Likewise.
5197
5198 2009-07-02  Ulrich Weigand  <[email protected]>
5199
5200         * printcmd.c (next_gdbarch): New static variable.
5201         (set_next_address, do_examine, x_command): Set it.
5202         (decode_format): Use 'a' size to indicate width of an address.
5203         (do_examine): Add GDBARCH argument.  Handle 'a' size.
5204         (x_command): Pass architecture to do_examine.
5205         Error if called without argument the first time.  
5206         (do_one_display): Pass architecture to do_examine.
5207
5208         (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
5209         examine_g_type): Remove.
5210         (_initialize_printcmd): Do not initialize them.
5211         (do_examine): Use builin_type_int... instead of examine_..._type.
5212
5213 2009-07-02  Ulrich Weigand  <[email protected]>
5214
5215         * gdbtypes.h (struct builtin_type): Add internal_fn member.
5216         * gdbtypes.c (gdbtypes_post_init): Initialize it.
5217         * value.c (internal_fn_type): Remove.
5218         (_initialize_values): Do not initialize it.
5219
5220         * value.c (struct internalvar): Add enum internalvar_kind type and
5221         kind member.  Restructure union internalvar_data type.  Remove type,
5222         canonical, and make_value members.
5223         (init_if_undefined_command): Update for data structure changes.
5224         (create_internalvar): Likewise.
5225         (create_internalvar_type_lazy): Likewise.
5226         (get_internalvar_integer): Likewise.
5227         (get_internalvar_function): Likewise.
5228         (set_internalvar_component): Likewise.
5229         (set_internalvar): Likewise.
5230         (set_internalvar_integer): Likewise.
5231         (set_internalvar_function): Likewise.
5232         (clear_internalvar): Likewise.
5233         (add_internal_function): Likewise.
5234         (preserve_one_internalvar): New function.
5235         (preserve_values): Call it.
5236
5237         * value.h (value_of_internalvar): Add GDBARCH parameter.
5238         (internalvar_make_value): Likewise.
5239         * value.c (value_of_internalvar): Add GDBARCH parameter.  Pass it to
5240         make_value callback.  Use it to generate per-architecture result value
5241         types for internal variables with no pre-defined type.  Update for data
5242         structure changes.
5243         (show_convenience): Pass architecture to value_of_internalvar.
5244         * eval.c (evaluate_subexp_standard): Likewise.
5245         * infrun.c (siginfo_make_value): Add GDBARCH parameter.  Use it
5246         instead of current frame architecture.  Return per-architecture type.
5247
5248         * value.h (set_internalvar_string): Add prototype.
5249         * value.c (set_internalvar_string): New function.
5250         * tracepoint.c (set_traceframe_context): Use it.
5251
5252 2009-07-02  Ulrich Weigand  <[email protected]>
5253
5254         * jv-lang.h (java_int_type, java_byte_type, java_short_type,
5255         java_long_type, java_boolean_type, java_char_type, java_float_type,
5256         java_double_type, java_void_type): Remove.
5257         (struct builtin_java_type): New data type.
5258         (builtin_java_type): Add prototype.
5259         (java_primitive_type): Add GDBARCH argument.
5260         (java_primitive_type_from_name): Likewise.
5261         (type_from_class): Likewise.
5262
5263         * jv-lang.c (java_int_type, java_byte_type, java_short_type,
5264         java_long_type, java_boolean_type, java_char_type, java_float_type,
5265         java_double_type, java_void_type): Remove.
5266
5267         (build_java_types, builtin_java_type): New functions.
5268         (java_type_data): New static variable.
5269         (_initialize_java_language): Initialize it.  No longer initialize
5270         global types.
5271         (java_language_arch_info): Use per-architecture types.
5272
5273         (java_primitive_type): Add GDBARCH argument.  Return per-architecture
5274         type instead of refering to global variable.
5275         (java_primitive_type_from_name): Add GDBARCH argument.
5276         (java_primitive_type_name): New function.
5277         (java_demangled_signature_length): Use it instead of
5278         java_primitive_type_from_name.
5279         (java_demangled_signature_copy): Likewise.
5280
5281         (type_from_class): Add GDBARCH argument.  Pass to java_link_class_type,
5282         java_primitive_type, and recursive type_from_class call.
5283         (java_link_class_type): Add GDBARCH argument.  Pass to type_from_class
5284         calls.  Use per-architecture types instead of global types.
5285
5286         * jv-exp.y (parse_java_type): New define.
5287         Use per-architecture types instead of global types througout.
5288
5289         * jv-valprint.c (java_value_print): Pass architecture to
5290         type_from_class and java_primitive_type_from_name.  Use per-
5291         architecture types instead of global types.
5292
5293 2009-07-01  Doug Evans  <[email protected]>
5294
5295         * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
5296         support for i386-linux, amd64-linux, and i386-win32 builds of
5297         gdbserver.
5298
5299 2009-07-01  Nick Roberts  <[email protected]>
5300
5301         * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
5302
5303 2009-06-30  Jan Kratochvil  <[email protected]>
5304
5305         * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
5306         (check//%): Construct FORCE_PARALLEL for the sub-make.  Extend the
5307         comment for it.
5308
5309 2009-06-30  Paul Pluzhnikov  <[email protected]>
5310
5311         gdb/10275
5312         * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
5313         cfa_how and cfa_exp into regs and adjust users.
5314         
5315 2009-06-30  Daniel Jacobowitz  <[email protected]>
5316
5317         * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
5318
5319 2009-06-30  Vladimir Prus  <[email protected]>
5320
5321         * mi/mi-cmd-stack.c (parse_print_values): New.
5322         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
5323
5324 2009-06-30  Vladimir Prus  <[email protected]>
5325
5326         * varobj.c (varobj_get_type): Use type_to_string.
5327
5328 2009-06-29  Pedro Alves  <[email protected]>
5329
5330         * infrun.c (handle_inferior_event): Context switch to the new
5331         thread when resuming for a new_thread_event.
5332
5333 2009-06-29  Ulrich Weigand  <[email protected]>
5334
5335         * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
5336         * ada-lang.c (convert_actual): Remove stale prototype.
5337         (ensure_lval, make_array_descriptor, ada_convert_actual):
5338         Add GDBARCH argument and pass through to subroutine calls.
5339         (ensure_lval): Use GDBARCH instead of current_gdbarch.
5340         * infcall.c (value_arg_coerce): Update ada_convert_actual call.
5341
5342 2009-06-29  Ulrich Weigand  <[email protected]>
5343
5344         * ada-lang.c (resolve): Use per-architecture void type instead
5345         of platform-independent one.
5346         (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
5347         (ada_resolve_function): Reimplement fallback logic to avoid
5348         explicit reference to builtin_type_void.
5349
5350 2009-06-29  Ulrich Weigand  <[email protected]>
5351
5352         * ada-valprint.c (ada_print_scalar): Accept NULL type argument
5353         to indicate scalar should be printed as default integer.
5354         (print_optional_low_bound): Pass NULL to ada_print_scalar to
5355         indicate default integer output.
5356         * ada-typeprint.c (print_range, print_range_bound): Likewise.
5357         (print_choices): Likewise.  Thus, accept NULL as val_type.
5358         * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
5359         to look up controlling discriminant name.
5360
5361 2009-06-29  Ulrich Weigand  <[email protected]>
5362
5363         * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
5364         Fall back to orig_type as index type if symbol lookup fails.
5365         Allocate result types from ORIG_TYPE's objfile.
5366         (ada_array_bound_from_type, to_fixed_array_type,
5367         ada_evaluate_subexp): Pass original index type to
5368         to_fixed_range_type.  Do not pass objfile.
5369
5370         * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
5371         Fall back to orig_type as index type if symbol lookup fails.
5372         (print_array_type, ada_print_type): Pass original index type
5373         to print_range_type_named.
5374
5375 2009-06-29  Ulrich Weigand  <[email protected]>
5376
5377         * ada-lang.c (ada_index_type): Update comment.
5378
5379 2009-06-29  Ulrich Weigand  <[email protected]>
5380
5381         * ada-lang.c (ada_index_type): Make static.  Add NAME argument.
5382         Throw error on invalid input arguments.  Return NULL if unable
5383         to determine index type.
5384
5385         (ada_array_bound_from_type): Remove TYPEP argument.
5386         (ada_array_bound): Make static.  Return LONGEST instead of value.
5387         Update for ada_array_bound_from_type change.
5388         (ada_array_length): Return LONGEST instead of value.
5389         Update for ada_array_bound_from_type change.
5390         (make_array_descriptor): Update for ada_array_bound change.
5391
5392         (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
5393         OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
5394         ada_array_bound, ada_array_length, ada_index_type changes.
5395         Always use ada_index_type to compute result type; fall back
5396         to architecture-specific integer type if ada_index_type fails.
5397
5398         * ada-lang.h (ada_index_type): Remove prototype.
5399         (ada_array_bound): Likewise.
5400
5401 2009-06-29  Pedro Alves  <[email protected]>
5402
5403         * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
5404         a psymtab.
5405
5406 2009-06-29  Tom Tromey  <[email protected]>
5407
5408         * README: Mention parallel check.
5409
5410 2009-06-29  Sami Wagiaalla  <[email protected]>
5411
5412         * dwarf2read.c (read_import_statement): Properly set import location
5413         and destination.
5414         * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
5415         inner, char* outer arguments. Updated callers.
5416
5417 2009-06-29  Ulrich Weigand  <[email protected]>
5418
5419         * value.h (value_subscript, value_subscripted_rvalue,
5420         value_bitstring_subscript, value_ptradd): Use LONGEST instead
5421         of value as type of the index argument.
5422         (value_ptrsub): Remove.
5423         * valarith.c (value_subscript, value_subscripted_rvalue,
5424         value_bitstring_subscript, value_ptradd): Use LONGEST instead
5425         of value as type of the index argument.
5426         (value_ptrsub): Remove.
5427
5428         * wrapper.h (gdb_value_subscript): Use LONGEST instead of
5429         value as type of the index argument.
5430         * wrapper.c (gdb_value_subscript): Likewise.
5431
5432         Update calls to gdb_value_subscript, value_subscript,
5433         value_subscripted_rvalue, value_bitstring_subscript and
5434         value_ptradd to use LONGEST instead of value as index
5435         argument type.  Use value_ptradd instead of value_ptrsub.
5436         * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
5437         ada_tag_name_2): Update.
5438         * ada-tasks.c (read_atcb): Update.
5439         * eval.c (evaluate_subexp_standard): Update.
5440         * valarith.c (value_subscript): Update.
5441         * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
5442         * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
5443         gnuv3_method_ptr_to_value): Update.
5444         * jv-lang.c (evaluate_subexp_java): Update.
5445         * m2-lang.c (evaluate_subexp_modula2): Update.
5446         * python/python-value.c (valpy_getitem, valpy_binop): Update.
5447         * wrapper.c (gdb_value_subscript): Update.
5448         * varobj.c (c_describe_child): Update.
5449
5450 2009-06-29  Ulrich Weigand  <[email protected]>
5451
5452         * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
5453         * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
5454         (lookup_function_type): Update call.
5455         * stabsread.c (read_type): Likewise.
5456         * dwarf2read.c (read_subroutine_type): Use lookup_function_type
5457         instead of make_function_type.
5458         * jv-lang.c (type_from_class): Likewise.  Do not allocate types
5459         on the fake "dynamics" obstack.
5460
5461 2009-06-29  Ulrich Weigand  <[email protected]>
5462
5463         * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
5464         nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
5465         and nodebug_tls_symbol members.
5466         (struct objfile_type): New data structure.
5467         (objfile_type): Add prototype.
5468         * gdbtypes.c (gdbtypes_post_init): Remove initialization code
5469         for types no longer in struct builtin_type.
5470         (objfile_type_data): New static variable.
5471         (_initialize_gdbtypes): Initialize it.
5472         (objfile_type): New function.
5473
5474         * gdbtypes.h (builtin_type_error): Remove.
5475         * gdbtypes.c (build_complex): Do not use builtin_type_error.
5476         * symtab.c (builtin_type_error): Remove.
5477         (_initialize_symtab): Remove initialization.
5478
5479         * stabsread.c (dbx_lookup_type, define_symbol, error_type,
5480         rs6000_builtin_type, read_range_type): Use per-objfile types
5481         instead of global or per-architecture builtin types.
5482         * coffread.c (decode_type): Likewise.
5483         * dwarf2read.c (read_array_type, read_tag_string_type,
5484         new_symbol, die_type): Likewise.
5485         * mdebugread.c (parse_symbol, basic_type, upgrade_type,
5486         parse_procedure, psymtab_to_symtab_1): Likewise.
5487         * xcoffread.c (process_xcoff_symbol): Likewise.
5488         * parse.c (write_exp_msymbol): Likewise.
5489
5490         * stabsread.c (rs6000_builtin_type_data): New static variable.
5491         (_initialize_stabsread): Initialize it.
5492         (rs6000_builtin_type): Add OBJFILE argument.  Allocate builtin
5493         types per-objfile instead of globally.
5494
5495         * stabsread.c (dbx_lookup_type): Add OBJFILE argument.  Use it
5496         instead of current_objfile; pass it to rs6000_builtin_type.
5497         (dbx_alloc_type, read_type, read_range_type): Update calls.
5498         (cleanup_undefined_types_noname): Add OBJFILE argument and
5499         pass it to dbx_lookup_type.
5500         (cleanup_undefined_types): Add OBJFILE argument and pass it
5501         to cleanup_undefined_types_noname.
5502         * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
5503         * buildsym.c (end_symtab): Update call.
5504
5505 2009-06-29  Ulrich Weigand  <[email protected]>
5506
5507         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5508         target_gdbarch instead of current_gdbarch.
5509
5510 2009-06-29  Ulrich Weigand  <[email protected]>
5511
5512         * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
5513         (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
5514         solib-darwin.o.
5515
5516         * configure.tgt: Add comment.
5517
5518 2009-06-28  Paul Pluzhnikov  <[email protected]>
5519
5520         * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
5521         
5522 2009-06-27  Daniel Jacobowitz  <[email protected]>
5523             Jan Kratochvil  <[email protected]>
5524
5525         * NEWS: Document inlined function support.
5526         * Makefile.in (SFILES): Add inline-frame.c.
5527         (COMMON_OBS): Add inline-frame.o.
5528         * block.c (contained_in): Rewrite to use lexical nesting.
5529         (block_linkage_function): Skip inlined function blocks.
5530         (block_inlined_p): New.
5531         * block.h (struct block): Update comment.
5532         (block_inlined_p): New prototype.
5533         * blockframe.c (get_frame_block): Handle inlined functions.
5534         (get_frame_function): Do not use block_linkage_function.
5535         (block_innermost_frame): Use get_frame_block and contained_in.
5536         * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
5537         Skip over inlined functions.  Simplify epilogue check.
5538         (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
5539         Update comments.
5540         (set_momentary_breakpoint): Only accept non-inlined frames.
5541         (watch_command_1): Use frame_unwind_caller_pc and
5542         frame_unwind_caller_id instead of get_prev_frame.
5543         (until_break_command): Likewise.  Use get_stack_frame_id.
5544         * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
5545         * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
5546         * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
5547         (read_func_scope, new_symbol): Likewise.  Handle arguments specially
5548         for inlined functions without call site information.
5549         (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
5550         (die_specification): Treat DW_AT_abstract_origin as a specification.
5551         (read_type_die): Handle DW_TAG_inlined_subroutine.
5552         * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
5553         * frame.c (fprint_frame_id): Print inline depth.
5554         (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
5555         (skip_inlined_frames, get_stack_frame_id): New.
5556         (frame_unwind_caller_id): Use skip_inlined_frames.
5557         (frame_id_inlined_p): New.
5558         (frame_id_eq): Make the logic match the comments.  Add inline_depth
5559         check.
5560         (frame_id_inner): Handle inlined functions.
5561         (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
5562         (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
5563         (get_prev_frame_1): Check for inline frames.  Split out frame
5564         allocation to get_prev_frame_raw.
5565         (get_prev_frame_raw): New function.
5566         (get_prev_frame): Handle inline frames.
5567         (get_frame_pc): Use frame_unwind_pc.
5568         (get_frame_address_in_block): Skip inlined frames on both sides.
5569         (pc_notcurrent): Delete.
5570         (find_frame_sal): Rewrite to handle inline call sites.  Use
5571         get_frame_address_in_block.
5572         (deprecated_update_frame_pc_hack): Make static.
5573         * frame.h: Update comments.
5574         (struct frame_id): Add inline_depth.
5575         (enum frame_type): Add INLINE_FRAME.
5576         (frame_id_inlined_p, get_stack_frame_id): New prototypes.
5577         * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
5578         * infcmd.c (set_step_frame): New function.
5579         (step_once): Use set_step_frame.  Handle inlined functions.
5580         (until_next_command): Use set_step_frame.
5581         (finish_backward), finish_forward): Use get_stack_frame_id.
5582         (finish_command): Support inlined functions.
5583         * inferior.h (set_step_info): New prototype.
5584         * infrun.c (RESUME_ALL): Use minus_one_ptid.
5585         (clear_proceed_status): Clear step_stack_frame_id.
5586         (init_wait_for_inferior): Call clear_inline_frame_state.
5587         (init_execution_control_state): Make static.
5588         (set_step_info): New function.
5589         (init_thread_stepping_state): Do not set the symtab or line here.
5590         (stepped_in_from): New function.
5591         (handle_inferior_event): Handle inlined functions.  Use set_step_info.
5592         (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
5593         (struct inferior_status): Add step_stack_frame_id.
5594         (save_inferior_status, restore_inferior_status): Save and restore
5595         step_stack_frame_id.
5596         * inline-frame.c, inline-frame.h: New files.
5597         * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
5598         * regcache.c (regcache_write_pc): Call reinit_frame_cache.
5599         * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
5600         * stack.c (frame_show_address): New.
5601         (print_frame_info, print_frame): Use it.
5602         (find_frame_funname): Use get_frame_function.  Handle inlined blocks.
5603         (frame_info): Mark inlined functions.
5604         (backtrace_command_1): Use get_current_user_frame.
5605         (print_frame_local_vars, print_frame_label_vars): Update comments.
5606         (return_command): Refuse inlined functions.
5607         * symtab.c (lookup_symbol_aux_local): Stop at inlined function
5608         boundaries.
5609         (find_function_start_sal): Avoid inlined functions.
5610         (completion_list_add_fields): New function.
5611         (default_make_symbol_completion_list): Use it.  Use block_static_block
5612         and block_global_block.  Check for inlined functions.
5613         (skip_prologue_using_sal): Avoid line number comparison across
5614         inlining.
5615         * symtab.h (struct symbol): Add is_inlined.
5616         (SYMBOL_INLINED): New.
5617         * target.c (target_resume): Call clear_inline_frame_state.
5618         * valops.c (value_of_variable): Check block_inlined_p.
5619
5620 2009-06-27  Daniel Jacobowitz  <[email protected]>
5621
5622         * frame.c (frame_unwind_id): Renamed to ...
5623         (frame_unwind_caller_id): ... this.  All callers updated.
5624         (frame_pc_unwind): Renamed to ...
5625         (frame_unwind_caller_pc): ... this.  All callers updated.
5626         * frame.h: Document frame_unwind_caller_WHAT functions.
5627         (frame_unwind_id): Renamed to ...
5628         (frame_unwind_caller_id): ... this.
5629         (frame_pc_unwind): Renamed to ...
5630         (frame_unwind_caller_pc): ... this.
5631         * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
5632         * stack.c (parse_frame_specification_1): Do not rely on
5633         frame_unwind_id.
5634
5635 2009-06-27  Michael Snyder  <[email protected]>
5636
5637         * infrun.c (handle_inferior_event): Improve handling of
5638         reverse-stepping into and over shared library functions.
5639
5640 2009-06-25  Karen Osmond  <[email protected]>
5641
5642         * linespec.c (find_method): Add new not_found_ptr parameter to
5643         bring in line with symtab_from_filename, decode_variable.
5644         (decode_compound): Likewise.  Also propagate not_found_ptr to 
5645         find_method.
5646         (decode_line_1): Propagate not_found_ptr to decode_compound.
5647         (cplusplus_error): Now throws NOT_FOUND_ERROR.
5648
5649 2009-06-25  Karen Osmond  <[email protected]>
5650
5651         * MAINTAINERS (Write After Approval): Add self.
5652
5653 2009-06-23  Ulrich Weigand  <[email protected]>
5654
5655         * valops.c (value_one): Reimplement broken decimal-float case.
5656
5657 2009-06-23  Ulrich Weigand  <[email protected]>
5658
5659         * eval.c (evaluate_subexp_standard): Use expression architecture
5660         instead of current_gdbarch.
5661
5662         * infrun.c (handle_inferior_event): Avoid unncessary reference
5663         to current_gdbarch and get_current_frame ().
5664
5665 2009-06-23  Ulrich Weigand  <[email protected]>
5666
5667         * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
5668         (enum bptype): Add bp_longjmp_master.
5669
5670         * breakpoint.c (create_longjmp_master_breakpoint): New function.
5671         (update_breakpoints_after_exec): Handle bp_longjmp_master
5672         breakpoints.  Call create_longjmp_master_breakpoint.
5673         (print_it_typical, bpstat_stop_status, bpstat_what,
5674         print_one_breakpoint_location, allocate_bp_location, mention,
5675         delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
5676         (breakpoint_re_set): Call create_longjmp_master_breakpoint.
5677         (create_longjmp_breakpoint): Delete.
5678         (set_longjmp_breakpoint): Add THREAD argument.  Reimplement
5679         to install momentary clones of bp_longjmp_master breakpoints.
5680
5681         * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
5682
5683 2009-06-23  Cary Coutant  <[email protected]>
5684
5685         * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
5686         Set basic_block to 0 after a special opcode.
5687
5688 2009-06-23  Jan Kratochvil  <[email protected]>
5689
5690         Fix a regression by the mmap patch from 2009-06-16.
5691         * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
5692         calls before deleting the OBJFILE obstack.  Extend the comment.
5693
5694 2009-06-23  Ulrich Weigand  <[email protected]>
5695
5696         * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
5697         (get_java_object_header_size): Add GDBARCH parameter.
5698         * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
5699         Use it instead of current_gdbarch.
5700         (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
5701         get_java_object_header_size.
5702         * jv-valprint.c (java_value_print): Likewise.
5703
5704 2009-06-23  Sami Wagiaalla  <[email protected]>
5705
5706         * dwarf2read.c (process_die): Handle import statements
5707         (DW_TAG_imported_declaration, case DW_TAG_imported_module)
5708         (read_import_statement): New.
5709         (read_func_scope): Update using_directives to point to current context
5710         (read_lexical_block_scope): Ditto.
5711         * cp-support.h: Added prototype for cp_add_using.
5712         * cp-namespace.c: Removed local context_stack.
5713         (cp_initialize_namespace): Deleted.
5714         (cp_finalize_namespace): Deleted.
5715         (cp_add_using_directive): Use using_directives instead of using_list.
5716         (cp_add_using): No longer static.
5717         * buildsym.h: Created global using_direct variable.
5718         Created using_direct variable in context_stack.
5719         * buildsym.c (finish_block): Set using directives for the block under
5720         construction.
5721         (start_symtab): Removed call to cp_initialize_namespace().
5722         (end_symtab): Removed call to cp_finalize_namespace().
5723         (push_context): Save and reset using_directives.
5724         * block.c (block_using): Return using directives for given
5725         block instead of static block.
5726
5727 2009-06-23  Ulrich Weigand  <[email protected]>
5728
5729         * target-descriptions.h (struct type): Do not declare.
5730         (struct tdesc_type): Declare.
5731         (tdesc_named_type): Change return type to struct tdesc_type *.
5732         (tdesc_record_type): Remove.
5733         (tdesc_create_vector): Add prototype.
5734         (tdesc_create_union): Likewise.
5735         (tdesc_add_field): Likewise.
5736
5737         * target-descriptions.c (struct tdesc_reg): Replace gdb_type
5738         member by tdesc_type member.
5739         (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
5740         (struct tdesc_type, tdesc_type_p): Likewise.
5741         (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
5742         (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
5743         (struct tdesc_arch_data): Replace registers member by arch_regs.
5744
5745         (tdesc_predefined_types): Change to array of pre-defined
5746         struct tdesc_type structures.  Add "code_ptr" and "data_ptr".
5747         (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
5748         (tdesc_gdb_type): New function.
5749
5750         (target_find_description): Update for data structure changes.
5751         (tdesc_data_cleanup): Likewise.
5752         (tdesc_numbered_register): Likewise.
5753         (tdesc_use_registers): Likewise.
5754         (tdesc_create_reg): Likewise.
5755         
5756         (tdesc_find_arch_register): New function.
5757         (tdesc_find_register): Use it.
5758         (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
5759         tdesc_type on demand; cache generated types in tdesc_arch_reg.
5760
5761         (tdesc_free_type): New function.
5762         (tdesc_free_feature): Call it.
5763
5764         (tdesc_create_vector): New function.
5765         (tdesc_create_union): Likewise.
5766         (tdesc_add_field): Likewise.
5767         (tdesc_record_type): Remove.
5768
5769         (tdesc_type_id): Remove.
5770         (maint_print_c_tdesc_cmd): Update for data structure changes.  Update
5771         generated code to create tdesc_type structures instead of GDB types.
5772
5773         * xml-tdesc.c: Do not include "gdbtypes.h".
5774         (struct tdesc_parsing_data): Change type of current_union to
5775         struct tdesc_type *.
5776         (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
5777         (tdesc_start_union): Call tdesc_create_union.
5778         (tdesc_start_field): Call tdesc_add_field.
5779         (tdesc_start_vector): Call tdesc_create_vector.
5780         (tdesc_end_union): Remove.
5781         (feature_children): Remove reference to tdesc_end_union.
5782
5783         * features/arm-with-iwmmxt.c: Regenerate.
5784         * features/mips-linux.c: Regenerate.
5785         * features/mips64-linux.c: Regenerate.
5786         * features/rs6000/powerpc-32.c: Regenerate.
5787         * features/rs6000/powerpc-32l.c: Regenerate.
5788         * features/rs6000/powerpc-403.c: Regenerate.
5789         * features/rs6000/powerpc-403gc.c: Regenerate.
5790         * features/rs6000/powerpc-505.c: Regenerate.
5791         * features/rs6000/powerpc-601.c: Regenerate.
5792         * features/rs6000/powerpc-602.c: Regenerate.
5793         * features/rs6000/powerpc-603.c: Regenerate.
5794         * features/rs6000/powerpc-604.c: Regenerate.
5795         * features/rs6000/powerpc-64.c: Regenerate.
5796         * features/rs6000/powerpc-64l.c: Regenerate.
5797         * features/rs6000/powerpc-7400.c: Regenerate.
5798         * features/rs6000/powerpc-750.c: Regenerate.
5799         * features/rs6000/powerpc-860.c: Regenerate.
5800         * features/rs6000/powerpc-altivec32.c: Regenerate.
5801         * features/rs6000/powerpc-altivec32l.c: Regenerate.
5802         * features/rs6000/powerpc-altivec64.c: Regenerate.
5803         * features/rs6000/powerpc-altivec64l.c: Regenerate.
5804         * features/rs6000/powerpc-e500.c: Regenerate.
5805         * features/rs6000/powerpc-e500l.c: Regenerate.
5806         * features/rs6000/powerpc-isa205-32l.c: Regenerate.
5807         * features/rs6000/powerpc-isa205-64l.c: Regenerate.
5808         * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
5809         * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
5810         * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
5811         * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
5812         * features/rs6000/powerpc-vsx32.c: Regenerate.
5813         * features/rs6000/powerpc-vsx32l.c: Regenerate.
5814         * features/rs6000/powerpc-vsx64.c: Regenerate.
5815         * features/rs6000/powerpc-vsx64l.c: Regenerate.
5816         * features/rs6000/rs6000.c: Regenerate.
5817
5818 2009-06-23  Joel Brobecker  <[email protected]>
5819
5820         * ada-lang.c (decode_packed_array): If the value is a pointer to
5821         an array, then use value_ind to dereference it, not ada_value_ind.
5822         (ada_template_to_fixed_record_type_1): Handle the case where a
5823         dynamic field is an aligner type.
5824         (to_fixed_array_type): Add handling for packed array types.
5825         (ada_get_base_type): Do not follow the XVS type if the type is
5826         an aligner type.
5827         (ada_evaluate_subexp): Split a few statements up for clarity
5828         and debuggability.
5829         <OP_FUNCALL>: Add handling of the case of a packed array that
5830         has already been fixed.
5831
5832 2009-06-23  Joel Brobecker  <[email protected]>
5833
5834         * ada-lang.c (evaluate_subexp): Delete.  Use the version from eval.c.
5835         (evaluate_subexp_type): Reimplement using evaluate_subexp.
5836         * value.h (evaluate_subexp): Add declaration.
5837         * eval.c (evaluate_subexp): Make non-static.
5838         * objc-lang.c (print_object_command): Use evaluate_subexp.
5839
5840 2009-06-23  Paul Pluzhnikov  <[email protected]>
5841
5842         Revert 2009-05-14 breakpoint commit (no longer needed).
5843         * breakpoint.h (breakpoint_re_set_objfile): Remove
5844         * breakpoint.c (breakpoint_re_set_objfile): Likewise
5845         (create_overlay_event_breakpoint): Remove objfile parameter,
5846         iterate over all objfiles.
5847         * objfiles.c (objfile_relocate): Update.
5848         * symfile.c (new_symfile_objfile): Likewise.    
5849         
5850 2009-06-23  Tom Tromey  <[email protected]>
5851
5852         PR gdb/10309:
5853         * c-lang.c (classify_type): Iterate over typedefs.
5854         * c-valprint.c (textual_element_type): Iterate over typedefs.
5855
5856 2009-06-22  Tristan Gingold  <[email protected]>
5857
5858         * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
5859         instead of "%p".
5860
5861 2009-06-22  Jan Kratochvil  <[email protected]>
5862
5863         PR gdb/9988:
5864         * buildsym.c (block_compar): New function.
5865         (end_symtab): Replace the bubble sort by a qsort based code.
5866
5867 2009-06-22  Sami Wagiaalla  <[email protected]>
5868
5869         * MAINTAINERS (Write After Approval): Add self.
5870
5871 2009-06-22  Ulrich Weigand  <[email protected]>
5872
5873         * spu-tdep.c (spu_get_longjmp_target): New function.
5874         (spu_gdbarch_init): Install it.
5875
5876 2009-06-22  H.J. Lu  <[email protected]>
5877
5878         PR server/10306
5879         * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
5880
5881 2009-06-21  Michael Snyder  <[email protected]>
5882
5883         * inferior.h: Update ancient comment.
5884
5885 2009-06-20  Aleksandar Ristovski  <[email protected]>
5886             Pedro Alves  <[email protected]>
5887
5888         * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
5889         NULL pointer.
5890         (scan_dyntag): Skip if input bfd isn't elf flavoured.
5891         (locate_base): Call elf_locate_base even without an exec_bfd.
5892
5893 2009-06-19  Samuel Bronson  <[email protected]>
5894
5895         PR cli/9903:
5896         * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
5897         for prefix commands to avoid duplicates in the output.
5898
5899 2009-06-19  Samuel Bronson  <[email protected]>
5900
5901         PR cli/9903:
5902         * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
5903         printing.
5904
5905 2009-06-19  Jerome Guitton  <[email protected]>
5906
5907         * breakpoint.c (expand_line_sal_maybe): When explicit_line,
5908         skip prologue on each sals.
5909         (skip_prologue_sal): Return explicit_line and explicit_pc
5910         unmodified.
5911
5912 2009-06-19  Tristan Gingold  <[email protected]>
5913
5914         * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
5915         line.
5916
5917 2009-06-19  Tristan Gingold  <[email protected]>
5918         * machoread.c (macho_symtab_read): Adjust for bfd changes.
5919         * darwin-nat.h (struct darwin_exception_msg): New type to describe
5920         a mach exception.
5921         (struct private_thread_info): New type to describe the state of the
5922         thread.
5923         (DEF_VEC_I thread_t): Removed, replaced by ...
5924         (DEF_VEC_O darwin_thread_t): ... this new type.
5925         (struct darwin_inferior): Renamed to ...
5926         (struct private_inferior): ... this type.  Fields added.
5927         (darwin_not_port): Moved into the private inferior structure.
5928         * darwin-nat.c: Add includes, improve comments.
5929         Rewrite to handle multiple threads and processes.
5930         (darwin_resume_to): New function and protype.
5931         (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
5932         (darwin_kill_inferior): Add ops argument.
5933         (darwin_pid_to_str): New function.
5934         (darwin_thread_alive): Ditto.
5935         (darwin_inf, darwin_not_port): Removed.
5936         (darwin_inf_fake_stop): New variable.
5937         (msgin, msgout, msg_state, exc_msg): Removed.
5938         (mach_check_error): Use warning instead of error.
5939         (darwin_ptrace): Adjust debug level.
5940         (cmp_thread_t): Fix names (typo).
5941         (darwin_check_new_threads): Argument is now an inferior,
5942         adjust for new structures, add no change check, ignore dead ports,
5943         handle first thread case.
5944         (find_inferior_task_it): New function.
5945         (find_inferior_notify_it): Ditto.
5946         (darwin_find_inferior_by_task): Ditto.
5947         (darwin_find_inferior_by_notify): Ditto.
5948         (darwin_find_thread): Ditto.
5949         (darwin_suspend_inferior): Ditto.
5950         (darwin_resume_inferior): Ditto.
5951         (catch_exception_raise_state): Removed.
5952         (catch_exception_raise_state_identity): Removed.
5953         (darwin_suspend_inferior_it): New function.
5954         (darwin_resume_inferior_it): Ditto.
5955         (darwin_dump_message): New function, extracted from darwin_wait.
5956         (darwin_decode_exception_message): New function.
5957         (darwin_encode_reply): New function.
5958         (catch_exception_raise): Removed.
5959         (darwin_send_reply): New function, extracted from darwin_resume.
5960         (darwin_resume_thread): New function, extracted from darwin_resume.
5961         (struct resume_inferior_threads_param): New type.
5962         (darwin_resume_inferior_threads_it): New function.
5963         (darwin_resume_inferior_threads): New function.
5964         (darwin_suspend_inferior_threads): New function.
5965         (darwin_resume): Mostly rewritten to handle multiple threads and
5966         some corner cases.
5967         (darwin_decode_message): New function extracted from darwin_wait.
5968         (cancel_breakpoint): New function.
5969         (darwin_wait): Mostly rewritten.  Handle multiple threads.
5970         (darwin_mourn_inferior): Adjust for per process structures.
5971         (darwin_reply_to_all_pending_messages): New function.
5972         (darwin_stop_inferior): Adjust for per inferior structures.
5973         (darwin_attach_pid): Ditto.
5974         (darwin_init_thread_list): Ditto.
5975         (darwin_attach): Ditto.
5976         (darwin_detach): Ditto.
5977         (darwin_files_info): Now empty.
5978         (darwin_pid_to_str): Adjust returns string to match one expected by
5979         the testsuite.
5980         (darwin_read_write_inferior): Rename err variable to match other uses.
5981         Adjust debug message.  Handle submaps.
5982         (darwin_xfer_memory): Adjust for per inferior structures.
5983         (set_enable_mach_exceptions): Ditto.
5984         (darwin_pid_to_exec_file): New function.
5985         (darwin_get_ada_task_ptid): Ditto.
5986         (darwin_supports_multi_process): Ditto.
5987         (_initialize_darwin_inferior): Remove useless assertion, adjust for
5988         per inferior structures.  Add new target operations.
5989
5990 2009-06-18  Hui Zhu  <[email protected]>
5991             Michael Snyder  <[email protected]>
5992
5993         * infrun.c (handle_inferior_event): Improve reverse stepping
5994         through function epilogue.
5995
5996         * infrun.c (handle_inferior_event): Reverse-next through
5997         trampoline.
5998
5999 2009-06-18  Paul Pluzhnikov  <[email protected]>
6000
6001         * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
6002         dwarf_frame_size.
6003
6004 2009-06-17  Tom Tromey  <[email protected]>
6005
6006         * dwarf2read.c (zlib_decompress_section): Use a cleanup.
6007
6008 2009-06-17  Ulrich Weigand  <[email protected]>
6009
6010         * gdbarch.sh (pointer_to_address): Change to type 'm'.
6011         (address_to_pointer): Likewise.
6012         * gdbarch.c, gdbarch.h: Regenerate.
6013
6014         * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
6015         (signed_pointer_to_address): Likewise.
6016         (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
6017         * findvar.c (unsigned_pointer_to_address): Likewise.
6018         (signed_pointer_to_address): Likewise.
6019         (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
6020
6021         * avr-tdep.c (avr_address_to_pointer): Likewise.
6022         (avr_pointer_to_address): Likewise.
6023         * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
6024         (iq2000_address_to_pointer): Likewise.
6025         * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
6026         (m32c_m16c_pointer_to_address): Likewise.
6027         * spu-tdep.c (spu_pointer_to_address): Likewise.
6028         * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
6029         (xstormy16_address_to_pointer): Likewise.
6030
6031 2009-06-17  Ulrich Weigand  <[email protected]>
6032
6033         * printcmd.c (print_scalar_formatted): Always truncate
6034         unsigned data types.
6035
6036         * cli-dump.c (struct callback_data): Change type of load_offset
6037         to CORE_ADDR.
6038         (restore_binary_file): Update type casts.
6039         (restore_command): Parse load_offset as address, not long.
6040
6041         * utils.c (string_to_core_addr): Do not sign-extend value.
6042         * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
6043         before comparing against requested frame address.
6044
6045 2009-06-17  Ulrich Weigand  <[email protected]>
6046
6047         * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
6048         * gdbarch.h, gdbarch.c: Regenerate.
6049
6050         * gcore.c (default_gcore_target): Make return value const.
6051         Call gdbarch_gcore_bfd_target if present.
6052         (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
6053
6054         * corelow.c (core_read_description): Call gdbarch_core_read_description
6055         on core_gdbarch instead of current_gdbarch.
6056
6057         * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
6058
6059 2009-06-17  Ulrich Weigand  <[email protected]>
6060
6061         * gdbtypes.c (create_string_type): Receive character type as argument.
6062         * gdbtypes.h (create_string_type): Add character type argument.
6063         * dwarf2read.c (read_tag_string_type): Pass character type to
6064         create_string_type.
6065
6066         * value.h (value_string): Add character type argument.
6067         * valops.c (value_string): Add character type argument.  Pass it to
6068         create_string_type.  Do not allocate space in inferior.
6069         * valarith.c (value_concat): Pass character type to value_string.
6070
6071         * value.h (value_typed_string): Rename to ...
6072         (value_cstring): ... this.
6073         * valops.c (value_typed_string): Rename to ...
6074         (value_cstring): ... this.
6075         * c-lang.c (evaluate_subexp_c): Update.
6076
6077         * python/python-value.c (builtin_type_pychar): New define.
6078         (convert_value_from_python): Call value_cstring instead
6079         of value_from_string.
6080         * value.c (value_from_string): Remove.
6081         * value.h (value_from_string): Remove.
6082
6083         * eval.c (evaluate_subexp_standard): Pass character type to
6084         value_string.  Pass expression architecture to value_nsstring
6085         and lookup_child_selector.
6086         * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
6087         (lookup_child_selector): Likewise.
6088         (value_nsstring): Likewise.
6089         * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
6090         Pass character type to value_string..
6091         (lookup_child_selector): Likewise.
6092         (value_nsstring): Add GDBARCH parameter, use it instead of
6093         objfile architecture.  Pass architecture to lookup_objc_class
6094         and lookup_child_selector. Pass character type to value_string.
6095         (end_msglist): Pass architecture to lookup_objc_class.
6096         * objc-exp.y: Pass architecture to lookup_objc_class.
6097
6098 2009-06-17  Ulrich Weigand  <[email protected]>
6099
6100         * gdbtypes.h (struct language_defn): Add forward declaration.
6101         (lookup_typename): Add LANGUAGE and GDBARCH parameters.
6102         (lookup_unsigned_typename): Likewise.
6103         (lookup_signed_typename): Likewise.
6104         * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
6105         Use them instead of current_language and current_gdbarch.
6106         (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
6107         Pass them to lookup_typename.
6108         (lookup_signed_typename): Likewise.
6109
6110         * c-exp.y: Pass parse_language and parse_gdbarch to
6111         lookup_unsigned_typename and lookup_signed_typename.
6112         * objc-exp.y: Likewise.
6113         * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
6114
6115         * c-lang.c (evaluate_subexp_c): Pass expression language and
6116         gdbarch to lookup_typename.
6117         * printcmd.c (printf_command): Pass current language and
6118         gdbarch to lookup_typename.
6119         * python/python-type.c (typy_lookup_typename): Likewise.
6120         Include "language.h".
6121
6122 2009-06-17  Ulrich Weigand  <[email protected]>
6123
6124         * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
6125         Use it instead of current_gdbarch.  Pass architecture to
6126         sparc32_gregset_supplies_p.
6127         (sparc64_fpregset_supplies_p): Add GDBARCH parameter.  Use it instead
6128         of current_gdbarch.  Pass architecture to sparc32_fpregset_supplies_p.
6129         * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
6130         sparc64nbsd_fpregset_supplies_p): Likewise.
6131         * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
6132         Add GDBARCH parameter.
6133         (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
6134         (sparc_fetch_inferior_registers): Pass regcache architecture to
6135         sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
6136         (sparc_store_inferior_registers): Likewise.
6137         * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
6138         Add GDBARCH parameter.
6139         (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
6140
6141 2009-06-17  Ulrich Weigand  <[email protected]>
6142
6143         * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
6144         of current_gdbarch.
6145         * aix-thread.c (pd_enable): Likewise.
6146         * amd64-linux-nat.c (ps_get_thread_area): Likewise.
6147         * bsd-uthread.c (bsd_uthread_activate): Likewise.
6148         * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
6149         * linux-thread-db.c (enable_thread_event): Likewise.
6150         * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
6151         * nto-procfs.c (procfs_open): Likewise.
6152         * procfs.c (invalidate_cache, procfs_insert_watchpoint,
6153         info_proc_mappings, info_mappings_callback): Likewise.
6154         * record.c (record_open): Likewise.
6155         * rs6000-nat.c (ARCH64): Likewise.
6156         * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
6157         (darwin_bfd_open): Likewise.
6158         * memattr.c (mem_info_command): Likewise.
6159
6160         * windows-nat.c (win32_resume): Use current regcache architecture
6161         instead of current_gdbarch.
6162
6163         * dbug-rom.c (dbug_regname): Remove check against number of
6164         registers in current_gdbarch.
6165         * solib-pa64.c (read_dynamic_info): Remove unused variable.
6166
6167 2009-06-17  Ulrich Weigand  <[email protected]>
6168
6169         * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
6170         use it instead of current_gdbarch.
6171         * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
6172         * arm-tdep.c (arm_skip_prologue): Pass architecture to
6173         deprecated_pc_in_call_dummy.
6174
6175         * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
6176         Use it instead of current_gdbarch.
6177         * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
6178         * breakpoint.c (expand_line_sal_maybe): Pass architecture to
6179         skip_prologue_using_sal.
6180         * arm-tdep.c (skip_prologue_using_sal): Likewise.
6181         * lm32-tdep.c (lm32_skip_prologue): Likewise.
6182         * m32-tdep.c (m32c_skip_prologue): Likewise.
6183         * mips-tdep.c (mips_skip_prologue): Likewise.
6184         * moxie-tdep.c (moxie_skip_prologue): Likewise.
6185         * mt-tdep.c (mt_frame_unwind_cache): Likewise.
6186         * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
6187         * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
6188         it to skip_prologue_using_sal.  Update call sites ...
6189         (frv_skip_prologue, frv_frame_unwind_cache): ... here.
6190
6191         * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
6192         (check_for_saved): Use it instead of current_gdbarch.
6193         (mn10300_analyze_prologue): Set it.
6194
6195         * value.c (using_struct_return): Add GDBARCH parameter.  Use it
6196         instead of current_gdbarch.
6197         * value.h (using_struct_return): Add GDBARCH parameter.
6198         * eval.c (evaluate_subexp_standard): Pass architecture to
6199         using_struct_return.
6200         * infcall.c (call_function_by_hand): Likewise.
6201         * stack.c (return_command): Likewise.
6202         * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
6203
6204         * symtab.c (in_prologue): Add GDBARCH parameter.  Use it instead of
6205         current_gdbarch.
6206         * symtab.h (in_prologue): Add GDBARCH parameter.
6207         * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
6208
6209         * eval.c (evaluate_subexp_standard): Use expression architecture
6210         instead of current_gdbarch.
6211
6212         * c-lang.c (evaluate_subexp_c): Use expression architecture and
6213         language instead of current_gdbarch and current_language.
6214
6215         * printcmd.c (do_one_display): Use expression architecture instead
6216         of current_gdbarch.
6217
6218         * infcmd.c (print_return_value): Use architecture of stop_regcache
6219         instead of current_gdbarch.
6220         (print_vector_info, print_float_info): Remove GDBARCH argument,
6221         use frame architecture instead.
6222         (vector_info, float_info): Update calls.
6223
6224         * objc-lang.c (objc_skip_trampoline): Use frame architecture
6225         instead of current_gdbarch.
6226
6227         * parse.c (write_dollar_variable): Use parse architecture instead
6228         of current_gdbarch.
6229
6230         * source.c (line_info): Use objfile architecture instead of
6231         current_gdbarch.
6232
6233         * symtab.c (find_function_start_sal): Use gdbarch instead of
6234         current_gdbarch.
6235         (print_msymbol_info): Use objfile architecture instead of
6236         current_gdbarch.
6237
6238         * valops.c (value_assign): Use frame architecture instead of
6239         current_gdbarch.
6240
6241 2009-06-17  Ulrich Weigand  <[email protected]>
6242
6243         * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
6244
6245         * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
6246         calling record_line.
6247         (enter_linenos): Likewise.
6248         * dbxread.c (process_one_symbol): Likewise.
6249         * dwarf2read.c (dwarf_decode_lines): Likewise.
6250         * mdebugread.c (psymtab_to_symtab_1): Likewise.
6251         * xcoffread.c (enter_line_range): Likewise.
6252
6253 2009-06-17  Ulrich Weigand  <[email protected]>
6254
6255         * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
6256         architecture instead of current_gdbarch.
6257         (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
6258         (gen_expr): Pass expression to get_struct_ref.
6259
6260         * symtab.h (struct symbol_ops): Add GDBARCH parameter to
6261         tracepoint_var_ref callback.
6262         * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
6263         symbol operation callback.
6264         * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
6265         Use it instead of current_gdbarch.
6266         (locexpr_tracepoint_var_ref): Add GDBARCH parameter.  Pass it to
6267         dwarf2_tracepoint_var_ref.
6268         (loclist_tracepoint_var_ref): Likewise.
6269
6270 2009-06-17  Ulrich Weigand  <[email protected]>
6271
6272         * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
6273         Use it instead of address bits of current_gdbarch.
6274         * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
6275         * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
6276         make_pv_area.
6277         (arm_scan_prologue): Likewise.
6278         * m32c-tdep.c (m32c_analyze_prologue): Likewise.
6279         * mep-tdep.c (mep_analyze_prologue): Likewise.
6280         * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
6281         * s390-tdep.c (s390_analyze_prologue): Likewise.
6282
6283 2009-06-17  Ulrich Weigand  <[email protected]>
6284
6285         * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
6286         frame architecture instead of current_gdbarch.
6287         (mi_cmd_data_list_changed_registers): Likewise.
6288         (mi_cmd_data_list_register_values): Likewise.  Pass selected
6289         frame to get_register.
6290         (get_register): Add FRAME argument, use it as frame to retrieve
6291         registers from (instead of selected frame).  Use frame architecture
6292         instead of current_gdbarch.
6293         (mi_cmd_data_write_register_values): Use current regcache
6294         architecture instead of current_gdbarch.
6295
6296 2009-06-17  Ulrich Weigand  <[email protected]>
6297
6298         * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
6299         use frame architecture instead.  Replace current_gdbarch uses.
6300         (tui_show_registers): Update call.
6301         (tui_get_register): Remove GDBARCH parameter; use frame architecture
6302         instead.
6303         (tui_show_register_group): Update call.
6304         (tui_check_register_values): Likewise.
6305         (tui_register_format): Remove GDBARCH parameter; use frame
6306         architecture instead.  Replace current_gdbarch uses.
6307         (tui_get_register): Update call.
6308
6309 2009-06-17  Ulrich Weigand  <[email protected]>
6310
6311         * gdbarch.sh (construct_inferior_arguments): Remove.
6312         * gdbarch.c, gdbarch.h: Regenerate.
6313         * infcmd.c (get_inferior_args): Call construct_inferior_arguments
6314         directly instead of gdbarch_construct_inferior_arguments.
6315         (construct_inferior_arguments): Remove GDBARCH argument.
6316         * inferior.h (construct_inferior_arguments): Likewise.
6317
6318 2009-06-17  Ulrich Weigand  <[email protected]>
6319
6320         * symfile.c (section_is_mapped): Use objfile architecture instead
6321         of current_gdbarch.
6322         (TARGET_LONG_BYTES): Remove.
6323         (read_target_long_array): Add SIZE argument.  Use it instead of
6324         TARGET_LONG_BYTES.
6325         (simple_read_overlay_table): Retrieve long size from objfile
6326         architecture; pass it to read_target_long_array.
6327         (simple_read_overlay_region_table): Likewise.
6328         (simple_overlay_update_1): Likewise.
6329
6330 2009-06-17  Ulrich Weigand  <[email protected]>
6331
6332         * infrun.c (cleanup_displaced_step_closure): Remove.
6333         (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
6334         (displaced_step_prepare): Use displaced_step_clear_cleanup instead
6335         of cleanup_displaced_step_closure.
6336         (handle_inferior_event, keep_going): Use thread architecture instead
6337         of current_gdbarch.
6338
6339 2009-06-17  Ulrich Weigand  <[email protected]>
6340
6341         * infrun.c (handle_inferior_event): Use current frame architecture
6342         or thread architecture instead of current_gdbarch.  Pass to
6343         handle_step_into_function and handle_step_into_function_backward.
6344         (handle_step_into_function): Add GDBARCH parameter.  Use it instead
6345         of current_gdbarch.
6346         (handle_step_into_function_backward): Likewise.
6347         (insert_step_resume_breakpoint_at_frame): Use frame architecture
6348         instead of current_gdbarch.
6349         (insert_step_resume_breakpoint_at_caller): Likewise.
6350
6351 2009-06-17  Pierre Muller  <[email protected]>
6352         Pedro Alves  <[email protected]>
6353         
6354         * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
6355         is pushed for watchpoint promotion to hardware watchpoint.
6356
6357 2009-06-16  Paul Pluzhnikov  <[email protected]>
6358
6359         * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
6360         (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
6361         (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
6362         (dwarf_ranges_section, dwarf_frame_section)
6363         (dwarf_eh_frame_section): Removed.
6364         (dwarf2_resize_section): Likewise.
6365         (dwarf2_read_section): Now static, use bfd_mmap() if possible.
6366         (dwarf2_get_section_info): New function.
6367         (munmap_section_buffer): Likewise.
6368         (dwarf2_per_objfile_cleanup): Likewise.
6369         (section_is_p): Signature change.
6370         * dwarf2-frame.c (dwarf2_build_frame_info): Use
6371         dwarf2_get_section_info instead of dwarf2_read_section.
6372         
6373 2009-06-16  Paul Pluzhnikov  <[email protected]>
6374
6375         * solib.c (symbol_add_stub): New FLAGS parameter.
6376         (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
6377         directly.
6378         (solib_add): Defer breakpoint_re_set until after all solibs.
6379         * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
6380         * rs6000-nat.c (objfile_symbol_add): Adjust.
6381         * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
6382         (new_symfile_objfile): Likewise.
6383         (symbol_file_add_with_addrs_or_offsets): Likewise.
6384         (symbol_file_add_from_bfd): Likewise.
6385         (symbol_file_add): Likewise.
6386         * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
6387         * symfile-mem.c (symbol_file_add_from_memory): Adjust.
6388         * windows-nat.c (safe_symbol_file_add_stub): Adjust.
6389         * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
6390         
6391 2009-06-16  Keith Seitz  <[email protected]>
6392
6393         * linespec.c (collect_methods): Delete.
6394         (add_matching_methods): Reove destructor special case.
6395         (find_method): Call find_methods directly instead of
6396         collect_methods.
6397         * valops.c (value_struct_elt): Remove destructor
6398         special cases.
6399         (check_field): Likewise.
6400         (value_struct_elt_for_reference): Likewise.
6401         (destructor_name_p): Remove misleading comment about dtors
6402         being "special cases". 
6403         * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
6404         * gdbtypes.c (get_destructor_fn_field): Likewise. 
6405
6406 2009-06-16  Pedro Alves  <[email protected]>
6407
6408         * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
6409         TARGET_OJECT_MEMORY reads to the topmost target, not to the
6410         flattened current_target.
6411
6412 2009-06-16  Tristan Gingold  <[email protected]>
6413
6414         * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
6415         call_length field.
6416         (avr_register_name): Add const to register_names.
6417         (avr_scan_arg_moves): Move inside avr_scan_prologue.
6418         (avr_scan_prologue): Add pc_end argument.
6419         Only read prologue bytes that can be read.
6420         Limit the scan to the known prologue length.
6421         Makes pattern variables static and const.
6422         Fix indentation.
6423         (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
6424         Fix indentation.
6425         (avr_breakpoint_from_pc): Constify avr_break_insn.
6426         (avr_extract_return_value): Fix function comment.
6427         (avr_frame_unwind_cache): Fix GNU style violations.
6428         Pass current_pc argument to avr_scan_prologue to stop prologue
6429         analysis to the current pc.  This fixes the bug with the 'next'
6430         command.
6431         Correctly set the SP register of the previous frame (use call_length).
6432         (avr_frame_prev_register): Fix indentation.
6433         Correctly read PC from the stack on avr6 architectures.
6434         (avr_push_dummy_call): Fix indentation.
6435         (avr_gdbarch_init): Set call_length according to the architecture.
6436
6437 2009-06-15  Phil Muldoon  <[email protected]>
6438
6439         * infcall.c (show_unwind_on_terminating_exception_p): New
6440         function.
6441         (call_function_by_hand): Create breakpoint and clean-up call for
6442         std::terminate.breakpoint. Add unwind_on_terminating_exception_p
6443         gate. Pop frame on breakpoint hit.
6444         (_initialize_infcall): Add add_setshow_boolean_cmd for
6445         unwind-on-terminating-exception.
6446
6447 2009-06-12  Kevin Buettner  <[email protected]>
6448
6449         * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
6450         `has_section_at_zero' flag from stripped objfile to separate,
6451         debug info only, objfile.
6452
6453 2009-06-12  Pedro Alves  <[email protected]>
6454
6455         * exec.h (section_table_xfer_memory_partial): Improve description,
6456         mention SECTION_NAME.
6457         * exec.c (section_table_xfer_memory_partial): Remove stale
6458         description.
6459
6460 2009-06-11  Aleksandar Ristovski  <[email protected]>
6461
6462         * nto-tdep.h (nto_generic_supply_gpregset)
6463         (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
6464         * nto-tdep.c (nto_generic_supply_gpregset)
6465         (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
6466
6467 2009-06-11  Aleksandar Ristovski  <[email protected]>
6468
6469         * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
6470         (i386nto_sigcontext_addr): Change the way context address is calculated.
6471         (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
6472         sc_sp_offset and set sc_reg_offset and sc_num_regs.
6473
6474 2009-06-11  Aleksandar Ristovski  <[email protected]>
6475
6476         * i386-nto-tdep.c (i386_nto_target): Remove definition.
6477         (init_i386nto_ops): Use macros to set fields to global
6478         current_nto_target directly.
6479         (i386nto_init_abi): Remove unused nto_set_target call.
6480         * nto-tdep.h (nto_set_target): Remove unused declaration.
6481         * nto-tdep.c (nto_set_target): Remove unused function.
6482
6483 2009-06-11  Pedro Alves  <[email protected]>
6484
6485         * breakpoint.c (break_command_really): Rename local variable
6486         breakpoint_chain to bkpt_chain.
6487
6488 2009-06-11  Aleksandar Ristovski  <[email protected]>
6489
6490         Add support for XMM registers.
6491         * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
6492         (i386nto_register_area): Correctly calculate offsets and sizes for
6493         all supported registers.
6494
6495 2009-06-11  Tom Tromey  <[email protected]>
6496
6497         * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
6498         'static' from local variable definitions.
6499
6500 2009-06-11  Pedro Alves  <[email protected]>
6501
6502         * symtab.c (append_expanded_sal): Remove unused local variables.
6503
6504 2009-06-11  Pedro Alves  <[email protected]>
6505
6506         * infrun.c (sched_multi): New global.
6507         (resume): If sched_multi is set, resume only threads of the
6508         current inferior.
6509         (prepare_to_proceed): Don't switch over to wait_ptid if we're
6510         resuming a different inferior, and sched_multi is off.
6511         (show_schedule_multiple): New.
6512         (_initialize_infrun): Register new "set schedule-multiple" command.
6513         * inferior.h (sched_multi): Declare.
6514         * NEWS: Mention new "schedule-multiple" setting.
6515
6516 2009-06-11  Pedro Alves  <[email protected]>
6517
6518         * varobj.c (varobj_create): Properly restore the selected frame.
6519
6520 2009-06-05  Tom Tromey  <[email protected]>
6521
6522         * inferior.c (print_inferior): Make a table, not a list.  Emit
6523         table headers.
6524
6525 2009-06-10  Jonas Maebe  <[email protected]>
6526
6527         * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
6528         darwin_wait (blocking wait).
6529         (darwin_kill_inferior): Likewise.
6530
6531 2009-06-10  Pedro Alves  <[email protected]>
6532
6533         * infrun.c (handle_inferior_event): Update comment around trying
6534         to revert back to a stepping thread that has exited.
6535
6536 2009-06-10  Cary Coutant  <[email protected]>
6537
6538         * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
6539         DW_LNE_set_discriminator.
6540
6541 2009-06-10  Pierre Muller  <[email protected]>
6542
6543         * breakpoint.c: ARI fixes.
6544         (create_overlay_event_breakpoint): Avoid assignment inside if statement.
6545         (print_one_breakpoint_location): Likewise.
6546         (create_longjmp_breakpoint): Likewise.
6547         (tracepoint_save_command): Likewise
6548         (bpstat_find_step_resume_breakpoint): No operator at end of line.
6549         (bpstat_stop_status): Likewise.
6550         (describe_other_breakpoints): Likewise.
6551         (hw_watchpoint_used_count): Likewise.
6552         (expand_line_sal_maybe): Likewise.
6553         (break_command_really): Likewise.
6554         (delete_command): Likewise.
6555         (do_enable_breakpoint): Likewise.
6556         (delete_trace_command): Likewise.
6557         (catch_exception_command_1): Likewise and remove extra parentheses.
6558
6559 2009-06-08  Pierre Muller  <[email protected]>
6560
6561         * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
6562         "ubreak" command that does not exist.
6563
6564 2009-06-08  Pierre Muller  <[email protected]>
6565
6566         * cli/cli-decode.c (add_alias_cmd): Correct assertion.
6567
6568 2009-06-07  Pedro Alves  <[email protected]>
6569
6570         * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
6571
6572 2009-06-07  Pedro Alves  <[email protected]>
6573
6574         * procfs.h: New.
6575         * proc-utils.h (procfs_first_available): Don't declare here.
6576         * sol-thread.c: Include procfs.h instead of sys/procfs.h and
6577         proc-utils.h.
6578         * procfs.c: Include procfs.h.
6579         (procfs_target): Make it public.  Don't register
6580         procfs_can_use_hw_breakpoint here.
6581         (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
6582         defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
6583         (procfs_can_use_hw_breakpoint): Remove check of
6584         TARGET_HAS_HARDWARE_WATCHPOINTS.
6585         (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
6586         here.
6587         (_initialize_procfs): Don't add the procfs target here.
6588
6589         * i386-sol2-nat.c: Include target.h and procfs.h.
6590         (_initialize_amd64_sol2_nat): Install the procfs target here,
6591         customized with watchpoints support.
6592         * irix5-nat.c: Include target.h.
6593         (_initialize_core_irix5): Rename to ...
6594         (_initialize_irix5_nat): ... this.  Install the procfs target
6595         here, customized with watchpoints support.
6596         * alpha-nat.c: Include procfs.h.
6597         (_initialize_core_alpha): Rename to...
6598         (_initialize_alpha_nat): ... this.  Install the procfs target
6599         here, customized with watchpoints support.
6600         * sparc-sol2-nat.c: Include target.h and procfs.h.
6601         (_initialize_sparc_sol2_nat): New.
6602
6603         * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
6604         * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
6605         * config/mips/irix5.mh (NAT_FILE): Delete.
6606         * config/mips/irix6.mh (NAT_FILE): Delete.
6607         * config/mips/nm-irix5.h: Delete.
6608
6609 20009-06-07  Pedro  Alves  <[email protected]>
6610
6611         * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
6612         to enum target_object.  Cleanup comments.
6613         * auxv.h: Include "target.h".  Cleanup comments to not mention
6614         NATIVE_XFER_AUXV anymore.
6615
6616 2009-06-07  Pedro Alves  <[email protected]>
6617
6618         * inferior.h (procfs_first_available): Move declaration to...
6619         * proc-utils.h: ... here.
6620         * sol-thread.c: Include procfs.h and proc-utils.h.
6621
6622 2009-06-07  Pedro Alves  <[email protected]>
6623
6624         * inferior.h (proc_iterate_over_mappings): Delete declaration.
6625         * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
6626         * procfs.c (proc_iterate_over_mappings): Delete.
6627
6628 2009-06-07  Pedro Alves  <[email protected]>
6629
6630         * target.h (struct target_ops): Make to_has_all_memory,
6631         to_has_memory, to_has_stack, to_has_registers and to_has_execution
6632         methods instead of variables.
6633         (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
6634         (target_has_registers_1, target_has_execution_1): Declare
6635         functions.
6636         (target_has_all_memory): Rewrite to call target_has_all_memory_1.
6637         (target_has_memory): Rewrite to call target_has_memory_1.
6638         (target_has_stack): Rewrite to call target_has_all_stack_1.
6639         (target_has_registers): Rewrite to call target_has_registers_1.
6640         (target_has_execution): Rewrite to call target_has_execution_1.
6641         (default_child_has_all_memory, default_child_has_memory)
6642         (default_child_has_stack, default_child_has_registers)
6643         (default_child_has_execution): Declare.
6644         (target_mark_running, target_mark_exited): Delete declarations.
6645         * target.c (default_child_has_all_memory,
6646         default_child_has_memory, default_child_has_stack,
6647         default_child_has_registers, default_child_has_execution): New.
6648         (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
6649         target_has_registers_1, target_has_execution_1): New.
6650         (add_target): Default the to_has_all_memory, to_has_all_memory,
6651         to_has_memory, to_has_stack, to_has_registers and to_has_execution
6652         callbacks to return 0.
6653         (update_current_target): Do not inherit to_has_all_memory,
6654         to_has_memory, to_has_stack, to_has_registers or to_has_execution.
6655         (target_mark_running, target_mark_exited): Delete.
6656         (memory_xfer_partial): Adjust.
6657         (target_read_memory, target_write_memory, target_search_memory):
6658         Dispatch to the the top-most target, not the flattened
6659         current_target.
6660         (target_info): Adjust.
6661         (init_dummy_target): Install return_zero as callback for
6662         to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
6663         to_has_execution.
6664         (set_maintenance_target_async_permitted): Use have_live_inferiors
6665         instead of target_has_execution.
6666         * target-memory.c (target_write_memory_blocks): Dispatch memory
6667         writes to the the top-most target, not the flattened
6668         current_target.
6669
6670         * breakpoint.c (insert_breakpoints): Don't check for
6671         target_has_execution here.
6672         (update_global_location_list): Check if there are live inferiors
6673         to debug instead of target_has_execution.
6674         * infcmd.c (kill_command, detach_command): Check if there are
6675         inferiors instead of target_has_execution.
6676         * inferior.h (have_live_inferiors): Declare.
6677         * inferior.c (have_live_inferiors): New.
6678         * infrun.c (normal_stop): Don't check for target_has_execution to
6679         finish the thread states.
6680         * thread.c (is_thread_state, is_stopped, is_exited, is_running)
6681         (any_running, is_executing): Remove checks for
6682         target_has_execution.
6683         * top.c (kill_or_detach): Don't try to kill core inferiors.
6684         (quit_target): Don't check for target_has_execution.
6685
6686         * corelow.c (core_has_memory, core_has_stack, core_has_registers):
6687         New.
6688         (init_core_ops): Install core_has_memory, core_has_stack and
6689         core_has_registers.
6690         * exec.c (exec_has_memory): New.
6691         (init_exec_ops): Install exec_has_memory.
6692         * remote.c (remote_add_inferior): Don't call target_mark_running.
6693         (remote_start_remote): Don't call target_mark_exited or call
6694         target_mark_running.
6695         (remote_open_1): Use have_inferiors instead of
6696         target_has_execution.  Don't use target_mark_exited.
6697         (init_remote_ops): Install deafult_child_has_all_memory,
6698         default_child_has_memory, default_child_has_stack,
6699         default_child_has_registers, default_child_has_execution.
6700         * bsd-kvm.c (bsd_kvm_return_one): New.
6701         (bsd_kvm_add_target): Register bsd_kvm_return_one as
6702         to_has_memory, to_has_stack and to_has_registers callbacks.
6703         * remote-m32r-sdi.c (m32r_return_one): New.
6704         (init_m32r_ops): Register it.
6705         * inf-child.c (inf_child_target): Adjust to register
6706         default_child_has_all_memory, default_child_has_memory,
6707         default_child_has_stack, default_child_has_registers,
6708         default_child_has_execution callbacks.
6709         * gnu-nat.c (init_gnu_ops): Likewise.
6710         * go32-nat.c (init_go32_ops): Likewise.
6711         * hpux-thread.c (init_hpux_thread_ops): Likewise.
6712         * monitor.c (init_base_monitor_ops): Likewise.
6713         * nto-procfs.c (init_procfs_ops): Likewise.
6714         * remote-mips.c (_initialize_remote_mips): Likewise.
6715         * windows-nat.c (init_windows_ops): Likewise.
6716         * remote-sim.c (gdbsim_create_inferior): Don't use
6717         target_mark_running or target_mark_exited.
6718         (gdbsim_mourn_inferior): Don't call target_mark_exited.
6719         (init_gdbsim_ops): Adjust to register
6720         default_child_has_all_memory, default_child_has_memory,
6721         default_child_has_stack, default_child_has_registers,
6722         default_child_has_execution callbacks.
6723
6724         * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
6725         there's no inferior selected, defer to a lower stratum.
6726
6727 2009-06-05  Tom Tromey  <[email protected]>
6728
6729         * varobj.c (update_dynamic_varobj_children): Wrap error text in
6730         _().
6731         (install_visualizer): Likewise.
6732         (varobj_set_visualizer): Likewise.
6733
6734 2009-06-05  Marc Khouzam  <[email protected]>
6735
6736         * mi/mi-main.c (mi_cmd_exec_continue)
6737         (mi_cmd_exec_interrupt): Adjust parsing of thread group
6738         ids to current reality, where they don't have any 'p' prefix.
6739
6740 2009-06-05  Aleksandar Ristovski  <[email protected]>
6741
6742         * corelow.c (core_open): Check for core_gdbarch before calling
6743         gdbarch_target_signal_from_host.
6744
6745 2009-06-05  Tom Tromey  <[email protected]>
6746
6747         * c-exp.y (parse_number): Don't use K&R definition.
6748         (yylex): Likewise.
6749         (yyerror): Likewise.
6750
6751 2009-06-04  Jan Kratochvil  <[email protected]>
6752
6753         * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
6754
6755 2009-06-04  Ulrich Weigand  <[email protected]>
6756
6757         * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
6758         * ax-gdb.c (gen_var_ref): Likewise.
6759         * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
6760         * printcmd.c (address_info): Likewise.
6761         * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
6762         * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
6763         * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
6764         * dwarf2loc.h: Likewise.
6765         * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
6766
6767         * symtab.h: (struct symbol_register_ops): New struct definition.
6768         (struct symbol): Make "ops" member a union of symbol_computed_ops and
6769         symbol_register_ops callback pointers.
6770         (SYMBOL_REGISTER_OPS): New macro.
6771         * tracepoint.c: Include "objfiles.h".
6772         (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
6773         callback to retrieve register numbers.
6774         * ax-gdb.c (gen_var_ref): Likewise.
6775         * findvar.c (read_var_value): Likewise.
6776         * printcmd.c (address_info): Likewise.
6777
6778         * coffread.c (coff_reg_to_regnum): New function.
6779         (coff_register_funcs): New static variable.
6780         (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
6781         Install SYMBOL_REGISTER_OPS callbacks.
6782         * mdebugread.c (mdebug_reg_to_regnum): New function.
6783         (mdebug_register_funcs): New static variable.
6784         (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
6785         Install SYMBOL_REGISTER_OPS callbacks.
6786         * stabsread.c (stab_reg_to_regnum): New function.
6787         (stab_register_funcs): New static variable.
6788         (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
6789         Install SYMBOL_REGISTER_OPS callbacks.
6790
6791 2009-06-03  Doug Evans  <[email protected]>
6792
6793         * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
6794         after discarding its contents.
6795
6796 2009-06-03  Pedro Alves  <[email protected]>
6797
6798         * target.c: Include "exec.h".
6799         (update_current_target): Don't inherit to_sections or
6800         to_sections_end.
6801         (target_get_section_table): New.
6802         (target_section_by_addr): Fetch the section table from the passed
6803         in target.
6804         (memory_xfer_partial): Handle unmapped overlay sections before
6805         anything else.  Get the overlay mapped address here.  Adjust to
6806         use section_table_xfer_memory_partial.
6807         (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
6808         instead of TARGET_OBJECT_MEMORY.
6809         (target_resize_to_sections): Delete.
6810         (remove_target_sections): Adjust to remove target sections from
6811         `current_target_sections', and use resize_section_table.
6812         * target.h (struct target_ops) <to_sections, to_sections_end>:
6813         Remove fields.
6814         <to_get_section_table>: New method.
6815         (xfer_memory, print_section_info): Delete declarations.
6816         (struct target_section_table): New type.
6817         (target_get_section_table): Declare.
6818         (target_resize_to_sections): Delete declaration.
6819         (remove_target_sections): Delete declaration.
6820         * bfd-target.c (target_bfd_xfer_partial): Get the section table
6821         from to_data.
6822         (target_bfd_get_section_table): New.
6823         (target_bfd_xclose): Adjust.
6824         (target_bfd_reopen): Store the section table in the to_data field.
6825         * corelow.c (core_data): New.
6826         (core_close): Adjust to release core_data and its sections.
6827         (core_open): Allocate core_data, and build its target sections
6828         table.
6829         (deprecated_core_resize_section_table): New.
6830         (core_files_info): Pass core_data to print_section_info.
6831         (core_xfer_partial): Adjust to use
6832         section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
6833         (init_core_ops): Do not install a deprecated_xfer_memory callback
6834         anymore.
6835         * solib.c (update_solib_list): Add the shared library sections
6836         to the current target sections table.
6837         * exec.c (current_target_sections_1): New global.
6838         (current_target_sections): New global.
6839         (exec_close_1): New function, refactored from exec_close.  Remove
6840         the exec_bfd's sections from the current target sections table.
6841         Adjust to not use to_sections.
6842         (exec_close): Remove all target sections.  Call exec_close_1.
6843         (exec_file_clear): Use exec_close_1 instead of unpushing the
6844         target.
6845         (exec_file_attach): Likewise.  Adjust to not use to_sections.  Add
6846         exec_bfd's sections to the current target sections table.  Don't
6847         push the exec_ops target here.
6848         (resize_section_table): New.
6849         (add_target_sections): New.
6850         (remove_target_sections): Moved here.
6851         (section_table_xfer_memory): Adjust to implement the xfer_partial
6852         interface, and rename to...
6853         (section_table_xfer_memory_partial): ... this, replacing the
6854         current function of that same name.
6855         (exec_get_section_table): New.
6856         (exec_xfer_partial): New.
6857         (xfer_memory): Delete.
6858         (print_section_info): Replace the target_ops parameter by a
6859         target_section_table parameter.
6860         (exec_files_info, set_section_command, exec_set_section_address):
6861         Adjust to use the current sections table.
6862         (init_exec_ops): Do not register a deprecated_xfer_memory
6863         callback.  Register to_xfer_partial and to_get_section_table
6864         callbacks.
6865         * infrun.c (handle_inferior_event): Update comments around
6866         solib_add.
6867         * rs6000-nat.c (xcoff_relocate_core): Adjust to use
6868         deprecated_core_resize_section_table.
6869         * exec.h (resize_section_table): Declare.
6870         (section_table_xfer_memory_partial): Add const char * argument.
6871         (remove_target_sections): Declare here.
6872         (add_target_sections): Declare.
6873         (print_section_info): Declare here.
6874         * gdbcore.h (deprecated_core_resize_section_table): Declare.
6875
6876 2009-06-03  Ulrich Weigand  <[email protected]>
6877
6878         * value.h (struct internalvar): Remove.
6879         (get_internalvar_integer): Add prototype.
6880         (set_internalvar_integer): Add prototype.
6881         (clear_internalvar): Add prototype.
6882
6883         * value.c (struct internalvar): Move here.  Add type member.  Remove
6884         endian member.  Add union_internalvar member instead of value member.
6885         (init_if_undefined_command): Use intvar->type.
6886         (create_internalvar): Do not initialize value/endian, but type.
6887         (create_internalvar_type_lazy): Call create_internalvar.
6888         (value_of_internalvar): Handle host-side internalvar contents.
6889         (set_internalvar_component): Likewise.
6890         (set_internalvar): Likewise.
6891         (get_internalvar_integer): New function.
6892         (clear_internalvar): Likewise.
6893         (set_internalvar_integer): Likewise.
6894         (preserve_values): Handle host-side internalvar contents.
6895
6896         * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
6897         set_internalvar_integer instead of set_internalvar.
6898         * findcmd.c (find_command): Likewise.
6899         * infrun.c (handle_inferior_event): Likewise.
6900         * source.c (forward_search_command, reverse_search_command): Likewise.
6901         * tracepoint.c (set_traceframe_num, set_tracepoint_num,
6902         set_traceframe_context): Likewise.
6903
6904         * printcmd.c (x_command): Call clear_internalvar instead of
6905         set_internalvar.
6906         * tracepoint.c (set_traceframe_context): Likewise.
6907         
6908         * breakpoint.c (get_number_trailer): Call get_internalvar_integer
6909         instead of value_of_internalvar.
6910         * linespec.c (decode_dollar): Likewise.
6911
6912         * expprint.c (dump_subexp_body_standard): Use internalvar_name
6913         instead of accessing internalvar private elements.
6914         * valops.c (value_assign): Copy from original source instead of
6915         accessing internalvar private elements.
6916
6917 2009-06-03  Ulrich Weigand  <[email protected]>
6918
6919         * scm-lang.c (builtin_type_scm): Remove.
6920         (scm_lookup_name): Add GDBARCH parameter.  Use it instead of
6921         objfile architecture.  Use per-architecture builtin_scm_type instead
6922         of builtin_type_scm.
6923         (evaluate_exp): Pass expression architecture to scm_lookup_name.
6924
6925         (scm_get_field): Add SIZE parameter.  Use it instead of 
6926         TYPE_LENGTH (builtin_type_scm).
6927
6928         (build_scm_types): New function.
6929         (scm_type_data): New variable.
6930         (builtin_scm_type): New function.
6931         (_initialize_scheme_language): Do not initialize builtin_type_scm.
6932         Register build_scm_types as post-init function for scm_type_data.
6933
6934         * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
6935         instead of builtin_type_scm.
6936
6937         * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
6938         (scm_get_field): Add SIZE paramter.
6939         (scm_scmval_print): Remove prototype.
6940         (builtin_type_scm): Remove.
6941         (struct builtin_scm_type): Add structure definition.
6942         (builtin_scm_type): Add prototype.
6943
6944         * scm-valprint.c (scm_inferior_print): Add TYPE parameter.  Use it
6945         instead of builtin_core_addr type; do not use objfile architecture.
6946         (scm_scmlist_print): Add TYPE parameter.  Use it to define SCM_SIZE.
6947         Pass type to scm_scmval_print.
6948         (scm_ipruk): Add TYPE parameter.  Use it to define SCM_SIZE.
6949         (scm_scmval_print): Make static.  Add TYPE parameter.  Use it to
6950         define SCM_SIZE.  Pass type to scm_ipruk and scm_scmlist_print.
6951         (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
6952
6953 2009-06-03  Ulrich Weigand  <[email protected]>
6954
6955         * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
6956         mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
6957         mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
6958         mdebug_type_unsigned_char, mdebug_type_unsigned_short,
6959         mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
6960         mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
6961         mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
6962         mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
6963         mdebug_type_complex, mdebug_type_double_complex,
6964         mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
6965         Remove.
6966
6967         (basic_type_data): New global variable.
6968         (basic_type): New function.
6969         (parse_type): Remove static basic type map map_bt.  Call basic_type
6970         to get basic types instead of using mdebug_type_ variables.
6971
6972         (parse_symbol): Use builtin types instead of mdebug_type_ variables.
6973         (upgrade_type): Likewise.
6974         (parse_procedure): Likewise.
6975         (psymtab_to_symtab_1): Likewise.
6976
6977         (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
6978         Initialize basic_type_data.
6979
6980 2009-06-03  Ulrich Weigand  <[email protected]>
6981
6982         * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
6983         * dfp.c (promote_decimal): Remove.
6984         (decimal_binop): Convert LEN_RESULT to input parameter.
6985         Remove call to decimal_binop.
6986         (decimal_compare): Remove call to decimal_binop.
6987
6988         * valarith.c (value_binop): Pass desired result type length
6989         to decimal_binop.
6990
6991 2009-06-01  Tristan Gingold  <[email protected]>
6992
6993         * configure.tgt (avr): Set gdb_sim to use the simulator.
6994
6995 2009-05-29  Doug Evans  <[email protected]>
6996
6997         * infrun.c (prepare_to_proceed): Document.  Assert !non_stop.
6998         If scheduler-locking is enabled, we're not going to be singlestepping
6999         any other previously stopped thread.
7000
7001 2009-05-29  Pedro Alves  <[email protected]>
7002
7003         * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
7004
7005 2009-05-29  Eli Zaretskii  <[email protected]>
7006
7007         * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
7008         for stabs and COFF debug info.
7009
7010 2009-05-28  Pedro Alves  <[email protected]>
7011
7012         * infrun.c (handle_inferior_event): When thread hoping, switch
7013         inferior_ptid to the event thread before removing breakpoints from
7014         the target.  If not stopping, also try to revert back to a thread
7015         that was doing a "next".  Check if that thread still exists before
7016         resuming.
7017         (currently_stepping_thread): Delete and merge with ...
7018         (currently_stepping): ... this.
7019         (currently_stepping_callback): Rename to ...
7020         (currently_stepping_or_nexting_callback): ... this, and also
7021         return true if the thread was stepping over a call (has a
7022         step-resume breakpoint).
7023
7024 2009-05-28  Tom Tromey  <[email protected]>
7025
7026         * python/python.c (gdbpy_parameter): Rename.  Fix error message.
7027         (GdbMethods): Change "get_parameter" to "parameter".
7028
7029 2009-05-28  Pierre Muller  <[email protected]>
7030             Paul Pluzhnikov  <[email protected]>
7031
7032         * configure.ac (!have_libpython): Add python-prettyprint source
7033         and object files.
7034         * configure: Regenerate.
7035         * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
7036         python headers.
7037         
7038 2009-05-27  Vladimir Prus  <[email protected]>
7039             Tom Tromey  <[email protected]>
7040             Thiago Jung Bauermann  <[email protected]>
7041
7042         * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
7043         * varobj.h (varobj_set_visualizer): Declare.
7044         (varobj_get_display_hint): Likewise.
7045         (varobj_update_result_t) <children_changed, value_installed>: New
7046         fields.
7047         * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
7048         * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
7049         mi_cmd_var_set_child_range): Declare.
7050         * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
7051         (mi_cmd_var_list_children): Emit display hint.
7052         (varobj_update_one): Emit display hint.  Handle dynamic children.
7053         * python/python.c (GdbMethods): Add "default_visualizer".
7054         * python/python-internal.h (apply_varobj_pretty_printer,
7055         gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
7056         Declare.
7057         (gdbpy_default_visualizer): Likewise.
7058         * varobj.c: Include python.h, python-internal.h.
7059         (PyObject): New typedef.
7060         (struct varobj) <children_requested, pretty_printer>: New fields.
7061         (varobj_create): Call install_default_visualizer.
7062         (instantiate_pretty_printer): New function.
7063         (varobj_set_display_format): Update.
7064         (varobj_get_display_hint): New function.
7065         (update_dynamic_varobj_children): New function.
7066         (varobj_get_num_children): Handle dynamic children.
7067         (varobj_list_children): Likewise.
7068         (install_new_value): Likewise.
7069         (varobj_add_child): New function.
7070         (install_visualizer): Likewise.
7071         (install_default_visualizer): Likewise.
7072         (varobj_set_visualizer): Likewise.
7073         (varobj_update): Handle dynamic children.
7074         (create_child): Use create_child_with_value.
7075         (create_child_with_value): New function.
7076         (value_get_print_value): Call pretty printer.  Add value_formatter
7077         argument.
7078         (c_value_of_variable): Update.
7079         (varobj_invalidate): Always free all_rootvarobj.
7080         * python/python-prettyprint.c (apply_varobj_pretty_printer): New
7081         function.
7082         (gdbpy_get_varobj_pretty_printer): Likewise.
7083         (gdbpy_default_visualizer): Likewise.
7084
7085 2009-05-27  Tom Tromey  <[email protected]>
7086             Thiago Jung Bauermann  <[email protected]>
7087             Phil Muldoon  <[email protected]>
7088             Paul Pluzhnikov  <[email protected]>
7089             Vladimir Prus  <[email protected]>
7090
7091         * python/python-value.c (value_object_to_value): New function.
7092         * python/python-internal.h: Include frameobject.h.
7093         (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
7094         Declare.
7095         (value_object_to_value): Declare.
7096         * printcmd.c (struct format_data) <raw>: New field.
7097         (last_format): Default to 0.
7098         (decode_format): Initialize val.raw.  Handle /r flag.
7099         (print_command_1): Initialize fmt.raw and opts.raw.
7100         (output_command): Likewise.
7101         (x_command): Fix initialization of fmt.format.  Initialize
7102         fmt.raw.
7103         (display_command): Initialize fmt.raw.
7104         (do_one_display): Set opts.raw.
7105         * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
7106         gdbpy_display_hint_cst): New globals.
7107         (_initialize_python): Initialize them.  Set gdb.pretty_printers.
7108         * cp-valprint.c: Include python.h.
7109         (cp_print_value): Call apply_val_pretty_printer.
7110         * python/python.h (apply_val_pretty_printer): Declare.
7111         * stack.c (print_this_frame_argument_p): Remove.
7112         (print_frame_args): Compute summary flag.  Don't use
7113         print_this_frame_argument_p.
7114         * valprint.c: Include python.h.
7115         (user_print_options): Initialize new fields.
7116         (scalar_type_p): New function.
7117         (val_print): Handle 'raw' and 'summary' modes.  Call
7118         apply_val_pretty_printer.
7119         (value_print): Handle 'raw' mode.
7120         * valprint.h (struct value_print_options) <raw, summary>: New
7121         fields.
7122         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
7123         (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
7124         (python-prettyprint.o): New target.
7125         * python/python-prettyprint.c: New file.
7126
7127 2009-05-27  Tom Tromey  <[email protected]>
7128             Paul Pluzhnikov  <[email protected]>
7129
7130         * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
7131         value_address.
7132         * cli/cli-dump.c (dump_value_to_file): Use value_address.
7133         * valprint.c (common_val_print): Likewise.
7134         * v850-tdep.c (v850_push_dummy_call): Use value_address.
7135         * tracepoint.c (encode_actions): Use value_address.
7136         * printcmd.c (print_formatted): Use value_address.
7137         (x_command): Likewise.
7138         * p-valprint.c (pascal_object_print_static_field): Use
7139         value_address.
7140         * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
7141         * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
7142         * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
7143         * jv-valprint.c (java_value_print): Use value_address.
7144         * infcall.c (find_function_addr): Use value_address.
7145         * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
7146         * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
7147         * frv-tdep.c (frv_push_dummy_call): Use value_address.
7148         * frame.c (frame_register_unwind): Use value_address.
7149         (frame_unwind_register_value): Likewise.
7150         * darwin-nat-info.c (info_mach_region_command): Use
7151         value_address.
7152         * cp-valprint.c (cp_print_static_field): Use value_address.
7153         * c-valprint.c (c_value_print): Use value_address.
7154         * breakpoint.c (update_watchpoint): Use value_address.
7155         (can_use_hardware_watchpoint): Likewise.
7156         * ada-valprint.c (ada_val_print_1): Use value_address.
7157         (ada_value_print): Likewise.
7158         * ada-tasks.c (read_fat_string_value): Use value_address.
7159         * jv-lang.c (java_link_class_type): Use set_value_address.
7160         (java_link_class_type): Likewise.
7161         (get_java_utf8_name): Use value_address.
7162         (type_from_class): Likewise.
7163         (java_link_class_type): Likewise.
7164         * findvar.c (value_of_register): Use set_value_address.
7165         (read_var_value): Likewise.
7166         (read_var_value): Likewise.
7167         * eval.c (evaluate_subexp_standard): Use set_value_address.
7168         (evaluate_subexp_standard): Use value_address.
7169         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
7170         * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
7171         (ada_value_primitive_packed_val): Likewise.
7172         (ensure_lval): Likewise.
7173         (thin_data_pntr): Use value_address.
7174         (desc_bounds): Likewise.
7175         (ada_value_primitive_packed_val): Likewise.
7176         (value_assign_to_component): Likewise.
7177         (ensure_lval): Likewise.
7178         (make_array_descriptor): Likewise.
7179         (ada_to_fixed_value): Likewise.
7180         (unwrap_value): Likewise.
7181         * value.c (deprecated_value_address_hack): Remove.
7182         (value_address): New function.
7183         (value_raw_address): Likewise.
7184         (set_value_address): Likewise.
7185         (value_fn_field): Use set_value_address.
7186         (value_from_contents_and_address): Likewise.
7187         (value_fn_field): Likewise.
7188         (allocate_value_lazy): Don't use VALUE_ADDRESS.
7189         (value_as_address): Use value_address.
7190         (value_static_field): Likewise.
7191         * valops.c (search_struct_field): Use set_value_address.
7192         (value_at): Likewise.
7193         (value_at_lazy): Likewise.
7194         (value_repeat): Likewise.
7195         (value_cast_structs): Use value_address.
7196         (value_cast): Likewise.
7197         (value_fetch_lazy): Likewise.
7198         (value_assign): Likewise.
7199         (value_repeat): Likewise.
7200         (address_of_variable): Likewise.
7201         (value_coerce_array): Likewise.
7202         (value_coerce_function): Likewise.
7203         (value_addr): Likewise.
7204         (search_struct_field): Likewise.
7205         (search_struct_method): Likewise.
7206         (find_method_list): Likewise.
7207         (value_struct_elt_for_reference): Likewise.
7208         (value_full_object): Likewise.
7209         * jv-valprint.c (java_value_print): Use set_value_address.
7210         * value.h (deprecated_value_address_hack): Remove.
7211         (VALUE_ADDRESS): Remove.
7212         (value_address): Declare.
7213         (value_raw_address): Declare.
7214         (set_value_address): Declare.
7215
7216 2009-05-27  Tom Tromey  <[email protected]>
7217             Thiago Jung Bauermann  <[email protected]>
7218             Phil Muldoon  <[email protected]>
7219             Paul Pluzhnikov  <[email protected]>
7220
7221         * python/python.c (_initialize_python): Call
7222         gdbpy_initialize_types.
7223         (GdbMethods): Add "lookup_type".
7224         * python/python-value.c (value_object) <type>: New field.
7225         (valpy_dealloc): Decref type.
7226         (valpy_new): Initialize type.
7227         (valpy_get_type): New function.
7228         (value_to_value_object): Initialize type.
7229         (valpy_cast): New function.
7230         (value_object_getset): Add "type".
7231         (value_object_methods): Add "cast".
7232         * python/python-internal.h (type_to_type_object): Declare.
7233         (type_object_to_type): Likewise.
7234         (gdbpy_initialize_types): Likewise.
7235         (gdbpy_lookup_type): Declare.
7236         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
7237         (SUBDIR_PYTHON_SRCS): Add python-type.c.
7238         (python-type.o): New target.
7239         * python/python-type.c: New file.
7240
7241 2009-05-27  Tom Tromey  <[email protected]>
7242             Thiago Jung Bauermann  <[email protected]>
7243             Phil Muldoon  <[email protected]>
7244
7245         * python/python.c: Include objfiles.h, observer.h.
7246         (gdbpy_auto_load): New global.
7247         (gdbpy_current_objfile): Likewise.
7248         (GDBPY_AUTO_FILENAME): New define.
7249         (gdbpy_new_objfile): New function.
7250         (gdbpy_get_current_objfile): Likewise.
7251         (gdbpy_objfiles): Likewise.
7252         (_initialize_python): Add "maint set auto-load".  Call
7253         gdbpy_initialize_objfile.  Attach objfile observer.
7254         (GdbMethods): New methods current_objfile, objfiles.
7255         * python/python-objfile.c: New file.
7256         * python/python-internal.h (objfile_to_objfile_object): Declare.
7257         (objfpy_get_printers): Likewise.
7258         (gdbpy_initialize_objfile): Likewise.
7259         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
7260         (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
7261         (python-objfile.o): New target.
7262
7263 2009-05-27  Pedro Alves  <[email protected]>
7264
7265         * infrun.c (follow_exec): Clear the stop_requested flag.
7266         * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
7267         Add debug output.
7268
7269 2009-05-27  Aleksandar Ristovski  <[email protected]>
7270
7271         * nto-procfs.c (get_regset): Pass correct pointer.
7272
7273 2009-05-26  Doug Evans  <[email protected]>
7274
7275         * dwarf2read.c (follow_die_ref): Add comment.
7276         (dwarf2_mark_helper): Tweak comment.
7277         (dwarf2_mark): Move description to its proper place.
7278
7279 2009-05-25  Pierre Muller  <[email protected]>
7280
7281         * procfs.c (procfs_wait): Add options parameter.
7282
7283 2009-05-24  Doug Evans  <[email protected]>
7284
7285         Global renaming of find_thread_pid to find_thread_ptid.
7286         * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
7287         * thread.c (find_thread_ptid): Renamed from find_thread_pid.
7288         All callers updated.
7289
7290         * infrun.c (follow_fork): Initialize new step_* locals
7291         to avoid "may be used uninitialized" warnings.
7292
7293 2009-05-24  Pedro Alves  <[email protected]>
7294
7295         * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
7296
7297 2009-05-24  Pedro Alves  <[email protected]>
7298
7299         * gdbthread.h (struct thread_info): New `pending_follow' field.
7300         * thread.c (new_thread): New function.
7301         (add_thread_silent): Use it.
7302         * breakpoint.c (internal_breakpoint_number): New global, moved
7303         from inside...
7304         (create_internal_breakpoint): ... this.
7305         (clone_momentary_breakpoint): New.
7306         * breakpoint.h (clone_momentary_breakpoint): Declare.
7307         * infrun.c (nullify_last_target_wait_ptid): Move declaration
7308         higher.
7309         (pending_follow): Delete.
7310         (follow_fork): Handle pending follow fork event here.  Moved the
7311         preserving of thread stepping state here.
7312         (resume): Don't handle pending follow fork events here.  Only
7313         install the inferior's terminal modes if we're about to resume it.
7314         (proceed): Handle possible pending follow fork events here.
7315         (init_wait_for_inferior): No need to clear pending_follow anymore,
7316         it's gone.
7317         (handle_inferior_event): Adjust to per-thread `pending_follow'.
7318         Call `follow_fork' to handle following the fork.  If the
7319         follow-fork is cancelled, stop stepping.
7320         * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
7321         `pending_follow' events.  Remove code that handled preserving the
7322         thread stepping state.
7323         * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
7324         * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
7325
7326 2009-05-24  Pierre Muller  <[email protected]>
7327
7328         * symfile.c (add_shared_symbol_files_command): Remove
7329         prototype and function.
7330         (_initialize _symfile): Move "add-shared-symbol-files"
7331         command and "assf" alias.
7332         * windows-nat.c (_initialize_windows_nat): to here.
7333         Change "add-shared-symbol-files" to alias.
7334         
7335         * config/i386/cygwin.mh: Remove NAT_FILE.
7336         * config/i386/mingw.mh: Remove NAT_FILE.
7337         * config/i386/mingw64.mh: Remove NAT_FILE.
7338         * config/i386/nm-cygwin.h: Remove file.
7339         * config/i386/nm-cygwin64.h: Remove file.
7340
7341 2009-05-24  Hui Zhu  <[email protected]>
7342
7343         * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
7344         I386_LINUX_RECORD_IOCTL_*,
7345         I386_LINUX_RECORD_FCNTL_*) Removed.
7346         (i386_linux_init_abi): Change size of record from macros to
7347         numbers.
7348
7349 2009-05-24  Hui Zhu  <[email protected]>
7350
7351         * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
7352         * linux-record.c (record_linux_system_call): Ditto.
7353         * linux-record.h (linux_record_tdep): Ditto.
7354
7355 2009-05-23  Jan Kratochvil  <[email protected]>
7356
7357         Replace the savestring calls by xstrdup calls where possible.
7358         * breakpoint.c (condition_command, set_raw_breakpoint)
7359         (create_catchpoint, update_breakpoint_locations): Replace the
7360         savestring calls by xstrdup calls where possible.
7361         * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
7362         (record_producer): Likewise.
7363         * coffread.c (coff_start_symtab, complete_symtab): Likewise.
7364         * corefile.c (set_gnutarget): Likewise.
7365         * dbxread.c (add_new_header_file): Likewise.
7366         * demangle.c (set_demangling_command, set_demangling_style): Likewise.
7367         * event-top.c (push_prompt, pop_prompt, command_line_handler)
7368         (set_async_prompt): Likewise.
7369         * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
7370         Likewise.
7371         * language.c (set_language_command, _initialize_language): Likewise.
7372         * linespec.c (decode_line_2): Likewise.
7373         * rs6000-nat.c (add_vmap): Likewise.
7374         * top.c (set_prompt, init_history, init_main): Likewise.
7375         * tracepoint.c (stringify_collection_list): Likewise.
7376         * varobj.c (varobj_create): Remove variable expr_len.  Replace the 
7377         savestring calls by xstrdup calls where possible.
7378         (value_of_root, c_name_of_variable, c_describe_child): Replace the
7379         savestring calls by xstrdup calls where possible.
7380         * xcoffread.c (complete_symtab): Likewise.
7381         * cli/cli-script.c (build_command_line, define_command): Likewise.
7382         * cli/cli-setshow.c (do_setshow_command): Likewise.
7383
7384 2009-05-23  Jan Kratochvil  <[email protected]>
7385
7386         Remove already unreachable code.
7387         * varobj.c (varobj_get_handle): Fix comment when error is called.
7388         All callers updated.
7389
7390 2009-05-23  Eli Zaretskii  <[email protected]>
7391
7392         * README (`configure' options): Document GDB-specific options to
7393         `configure'.
7394
7395         * symtab.c (skip_prologue_using_lineinfo): New function.
7396         (find_function_start_sal): Use it to get to the first line of
7397         function's body that has an entry in the lineinfo table.
7398
7399         * symmisc.c (dump_symtab): Switch the current language to
7400         the language of the symtab we are dumping only if the symtab's
7401         language is neither language_auto nor language_unknown.
7402
7403         * coffread.c (coff_symtab_read): Set language_minimal as the
7404         language for the "_globals_" pseudo-file.
7405         (process_coff_symbol): Set the symbol's language to the language
7406         of current_subfile.
7407
7408 2009-05-22  Pedro Alves  <[email protected]>
7409
7410         * target.h (struct section_table): Rename to ...
7411         (struct target_section): ... this.
7412         * exec.c: Adjust all references.
7413         * exec.h: Adjust all references.
7414         * nto-tdep.c: Adjust all references.
7415         * nto-tdep.h: Adjust all references.
7416         * ppc-linux-tdep.c: Adjust all references.
7417         * rs6000-nat.c: Adjust all references.
7418         * s390-tdep.c: Adjust all references.
7419         * solib-darwin.c: Adjust all references.
7420         * solib-frv.c: Adjust all references.
7421         * solib-irix.c: Adjust all references.
7422         * solib-null.c: Adjust all references.
7423         * solib-osf.c: Adjust all references.
7424         * solib-pa64.c: Adjust all references.
7425         * solib-som.c: Adjust all references.
7426         * solib-sunos.c: Adjust all references.
7427         * solib-svr4.c: Adjust all references.
7428         * solib-target.c: Adjust all references.
7429         * solib.c: Adjust all references.
7430         * solist.h: Adjust all references.
7431         * symfile.c: Adjust all references.
7432         * symfile.h: Adjust all references.
7433         * target.c: Adjust all references.
7434
7435 2009-05-22  Hui Zhu  <[email protected]>
7436
7437         Add sys_fcntl argument interfaces to linux_record_tdep.
7438
7439         * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
7440         fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
7441         interfaces.
7442         * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
7443         I386_LINUX_RECORD_FCNTL_F_GETLK64,
7444         I386_LINUX_RECORD_FCNTL_F_SETLK64,
7445         I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
7446         of I386 Linux sys_fcntl arguments.
7447         (i386_linux_init_abi): Set macros values to linux_record_tdep.
7448         * linux-record.c (record_linux_system_call): Change to use
7449         the interface in linux_record_tdep in sys_fcntl and
7450         sys_fcntl64.
7451
7452         * linux-record.c (record_linux_system_call): Fix the process
7453         record build error about type in CYGWIN.
7454
7455 2009-05-22  Pedro Alves  <[email protected]>
7456
7457         * inflow.c (kill_command): Delete left over static declaration.
7458
7459 2009-05-22  Pedro Alves  <[email protected]>
7460
7461         * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
7462         Include exec.h.
7463         (struct section_closure): Delete.
7464         (add_to_section_table): Delete.
7465         (build_target_sections_from_bfd): Delete.
7466         (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
7467         (target_bfd_reopen): Use build_section_table.
7468         * exec.c (xfer_memory): Move most code except for overlay
7469         debugging support from here...
7470         (section_table_xfer_memory): ... to this new function.
7471         (section_table_xfer_memory_partial): New.
7472         * exec.h (section_table_xfer_memory_partial): Declare.
7473         * bfd-target.h (build_target_sections_from_bfd): Delete
7474         declaration.
7475
7476 2009-05-22  Pedro Alves  <[email protected]>
7477
7478         * remote.c (compare_sections_command): Don't declare exec_bfd.
7479         * tracepoint.c: Include "gdbcore.h".
7480         (remote_set_transparent_ranges): Don't declare exec_bfd.
7481
7482 2009-05-21  Pedro Alves  <[email protected]>
7483
7484         * aix-thread.c (init_aix_thread_ops): Whitespace.
7485
7486 2009-05-21  Pedro Alves  <[email protected]>
7487
7488         * dec-thread.c (dec_thread_wait): Add options parameter.  Use it
7489         to call the to_wait method in the target beneath.
7490         * remote-m32r-sdi.c (m32r_wait): Add options parameter.
7491
7492 2009-05-21  Joel Brobecker  <[email protected]>
7493
7494         * aix-thread.c (aix_thread_wait): Add options parameter.  Use it
7495         to call the to_wait method in the target_beneath.
7496
7497 2009-05-21  Pedro Alves  <[email protected]>
7498
7499         * linux-nat.c (linux_nat_terminal_inferior)
7500         (linux_nat_terminal_ours): Don't check sync_execution.
7501         * remote.c (remote_terminal_inferior, remote_terminal_ours):
7502         Don't check sync_execution.  Update comments.
7503         * target.c (target_terminal_inferior): New.
7504         * target.h (target_terminal_inferior): Delete macro, and declare
7505         as function.
7506         * event-top.c (async_disable_stdin): Make idempotent.  Don't give
7507         the target the terminal here.
7508         * inflow.c (terminal_ours_1): Don't return early without setting
7509         `terminal_is_ours'.
7510
7511 2009-05-21  Pedro Alves  <[email protected]>
7512
7513         * target.h (TARGET_WNOHANG): New.
7514         * target.c (target_wait): Add `options' argument.  Adjust.
7515         (struct target_ops) <to_wait>: Add `options' argument.
7516         (target_wait): Add `options' argument.
7517         * infrun.c (wait_for_inferior): Pass 0 as options to
7518         target_wait (blocking wait).
7519         (fetch_inferior_event): Pass TARGET_WNOHANG as options to
7520         target_wait.
7521         * fork-child.c (startup_inferior): Pass 0 as options to
7522         target_wait (blocking wait).
7523         * linux-nat.c (linux_nat_create_inferior): Remove async masking.
7524         (linux_nat_wait_1): Add `target_options' argument.  Use it instead
7525         of checking on target_can_async_p.
7526         (linux_nat_wait): Add `target_options' argument.  Adjust.
7527         * remote.c (remote_wait_ns): Add `options' argument.  Adjust to
7528         check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
7529         (remote_wait_as): Add `options' argument.  Adjust to check on
7530         TARGET_WNOWAIT instead of checking on remote_is_async_p.  If doing
7531         a blocking wait, keep waiting until an interesting event comes
7532         out.
7533         (remote_wait): Add `options' argument.  Don't loop here if the
7534         target is in async mode, and a blocking wait has been requested.
7535
7536         * top.c (deprecated_target_wait_hook): Add `options' argument.
7537         * linux-thread-db.c (thread_db_wait): Add `options' argument, and
7538         pass it down to the layer beneath.
7539         * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
7540         * record.c (record_beneath_to_wait): Add `options' argument.
7541         (record_wait): Add `options' argument, and pass it down to the
7542         layer beneath.
7543         * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
7544         * darwin-nat.c (darwin_wait): Likewise.
7545         * defs.h (deprecated_target_wait_hook): Likewise.
7546         * gnu-nat.c (gnu_wait): Add `options' argument.
7547         * go32-nat.c (go32_wait): Likewise.
7548         * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
7549         pass it down to the layer beneath.
7550         * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
7551         * monitor.c (monitor_wait): Likewise.
7552         * nto-procfs.c (procfs_wait): Likewise.
7553         * remote-mips.c (mips_wait): Add `options' argument.
7554         * remote-sim.c (gdbsim_wait): Likewise.
7555         * rs6000-nat.c (rs6000_wait): Add `options' argument.
7556         * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
7557         it down to the layer beneath.
7558         * spu-linux-nat.c (spu_child_wait): Add `options' argument.
7559         * windows-nat.c (windows_wait): Likewise.
7560         * tui/tui-hooks.c (tui_target_wait_hook): Likewise.  Adjust.
7561
7562 2009-05-21  Pedro Alves  <[email protected]>
7563
7564         * mi/mi-interp.c (mi_on_resume): Account for whole process
7565         resumes.
7566
7567 2009-05-21  Jan Kratochvil  <[email protected]>
7568
7569         * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
7570
7571 2009-05-21  Jan Kratochvil  <[email protected]>
7572
7573         * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
7574
7575 2009-05-21  Jan Kratochvil  <[email protected]>
7576
7577         Fix parsing DW_AT_const_value using DW_FORM_string.
7578         * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
7579
7580 2009-05-20  Joel Brobecker  <[email protected]>
7581
7582         * aix-thread.c (giter_count): Do not count the main thread.
7583         (giter_accum): Do not include the main thread.
7584
7585 2009-05-19  Jan Kratochvil  <[email protected]>
7586
7587         Remove the PROT parameter from openp.
7588         * source.c (openp): Remove the parameter PROT.  Assertion check MODE.
7589         defs.h (openp): Update the prototype.
7590         Update all the openp callers.
7591
7592 2009-05-19  Pedro Alves  <[email protected]>
7593
7594         * inflow.c (kill_command): Moved to infcmd.c.
7595         (_initialize_inflow): Don't add the "kill" command or clear
7596         inferior_ptid here.
7597         * infcmd.c (kill_command): Moved here from inflow.c.
7598         (_initialize_infcmd): Add the "kill" command here.
7599
7600 2009-05-19  Pedro Alves  <[email protected]>
7601
7602         * fork-child.c: Don't include frame.h.  Include terminal.h.
7603         (fork_inferior): Call new_tty_postfork after forking adn adding
7604         the child to the inferior list.
7605         * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
7606         here.
7607         * inflow.c (struct terminal_info): Remove const qualifier from
7608         `run_terminal' field.
7609         (inferior_thisrun_terminal): Tweak comment.
7610         (inflow_inferior_exit): Release the `run_terminal' field.
7611         (copy_terminal_info): New function.
7612         (new_tty_postfork): New function.
7613         * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
7614         (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
7615         * inf-ptrace.c: Include terminal.h.
7616         (inf_ptrace_follow_fork): Copy the parent's terminal info to the
7617         child.
7618         * linux-nat.c: Include terminal.h.
7619         (linux_child_follow_fork): Copy the parent's terminal info to the
7620         child.
7621         * inf-ttrace.c: Include terminal.h.
7622         (inf_ttrace_follow_fork): Copy the parent's terminal info to the
7623         child.
7624
7625 2009-05-19  Pedro Alves  <[email protected]>
7626
7627         * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
7628         (update_global_location_list): Use gdbarch_has_global_breakpoints
7629         instead of gdbarch_has_global_solist and
7630         target_supports_multi_process.
7631         * dicos-tdep.c (dicos_init_abi): Set
7632         gdbarch_has_global_breakpoints.
7633         * gdbarch.sh (has_global_solist): Update comment.
7634         (has_global_breakpoints): New.
7635         * remote.c (remote_start_remote): Use
7636         gdbarch_has_global_breakpoints instead of
7637         gdbarch_has_global_solist.
7638         * target.c (target_detach): Use gdbarch_has_global_breakpoints
7639         instead of gdbarch_has_global_solist.
7640         * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
7641         of target_supports_multi_process.
7642
7643 2009-05-18  Paul Pluzhnikov  <[email protected]>
7644
7645         * objc-lang.c (find_methods): Plug a small memory leak.
7646
7647 2009-05-18  Pedro Alves  <[email protected]>
7648
7649         * solib-svr4.c: Include observer.h.
7650         (debug_base, debug_loader_offset_p, debug_loader_offset)
7651         (debug_loader_name, main_lm_addr): Move these globals...
7652         (struct svr4_info): ... into this new structure.
7653         (svr4_info_p): New typedef.
7654         (svr4_info): New global.
7655         (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
7656         functions.
7657         (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
7658         (solib_svr4_r_ldsomap): Add svr4_info argument.  Adjust to
7659         per-inferior svr4.
7660         (open_symbol_file_object): Adjust to per-inferior svr4.
7661         (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
7662         Ditto.
7663         (enable_break): Add svr4_info argument.  Adjust to per-inferior
7664         svr4.
7665         (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
7666         Adjust to per-inferior svr4.
7667         (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
7668         observer.
7669
7670 2009-05-18  Pedro Alves  <[email protected]>
7671
7672         * linux-nat.h (linux_proc_get_tgid): Declare.
7673         * linux-nat.c (linux_proc_get_tgid): New.
7674         * linux-thread-db.c (struct thread_db_info): New field
7675         `need_stale_parent_threads_check'.
7676         (add_thread_db_info): Set it.
7677         (find_new_threads_callback): Ignore stale fork parent threads.
7678         (thread_db_resume): New.
7679         (init_thread_db_ops): Install thread_db_resume.
7680
7681 2009-05-18  Pedro Alves  <[email protected]>
7682
7683         * fork-child.c (fork_inferior): Only reset the thread list if this
7684         is the first inferior.
7685         (startup_inferior): If the target support multi-process, tell it
7686         to resume only the new process.
7687         * linux-nat.c (num_lwps): Delete global.
7688         (purge_lwp_list): New function.
7689         (num_lwps): New function.
7690         (add_lwp, delete_lwp): Adjust.
7691         (ptid_match): New.
7692         (iterate_over_lwps): Add filter argument.  Handle it.
7693         (linux_nat_attach): Remove FIXME note.
7694         (linux_nat_detach): Adjust to iterate over threads of the inferior
7695         we're detaching from.  Adjust to num_lwps being a function.  Don't
7696         assume the head of the lwp list is the main thread of the process
7697         we're detaching from.  Don't destroy the LWP list.
7698         (resume_callback): Add debug output.
7699         (linux_nat_resume): Handle resuming a single inferior.  Allow a
7700         wildcard resume in non-stop mode.
7701         (linux_handle_extended_wait): Don't assume inferior_ptid is the
7702         correct inferior of the parent LWP.
7703         (status_callback): Also check lp->waitstatus.
7704         (select_event_lwp): Add new filter parameter.  Handle it.
7705         (linux_nat_filter_event): Adjust to num_lwps being a function.
7706         (linux_nat_wait_1): When adding the first lwp of the inferior, use
7707         an is_lwp check instead of checking for the number of lwps.
7708         (linux_nat_wait_1): Handle waiting for a specific tgid.  Handle
7709         pending process exit statuses.
7710         (linux_nat_mourn_inferior): Don't destroy all the LWP info.
7711         Instead delete LWPs of the inferior that we're mourning.  Don't
7712         unregister from the event loop here.
7713         (linux_nat_pid_to_str): Use `num_lwps'.
7714         (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
7715         single inferior.
7716         (linux_nat_is_async_p): Check if async was masked out.
7717         (linux_multi_process): New global.
7718         (linux_nat_supports_multi_process): New.
7719         (linux_nat_stop_lwp): Remove LWP filtering.  It is done by the
7720         caller.
7721         (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
7722         LWP filtering.
7723         (linux_nat_close): New.
7724         (linux_nat_add_target): Register linux_nat_close and
7725         linux_nat_supports_multi_process.
7726         * linux-nat.h (iterate_over_lwps): Add filter argument.
7727         * linux-thread-db.c (thread_db_handle): Delete.
7728         (proc_handle, thread_agent, td_init_p, td_ta_new_p)
7729         (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
7730         (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
7731         (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
7732         (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
7733         longer globals, moved to...
7734         (struct thread_db_info): ... this new structure.
7735         (thread_db_list): New.
7736         (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
7737         New.
7738         (have_threads_callback): Filter out threads of all inferiors but
7739         the one specified by the ARGS argument.
7740         (have_threads): Add ptid argument specifying the inferior we're
7741         interested in.  Handle it.
7742         (struct thread_get_info_inout): New.
7743         (thread_get_info_callback, thread_from_lwp): Adjust to use it.
7744         (thread_db_attach_lwp): Check that inferior of the passed in
7745         thread is using thread-db.  Adjust.
7746         (enable_thread_event): Remove thread_agent parameter.  Instead,
7747         get it from the per-inferior thread-db info.
7748         (dladdr_to_soname): Move higher up.
7749         (enable_thread_event_reporting): Adjust to use per-inferior
7750         thread-db info.
7751         (try_thread_db_load_1): Replace `handle' parameter by a
7752         thread_db_info parameter.  Adjust to use per-inferior thread-db
7753         info.
7754         (try_thread_db_load): Adjust to use per-inferior thread-db info.
7755         (thread_db_load, disable_thread_event_reporting): Ditto.
7756         (check_for_thread_db): Remove conditional reporting of which
7757         libthread_db is in use.
7758         (thread_db_new_objfile): Add comment about inferior_ptid.
7759         (attach_thread): Adjust to use per-inferior thread-db info.
7760         (thread_db_detach): Adjust to use per-inferior thread-db info.
7761         Remove thread event breakpoints of the current inferior.  Only
7762         unpush the thread-db target if there are no more processes using
7763         it.
7764         (check_event): Adjust to use per-inferior thread-db info.
7765         (thread_db_wait): Adjust to use per-inferior thread-db info.  Only
7766         unpush the thread-db target if there are no more processes using
7767         it.
7768         (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
7769         info.  Mark breakpoints of the current inferior out before
7770         deleting them.  Only unpush the thread-db target if there are no
7771         more processes using it.
7772         (find_new_threads_callback): Adjust to use per-inferior thread_db
7773         info.
7774         (thread_db_find_new_threads_1): Add new ptid argument.  Adjust to
7775         use per-inferior thread-db info.
7776         (thread_db_find_new_threads): Adjust to use per-inferior thread-db
7777         info.
7778         (thread_db_get_thread_local_address): Adjust.
7779         (thread_db_get_ada_task_ptid): Adjust.
7780         * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
7781         if there no more processes left to debug.
7782         * thread.c (set_running, set_executing): Handle resuming all
7783         threads of a single inferior.
7784         * mi/mi-interp.c (mi_output_running_pid): New.
7785         (mi_inferior_count): New.
7786         (mi_on_resume): For backwards compatibility, if resuming all
7787         threads of an inferior, and there is only one inferior, output
7788         "all".
7789
7790 2009-05-18  Ulrich Weigand  <[email protected]>
7791
7792         * ada-lang.c (ada_find_any_type): Move check for primitive types ...
7793         (to_fixed_range_type): ... to here.
7794
7795 2009-05-18  Ulrich Weigand  <[email protected]>
7796
7797         * ada-lang.c (desc_data_type): Remove, replace by ...
7798         (desc_data_target_type): ... this.
7799         (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
7800         (ada_is_array_descriptor_type): Likewise.
7801         (ada_type_of_array): Likewise.
7802         (ada_coerce_to_simple_array_type): Likewise.
7803         (ada_array_element_type): Likewise.
7804
7805 2009-05-18  Ulrich Weigand  <[email protected]>
7806
7807         * ada-valprint.c (ada_val_print_1): Use val_print_string to print
7808         result of ada_vax_float_print_function inferior call.
7809
7810 2009-05-18  Ulrich Weigand  <[email protected]>
7811
7812         * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
7813         avoid creating a dummy value.
7814
7815 2009-05-18  Ulrich Weigand  <[email protected]>
7816
7817         * p-valprint.c (pascal_val_print): Use extract_typed_address
7818         to extract reference value.
7819
7820 2009-05-18  Ulrich Weigand  <[email protected]>
7821
7822         * doublest.c (NAN): Remove unused define.
7823         (extract_floating_by_length, deprecated_extract_floating): Remove.
7824         (store_floating_by_length, deprecated_store_floating): Remove.
7825         (extract_typed_floating): Do not call extract_floating_by_length.
7826         (store_typed_floating): Do not call store_floating_by_length.
7827         (convert_typed_floating): Remove redundant assertions.
7828         * doublest.h (deprecated_extract_floating): Remove.
7829         (deprecated_store_floating): Remove.
7830         * sh64-tdep.c (sh64_register_convert_to_raw): Call
7831         extract_typed_floating instead of deprecated_extract_floating.
7832
7833 2009-05-18  Jon Beniston <[email protected]>
7834         
7835         * MAINTAINERS: Add lm32 target.        
7836         * Makefile.in: Add lm32 dependencies.        
7837         * NEWS: Indicate lm32 is a new target.
7838         * configure.tgt: Add lm32 targets.
7839         * lm32-tdep.c: New file.
7840
7841 2009-05-18  Pedro Alves  <[email protected]>
7842
7843         * corelow.c (core_open): Flush the register cache before doing
7844         anything with registers.
7845
7846 2009-05-18  Pedro Alves  <[email protected]>
7847
7848         * inflow.h (our_process_group): Remove declaration.
7849         (inferior_process_group): Delete global variable declaration.
7850         (inferior_process_group): New function declaration.
7851         * inflow.c: Include observer.h.
7852         (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
7853         Delete.
7854         (struct terminal_info): New struct.
7855         (our_terminal_info): New global.
7856         (inferior_process_group): New function.
7857         (inferior_thisrun_terminal): Extend description comment.
7858         (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
7859         instead of globals.
7860         (terminal_init_inferior_with_pgrp): Adjust to per-inferior
7861         terminal settings.
7862         (terminal_inferior): Ditto.
7863         (terminal_ours_1): Ditto.
7864         (inflow_new_inferior, inflow_inferior_exit): New functions.
7865         (child_terminal_info): Adjust to per-inferior terminal settings.
7866         (osig_set): New global.
7867         (set_sigint_trap): Adjust to per-inferior terminal settings.  Set
7868         or clear `osig_set' accordingly.
7869         (clear_sigint_trap): Check `osig_set' to decide wheater to restore
7870         SIGINT handler, instead of checking the current inferior (which
7871         may be none).
7872         (_initialize_inflow): Attach inflow_new_inferior and
7873         inflow_inferior_exit to the "new_inferior" and "inferior_exit"
7874         notifications, respectively.
7875         * inferior.h (struct terminal_info): Forward declare.
7876         (struct inferior): Add `terminal_info' field.
7877         * inferior.c (delete_inferior_1): Notify the inferior_exit
7878         observers before removing the inferior from the lists and deleting
7879         it.
7880         * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
7881         a function instead of a variable.  Adjust.
7882         * procfs.c (procfs_stop): Ditto.
7883
7884 2009-05-17  Pedro Alves  <[email protected]>
7885
7886         * infrun.c (handle_inferior_event): When handling a
7887         TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
7888         immediatelly.
7889         * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
7890         from the child if vforking.
7891         * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
7892         breakpoints from the child here.
7893
7894 2009-05-17  Pedro Alves  <[email protected]>
7895
7896         * infrun.c (pending_follow): Remove execd_pathname member.
7897         (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
7898         (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
7899         event, don't copy `execd_pathname' to pending_follow, use the
7900         event copy instead.  Release `execd_pathname' once done with
7901         handling the event.
7902
7903         * infrun.c (pending_follow): Remove mention of exec events.
7904
7905 2009-05-17  Hui Zhu  <[email protected]>
7906
7907         * i386-tdep.c (i386_process_record): Make it extern.
7908         (i386_gdbarch_init): Don't call set_gdbarch_process_record
7909         here.
7910         * i386-tdep.h (i386_process_record): Declare.
7911         * i386-linux-tdep.c (i386_linux_init_abi): Call
7912         set_gdbarch_process_record.
7913
7914 2009-05-17  Vladimir Prus  <[email protected]>
7915
7916         Always report varobj as changed when in_scope attribute changes.
7917
7918         * varobj.c (install_new_value): If non-NULL-ness of value
7919         changed, return 1.
7920
7921 2009-05-15  Paul Pluzhnikov  <[email protected]>
7922         
7923         * NEWS: Mention set/show libthread-db-search-path.
7924         * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
7925         (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
7926         * linux-thread-db.c (libthread_db_search_path): New setting.
7927         (thread_db_handle): New variable (replaces using_thread_db).
7928         (try_thread_db_load_1): New function.
7929         (try_thread_db_load, thread_db_load_search): Likewise.
7930         (dladdr_to_soname): Likewise.
7931         (thread_db_load): Iterate over possibly multiple libthread_db's.
7932         (check_for_thread_db): Attempt to load new libthread_db.
7933         (thread_db_detach, thread_db_wait): Unload libthread_db.
7934         (thread_db_mourn_inferior): Likewise.
7935         (_initialize_thread_db): Add new libthread-db-search-path option.
7936         Defer loading of libthread_db to check_for_thread_db.
7937         * solib.c (libpthread_name_p): New function.
7938         (libpthread_solib_p): Call it.
7939         * solib.h (libpthread_name_p): New prototype.
7940         
7941 2009-05-15  Pierre Muller  <[email protected]>
7942
7943         * MAINTAINERS: Update my email address.
7944         
7945 2009-05-14  Paul Pluzhnikov  <[email protected]>
7946
7947         * breakpoint.h: Add breakpoint_re_set_objfile prototype.
7948         * breakpoint.c (create_overlay_event_breakpoint): Renamed
7949         from create_overlay_event_breakpoint_1, old
7950         create_overlay_event_breakpoint deleted.
7951         (breakpoint_re_set_objfile): Don't rescan all objfiles
7952         unnecessarily.
7953         (breakpoint_re_set): New function.
7954         * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
7955         instead of breakpoint_re_set.
7956         * objfiles.c (objfile_relocate): Likewise.
7957         
7958 2009-05-14  Joel Brobecker  <[email protected]>
7959
7960         * gdbarch.sh: Add comment documenting the target_gdbarch global.
7961         gdbarch.h does NOT need to be regenerated as the corresponding
7962         change has already been made in a previous commit.
7963
7964 2009-05-14  Pierre Muller  <[email protected]>
7965
7966         Remove all i386 debug register low level macros in config nm files.
7967         (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
7968         (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
7969         (I386_USE_GENERIC_WATCHPOIINTS): Remove.
7970
7971         * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
7972         (struct i386_dr_low_type): New type.
7973         (i386_dr_low): New global variable.
7974         * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
7975         (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
7976         i386_dr_low struct variable fields.
7977         (i386_remove_aligned_watchpoint): Likewise.
7978         (i386_stopped_data_address): Likewise.
7979         (i386_stopped_by_hwbp): Likewise.
7980         (show_debug_regs_command_added): New static variable.
7981         (add_show_debug_regs_command): New static function.
7982         (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
7983         (i386_set_debug_register_length): New function.
7984         (_initialize_i386_nat): Delete.
7985         
7986         * amd64-linux-nat.c: Include "i386-nat.h".
7987         (amd64_linux_dr_set_control):  Change to static.
7988         (amd64_linux_dr_get_status): Change to static.
7989         (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
7990         (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
7991         
7992         * go32-nat.c: Include "i386-nat.h".
7993         (go32_set_addr): Change to static.
7994         (go32_set_dr7): Change to static. Change arg type to unisgned long.
7995         (go32_get_dr6): Change to static. Change return type to unisnged long.
7996         (init_go32_ops):  Set i386_dr_low variable fields.
7997         * i386-linux-nat.c: Include "i386-nat.h".
7998         (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
7999         (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
8000         (_initialize_i386_linux_nat):  Set i386_dr_low variable fields.
8001         * i386bsd-nat.h: Declare functions used for
8002         i386_dr_low fields in i386fbsd-nat.c.
8003         * i386fbsd-nat.c: Include "i386-nat.h".
8004         (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
8005         * windows-nat.c: Include "i386-nat.h".
8006         (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
8007         Change to static.
8008         (cygwin_get_dr6): Change return type to unisnged long.
8009         (cygwin_set_dr7): Change arg type to unisgned long.
8010         (init_windows_ops): Set i386_dr_low function fields.
8011
8012         * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call 
8013         i386_set_debug_register_length.
8014         * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
8015
8016         * config/i386/nm-cygwin.h: Remove all I386_* macros.
8017         * config/i386/nm-cygwin64.h: Likewise.
8018         * config/i386/nm-fbsd.h: Likewise.
8019         * config/i386/nm-linux.h: Likewise.
8020         * config/i386/nm-i386.h: Remove completely.
8021         * config/i386/nm-go32.h: Remove completely.
8022         * config/i386/nm-linux64.h: Remove completely.
8023         * config/i386/go32.mh (NAT_FILE): Remove entry.
8024         * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
8025
8026 2009-05-14  Jon Beniston  <[email protected]>
8027
8028         * MAINTAINERS: Add Jon Beniston to write after approval list.
8029
8030 2009-05-13  Paul Pluzhnikov  <[email protected]>
8031
8032         * objc-lang.c (objc_objfile_data): New variable.
8033         (find_methods): Skip objfiles without Obj-C methods.
8034         (_initialize_objc_lang): New function.
8035
8036 2009-05-13  Joel Brobecker  <[email protected]>
8037
8038         * c-lang.c (print_wchar): Remove unnecessary cast.
8039
8040 2009-05-12  Jim Blandy  <[email protected]>
8041
8042         * MAINTAINERS: Remove self as m32c target maintainer.
8043
8044 2009-05-12  Pedro Alves  <[email protected]>
8045
8046         * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
8047         * command.h (deprecated_add_set_cmd): Delete declaration.
8048         * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
8049         'set debug gnu-nat' and 'show debug gnu-nat'.
8050         * i386-nat.c (_initialize_i386_nat): Replace 'maint
8051         show-debug-registers' with 'maint set show-debug-registers' and
8052         'maint show show-debug-registers'.
8053         * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
8054         show-debug-registers' with 'maint set show-debug-registers' and
8055         'maint show show-debug-registers'.
8056
8057 2009-05-12  Joel Brobecker <[email protected]>
8058
8059         * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
8060         pushing it on the output obstack.
8061
8062 2009-05-11  Joel Brobecker <[email protected]>
8063
8064         Fix internal error on breaking at a multi-locations caller source line.
8065         * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
8066         command with no parameters.
8067
8068 2009-05-11  Pedro Alves  <[email protected]>
8069
8070         * linux-nat.c (enum sigchld_state): Delete.
8071         (linux_nat_async_events_state): Delete.
8072         (struct waitpid_result): Delete.
8073         (waitpid_queue): Delete.
8074         (queued_waitpid_1): Delete.
8075         (async_file_flush): New.
8076         (queued_waitpid, push_waitpid): Delete.
8077         (async_file_mark): New.
8078         (drain_queued_events): Delete.
8079         (my_waitpid): Remove locally queued events handling.
8080         (linux_test_for_tracefork): Upjust.
8081         (linux_child_follow_fork): Ditto.
8082         (sync_sigchld_action): Delete.
8083         (blocked_mask): Reinstate.
8084         (async_sigchld_action): Rename to...
8085         (sigchld_action): ... this.
8086         (block_child_signals): New.
8087         (restore_child_signals_mask): New.
8088         (lin_lwp_attach_lwp): Adjust.
8089         (linux_nat_create_inferior): Ditto.
8090         (linux_nat_attach): Also use lp->status in async mode.
8091         (get_pending_status): Don't use queued_waitpid.
8092         (linux_nat_detach): Don't drain locally queued events.
8093         (linux_nat_resume): Allow pending wait statuses stored lp->status
8094         in async mode.  If returning early due to a pending event,
8095         re-register the event source.
8096         (stop_wait_callback): Allow pending wait statuses stored
8097         lp->status in async mode.
8098         (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
8099         (linux_nat_wait): Rename to ...
8100         (linux_nat_wait_1): ... this.  Allow pending wait statuses stored
8101         lp->status in async mode.  Always add WNOHANG to the waitpid
8102         options in async mode.
8103         (linux_nat_wait): New.
8104         (kill_callback): Don't drain locally queued events.
8105         (sigchld_handler): Rewrite.
8106         (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
8107         refer to "set target-async".
8108         (linux_nat_async_mask): If in non-stop, and re-enabling async
8109         mode, re-register the target event source in the event loop.
8110         (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
8111         (get_pending_events, async_sigchld_handler)
8112         (linux_nat_async_events): Delete.
8113         (handle_target_event): New.
8114         (linux_nat_async_file_handler): Delete.
8115         (linux_async_pipe): New.
8116         (linux_nat_async): Only re-register in the event loop if not
8117         registered yet.  Always notify the event-loop once if enabling the
8118         event source.
8119         (linux_nat_stop_lwp): Rewrite to handle pending events stored in
8120         lp->status, not in the locally queued event list.
8121         (linux_nat_stop): Don't mask out async event handling.
8122         (linux_nat_setup_async): Delete.
8123         (_initialize_linux_nat): Adjust.
8124         (lin_thread_get_thread_signals): blocked_mask is global again.
8125         Adjust.
8126
8127 2009-05-11  Pierre Muller  <[email protected]>
8128
8129         Unify target macros.
8130
8131         * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
8132         (target_stoppped_by_watchpoint): New macro.
8133         (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
8134         (target_have_steppable_watchpoint): New macro.
8135         (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
8136         (target_have_continuable_watchpoint): New macro.
8137         (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
8138         (target_can_use_hardware_watchpoint): New macro.
8139         (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
8140         (target_region_ok_for_hw_watchpoint): New macro.
8141
8142         * breakpoint.c (update_watchpoint): Use new macros.
8143         (bpstat_alloc): Likewise.
8144         (create_breakpoint): Likewise.
8145         (watch_command_1): Likewise.
8146         (can_use_hardware_watchpoint): Likewise.
8147         (do_enable_breakpoint): Likewise.
8148         * infrun.c (handle_inferior_event): Adapt to new macros.
8149         * mips-tdep.c (mips_gdbarch_init): Update comments.
8150         * procfs.c (procfs_set_watchpoint): Update comment.
8151         (procfs_insert_watchpoint): Adapt to new macros.
8152         * remote-m32r-sdi.c (m32r_stop):
8153         * remote-mips.c (mips_remove_breakpoint):
8154         * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
8155         (debug_to_stopped_by_watchpoint): Likewise.
8156
8157
8158 2009-05-10  Pierre Muller  <[email protected]>
8159
8160         * src/gdb/target.h: Remove all tests for already defined
8161         macros. All macros defined here should not be set in config
8162         headers anymore.
8163
8164 2009-05-08  Sergio Durigan Junior <[email protected]>
8165
8166         * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
8167         (have_ptrace_getsetfpregs): Likewise.
8168         fetch_all_gp_regs): New function.
8169         (fetch_gp_regs): New function.
8170         (fetch_all_fp_regs): Likewise.
8171         (fetch_fp_regs): New function.
8172         (fetch_ppc_registers): Using the new methods to fetch general-
8173         purpose and floating-pointer registers.
8174         (store_all_gp_regs): New function.
8175         (store_gp_regs): Likewise.
8176         (store_all_fp_regs): New function.
8177         (store_fp_regs): Likewise.
8178         (store_ppc_registers): Using the new methods to store general-
8179         purpose and floating-pointer registers.
8180
8181 2009-05-08  Doug Evans  <[email protected]>
8182
8183         * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
8184
8185 2009-05-07  Sergio Durigan Junior  <[email protected]>
8186
8187         * MAINTAINERS (Write After Approval): Add self.
8188
8189 2009-05-07  Joel Brobecker  <[email protected]>
8190
8191         * gdbarch.h (target_gdbarch): Add comment documenting this global.
8192
8193 2009-05-06  Joel Brobecker  <[email protected]>
8194
8195         * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
8196         system iconv.
8197         * configure: Regenerate.
8198
8199 2009-05-06  Joel Brobecker  <[email protected]>
8200
8201         * utils.c: Add include of gdb_usleep.h.
8202         (defaulted_query): Detect false EOF conditions that happen
8203         on terminals opened with the O_NONBLOCK flag when there is
8204         nothing to read.
8205
8206 2009-05-06  Pedro Alves  <[email protected]>
8207
8208         * inferior.c (add_inferior): Move observer_notify_new_inferior
8209         call to ...
8210         (add_inferior_silent): ... here.
8211
8212 2009-05-06  Pierre Muller  <[email protected]>
8213             Pedro Alves  <[email protected]>
8214
8215         * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
8216         (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
8217         functions.
8218         (procfs_stopped_by_watchpoint): Made static, ptid argument
8219         removed.
8220         (_initialize_procfs): Register new watchpoint related target
8221         functions.
8222         * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
8223         (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
8224         (HAVE_CONTINUABLE_WATCHPOINT): Delete.
8225         (target_insert_watchpoint, target_remove_watchpoint): Delete.
8226         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
8227         declarations.
8228         * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
8229         (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
8230         (target_insert_watchpoint, target_remove_watchpoint): Delete.
8231         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
8232         declarations.
8233         * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
8234         (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
8235         (target_insert_watchpoint, target_remove_watchpoint): Delete.
8236         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
8237         declarations.
8238
8239 2009-05-06  Hui Zhu  <[email protected]>
8240
8241         * i386-tdep.c (i386_process_record): Change bzero to memset.
8242
8243 2009-05-06  Hui Zhu  <[email protected]>
8244
8245         * NEWS: Add item for process record and replay.
8246
8247 2009-05-05  Maxim Grigoriev  <[email protected]>
8248
8249         * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
8250
8251 2009-05-05  Ulrich Weigand  <[email protected]>
8252
8253         * inferior.h (read_pc, write_pc): Remove.
8254         * regcache.c (read_pc, write_pc): Remove.
8255
8256         * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
8257         of read_pc.
8258         (handle_inferior_event): Use regcache_read_pc instead of read_pc
8259         when determining value of stop_pc.  Replace subsequent uses of
8260         read_pc by inspecting already-retrieved stop_pc value.
8261         (keep_going): Use regcache_read_pc instead of read_pc.
8262
8263         * breakpoint.c (watchpoint_check): Use current frame architecture
8264         and PC instead of current_gdbarch and read_pc ().
8265         * tracepoint.c (set_traceframe_context): Replace PC argument
8266         with FRAME argument.
8267         (trace_start_command, finish_tfind_command): Update calls.
8268         (finish_tfind_command): Compare frame IDs to identify transitions
8269         between frames.
8270         (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
8271         * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
8272         of gdbarch.  Use regcache_read_pc and regcache_write_pc instead
8273         of read_pc and write_pc.
8274         (store_register): Make regcache argument non-const.  Update call
8275         to exec_one_dummy_insn.
8276
8277         * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
8278         * infcmd.c (post_create_inferior): Likewise.
8279         * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
8280         * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
8281         * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
8282         * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
8283         * linux-fork.c (fork_load_infrun_state): Likewise.
8284         * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
8285         * record.c (record_wait): Likewise.
8286         * procfs.c (procfs_wait): Likewise.
8287         * remote-mips.c (common_open, mips_wait): Likewise.
8288         * remote-m32r-sdi.c (m32r_resume): Likewise.
8289
8290         * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
8291         * monitor.c (monitor_create_inferior, monitor_load): Likewise.
8292         * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
8293         * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
8294         * remote-mips.c (mips_create_inferior, mips_load): Likewise.
8295
8296         * solib-darwin.c: Include "regcache.h".
8297         * solib-pa64.c: Include "regcache.h".
8298         * solib-svr4.c: Include "regcache.h.".
8299
8300         * symfile.c: Do not mention read_pc or write_pc in comments.
8301         * dink32-rom.c: Likewise.
8302         * m32r-rom.c: Likewise.
8303         * mips-tdep.c: Likewise.
8304
8305 2009-05-05  Ulrich Weigand  <[email protected]>
8306
8307         * fork-child.c (startup_inferior): Move setting stop_pc ...
8308         * infcmd.c (post_create_inferior): ... to here.
8309
8310 2009-05-04  Michael Snyder  <[email protected]>
8311
8312         * NEWS: Add item for reverse debugging commands.
8313
8314 2009-05-04  Pedro Alves  <[email protected]>
8315
8316         * go32-nat.c (go32_stop): Delete.
8317         (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
8318         (go32_create_inferior): Don't call go32_stop or
8319         go32_kill_inferior.
8320         (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
8321         here.
8322         (init_go32_ops): Don't register go32_stop.
8323
8324 2009-05-02  Eli Zaretskii  <[email protected]>
8325
8326         * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
8327         sym_name.
8328
8329         * infcall.c (find_function_addr): Avoid compiler warnings for
8330         funaddr.
8331
8332 2009-05-01  Jan Kratochvil  <[email protected]>
8333
8334         * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
8335         (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
8336
8337 2009-05-01  Doug Evans  <[email protected]>
8338
8339         * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
8340         to thread_info.
8341
8342 2009-05-01  Eli Zaretskii  <[email protected]>
8343
8344         * record.c (_initialize_record): Reformat and clarify doc strings
8345         for stop-at-limit and insn-number-max.
8346
8347         * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
8348
8349 2009-05-01  Jan Kratochvil  <[email protected]>
8350
8351         Make specifiable the make_function_type type memory ownership.
8352         * gdbtypes.c (make_function_type): New parameter `objfile', use it
8353         explicitely instead of TYPE-initialized removed local variable
8354         `objfile'.  Describe `objfile' it in the function comment.
8355         (lookup_function_type): Update make_function_type callers.
8356         * gdbtypes.h (make_function_type): Update the prototype.
8357         * jv-lang.c (java_link_class_type): Update make_function_type callers.
8358         * dwarf2read.c (read_subroutine_type): Likewise.
8359         * stabsread.c (read_type): Likewise.
8360
8361 2009-05-01  Eli Zaretskii  <[email protected]>
8362
8363         * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
8364         printing a bogus "Thread <main>".
8365         (go32_thread_alive): Don't return 1 for null_ptid.
8366
8367         * i386-tdep.c (i386_go32_init_abi): Override the number of
8368         registers due to non-support of SSE.
8369
8370 2009-04-30  Anthony Green  <[email protected]>
8371
8372         * configure.tgt: Link the moxie simulator in with gdb.
8373
8374 2009-04-30  Paul Pluzhnikov  <[email protected]>
8375
8376         * elfread.c (elf_symtab_read): Don't assume .data and .rodata
8377         are present.
8378
8379 2009-04-30  Hui Zhu  <[email protected]>
8380             Michael Snyder  <[email protected]>
8381
8382         I386 Linux process record and replay support.
8383
8384         * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
8385         This struct has the argument for the function
8386         "record_linux_system_call".
8387         (i386_linux_intx80_sysenter_record): New function. Parse the
8388         system call instruction and call function
8389         "record_linux_system_call" to record execute log.
8390         (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
8391         Set "i386_linux_intx80_sysenter_record" to
8392         "i386_intx80_record" and "i386_sysenter_record".
8393
8394 2009-04-30  Hui Zhu  <[email protected]>
8395             Michael Snyder  <[email protected]>
8396
8397         I386 architecture process record and replay support.
8398
8399         * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
8400         PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
8401         instruction set.
8402         (aflag, dflag, override, modrm, mod, reg, rm, ot,
8403         i386_record_pc): New variables. Ditto.
8404         (i386_record_modrm, i386_record_lea_modrm_addr,
8405         i386_record_lea_modrm): New functions. Ditto.
8406         (i386_process_record): New function. Parse the instruction in
8407         address "addr" and record the values of registers and memory
8408         that will be changed by this instruction.
8409         (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
8410         "process_record" interface.
8411         * i386-tdep.h (gdbarch_tdep): New function pointers
8412         "i386_intx80_record" and "i386_sysenter_record" that point to
8413         the function that can record "intx80" and "sysenter" execute
8414         log.
8415
8416 2009-04-30  Hui Zhu  <[email protected]>
8417             Michael Snyder  <[email protected]>
8418
8419         * infrun.c (use_displaced_stepping): Return false if process
8420         record and replay target is used.
8421         (proceed): Call function "record_not_record_set" if pocess
8422         record and replay target is used.
8423
8424 2009-04-30  Hui Zhu  <[email protected]>
8425             Michael Snyder  <[email protected]>
8426
8427         Linux process record and replay support.
8428
8429         * Makefile.in (ALLDEPFILES): Add linux-record.c.
8430         (ALL_TARGET_OBS): Add linux-record.o.
8431         * configure.tgt (x86_64-*-linux*): Add linux-record.o.
8432         (i[34567]86-*-linux*): Add linux-record.o.
8433         * linux-record.c, linux-record.h: New file.
8434
8435 2009-04-30  Hui Zhu  <[email protected]>
8436             Michael Snyder  <[email protected]>
8437
8438         Process record and replay target.
8439
8440         * Makefile.in (SFILES): Add record.c.
8441         (COMMON_OBS): Add record.o.
8442         * record.c, record.h: New file.
8443
8444 2009-04-30  Hui Zhu  <[email protected]>
8445             Michael Snyder  <[email protected]>
8446
8447         * target.h (strata): New stratum "record_stratum".
8448
8449 2009-04-30  Hui Zhu  <[email protected]>
8450             Michael Snyder  <[email protected]>
8451
8452         GDBARCH interface for process record and replay.
8453
8454         * gdbarch.sh (process_record): This interface point to the
8455         function that records the inferior execute log.
8456
8457 2009-04-29  Doug Evans  <[email protected]>
8458
8459         * i386-nat.c (child_post_startup_inferior): Delete, unused.
8460
8461 2009-04-29  Pedro Alves  <[email protected]>
8462
8463         * breakpoint.c (print_exception_catchpoint): Access `b' directly
8464         instead of `b->loc->owner'.
8465         (print_mention_exception_catchpoint): Ditto.
8466
8467 2009-04-29  Jan Kratochvil  <[email protected]>
8468
8469         * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
8470
8471 2009-04-27  Tom Tromey  <[email protected]>
8472
8473         * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
8474
8475 2009-04-27  Jerome Guitton  <[email protected]>
8476
8477         * symtab.c (append_exact_match_to_sals): New function, extracted
8478         from expand_line_sal.
8479         (expand_line_sal): Use append_exact_match_to_sals to append exact
8480         matches. If none found, append all best items.
8481
8482 2009-04-27  Jerome Guitton  <[email protected]>
8483
8484         * main.c (captured_main): Move gdbinit lookups after gdb_init.
8485
8486 2009-04-27  Jan Kratochvil  <[email protected]>
8487
8488         PR gdb/9675:
8489         * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
8490         (read_func_scope): Call inherit_abstract_dies.
8491
8492 2009-04-25  Eli Zaretskii  <[email protected]>
8493
8494         * Makefile.in (ALLDEPFILES): Remove duplicate entries for
8495         sparc-sol2-nat.c and sparc-sol2-tdep.c.
8496
8497         * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
8498
8499 2009-04-24  Pierre Muller  <[email protected]>
8500
8501         ARI change: Use "/* ARI: rule */" pattern.
8502         * utils.c: Update ARI patterns.
8503         * gdb_dirent.h: Likewise.
8504
8505 2009-04-23  Anthony Green  <[email protected]>
8506
8507         * MAINTAINERS: Add moxie target.
8508         * configure.tgt: Add moxie-*-elf target.
8509         * moxie-tdep.c: New file.
8510         * moxie-tdep.h: New file.
8511
8512 2009-04-23  Joel Brobecker  <[email protected]>
8513
8514         * ada-lang.c: Remove an extra empty line. No code change.
8515
8516 2009-04-23  Jan Kratochvil  <[email protected]>
8517
8518         Fix double free on error inserting the breakpoint instruction.
8519         * breakpoint.c (create_breakpoints): Move the
8520         update_global_location_list call to ...
8521         (break_command_really): ... here together with the second local call
8522         both unified after all the cleanups.
8523
8524 2009-04-23  Sergio Durigan Junior <[email protected]>
8525             Tom Tromey  <[email protected]>
8526
8527         * configure, config.in: Regenerate.
8528         * configure.ac: Support for relocatable GDB datadir.  Use
8529         GDB_AC_WITH_DIR.  Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
8530         * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
8531         * top.c (init_main): Add "set data-directory".
8532         * defs.h (gdb_datadir): Declare.
8533         * main.c (gdb_datadir): New global.
8534         (captured_main): Initialize gdb_datadir.  Use relocate_directory.
8535         (relocate_path): New function.
8536         (relocate_directory): Likewise.
8537         (get_init_files): Use relocate_path.
8538         (README): Mention --with-gdb-datadir.
8539
8540 2009-04-23  Joel Brobecker  <[email protected]>
8541
8542         * ada-tasks (task_command_1): Call target_find_new_threads.
8543
8544 2009-04-23  Joel Brobecker  <[email protected]>
8545
8546         * stack.c (do_gdb_disassembly): Print the exception message if an
8547         error was thrown while trying to perform the disassembly.
8548
8549 2009-04-22  Jan Kratochvil  <[email protected]>
8550
8551         * varobj.c (free_variable): Replace free_current_contents by xfree.
8552
8553 2009-04-22  Kazu Hirata  <[email protected]>
8554
8555         * arm-linux-nat.c (fetch_register, store_register): Use
8556         ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
8557         * arm-linux-tdep.c (arm_linux_supply_gregset,
8558         arm_linux_collect_gregset): Likewise.
8559         * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
8560         * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
8561
8562 2009-04-22  Hui Zhu  <[email protected]>
8563
8564         * stack.c (_initialize_stack): Set the default of
8565         disassemble-next-line to off.
8566
8567 2009-04-21  Tom Tromey  <[email protected]>
8568
8569         * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
8570         * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
8571
8572 2009-04-21  Andreas Schwab  <[email protected]>
8573
8574         * configure.ac: Add quotes to not lose brackets in help text.
8575         * configure: Rebuild.
8576
8577 2009-04-21  Andreas Schwab  <[email protected]>
8578
8579         * configure.ac: Don't postprocess Makefile in config.status.
8580         Substitute GDB_NM_FILE.  Don't substitute nm_h.
8581         * Makefile.in (GDB_NM_FILE): Substitute.
8582         (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
8583         * configure: Regenerate.
8584         * gnulib/Makefile.in: Regenerate.
8585
8586 2009-04-21  Joseph Myers  <[email protected]>
8587
8588         * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
8589         --with-htmldir): New.
8590         * configure: Regenerate.
8591
8592 2009-04-21  Tom Tromey  <[email protected]>
8593
8594         * configure: Rebuild.
8595         * configure.ac: Use lower case for start of help strings.  Clean
8596         up --with-sysroot help.
8597
8598 2009-04-21  Tom Tromey  <[email protected]>
8599
8600         * configure: Rebuild.
8601         * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
8602         * configure.ac: Use AC_HELP_STRING.  Use upper case for variables
8603         in help.
8604
8605 2009-04-21  Pierre Muller  <[email protected]>
8606
8607         ARI fix: remove "%p".
8608         * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
8609         (ia64_sigtramp_frame_this_id): Ditto.
8610         (ia64_libunwind_frame_this_id): Ditto.
8611         (ia64_libunwind_sigtramp_frame_this_id): Ditto.
8612         * symmisc.c (maintenance_info_psymtabs): Ditto.
8613
8614 2009-04-21  Joseph Myers  <[email protected]>
8615
8616         * configure.ac (--with-relocated-sources): New.
8617         * configure, config.in: Regenerate.
8618         * source.c (add_substitute_path_rule): Remove static.
8619         * source.h (add_substitute_path_rule): Declare.
8620         * main.c: Include "source.h".
8621         (captured_main): Add substitution rule if RELOC_SRCDIR.
8622
8623 2009-04-21  Pierre Muller  <[email protected]>
8624
8625         * gnu-nat.h (proc_debug): Add missing continuation line in macro.
8626
8627 2009-04-20  David Daney  <[email protected]>
8628
8629         * NEWS: Mention MIPS/Linux hardware watchpoint support.
8630
8631 2009-04-20  David Daney  <[email protected]>
8632
8633         * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
8634         (maint_show_dr, super_close): New variables.
8635         (super_fetch_registers, super_store_registers): Make static.
8636         (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
8637         (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
8638         (pt_watch_style): Define new enum.
8639         (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
8640         Define new structs.
8641         (watch_readback_valid, watch_readback, current_watches, watch_mirror):
8642         New variables.
8643         (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
8644         (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
8645         (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
8646         (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
8647         (type_to_irw, fill_mask, try_one_watch)
8648         (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
8649         (mips_linux_new_thread, populate_regs_from_watches)
8650         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8651         (mips_linux_close): New functions.
8652         (_initialize_mips_linux_nat): Register watchpoint functions with
8653         the target_ops.  Add show-debug-regs maintenance command.
8654
8655 2009-04-20  David Daney  <[email protected]>
8656
8657         * infrun.c (handle_inferior_event): Move gegisters_changed call down.
8658
8659 2009-04-19  Pedro Alves  <[email protected]>
8660
8661         * NEWS: Mention gdbserver support for x86 Windows CE.
8662
8663 2009-04-19  Eli Zaretskii  <[email protected]>
8664
8665         * config/djgpp/fnchange.lst: Fix typos.
8666
8667         Set default host and target charsets in the DJGPP port.
8668
8669         * config/djgpp/config.sed (am_cv_langinfo_codeset)
8670         (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
8671         in all configure scripts that define ac_cv_env_CPP_value.
8672
8673         * go32-nat.c (dos_codepage, nl_langinfo): New functions.
8674         Include langinfo.h.
8675
8676         * config/djgpp/nl_types.h: New file.
8677
8678         * config/djgpp/langinfo.h: New file.
8679
8680         * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
8681
8682 2009-04-18  Carlos O'Donell  <[email protected]>
8683
8684         * Makefile.in (MAKEHTML): Set to makeinfo --html.
8685         (MAKEHTMLFLAGS): Set to empty.
8686
8687 2009-04-18  Eli Zaretskii  <[email protected]>
8688
8689         * NEWS: Mention all new set/show commands added since GDB 6.8 was
8690         released.
8691
8692         * go32-nat.c (go32_sysinfo): Check if the call to
8693         __dpmi_get_capabilities fills the buffer with information, and
8694         don't use the buffer if not.
8695
8696 2009-04-17  Tom Tromey  <[email protected]>
8697
8698         * charset.c (_initialize_charset): Add special case for "646".
8699
8700 2009-04-17  Carlos O'Donell  <[email protected]>
8701
8702         * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
8703         * configure: Regenerate.
8704         * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
8705         configure substitutions.
8706         (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
8707
8708 2009-04-17  Pierre Muller  <[email protected]>
8709
8710         ARI fix: Do not use %p, replace by call to host_address_to_string
8711         for host pointers.
8712         * darwin-nat.c (darwin_xfer_partial): Apply change.
8713         * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
8714         * gnu-nat.h (proc_debug): Ditto.
8715         * symmisc.c (maintenance_info_symtabs): Ditto.
8716         (maintenance_info_psymtabs): Ditto.
8717         * windows-nat.c (handle_load_dll): Ditto.
8718         (handle_unload_dll, info_w32_command, handle_exception): Ditto.
8719         * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
8720
8721 2009-04-17  Joseph Myers  <[email protected]>
8722
8723         * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
8724         --enable-64-bit-bfd.
8725         (sparc-*-linux*): Likewise.
8726
8727 2009-04-17  Eli Zaretskii  <[email protected]>
8728
8729         * go32-nat.c (go32_sysinfo): Update list of Windows versions of
8730         the NT family.
8731
8732 2009-04-16  Pedro Alves  <[email protected]>
8733
8734         * remote.c (remote_query_attached): Fix pasto in packet_ok result
8735         checking.
8736
8737 2009-04-16  Joel Brobecker  <[email protected]>
8738
8739         * procfs.c (solib_mappings_callback, find_memory_regions_callback):
8740         Revert the previous change.  Might not be correct, actually.
8741
8742 2009-04-16  Joel Brobecker  <[email protected]>
8743
8744         * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
8745         (ada_get_current_task, ada_print_exception_breakpoint_nontask)
8746         (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
8747         Remove declaration. These are non-existent functions.
8748
8749 2009-04-16  Joel Brobecker  <[email protected]>
8750
8751         * procfs.c (solib_mappings_callback, find_memory_regions_callback):
8752         Fix a compilation warning on mips-irix due to casting from
8753         a pointer of different size.
8754
8755 2009-04-16  Joel Brobecker  <[email protected]>
8756
8757         * ada-lang.c (symtab_for_sym): Delete.
8758         (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
8759
8760 2009-04-16  Joel Brobecker  <[email protected]>
8761
8762         * ada-lang.c (extract_string): Delete.
8763         (ada_main_name): Reimplement using target_read_string instead of
8764         extract_string.
8765
8766 2009-04-16  Andreas Schwab  <[email protected]>
8767
8768         * m68klinux-nat.c: Remove obsolete comment.
8769         (fetch_register, store_register): Don't call
8770         gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
8771         which are always nops here.
8772
8773 2009-04-14  Tom Tromey  <[email protected]>
8774
8775         * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
8776         (c_printstr): Likewise.
8777         * charset.c: Include gdb_wait.h.
8778         (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
8779         (find_charset_names): Use pexecute.  Handle libiconv's output.
8780         Detect errors.
8781         (_initialize_charset): Use xstrdup.
8782         * gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
8783         cases.
8784         (INTERMEDIATE_ENCODING): New define.
8785         * configure, config.in: Rebuild.
8786         * configure.ac: Check for btowc.
8787
8788 2009-04-15  Tom Tromey  <[email protected]>
8789
8790         * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
8791
8792 2009-04-15  Eli Zaretskii  <[email protected]>
8793
8794         * utils.c (parse_escape): Initialize target_char to pacify GCC.
8795
8796 2009-04-14  Jan Kratochvil  <[email protected]>
8797
8798         * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
8799
8800 2009-04-14  Pierre Muller  <[email protected]>
8801
8802         ARI fix: sprintf rule.
8803         * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
8804         * ada-lang.c (add_angle_brackets): Use xstrprintf.
8805         (ada_decode): Replace sprintf by xsnprintf.
8806         (find_old_style_renaming_symbol): Ditto.
8807         (ada_to_fixed_type_1, ada_enum_name): Ditto.
8808
8809
8810 2009-04-14  Joel Brobecker  <[email protected]>
8811
8812         * target.c (target_mourn_inferior): Call bfd_cache_close_all
8813         after having executed the target mourn_inferior routine.
8814
8815 2009-04-14  Eli Zaretskii  <[email protected]>
8816
8817         * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
8818         undefined.
8819
8820 2009-04-13  David Daney  <[email protected]>
8821
8822         * infrun.c (maybe_software_singlestep): New function.
8823         (resume): Call maybe_software_singlestep.
8824         (handle_inferior_event): Same.
8825
8826 2009-04-13  Tom Tromey  <[email protected]>
8827
8828         * python/python-frame.c (frapy_richcompare): Return
8829         Py_NotImplemented, not an error.  Handle Py_NE as well.
8830
8831 2009-04-13  Eli Zaretskii  <[email protected]>
8832
8833         * charset.c (EILSEQ): Define if not defined by system headers.
8834
8835 2009-04-11  Eli Zaretskii  <[email protected]>
8836
8837         * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
8838         to be consistent with renaming config.intl.in into config_intl.in.
8839
8840         * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
8841         consistent with the change from 2008-11-09.
8842
8843 2009-04-10  Jan Kratochvil  <[email protected]>
8844
8845         * gdbtypes.c: Remove excessive parentheses at the return keywords.
8846         * varobj.c (varobj_invalidate): Fix indentation.
8847         * varobj.c (varobj_invalidate): Fix formatting text width.
8848
8849 2009-04-08  Vladimir Prus  <[email protected]>
8850
8851         Implement -exec-jump.
8852
8853         * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
8854         * mi/mi-main.c (mi_cmd_exec_jump): New.
8855         * mi/mi-cmds.c (mi_cmds): Register exec-jump.
8856
8857 2009-04-07  Doug Evans  <[email protected]>
8858
8859         * symfile.c (symbol_file_clear): Fix indentation.
8860
8861 2009-04-06  Mark Kettenis  <[email protected]>
8862
8863         * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
8864
8865 2009-04-03  Ulrich Weigand  <[email protected]>
8866
8867         * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
8868         (ppc_linux_auxv_parse): New function.
8869         (ppc_linux_read_description): Use ppc_linux_target_wordsize.
8870         (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
8871
8872 2009-04-03  Ulrich Weigand  <[email protected]>
8873
8874         * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
8875         BFD to contents of SPU name note.
8876         (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
8877         with "from_tty" argument 1 instead of 0.
8878
8879 2009-04-02  Jan Kratochvil  <[email protected]>
8880
8881         * dwarf2read.c
8882         (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
8883         Create the symbol in local scope.
8884         * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
8885
8886 2009-04-02  Keith Seitz  <[email protected]>
8887
8888         * stabsread.c (read_member_functions): GCC may emit an extra space
8889         at the end of the names "__base_ctor" and "__base_dtor"; so ignore
8890         whitespace when looking for these functions.
8891
8892 2009-04-01  Joel Brobecker  <[email protected]>
8893
8894         Change the default value for "set print frame-arguments" to scalars.
8895
8896         * stack.c (print_frame_arguments): Set initial value to "scalars".
8897
8898 2009-04-01  Aleksandar Ristovski  <[email protected]>
8899
8900         * mips-tdep.c (mips_numeric_register_alieses): New definition.
8901         (mips_gdbarch_init): Add user registers from
8902         mips_numeric_register_aliases.
8903
8904 2009-04-01  Joel Brobecker  <[email protected]>
8905
8906         * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
8907
8908 2009-04-01  Joel Brobecker  <[email protected]>
8909
8910         * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
8911         this is the last one.
8912
8913 2009-04-01  Pedro Alves  <[email protected]>
8914
8915         * remote.c (append_resumption): New.
8916         (remote_vcont_resume): Use it.
8917
8918 2009-04-01  Joel Brobecker  <[email protected]>
8919
8920         * windows-nat.c (+windows_get_ada_task_ptid): New function.
8921         (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
8922
8923 2009-03-31  Daniel Jacobowitz  <[email protected]>
8924             Keith Seitz  <[email protected]>
8925             Jan Kratochvil  <[email protected]>
8926
8927         PR gdb/6817
8928         * Makefile.in (dbxread.o): Update.
8929         * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
8930         * dwarf2read.c (GDB_FORM_cached_string): New.
8931         (read_partial_die): Use dwarf2_canonicalize_name.
8932         (dwarf2_linkage_name): Use dwarf2_name.
8933         (dwarf2_canonicalize_name): New.
8934         (dwarf2_name): Use dwarf2_canonicalize_name.
8935         (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
8936         * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
8937         * symtab.c (lookup_symbol_in_language): Canonicalize input before
8938         searching.
8939         * cp-name-parser.y: operator() requires two parameters,
8940         according to libiberty.
8941         * minsyms.c (lookup_minimal_symbol): Canonicalize input
8942         before searching.
8943         * NEWS: Update.
8944
8945 2009-03-31  Joel Brobecker  <[email protected]>
8946
8947         Provide support for (Ada) task-specific breakpoints.
8948
8949         * ada-lang.h (ada_get_task_number): Add declaration.
8950         (breakpoint_ada_task_match): Delete declaration.
8951         * ada-tasks.c (ada_get_task_number): Make non-static.
8952         * breakpoint.h (struct breakpoint): Add field "task".
8953         * breakpoint.c (print_one_breakpoint_location): Add handling of
8954         task-specific breakpoints.
8955         (create_breakpoint, create_breakpoints, find_condition_and_thread):
8956         New parameter "task".
8957         (break_command_really): Update calls to find_condition_and_thread
8958         and create_breakpoints.
8959         (breakpoint_re_set_one): Update call to find_condition_and_thread.
8960         Set b->task.
8961
8962 2009-03-31  Joel Brobecker  <[email protected]>
8963
8964         * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
8965
8966 2009-03-31  Pedro Alves  <[email protected]>
8967
8968         * remote.c (remote_notice_new_inferior): Use ptid_is_pid.  Check
8969         if the thread's ptid without a thread id field is in the list
8970         before calling thread_change_ptid.
8971         (extended_remote_attach_1): In non-stop mode, do not rely on
8972         querying the current thread, instead, query the thread list, and
8973         select the first thread of the process.
8974         * gdbthread.h (first_thread_of_process): Declare.
8975         * thread.c (first_thread_of_process): Define.
8976
8977 2009-03-30  Stan Shebs  <[email protected]>
8978
8979         Make tracepoints into a type of breakpoint.
8980         * breakpoint.h (enum bptype): Add bp_tracepoint.
8981         (struct breakpoint): Add fields step_count, pass_count, actions.
8982         (get_tracepoint, get_tracepoint_by_number): Declare.
8983         (all_tracepoints): Declare.
8984         * breakpoint.c: Include tracepoint.h, readline.h.
8985         (ALL_TRACEPOINTS): Move here from tracepoint.c.
8986         (tracepoint_count): Ditto.
8987         (should_be_inserted): GDB does not insert tracepoints itself.
8988         (print_it_typical): Add tracepoint case.
8989         (bpstat_what): Ditto.
8990         (print_one_breakpoint_location): Ditto, and add printing for
8991         pass count, step count, and action list.
8992         (user_settable_breakpoint): Add tracepoint case.
8993         (allocate_bp_location): Ditto.
8994         (set_breakpoint_location_function): Ditto.
8995         (disable_breakpoints_in_shlibs): Ditto.
8996         (mention): Ditto.
8997         (break_command_really): Add argument traceflag, use to choose
8998         basic breakpoint type.
8999         (break_command_1): Pass extra argument.
9000         (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
9001         (breakpoint_re_set_one): Add tracepoint case.
9002         (disable_command, enable_command): Ditto.
9003         (set_tracepoint_count): Move here from tracepoint.c.
9004         (trace_command): Move here from tracepoint.c and use
9005         break_command_really.
9006         (tracepoints_info): Move here from tracepoint.c and call
9007         breakpoints_info.
9008         (enable_trace_command): Move here from tracepoint.c and call
9009         enable_command.
9010         (disable_trace_command): Move here from tracepoint.c and call
9011         disable_command.
9012         (delete_trace_command): Move here from tracepoint.c and call
9013         delete_breakpoint.
9014         (trace_pass_command): Move here from tracepoint.c.
9015         (get_tracepoint_by_number): Ditto.
9016         (tracepoint_save_command): Ditto.
9017         (get_tracepoint): New function.
9018         (all_tracepoints): New function.
9019         (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
9020         deprecate "enable trace" and "disable trace" commands.
9021         * tracepoint.h (struct tracepoint): Remove.
9022         (tracepoint_chain): Remove decl.
9023         (deprecated_create_tracepoint_hook): Remove decl.
9024         (deprecated_delete_tracepoint_hook): Remove decl.
9025         (deprecated_modify_tracepoint_hook): Remove decl.
9026         (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
9027         (free_actions): Update signature.
9028         (validate_actionline): Update signature.
9029         (end_actions_pseudocommand): Declare.
9030         (while_stepping_pseudocommand): Declare.
9031         * tracepoint.c: Include breakpoint.h.
9032         (tracepoint_chain, tracepoint_count): Remove.
9033         (free_actions, make_cleanup_free_actions): Update signature.
9034         (trace_command, set_raw_tracepoint): Remove.
9035         (trace_mention): Remove.
9036         (tracepoints_info): Remove.
9037         (tracepoint_operation, map_args_over_tracepoints): Remove.
9038         (get_tracepoint_by_number): Remove.
9039         (enable_trace_command, disable_trace_command): Remove.
9040         (delete_trace_command, trace_pass_command): Remove.
9041         (trace_actions_command, read_actions): Update signature.
9042         (validate_actionline): Update signature, use bp loc.
9043         (encode_actions): Ditto.
9044         (download_tracepoint): New function, body of trace_start_command.
9045         (trace_start_command): Call it, use all_tracepoints.
9046         (tracepoint_save_command): Remove.
9047         (tracepoint_dump_command): Use get_tracepoint.
9048         (end_actions_pseudocommand): Make globally visible.
9049         (while_stepping_pseudocommand): Ditto.
9050         (_initialize_tracepoint): Move command definitions to breakpoint.c.
9051
9052 2009-03-30  Thiago Jung Bauermann  <[email protected]>
9053
9054         Expose frames to Python.
9055         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
9056         (SUBDIR_PYTHON_SRCS): Add python-frame.c.
9057         (python-frame.o): New target.
9058         * python/python-frame.c: New file.
9059         * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
9060         gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
9061         gdbpy_initialize_frames): New prototypes.
9062         * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
9063         (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
9064         entries.
9065         * stack.c (find_frame_funname): New function, factored out of
9066         print_frame.
9067         (print_frame): Call find_frame_funname.
9068         * stack.h (find_frame_funname): Add prototype.
9069
9070 2009-03-29  Thiago Jung Bauermann  <[email protected]>
9071
9072         Remove unused value_object attribute `owned_by_gdb'.
9073         * python/python-value.c (value_object): Remove owned_by_gdb
9074         attribute.
9075         (valpy_dealloc): Remove reference to self->owned_by_gdb.
9076         (valpy_new): Likewise.
9077         (value_to_value_object): Likewise.
9078
9079 2009-03-29  Thiago Jung Bauermann  <[email protected]>
9080
9081         Change gdb.Value.address from a method to an attribute.
9082         * python/python-value.c (value_object): Add `address' element.
9083         (valpy_dealloc): Decrement reference to self->address if set.
9084         (valpy_new): Initialize val_obj->address.
9085         (valpy_address): Rename to ...
9086         (valpy_get_address): ... this.  Change signature from method to
9087         attribute.  Update self->address if not set.
9088         (value_to_value_object): Initialize val_obj->address.
9089         (value_object_getset): Add `address' element.
9090         (value_object_methods): Remove `address' element.
9091
9092 2009-03-29  Andreas Schwab  <[email protected]>
9093
9094         * observer.sh: Set LANG/LC_ALL to C, not c.
9095
9096 2009-03-28  Kevin Buettner  <[email protected]>
9097
9098         * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
9099         `char' is unsigned.
9100
9101 2009-03-28  Pedro Alves  <[email protected]>
9102
9103         * remote.c (remote_stop_ns): If multi-process extensions are off,
9104         and GDB is requesting the whole process to stop, sent "vCont;t",
9105         not "vCont;t:-1"
9106
9107 2009-03-28  Pedro Alves  <[email protected]>
9108
9109         * inf-loop.c (inferior_event_handler): Avoid calling is_running on
9110         null inferior_ptid.
9111
9112 2009-03-27  Eli Zaretskii  <[email protected]>
9113
9114         * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
9115
9116 2009-03-26  Doug Evans  <[email protected]>
9117
9118         * thread.c (do_restore_current_thread_cleanup): Redo test for
9119         whether to restore old->inferior_ptid.
9120
9121 2009-03-26  Tom Tromey  <[email protected]>
9122
9123         * breakpoint.c (resolve_sal_pc): Preserve original line number
9124         when skipping prologue.
9125
9126 2009-03-26  Doug Evans  <[email protected]>
9127
9128         * thread.c (inferior_thread) Remove "extern" in definition.
9129
9130 2009-03-26  Thiago Jung Bauermann  <[email protected]>
9131
9132         Add gdb.Value.is_optimized_out attribute.
9133         * python/python-value.c (valpy_get_is_optimized_out): New
9134         function.
9135         (value_object_getset): New variable.
9136         (value_object_type): Initialize tp_getset element.
9137
9138 2009-03-26  Joel Brobecker  <[email protected]>
9139
9140         Recognize missing DW_AT_location as <value optimized out>.
9141         * dwarf2read.c
9142         (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
9143         Call add_symbol_to_list.
9144
9145 2009-03-25  Tom Tromey  <[email protected]>
9146
9147         * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
9148         * stack.c (print_this_frame_argument_p): Use check_typedef.
9149
9150 2009-03-25  Tom Tromey  <[email protected]>
9151
9152         * configure: Rebuild.
9153         * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
9154         Rearrange flags setting.  Add comments.
9155
9156 2009-03-25  Pierre Muller  <[email protected]>
9157
9158         * config/i386/nm-i386.h: Remove code within
9159         I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
9160         * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
9161         macro.
9162         * config/i386/nm-cygwin64.h: Ditto.
9163         * config/i386/nm-fbsd.h: Ditto.
9164         * config/i386/nm-go32.h: Ditto.
9165         * config/i386/nm-linux.h: Ditto.
9166         * config/i386/nm-linux64.h: Ditto.
9167
9168 2009-03-25  Pierre Muller  <[email protected]>
9169
9170         ARI fix: "xasprintf" rule.
9171         * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
9172
9173 2009-03-25  Pedro Alves  <[email protected]>
9174
9175         * remote.c (remote_start_remote): In non-stop mode, call
9176         init_wait_for_inferior before adding threads and inferiors.
9177
9178 2009-03-25  Joel Brobecker  <[email protected]>
9179
9180         * breakpoint.c (breakpoint_thread_match): Split a large condition
9181         into several smaller conditions.  No behavior change.
9182
9183 2009-03-25  Pedro Alves  <[email protected]>
9184
9185         * infrun.c (infrun_thread_thread_exit): New.
9186         (_initialize_infrun): Attach it to the thread_exit observer.
9187         * thread.c (delete_thread_1): Always call the observer, passing it
9188         the silent flag.
9189         * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter.  If
9190         SILENT, return immediately.
9191
9192 2009-03-25  Pedro Alves  <[email protected]>
9193
9194         * infrun.c (normal_stop): Use has_stack_frames instead of
9195         target_has_stack.
9196         * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
9197         when there is no thread selected.
9198         (mi_cmd_execute): Don't special case commands that can run without
9199         a valid selected thread.
9200         * top.c (execute_command): Don't special case commands that can
9201         run without a valid selected thread.  Use has_stack_frames.
9202         * infcmd.c (ensure_valid_thread): New.
9203         (continue_1, step_1, jump_command, signal_command): Use it.
9204         (detach_command): Error out if there's no selected thread/inferior.
9205         * thread.c (print_thread_info): Allow having no thread selected.
9206         (switch_to_thread): Don't read the PC if there is no current thread.
9207         (do_restore_current_thread_cleanup): Don't record the current
9208         frame if there is no current thread.
9209         (make_cleanup_restore_current_thread): Don't read frame info if
9210         there is no selected thread.
9211         (_initialize_thread): Don't mark commands as
9212         "no_selected_thread_ok".
9213         * frame.c (get_current_frame): Error out if there is no valid
9214         selected thread.
9215         (has_stack_frames): Return false if there is no valid
9216         selected thread.
9217         * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
9218         "no_selected_thread_ok".
9219         * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
9220         (get_cmd_no_selected_thread_ok): Delete.
9221         * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
9222         (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
9223         Delete declaration.
9224         * stack.c (get_selected_block): Use has_stack_frames.
9225
9226 2009-03-25  Thiago Jung Bauermann  <[email protected]>
9227
9228         Fix size of FPSCR in Power 7 processors.
9229         * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9230         (PPC_FEATURE_HAS_DFP): New #define.
9231         (ppc_linux_read_description): Check for DFP feature instead of
9232         ISA 2.05 to decide on size of the FPSCR.
9233
9234 2009-03-25  Kevin Buettner  <[email protected]>
9235
9236         * mn10300-tdep.c (trad-frame.h): Don't include.
9237         (prologue-value.h): Include.
9238         (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
9239         (struct mn10300_prologue): Define.
9240         (push_reg, translate_rreg, check_for_saved): New functions.
9241         (mn10300_analyze_prologue): Rewrite, using prologue-value
9242         machinery.  Handle more instructions than before.  Permit
9243         instructions to occur in any order.
9244         (mn10300_skip_prologue): Find the extents of the function
9245         in question; mn10300_analyze_prologue no longer does this.
9246         (mn10300_analyze_frame_prologue): New function.
9247         (mn10300_frame_base): New function.
9248         (mn10300_frame_this_id): Rewrite, no longer using trad-frame
9249         implementation.
9250         (mn10300_frame_prev_register): Likewise.
9251         (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
9252         (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
9253         `this_frame'.
9254         (mn10300_frame_unwind_init): Don't call frame_base_set_default().
9255
9256 2009-03-25  Pierre Muller  <[email protected]>
9257
9258         Fix completer problem for filename completion on the first try.
9259
9260         * gdb/completer.h (gdb_completion_word_break_characters): New function.
9261         * gdb/completer.c: Include gdb_assert.h.
9262         (complete_line_internal_reason): New enum.
9263         (complete_line_internal): Change last argument type to
9264         complete_line_internal_reason.
9265         Modify function to handle the different complete_line_internal_reason
9266         argument values.
9267         (complete_line): Adapt to change in complete_line_internal.
9268         (command_completer): Ditto.
9269         (gdb_completion_word_break_characters): Implement new function.
9270         * top.c (init_main): Set  rl_completion_word_break_hook to
9271         gdb_completion_word_break_characters.
9272
9273
9274 2009-03-25  Pierre Muller  <[email protected]>
9275
9276         ARI fix: "strlen d_name" rule.
9277         * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
9278
9279
9280 2009-03-24  Tom Tromey  <[email protected]>
9281             Pedro Alves  <[email protected]>
9282
9283         * configure, config.in: Rebuild.
9284         * configure.ac: Check for libiconvlist.
9285         * charset.c: Check HAVE_LIBICONVLIST.
9286         * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
9287         LIBICONV_LIBDIR.  Update CPPFLAGS and LIBS.
9288         * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
9289         Remove.
9290         (INTERNAL_CFLAGS_BASE): Update.
9291         (INTERNAL_LDFLAGS): Update.
9292         (CLIBS): Update.
9293
9294 2009-03-24  Jan Kratochvil  <[email protected]>
9295
9296         * configure.ac: Initialize the variable $PREFER_CURSES.
9297         * configure: Regenerated.
9298
9299 2009-03-24  Jan Kratochvil  <[email protected]>
9300
9301         * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
9302         * configure: Regenerated.
9303
9304 2009-03-24  Pierre Muller  <[email protected]>
9305
9306         ARI fix: "strerror" rule.
9307         * darwin-nat.c (darwin_ptrace): Use safe_strerror.
9308         (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
9309
9310 2009-03-23  Joel Brobecker  <[email protected]>
9311
9312         * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
9313         before looking up the fields inside our struct type.
9314
9315 2009-03-23  Joel Brobecker  <[email protected]>
9316
9317         * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
9318         trying to resolve the type qualification.
9319
9320 2009-03-23  Joel Brobecker  <[email protected]>
9321
9322         * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
9323         we try to apply the attribute on the real type, rather than
9324         its associated typedef.
9325
9326 2009-03-23  Joel Brobecker  <[email protected]>
9327
9328         * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
9329         to make sure we try to get the modulus of the actual type, not the
9330         associated typedef.
9331
9332 2009-03-23  Joel Brobecker  <[email protected]>
9333
9334         * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
9335         [OP_ATR_LENGTH]: When using the attribute on a type, make sure
9336         to get the real type, not the associated typedef.
9337
9338 2009-03-23  Joel Brobecker  <[email protected]>
9339
9340         * ada-lang.c (ada_get_field_index): Add handling of the case
9341         when TYPE is a typedef of a struct.
9342
9343 2009-03-23  Joel Brobecker  <[email protected]>
9344
9345         Add gdb_usleep as a portable version of usleep based on gdb_select.
9346         * gdb_usleep.h, gdb_usleep.c: New files.
9347         * Makefile.in (SFILES): Add gdb_usleep.c.
9348         (HFILES_NO_SRCDIR): Add gdb_usleep.h.
9349         (COMMON_OBS): Add gdb_usleep.o.
9350         * ser-unix.c (hardwire_send_break): Replace call to gdb_select
9351         by call to gdb_usleep.
9352
9353 2009-03-23  Joel Brobecker  <[email protected]>
9354
9355         * buildsym.c (end_symtab): If we ignore the subfiles, then
9356         unlink the associated symtabs if they were already allocated.
9357
9358 2009-03-23  Jerome Guitton  <[email protected]>
9359
9360         Provide a way to force building of GDB with libcurses.
9361         * configure.ac: Add --with-curses.
9362         * configure: Regenerated.
9363
9364 2009-03-23  Tom Tromey  <[email protected]>
9365
9366         * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
9367         error message.
9368
9369 2009-03-23  Paul Pluzhnikov  <[email protected]>
9370
9371         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
9372         solib_contains_address_p instead of searching.
9373
9374 2009-03-23  Tom Tromey  <[email protected]>
9375
9376         * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
9377         (iconv): Make 'inbuf' argument const.
9378         (convert_between_encodings): Use ICONV_CONST.
9379         (wchar_iterate): Likewise.
9380
9381 2009-03-22  Christopher Faylor  <[email protected]>
9382
9383         * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
9384         dynamically loaded function.
9385         (LookupPrivilegeValueA): Ditto.
9386         (OpenProcessToken): Ditto.
9387         (AdjustTokenPrivileges): Rename and define placeholder for address of
9388         dynamically loaded function.
9389         (LookupPrivilegeValueA): Ditto.
9390         (OpenProcessToken): Ditto.
9391         (set_process_privilege): Remove check for loaded functions.
9392         (bad_OpenProcessToken): Define.
9393         (_initialize_loadable): Load token functions from advapi here, setting
9394         OpenProcessToken function to a dummy static function which always return
9395         error if OS doesn't support this functionality.
9396
9397 2009-03-22   Nicolas Roche  <[email protected]>
9398              Christopher Faylor <[email protected]>
9399
9400         * win32-nat.c (ctrl_c_handler): New function.
9401         (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
9402         is run in a separate console.
9403
9404 2009-03-22  Christopher Faylor  <[email protected]>
9405
9406         * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
9407         for dynamically loaded function.
9408         (DebugBreakProcess): Ditto.
9409         (DebugSetProcessKillOnExit): Ditto.
9410         (EnumProcessModules): Ditto.
9411         (GetModuleFileNameExA): Ditto.
9412         (GetModuleInformation): Ditto.
9413         (DebugActiveProcessStop): Rename and define placeholder for address of
9414         dynamically loaded function.
9415         (DebugBreakProcess): Ditto.
9416         (DebugSetProcessKillOnExit): Ditto.
9417         (EnumProcessModules): Ditto.
9418         (GetModuleFileNameExA): Ditto.
9419         (GetModuleInformation): Ditto.
9420         (psapi_loaded): Delete.
9421         (get_module_name): Don't check psapi_loaded, just rely on the fact that
9422         dynamically loaded functions will return failure if they weren't
9423         previously found.
9424         (has_detach_ability): Delete.
9425         (windows_attach): Remove call to has_detach_ability ().  Just rely on
9426         functions being callable.
9427         (bad_DebugActiveProcessStop): Define.
9428         (bad_DebugBreakProcess): Ditto.
9429         (bad_DebugSetProcessKillOnExit): Ditto.
9430         (bad_EnumProcessModules): Ditto.
9431         (bad_GetModuleFileNameExA): Ditto.
9432         (bad_GetModuleInformation): Ditto.
9433         (_initialize_loadable): Rename from _initialize_psapi.  Initialize all
9434         dynamic storage here, setting nonexistent functions to dummy static
9435         functions which always return error.
9436
9437 2009-03-22  Pedro Alves  <[email protected]>
9438
9439         * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
9440         to the about_to_proceed observer notification.
9441         (mi_about_to_proceed): New.
9442         (mi_on_resume): Only output ^running and the prompt here if the
9443         target was proceeded.
9444         * breakpoint.c (breakpoint_proceeded): New static.
9445         (breakpoint_about_to_proceed): New.
9446         (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
9447         the about_to_proceed observer notification.
9448         * inferior.h (breakpoint_proceeded): Delete declaration.
9449         * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
9450         Notify the about_to_proceed observers.
9451         (struct inferior_status): Delete breakpoint_proceeded member.
9452         (save_inferior_status): Don't save it.
9453         (restore_inferior_status): Don't restore it.
9454         * mi-main.h (mi_proceeded): Declare.
9455         * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
9456         a command.
9457
9458 2009-03-22  Pedro Alves  <[email protected]>
9459
9460         * gdbthread.h (struct thread_info): Add in_infcall member.
9461         * infcall.c (run_inferior_call): Save, set and restore in_infcall.
9462         Remove reverences to suppress_resume_observer.  Refresh
9463         `call_thread' after returning from `proceed'.
9464         * infcmd.c (suppress_resume_observer): Delete.
9465         * inferior.h (suppress_resume_observer): Delete declaration.
9466         * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
9467         inferior function.
9468         * thread.c (set_running): Remove references to
9469         suppress_resume_observer.
9470         * infrun.c (struct inferior_status): Add in_infcall member.
9471         (save_inferior_status): Save it.
9472         (restore_inferior_status): Restore it.
9473
9474 2009-03-22  Pedro Alves  <[email protected]>
9475
9476         * infcall.c (run_inferior_call): Remove references to
9477         suppress_stop_observer.
9478         * infcmd.c (suppress_stop_observer): Delete.
9479         (finish_command_continuation): Remove NOTE.  Don't clear
9480         suppress_stop_observer anymore.
9481         (finish_command_continuation_free_arg): Likewise.
9482         (finish_forward): Remove references to suppress_stop_observer.
9483         Call normal_stop observer if we haven't already.
9484         * inferior.h (suppress_stop_observer): Delete.
9485         * infrun.c (normal_stop): When deciding to suppress the
9486         normal_stop observer, check for proceed_to_finish instead of
9487         suppress_stop_observer.
9488
9489 2009-03-22  Pedro Alves  <[email protected]>
9490
9491         * symfile.c (symfile_relocate_debug_section): Remove check for
9492         SEC_DEBUGGING.
9493
9494 2009-03-21  Jan Kratochvil  <[email protected]>
9495             Jim Blandy  <[email protected]>
9496             Thiago Jung Bauermann  <[email protected]>
9497             Tom Tromey  <[email protected]>
9498
9499         Miscellaneous fixes to the Python code.
9500         * python/python-cmd.c (cmdpy_init): Accept keyword
9501         arguments.
9502         * python/python-value.c (valpy_string): Accept keyword
9503         arguments.
9504         (valpy_binop): Use `break' to exit from the TRY_CATCH block.
9505         Do not call value_to_value_object on NULL RES_VAL.
9506         (value_object_methods): Change `string' entry to also accept
9507         keyword arguments.
9508         (convert_value_from_python): Return a copy of the value if obj is
9509         a gdb.Value object.
9510         (value_object_methods): Mark the `string' method as accepting
9511         keywords, and show method "prototype" in the doc string.
9512         * python/python.c (get_parameter): Don't return inside a
9513         TRY_CATCH.
9514
9515 2009-03-20  Tom Tromey  <[email protected]>
9516
9517         Add support for convenience functions in Python.
9518         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
9519         (SUBDIR_PYTHON_SRCS): Add python-function.c.
9520         (python-function.o): New target.
9521         * eval.c: Include "python/python.h" and <ctype.h>.
9522         (evaluate_subexp_standard): Handle values of type
9523         TYPE_CODE_INTERNAL_FUNCTION.
9524         * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
9525         * parse.c (write_exp_string): Remove duplicate word in comment.
9526         * python/python-function.c: New file.
9527         * python/python-internal.h (gdbpy_initialize_functions): Add
9528         prototype.
9529         * python/python.c (_initialize_python): Call
9530         gdbpy_initialize_functions.
9531         * valprint.c (value_check_printable): Handle values of type
9532         TYPE_CODE_INTERNAL_FUNCTION.
9533         * value.c: Include "cli/cli-decode.h".
9534         (internal_function): New struct.
9535         (functionlist, internal_fn_type): New static variables.
9536         (lookup_only_internalvar,
9537         lookup_internalvar): Add const qualifier to name argument.
9538         (create_internalvar): Likewise.  Initialize new field.
9539         (set_internal_var): Fix typo in comment.  Don't allow assignment
9540         to canonical variable.
9541         (value_create_internal_function, value_internal_function_name,
9542         call_internal_function, function_command, function_destroyer,
9543         add_internal_function): New functions.
9544         (_initialize_values): Create `function' placeholder command.
9545         Initialize internal_fn_type.
9546         * value.h (lookup_only_internalvar, create_internalvar,
9547         lookup_internalvar): Add const qualifier to name argument.
9548         (internal_function_fn, add_internal_function, call_internal_function,
9549         value_internal_function_name): Add prototypes.
9550         (struct internalvar) <canonical>: New field.
9551
9552 2009-03-20  Tom Tromey  <[email protected]>
9553
9554         * c-lang.c (evaluate_subexp_c): Call check_typedef.
9555
9556 2009-03-20  Tom Tromey  <[email protected]>
9557             Julian Brown  <[email protected]>
9558
9559         PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
9560         PR i18n/9401, PR exp/9613:
9561         * NEWS: Update
9562         * value.h (value_typed_string): Declare.
9563         (val_print_string): Update.
9564         * valprint.h (print_char_chars): Update.
9565         * valprint.c (print_char_chars): Add type argument.  Update.
9566         (val_print_string): Likewise.
9567         * valops.c (value_typed_string): New function.
9568         * utils.c (host_char_to_target): New function.
9569         (parse_escape): Use host_char_to_target, host_hex_value.  Update.
9570         Remove '^' case.
9571         (no_control_char_error): Remove.
9572         * typeprint.c (print_type_scalar): Update.
9573         * scm-valprint.c (scm_scmval_print): Update.
9574         * scm-lang.h (scm_printchar, scm_printstr): Update.
9575         * scm-lang.c (scm_printchar): Add type argument.
9576         (scm_printstr): Likewise.
9577         * printcmd.c (print_formatted): Update.
9578         (print_scalar_formatted): Update.
9579         (printf_command) <wide_string_arg, wide_char_arg>: New constants.
9580         Handle '%lc' and '%ls'.
9581         * parser-defs.h (struct typed_stoken): New type.
9582         (struct stoken_vector): Likewise.
9583         (write_exp_string_vector): Declare.
9584         * parse.c (write_exp_string_vector): New function.
9585         * p-valprint.c (pascal_val_print): Update.
9586         * p-lang.h (is_pascal_string_type, pascal_printchar,
9587         pascal_printstr): Update.
9588         * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
9589         Add 'char_type' argument.
9590         (pascal_emit_char): Add type argument.
9591         (pascal_printchar): Likewise.
9592         (pascal_printstr): Likewise.
9593         * objc-lang.c (objc_emit_char): Add type argument.
9594         (objc_printchar): Likewise.
9595         (objc_printstr): Likewise.
9596         * macroexp.c (get_character_constant): Handle unicode characters.
9597         Use c_parse_escape.
9598         (get_string_literal): Handle unicode strings.  Use
9599         c_parse_escape.
9600         * m2-valprint.c (print_unpacked_pointer): Update.
9601         (m2_print_array_contents): Update.
9602         (m2_val_print): Update.
9603         * m2-lang.c (m2_emit_char): Add type argument.
9604         (m2_printchar): Likewise.
9605         (m2_printstr): Likewise.
9606         * language.h (struct language_defn) <la_printchar>: Add type
9607         argument.
9608         <la_printstr, la_emitchar>: Likewise.
9609         (LA_PRINT_CHAR): Likewise.
9610         (LA_PRINT_STRING): Likewise.
9611         (LA_EMIT_CHAR): Likewise.
9612         * language.c (unk_lang_emit_char): Add type argument.
9613         (unk_lang_printchar): Likewise.
9614         (unk_lang_printstr): Likewise.
9615         * jv-valprint.c (java_val_print): Update.
9616         * jv-lang.c (java_emit_char): Add type argument.
9617         * f-valprint.c (f_val_print): Update.
9618         * f-lang.c (f_emit_char): Add type argument.
9619         (f_printchar): Likewise.
9620         (f_printstr): Likewise.
9621         * expprint.c (print_subexp_standard): Update.
9622         * charset.h (target_wide_charset): Declare.
9623         (c_target_char_has_backslash_escape, c_parse_backslash,
9624         host_char_print_literally, host_char_to_target,
9625         target_char_to_host, target_char_to_control_char): Remove.
9626         (enum transliterations): New type.
9627         (convert_between_encodings): Declare.
9628         (HOST_ESCAPE_CHAR): New define.
9629         (host_letter_to_control_character, host_hex_value): Declare.
9630         (enum wchar_iterate_result): New enum.
9631         (struct wchar_iterator): Declare.
9632         (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
9633         wchar_push_back): Declare.
9634         * charset-list.h: New file.
9635         * c-valprint.c (textual_name): New function.
9636         (textual_element_type): Handle wide character types.
9637         (c_val_print): Pass original type to textual_element_type.  Handle
9638         wide character types.
9639         (c_value_print): Use textual_element_type.  Pass original type of
9640         value to val_print.
9641         * c-lang.h (enum c_string_type): New type.
9642         (c_printchar, c_printstr): Update.
9643         * c-lang.c (classify_type): New function.
9644         (print_wchar): Likewise.
9645         (c_emit_char): Add type argument.  Handle wide characters.
9646         (c_printchar): Likewise.
9647         (c_printstr): Add type argument.  Handle wide and multibyte
9648         character sets.
9649         (convert_ucn): New function.
9650         (emit_numeric_character): Likewise.
9651         (convert_octal): Likewise.
9652         (convert_hex): Likewise.
9653         (ADVANCE): New macro.
9654         (convert_escape): New function.
9655         (parse_one_string): Likewise.
9656         (evaluate_subexp_c): Likewise.
9657         (exp_descriptor_c): New global.
9658         (c_language_defn): Use exp_descriptor_c.
9659         (cplus_language_defn): Likewise.
9660         (asm_language_defn): Likewise.
9661         (minimal_language_defn): Likewise.
9662         (charset_for_string_type): New function.
9663         * c-exp.y (%union): Add 'svec' and 'tsval'.
9664         (CHAR): New token.
9665         (exp): Add CHAR production.
9666         (string_exp): Rewrite.
9667         (exp) <string_exp>: Rewrite.
9668         (tempbuf): Now global.
9669         (tempbuf_init): New global.
9670         (parse_string_or_char): New function.
9671         (yylex) <tempbuf>: Now global.
9672         <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
9673         Remove.
9674         Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
9675         (c_parse_escape): New function.
9676         * auxv.c (fprint_target_auxv): Update.
9677         * ada-valprint.c (ada_emit_char): Add type argument.
9678         (ada_printchar): Likewise.
9679         (ada_print_scalar): Update.
9680         (printstr): Add type argument.  Update calls to ada_emit_char.
9681         (ada_printstr): Add type argument.
9682         (ada_val_print_array): Update.
9683         (ada_val_print_1): Likewise.
9684         * ada-lang.c (emit_char): Add type argument.
9685         * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
9686         type arguments.
9687         * gdb_locale.h: Include langinfo.h.
9688         * charset.c (_initialize_charset): Set default host charset from
9689         the locale.  Don't register charsets.  Add target-wide-charset
9690         commands.  Call find_charset_names.
9691         (struct charset, struct translation): Remove.
9692         (GDB_DEFAULT_HOST_CHARSET): Remove.
9693         (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
9694         (target_wide_charset_name): New global.
9695         (show_host_charset_name): Handle "auto".
9696         (show_target_wide_charset_name): New function.
9697         (host_charset_enum, target_charset_enum): Remove.
9698         (charset_enum): New global.
9699         (all_charsets, register_charset, lookup_charset, all_translations,
9700         register_translation, lookup_translation): Remove.
9701         (simple_charset, ascii_print_literally, ascii_to_control): Remove.
9702         (iso_8859_print_literally, iso_8859_to_control,
9703         iso_8859_family_charset): Remove.
9704         (ebcdic_print_literally, ebcdic_to_control,
9705         ebcdic_family_charset): Remove.
9706         (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
9707         register_iconv_charsets): Remove.
9708         (target_wide_charset_be_name, target_wide_charset_le_name): New
9709         globals.
9710         (identity_either_char_to_other): Remove.
9711         (set_be_le_names, validate): New functions.
9712         (backslashable, backslashed, represented): Remove.
9713         (default_c_target_char_has_backslash_escape): Remove.
9714         (default_c_parse_backslash, iconv_convert): Remove.
9715         (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
9716         ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
9717         iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
9718         ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
9719         ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
9720         ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
9721         (table_convert_char, table_translation, simple_table_translation):
9722         Remove.
9723         (current_host_charset, current_target_charset,
9724         c_target_char_has_backslash_escape_func,
9725         c_target_char_has_backslash_escape_baton): Remove.
9726         (c_parse_backslash_func, c_parse_backslash_baton): Remove.
9727         (host_char_to_target_func, host_char_to_target_baton): Remove.
9728         (target_char_to_host_func, target_char_to_host_baton): Remove.
9729         (cached_iconv_host_to_target, cached_iconv_target_to_host):
9730         Remove.
9731         (lookup_charset_or_error, check_valid_host_charset): Remove.
9732         (set_host_and_target_charsets): Remove.
9733         (set_host_charset, set_target_charset): Remove.
9734         (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
9735         (set_target_wide_charset_sfunc): New function.
9736         (show_charset): Print target wide character set.
9737         (host_charset, target_charset): Rewrite.
9738         (target_wide_charset): New function.
9739         (c_target_char_has_backslash_escape): Remove.
9740         (c_parse_backslash): Remove.
9741         (host_letter_to_control_character): New function.
9742         (host_char_print_literally): Remove.
9743         (host_hex_value): New function.
9744         (target_char_to_control_char): Remove.
9745         (cleanup_iconv): New function.
9746         (convert_between_encodings): New function.
9747         (target_char_to_host): Remove.
9748         (struct wchar_iterator): Define.
9749         (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
9750         wchar_push_back): New functions.
9751         (do_cleanup_iterator): New function.
9752         (char_ptr): New typedef.
9753         (charsets): New global.
9754         (add_one, find_charset_names): New functions.
9755         (default_charset_names): New global.
9756         (auto_host_charset_name): Likewise.
9757         * aclocal.m4, config.in, configure: Rebuild.
9758         * configure.ac: Call AM_LANGINFO_CODESET.
9759         (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
9760         (AM_ICONV): Invoke earlier.
9761         * acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
9762         LIBICONV_LIBDIR.  Check for libiconv in build tree.
9763         * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
9764         (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
9765         (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
9766         * gdb_obstack.h (obstack_grow_wstr): New define.
9767         * gdb_wchar.h: New file.
9768         * defs.h: Include it.
9769
9770 2009-03-20  Tom Tromey  <[email protected]>
9771             Jan Kratochvil  <[email protected]>
9772
9773         * dwarf2read.c (process_die): Handle DW_TAG_typedef.
9774         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
9775         typedef.
9776         * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
9777         SYMBOL_TYPE result.
9778         * ada-typeprint.c (print_array_type): Do the NULL check
9779         unconditionally.
9780
9781 2009-03-19  Tom Tromey  <[email protected]>
9782
9783         * utils.c (do_obstack_free): New function.
9784         (make_cleanup_obstack_free): Likewise.
9785         * defs.h (make_cleanup_obstack_free): Declare.
9786
9787 2009-03-18  Doug Evans  <[email protected]>
9788
9789         * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
9790         int, not a long long.
9791         (linux_nat_info_proc_cmd): Store pid in long instead of long long.
9792
9793         * expprint.c (dump_raw_expression): Print note if non-NULL.
9794
9795         * printcmd.c (display_uses_solib_p): Redo loop, scan element list
9796         backwards.
9797
9798 2009-03-18  Nathan Sidwell  <[email protected]>
9799
9800         * Makefile.in: Update license to GPLv3.
9801         * ada-exp.y: Update license to GPLv3.
9802         * ada-lex.l: Update license to GPLv3.
9803         * c-exp.y: Update license to GPLv3.
9804         * cp-name-parser.y: Update license to GPLv3.
9805         * darwin-nat-info.c: Update license to GPLv3.
9806         * f-exp.y: Update license to GPLv3.
9807         * gdb_thread_db.h: Update license to GPLv3.
9808         * hppanbsd-nat.c: Update license to GPLv3.
9809         * hppanbsd-tdep.c: Update license to GPLv3.
9810         * hppaobsd-tdep.c: Update license to GPLv3.
9811         * jv-exp.y: Update license to GPLv3.
9812         * m2-exp.y: Update license to GPLv3.
9813         * objc-exp.y: Update license to GPLv3.
9814         * p-exp.y: Update license to GPLv3.
9815         * reply_mig_hack.awk: Update license to GPLv3.
9816         * reverse.c: Update license to GPLv3.
9817         * xtensa-xtregs.c: Update license to GPLv3.
9818
9819 2009-03-18  Pedro Alves  <[email protected]>
9820
9821         * remote.c (remote_close): Don't call generic_mourn_inferior.
9822         (remote_mourn_1): Call generic_mourn_inferior after closing the
9823         target.
9824
9825 2009-03-18  Pedro Alves  <[email protected]>
9826
9827         * remote.c (remote_start_remote): Add missing call to
9828         init_wait_for_inferior in non-stop mode.
9829
9830 2009-03-18  Pedro Alves  <[email protected]>
9831
9832         * breakpoint.c (bpstat_should_step): Only consider software
9833         watchpoints that have a location.
9834
9835 2009-03-17  Joel Brobecker  <[email protected]>
9836
9837         Add a target_ops parameter to the to_kill method in struct target_ops.
9838
9839         * target.h (struct target_ops): Add a "target_ops *" parameter to
9840         method to_kill.
9841         (target_kill): Remove macro. Add declaration.
9842         * target.c (debug_to_kill): Delete, no longer necessary.
9843         (target_kill): New function.
9844         (update_current_target):  Stop inheriting the to_kill method.
9845         Do not de_fault it to no_process either.
9846         (setup_target_debug): Do not set current_target.to_kill.
9847         * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
9848         linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
9849         remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
9850         accordingly.
9851
9852 2009-03-17  Doug Evans  <[email protected]>
9853
9854         * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
9855         glibc 2.3.2 and earlier.
9856
9857 2009-03-17  Joel Brobecker  <[email protected]>
9858
9859         * frame.c (get_prev_frame_1): Do not perform the inner_frame
9860         sanity check if this_frame is not NORMAL.
9861         (frame_id_inner): Update the description of this function.
9862
9863 2009-03-17  Hui Zhu  <[email protected]>
9864
9865         * stack.c: Change the introduce of "disassemble-next-line".
9866
9867 2009-03-17  Pedro Alves  <[email protected]>
9868
9869         * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
9870         declare as extern.
9871
9872 2009-03-17  Hui Zhu  <[email protected]>
9873
9874         * stack.c: Include valprint.h.
9875         (disassemble_next_line): New enum.
9876         (show_disassemble_next_line): New function.  Show the current
9877         value of disassemble-next-line.
9878         (gdb_disassembly_stub_args): New struct for argument passing
9879         between function do_gdb_disassembly and function
9880         gdb_disassembly_stub.
9881         (gdb_disassembly_stub): New function.  Helper for
9882         gdb_disassembly.
9883         (do_gdb_disassembly): New function.  Use TRY_CATCH to catch
9884         the exception from the gdb_disassembly because it will be
9885         broken by filter sometime.
9886         (print_frame_info): If disassemble-next-line is set to auto
9887         or on and doesn't have the line debug messages for $pc,
9888         output the next instruction.
9889         If disassemble-next-line is set to on and there is line debug
9890         messages, output assembly codes for next line.
9891         (_initialize_stack): Make the "set disassemble-next-line"
9892         command an auto-boolean command.  Change its class to
9893         class_stack.  Place it in the top level set list.  Extend help
9894         to describe the auto mode.
9895
9896 2009-03-17  Pedro Alves  <[email protected]>
9897
9898         * infrun.c (normal_stop): Don't overwrite old_chain.
9899
9900 2009-03-16  Joel Brobecker  <[email protected]>
9901
9902         * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
9903         which is undefined, by call to regcache_invalidate, which should
9904         do what the original author wanted to do.
9905
9906 2009-03-16  Joel Brobecker  <[email protected]>
9907
9908         * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
9909         (mips_create_inferior): Likewise.
9910
9911 2009-03-16  Joel Brobecker  <[email protected]>
9912
9913         * go32-nat.c (go32_create_inferior): Add missing ops parameter.
9914
9915 2009-03-16  Joel Brobecker  <[email protected]>
9916
9917         * darwin-nat.c (darwin_resume): Fix a compiler warning when
9918         building on x86_64-darwin.
9919
9920 2009-03-16  Tristan Gingold  <[email protected]>
9921
9922         * configure.tgt: Add handling for x86_64-darwin.
9923
9924 2009-03-16  Jan Kratochvil  <[email protected]>
9925
9926         * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
9927
9928 2009-03-15  Joel Brobecker  <[email protected]>
9929
9930         * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
9931         Use the ops parameter to get to the target beneath, rather than
9932         using the current_target global.  Using the current_target global
9933         was an unintended accident.
9934
9935 2009-03-15  Joel Brobecker  <[email protected]>
9936
9937         Fix an error happening while loading symbols from a core file
9938         (on AIX).
9939
9940         * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
9941         to detect whether we're debugging a core file or not.
9942
9943 2009-03-15  Joel Brobecker  <[email protected]>
9944
9945         Modernize the aix-thread later by getting rid of the base_target
9946         global.  This brings back to life the AIX port which was otherwise
9947         crashing all the time.
9948
9949         * aix-thread.c (base_target): Delete.
9950         (pd_enable): Do not set base_target.
9951         (aix_thread_attach): Use find_target_beneath instead of base_target.
9952         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9953         (aix_thread_fetch_registers, aix_thread_store_registers),
9954         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9955         (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
9956         (aix_thread_kill): Delete. Does not seem necessary.
9957         (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
9958
9959 2009-03-15  Jan Kratochvil  <[email protected]>
9960
9961         * stack.c (return_command <retval_exp>): New variables retval_expr
9962         and old_chain.  Inline parse_and_eval to initialize retval_expr.  Check
9963         RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
9964         if RETURN_TYPE is NULL.
9965
9966 2009-03-14  Pedro Alves  <[email protected]>
9967
9968         * remote.c (PACKET_qAttached): New.
9969         (remote_query_attached): New.
9970         (remote_add_inferior): Add new `attached' argument.  Handle it.
9971         (remote_notice_new_inferior, remote_start_remote): Adjust to pass
9972         -1 to remote_add_inferior in new parameter.
9973         (extended_remote_attach_1): Adjust to pass 1 to
9974         remote_add_inferior in the new parameter.
9975         (extended_remote_create_inferior_1): Adjust to pass 0 to
9976         remote_add_inferior in the new parameter.
9977         (_initialize_remote): Add "set/show remote query-attached-packet"
9978         commands.
9979
9980 2009-03-13  Tom Tromey  <[email protected]>
9981
9982         * symtab.c (lookup_symbol_in_language): Use a cleanup.
9983
9984 2009-03-13  Doug Evans  <[email protected]>
9985
9986         * exceptions.h: Clean up some comments on catch_exceptions usage.
9987         * exceptions.c: Ditto.  Plus mark catch_errors as superseded by
9988         catch_exceptions.
9989
9990 2009-02-17  Joel Brobecker  <[email protected]>
9991
9992         The following patch helps getting rid of a warning inside solib-som.c.
9993
9994         * source.c (source_full_path_of): Constify parameter filename.
9995         * defs.h (source_full_path_of): Update declaration accordingly.
9996
9997 2009-03-12  Joel Brobecker  <[email protected]>
9998
9999         * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
10000         BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
10001         Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
10002
10003 2009-03-12  Joel Brobecker  <[email protected]>
10004
10005         * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
10006         promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
10007
10008 2009-03-12  Joel Brobecker  <[email protected]>
10009
10010         * ada-tasks.c (ada_task_is_alive): Move up and make static.
10011         * ada-lang.h (ada_task_is_alive): Remove declaration.
10012
10013 2009-03-12  Jerome Guitton  <[email protected]>
10014
10015         * ada-lang.c (ada_delta): Change the type of numerators and
10016         denominators to DOUBLEST, as they may not fit into a long.
10017         (scaling_factor): Ditto.
10018
10019 2009-03-12  Jerome Guitton  <[email protected]>
10020
10021         * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
10022
10023 2009-03-12  Joel Brobecker  <[email protected]>
10024
10025         * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
10026         types, if we are unable to determine the actual symbol type
10027         from its tag, then use the static approximation instead.
10028
10029 2009-03-12  Joel Brobecker  <[email protected]>
10030
10031         Fix crash printing packed record with packed array.
10032
10033         * ada-lang.c (ada_modulus_from_name): New function.
10034         (ada_modulus): In the case where the type length is bigger than
10035         the size of the type used to hold the bounds, try determining
10036         the modulus from the type name.
10037         (ada_value_primitive_packed_val): Fix bug in the computation of
10038         ntarg causing an out-of-buffer invalid access.
10039
10040 2009-03-12  Joel Brobecker  <[email protected]>
10041
10042         Fix segfault when printing short_integer'last.
10043
10044         * ada-lang.c (ada_find_any_type): Search in the primitive types
10045         if a symbol could not be found.
10046
10047 2009-03-12  Joel Brobecker  <[email protected]>
10048
10049         * ada-tasks.c (task_states,long_task_states): Add new states
10050         Activating and Acceptor_Delay_Sleep.  Update the description
10051         of state Acceptor_Sleep.
10052
10053 2009-03-12  Jonas Maebe <[email protected]>  (obvious change)
10054
10055         Fix a build failure on Darwin following some changes in
10056         the profile of some target_ops methods.
10057
10058         * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
10059         where missing.
10060         (darwin_stop_inferior, darwin_detach): Likewise.
10061
10062 2009-03-12  Vladimir Prus  <[email protected]>
10063
10064         Include token in ^running notification for CLI commands.
10065
10066         * mi/mi-main.c (mi_execute_command): Set current_token here.
10067         (mi_cmd_execute): Do not set current_token here.
10068
10069 2009-03-12  Vladimir Prus  <[email protected]>
10070
10071         Fix MI timings.
10072
10073         * mi/mi-main.c (mi_print_timing_maybe): New.
10074         (captured_mi_execute_command): Simplify. Output timings to
10075         CLI commands, too.
10076         (mi_execute_async_cli_command): Do not print timings.
10077         * mi/mi-main.h (mi_print_timing_maybe): Declare.
10078         * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
10079
10080 2009-03-12  Jerome Guitton  <[email protected]>
10081
10082         * xcoffread.c (process_linenos): Check if the line in the
10083         include table refers to the main source file and, if so,
10084         add them to the main subfile.
10085
10086 2009-03-12  Joel Brobecker  <[email protected]>
10087
10088         Fix a build failure on AIX introduced after a change in the profile
10089         of some of the "methods" in the target_ops structure.
10090         * aix-thread.c: Add missing target_ops parameter throughout.
10091
10092         Implement Ada task switching on AIX.
10093         * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
10094         (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
10095
10096 2009-03-11  Daniel Jacobowitz  <[email protected]>
10097
10098         * breakpoint.c (bpstat_check_breakpoint_conditions): Use
10099         value_mark and value_free_to_mark.
10100         * objfiles.c (free_objfile): Call objfile_free_data before
10101         freeing the BFD.
10102
10103 2009-03-10  Hui Zhu  <[email protected]>
10104
10105         * disasm.c (gdb_disassembly): Remove unused argument
10106         "line_num".
10107         * disasm.h (gdb_disassembly): Ditto.
10108         * cli/cli-cmds.c (print_disassembly): Ditto.
10109         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
10110
10111 2009-03-09  Paul Pluzhnikov  <[email protected]>
10112
10113         * solib.c (solib_contains_address_p): New function.
10114         (solib_name_from_address): Use it.
10115         * printcmd.c (display_uses_solib_p): Use it.
10116         * solib.h (solib_contains_address_p): Declare it.
10117
10118 2009-03-09  Jan Kratochvil  <[email protected]>
10119
10120         * varobj.c (free_variable): Call value_free.
10121
10122 2009-03-09  Jan Kratochvil  <[email protected]>
10123
10124         PR gdb/9873:
10125         * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
10126         Move the variable `macinfo_type' out of the loop.  Create a new
10127         processing pass before the current one to pre-create `current_file'.
10128         New complaint on misplaced zero/non-zero definitions/includes.
10129         Skip first DW_MACINFO_start_file with `at_commandline' set.
10130
10131 2008-03-09  Vladimir Prus  <[email protected]>
10132
10133        * solib.c (reload_shared_libraries): Give
10134        inferior a chance to reset solib breakpoint.
10135        Reinit frame cache.
10136
10137 2009-03-08  Christopher Faylor  <[email protected]>
10138
10139         * windows-nat.c (dr): Redefine to use largest possible integer which
10140         holds a pointer.
10141         (cygwin_set_dr): Avoid coercion.
10142
10143 2009-03-08  Oswald Buddenhagen  <[email protected]>
10144
10145         * windows-nat.c (windows_create_inferior): Implement --tty handling on
10146         non-cygwin.
10147
10148 2009-03-06  Paul Pluzhnikov  <[email protected]>
10149
10150         Rename solib_address to solib_name_from_address.
10151         * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
10152         (disable_breakpoints_in_unloaded_shlib): Update.
10153         * printcmd.c (display_uses_solib_p): Likewise.
10154         * stack.c (print_frame): Likewise.
10155         * solib.c: Rename.
10156         * solib.h: Rename.
10157
10158 2009-03-05  Paul Pluzhnikov  <[email protected]>
10159
10160         * printcmd.c (do_one_display): Reparse exp_string.
10161         (display_uses_solib_p): New function.
10162         (clear_dangling_display_expressions): New function.
10163         (_initialize_printcmd): Add observer.
10164         * solib.c (no_shared_libraries): Swap order of calls to
10165         clear_solib and objfile_purge_solibs.
10166
10167 2009-03-05  Joel Brobecker  <[email protected]>
10168
10169         Implement the target-specific part of Ada tasking support
10170         on Tru64.
10171
10172         * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
10173         (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
10174
10175 2009-03-05  Joel Brobecker  <[email protected]>
10176
10177         Get rid of the global "base_target" and use "find_target_beneath"
10178         to find the underlying target.
10179         * dec-thread.c (base_target): Delete.
10180         (enable_dec_thread): Remove assignement to base_target.
10181         (dec_thread_detach, dec_thread_wait, dec_thread_wait)
10182         (dec_thread_fetch_registers, dec_thread_store_registers)
10183         (dec_thread_mourn_inferior, dec_thread_pid_to_str):
10184         Update the function profile if necessary.
10185         Use find_target_beneath to call the same method but from
10186         the underlying target, removing the need for "base_target".
10187
10188         * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
10189         Fix a copy/paste error in a few debug traces...
10190
10191         * solib-osf.c (init_so): Use a simpler method for computing
10192         the size of lm_info structure. This also gets rid of warning
10193         emitted by the compiler.
10194
10195 2009-03-05  Pedro Alves  <[email protected]>
10196
10197         * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
10198         duplicates of permanent breakpoints.
10199
10200 2009-03-04  Pedro Alves  <[email protected]>
10201
10202         * inferior.h (notice_new_inferior): Declare.
10203         * infcmd.c (notice_new_inferior): New.
10204         * remote.c (remote_add_inferior, remote_add_thread): New.
10205         (notice_new_inferiors): Rename to...
10206         (remote_notice_new_inferior): ... this.  Add RUNNING argument.
10207         Use remote_add_thread instead of add_thread, passing it the
10208         RUNNING argument.  Add an inferior with remote_add_inferior.  If
10209         we just learned about an inferior, call notice_new_inferior.
10210         (record_currthread): Adjust.
10211         (remote_threads_info): Adjust to use remote_notice_new_inferior.
10212         (remote_start_remote, extended_remote_attach_1): Use
10213         remote_add_inferior.
10214         (process_stop_reply): Adjust.  Call remote_notice_new_inferior
10215         after handling expedited registers and watchpoint state.
10216         (extended_remote_create_inferior_1): Use remote_add_inferior.
10217
10218 2009-03-04  Aleksandar Ristovski  <[email protected]>
10219
10220         * infcmd.c (registers_info): Remove register number case.
10221
10222 2009-03-03  Pedro Alves  <[email protected]>
10223
10224         * top.c (quit_target): Check for target_has_execution before
10225         killing or detaching from inferiors.
10226
10227 2009-03-02  Joel Brobecker  <[email protected]>
10228
10229         Remove some unused routines.
10230
10231         * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
10232         Delete.
10233         * ada-lang.c (ada_task_list_iterator_ftype)
10234         (iterate_over_live_ada_tasks): Delete.
10235         * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
10236         Delete.
10237
10238 2009-03-01  Doug Evans  <[email protected]>
10239
10240         * symtab.c: Remove trailing whitespace throughout the file.
10241         (expand_line_sal): Fix some typos and whitespace.
10242
10243         * Makefile.in (clean): rm -f $(DEPDIR)/*.
10244
10245         * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
10246         (init.c): signals/ -> common/.
10247         (signals.o): Update.
10248         * target.h (target_signal_to_string,target_signal_to_string)
10249         (target_signal_from_name,target_signal_to_host_p)
10250         (target_signal_from_host,target_signal_to_host): Move to ...
10251         * common/gdb_signals.h: ... here.  New file.
10252         * common/signals.c: Moved here from signals/signals.c.
10253         #include gdb_signals.h, remove #include of target.h in gdb case.
10254         (target_signal_from_command,default_target_signal_to_host)
10255         (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
10256
10257         Include thread ID in target_wait debugging output.
10258         * infrun.c (print_target_wait_results): New function.
10259         (wait_for_inferior,fetch_inferior_event): Call it.
10260
10261 2009-02-27  Pedro Alves  <[email protected]>
10262
10263         * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
10264         with a ptid_t field.
10265         * linux-thread-db.c (thread_get_info_callback): Build the ptid
10266         using the pid stored in proc_handle.ptid.
10267         (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
10268         (check_for_thread_db, thread_db_detach, check_event)
10269         (thread_db_mourn_inferior, find_new_threads_callback)
10270         (thread_db_find_new_threads_1): Adjust.
10271         * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
10272         (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
10273
10274 2009-02-27  Phil Muldoon  <[email protected]>
10275
10276         * valprint.c (read_string): Rework clean-up logic. Use
10277         free_current_contents to clean-up buffer.
10278
10279 2009-02-27  Andreas Schwab  <[email protected]>
10280
10281         * MAINTAINERS: Update e-mail address.
10282
10283 2009-02-26  Phil Muldoon  <[email protected]>
10284
10285         * python/python-utils.c (python_string_to_unicode): Always return
10286         a new reference.
10287         (python_string_to_target_string): Decrement transient python
10288         instance.
10289         (python_string_to_host_string): Likewise.
10290
10291 2007-02-26  Pedro Alves  <[email protected]>
10292
10293         * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
10294         call to super_fetch_registers.
10295         (mips64_linux_store_registers): Pass `ops' to call to
10296         super_store_registers.
10297
10298 2009-02-25  Doug Evans  <[email protected]>
10299
10300         * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
10301         error message.
10302
10303         * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
10304         disabled_shlib_breaks, unused.
10305
10306         * printcmd.c (build_address_symbolic): Fix comment.
10307
10308 2009-02-25  Hui Zhu  <[email protected]>
10309
10310         * cli/cli-script.c (define_command): Add _() to query.
10311         * gnu-nat.c (inf_validate_task_sc): Ditto.
10312         * infcmd.c (kill_if_already_running): Ditto.
10313         (jump_command): Ditto.
10314         (attach_command): Ditto.
10315         * inflow.c (kill_command): Ditto.
10316         * infrun.c (handle_command): Ditto.
10317         * maint.c (maintenance_dump_me): Ditto.
10318         * memattr.c (mem_delete_command): Ditto.
10319         * monitor.c (monitor_interrupt_query): Ditto.
10320         * nto-procfs.c (interrupt_query): Ditto.
10321         * printcmd.c (undisplay_command): Ditto.
10322         * remote-mips.c (mips_kill): Ditto.
10323         * remote.c (interrupt_query): Ditto.
10324         * solib-irix.c (irix_open_symbol_file_object): Ditto.
10325         * solib-osf.c (osf_open_symbol_file_object): Ditto.
10326         * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
10327         * solib-som.c (som_open_symbol_file_object): Ditto.
10328         * solib-svr4.c (open_symbol_file_object): Ditto.
10329         * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
10330         * target.c (kill_or_be_killed): Ditto.
10331         * tracepoint.c (delete_trace_command): Ditto.
10332         * top.c (quit_confirm): Add _() to s that will be used
10333         in query.
10334
10335 2009-02-24  Pierre Muller  <[email protected]>
10336
10337         Fix windows-nat.c compilation failure.
10338
10339         * windows-nat.c (windows_thread_alive): Fix forward declaration.
10340         (get_windows_debug_event): Add ops parameter to call to windows_resume.
10341
10342 2009-02-23  Pedro Alves  <[email protected]>
10343
10344         * remote-sim.c (gdbsim_resume): Add target_ops* argument.
10345
10346 2009-02-23  Jay Krell  <[email protected]>  (tiny change)
10347
10348         * symtab.c (find_line_symtab): Initialize exact to avoid
10349         a compiler warning.
10350
10351 2009-02-23  Pedro Alves  <[email protected]>
10352
10353         * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
10354         `ops' to recursive call.
10355
10356 2009-02-23  Pedro Alves  <[email protected]>
10357
10358         * corelow.c (get_core_registers): Adjust.
10359         (core_file_thread_alive): Rename to...
10360         (core_thread_alive): ... this.
10361         (core_pid_to_str): Try gdbarch_core_pid_to_str first.
10362         (init_core_ops): Adjust.
10363         (coreops_suppress_target): Delete.
10364         (_initialize_corelow): Unconditionally add core_ops.
10365         * procfs.c: Include "inf-child.h".
10366         (procfs_ops): Delete.
10367         (init_procfs_ops): Delete.  Reimplement as...
10368         (procfs_target): ... this, inheriting from inf-child.
10369         (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
10370         (procfs_prepare_to_store): Delete.
10371         (procfs_store_registers, procfs_resume): Adjust.
10372         (procfs_open): Delete.
10373         (procfs_suppress_run): Delete.
10374         (procfs_can_run): Delete.
10375         (procfs_mourn_inferior): Adjust.
10376         (procfs_init_inferior): Add target_ops parameter.  Adjust.
10377         (procfs_create_inferior): Don't pass procfs_init_inferior to
10378         fork_inferior.  Instead call it after fork_inferior returns.
10379         (procfs_find_new_threads): Adjust.
10380         (_initialize_procfs): Adjust to use procfs_target instead of
10381         init_procfs_ops.
10382         * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
10383         (lwp_to_thread): Use target_thread_alive.
10384         (sol_thread_open): Delete.
10385         (sol_thread_attach): Delete.
10386         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10387         (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
10388         to use find_target_beneath.
10389         (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
10390         (sol_thread_xfer_partial): Adjust to use find_target_beneath.
10391         (sol_thread_files_info, sol_thread_kill_inferior): Delete.
10392         (check_for_thread_db): New.
10393         (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
10394         (sol_thread_new_objfile): Call check_for_thread_db.
10395         (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
10396         (sol_thread_can_run): Delete.
10397         (sol_thread_alive): Adjust to use find_target_beneath.
10398         (sol_thread_stop): Delete.
10399         (rw_common): Use target_write_memory or target_read_memory.
10400         (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
10401         (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
10402         (solaris_pid_to_str): Remove check for libthread_db initialization
10403         failing.
10404         (sol_find_new_threads): Remove check for libthread_db
10405         initialization failing, or for an invalid inferior_ptid.  Adjust
10406         to use find_target_beneath.
10407         (sol_core_open, sol_core_close, sol_core_detach,
10408         sol_core_files_info, sol_find_memory_regions,
10409         sol_make_note_section, ignore): Delete.
10410         (init_sol_thread_ops): Make it a thread_stratum target.  Remove
10411         unneeded callback settings.
10412         (init_sol_core_ops): Delete.
10413         (_initialize_sol_thread): No longer call init_sol_core_ops, set
10414         procfs_suppress_run, or hack with core_ops.
10415
10416         * target.h (struct target_ops): Add a target_ops * parameter to
10417         to_resume, to_fetch_registers, to_store_registers, to_thread_alive
10418         and to_find_new_threads.
10419         (target_fetch_registers, target_store_registers)
10420         (target_thread_alive, target_find_new_threads): Redeclare as
10421         function.
10422
10423         * target.c (update_current_target): Do not inherit or de_fault
10424         to_resume, to_fetch_registers, to_store_registers,
10425         to_thread_alive, to_find_new_threads.
10426         (target_resume): Adjust.
10427         (target_thread_alive, target_find_new_threads): New.
10428         (debug_to_resume, debug_to_fetch_registers): Delete.
10429         (target_fetch_registers): New.
10430         (debug_to_store_registers): Delete.
10431         (target_store_registers): New.
10432         (debug_to_thread_alive, debug_to_find_new_threads): Delete.
10433         (setup_target_debug): Adjust.
10434
10435         * gdbcore.h (core_ops): Delete declaration.
10436
10437         * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
10438         inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
10439         i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
10440         hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
10441         nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
10442         alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
10443         bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
10444         hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
10445         ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
10446         m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
10447         mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
10448         ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
10449         shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
10450         vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
10451
10452         * gdbarch.sh (core_pid_to_str): New gdbarch callback.
10453         * gdbarch.h, gdbarch.c: Regenerate.
10454
10455         * sol2-tdep.c: Include "inferior.h".
10456         (sol2_core_pid_to_str): New.
10457         * sol2-tdep.h (sol2_core_pid_to_str): Declare.
10458
10459         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
10460         * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
10461         * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
10462         * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
10463
10464 2009-02-22  Doug Evans  <[email protected]>
10465
10466         * exec.c (exec_file_attach): Fix comment.
10467
10468 2009-02-22  Pedro Alves  <[email protected]>
10469
10470         Silence a few -Wmissing-prototypes warnings.
10471
10472         PR build/9877:
10473         * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
10474         it static.
10475         * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
10476         * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
10477         * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
10478         (_initialize_amd64nbsd_tdep): ... this.
10479         * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
10480         (_initialize_arm_linux_tdep): Declare.
10481         * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
10482         * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
10483         * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
10484         * avr-tdep.c (avr_return_value): Make it static.
10485         (avr_frame_unwind_cache): Ditto.
10486         * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
10487         (bsd_uthread_solib_loaded): Ditto.
10488         (bsd_uthread_solib_unloaded): Ditto.
10489         (bsd_uthread_target): Ditto.
10490         (_initialize_bsd_uthread): Declare.
10491         * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
10492         (cris_frame_unwind_cache): Ditto.
10493         * frv-tdep.c (frv_return_value): Ditto.
10494         * h8300-tdep.c (h8300_use_struct_convention): Ditto.
10495         (h8300h_use_struct_convention): Ditto.
10496         * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
10497         Ditto.
10498         * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
10499         declarations.
10500         * hppabsd-tdep.c: Include hppabsd-tdep.h.
10501         (hppabsd_find_global_pointer): Make it static.
10502         * hppabsd-tdep.h: New.
10503         * hppanbsd-tdep.c: Include hppabsd-tdep.h.
10504         (hppabsd_init_abi): Remove declaration.
10505         (_initialize_hppabsd_tdep): Remove declaration.
10506         (_initialize_hppanbsd_tdep): Declare.
10507         * hppaobsd-tdep.c: Include hppabsd-tdep.h.
10508         (hppabsd_init_abi): Delete declaration.
10509         (hppaobsd_init_abi): Make it static.
10510         * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
10511         * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
10512         * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
10513         * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
10514         * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
10515         * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
10516         (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
10517         (_initialize_m32c_tdep): Declare.
10518         * m32r-rom.c (_initialize_m32r_rom): Declare.
10519         * m32r-tdep.c (m32r_skip_prologue): Make it static.
10520         (m32r_return_value): Ditto.
10521         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
10522         (m68hc11_return_value): Ditto.
10523         * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
10524         * m88k-tdep.c (m88k_frame_cache): Make it static.
10525         * mep-tdep.c (mep_gdb_print_insn): Ditto.
10526         (mep_return_value): Ditto.
10527         (_initialize_mep_tdep): Declare.
10528         * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
10529         * mips-linux-tdep.c (supply_64bit_reg): Make it static.
10530         (mips_linux_syscall_next_pc): Ditto.
10531         (_initialize_mips_linux_tdep): Declare.
10532         * mips-tdep.c (mips_single_step_through_delay): Make it static.
10533         * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
10534         * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
10535         * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
10536         * mt-tdep.c (_initialize_mt_tdep): Declare.
10537         * nbsd-tdep.c: Include nbsd-tdep.h.
10538         * nto-tdep.c (find_load_phdr): Make it static.
10539         (_initialize_nto_tdep): Declare.
10540         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
10541         static.
10542         (_initialize_ppc_linux_tdep): Declare.
10543         * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
10544         (m32r_insert_watchpoint, m32r_remove_watchpoint)
10545         (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
10546         static.
10547         * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
10548         * rs6000-nat.c: Include xcoffread.h.
10549         (find_toc_address): Don't extern declare get_toc_offset.  Adjust
10550         to call xcoff_get_to_offset.
10551         * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
10552         (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
10553         (rs6000_skip_trampoline_code): Make static.
10554         * s390-tdep.c (s390_regset_from_core_section): Ditto.
10555         * sh-tdep.c (sh_register_reggroup_p): Ditto.
10556         * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
10557         (_initialize_shnbsd_tdep): Declare.
10558         * solib-frv.c (displacement_from_map): Make static.
10559         (_initialize_frv_solib): Declare.
10560         * solib-irix.c (fetch_lm_info): Make static.
10561         (_initialize_irix_solib): Declare.
10562         * solib-som.c: Include solib-som.h.
10563         (som_solib_select): Line break.
10564         * sparc-tdep.c (sparc_regset_from_core_section): Make static.
10565         * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
10566         (_initialize_sparcnbsd_tdep): ... this.
10567         * spu-tdep.c (spu_software_single_step): Make it static.
10568         (_initialize_spu_tdep): Declare.
10569         * vax-tdep.c (vax_frame_cache): Make it static.
10570         * xcoffread.c: Include xcoffread.h.
10571         (get_toc_offset): Rename to ...
10572         (xcoff_get_toc_offset): ... this.
10573         (_initialize_xcoffread): Declare.
10574         * xcoffread.h: New.
10575         * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
10576         * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
10577         static.
10578         (_initialize_xtensa_tdep): Declare.
10579
10580 2008-02-21  Pedro Alves  <[email protected]>
10581
10582         Silence a few -Wmissing-prototypes warnings.
10583
10584         PR build/9877:
10585         * amd64-nat.c: Include "amd64-nat.h".
10586         * fork-child.c (_initialize_fork_child): Ditto.
10587         * gcore.c (_initialize_gcore): Ditto.
10588         * inf-ptrace.c: Include "inf-ptrace.h".
10589         (inf_ptrace_store_registers): Make it static.
10590         * linux-nat.c (linux_nat_terminal_ours): Make it static.
10591         (_initialize_linux_nat): Declare before definition.
10592         * linux-tdep.c: Include "linux-tdep.h".
10593         * linux-thread-db.c (_initialize_thread_db): Declare before
10594         definition.
10595         * proc-service.c (_initialize_proc_service): Ditto.
10596         * remote.c (remote_send_printf): Make it static.
10597         * solib.c: Include "solib.h".
10598         * symfile-mem.c (_initialize_symfile_mem): Declare before
10599         definition.
10600         * ada-lang.c (ada_la_decode, ada_match_name)
10601         (ada_suppress_symbol_printing, ada_is_array_type)
10602         (ada_value_ptr_subscript, ada_array_length)
10603         (ada_to_static_fixed_value): Make them static.
10604         (_initialize_ada_language): Declare before definition.
10605         * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
10606         (ada_task_list_changed, ada_new_objfile_observer): Make them
10607         static.
10608         (_initialize_tasks): Declare before definition.
10609         * addrmap.c (_initialize_addrmap): Declare before definition.
10610         * auxv.c (default_auxv_parse): Make it static.
10611         * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
10612         them static.
10613         * breakpoint.c (remove_sal): Add line break.
10614         (expand_line_sal_maybe): Make it static.
10615         * cp-name-parser.y: Include "cp-support.h".
10616         * cp-valprint.c (cp_find_class_member): Make it static.
10617         * eval.c (value_f90_subarray): Ditto.
10618         * exceptions.c (print_any_exception): Ditto.
10619         * findcmd.c (_initialize_mem_search): Declare before definition.
10620         * frame.c (frame_observer_target_changed): Make it static.
10621         * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
10622         * inf-child.c: Include "inf-child.h".
10623         * inferior.h (valid_inferior_id): Rename to ...
10624         (valid_gdb_inferior_id): ... this.
10625         * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
10626         Make them static.
10627         * jv-lang.c (java_language_arch_info): Make it static.
10628         * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
10629         * osdata.c (info_osdata_command): Make it static.
10630         * regcache.c (regcache_observer_target_changed): Make it static.
10631         * reverse.c (_initialize_reverse): Declare before definition.
10632         * stabsread.c (cleanup_undefined_types_noname)
10633         (cleanup_undefined_types_1): Make them static.
10634         * symfile.c (place_section): Make it static.
10635         * symtab.c (find_pc_sect_psymtab_closer): Make it static.
10636         * target-descriptions.c (_initialize_target_descriptions): Declare
10637         before definition.
10638         * target.c (default_get_ada_task_ptid, find_default_can_async_p)
10639         (find_default_is_async_p, find_default_supports_non_stop): Make
10640         them static.
10641         (target_supports_non_stop): Add prototype.
10642         (dummy_pid_to_str): Make it static.
10643         * utils.c (_initialize_utils): Declare before definition.
10644         * ada-exp.y (_initialize_ada_exp): Declare before definition.
10645         * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
10646         * target.h (struct target_ops): Add a prototype to the
10647         to_can_execute_reverse callback.
10648         * macroscope.c (_initialize_macroscope): Declare before definition.
10649         * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
10650         * python/python.c (_initialize_python): Declare before definition.
10651         * tui/tui-command.c: Include "tui/tui-command.h".
10652         * tui/tui-data.c (init_content_element, init_win_info): Make them
10653         static.
10654         * tui/tui-disasm.c: Include "tui/tui-disasm.h".
10655         * tui/tui-interp.c (_initialize_tui_interp): Declare before
10656         definition.
10657         * tui/tui-layout.c: Include "tui/tui-layout.h".
10658         (_initialize_tui_layout): Declare before definition.
10659         * tui/tui-regs.c: Include "tui/tui-regs.h".
10660         (tui_display_reg_element_at_line): Make it static.
10661         (_initialize_tui_regs): Declare before definition.
10662         * tui/tui-stack.c (_initialize_tui_stack): Declare before
10663         definition.
10664         * tui/tui-win.c: Include "tui/tui-win.h".
10665         (_initialize_tui_win): Declare before definition.
10666         (tui_sigwinch_handler): Make it static.  Wrap in ifdef SIGWINCH.
10667         * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
10668         (tui_get_cmd_list): Add a prototype.
10669         * tui/tui-windata.c: Include tui-windata.h.
10670         * tui/tui-wingeneral.c (box_win): Make it static.
10671         * cli/cli-logging.c (show_logging_command): Make it static.
10672         (_initialize_cli_logging): Declare before definition.
10673         * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
10674         definition.
10675
10676 2009-02-20  Pierre Muller  <[email protected]>
10677
10678         Extend use of i386_use_watchpoints to all i386 native files
10679         using hardware watchpoints.
10680         * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
10681         * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
10682         * windows-nat.c (init_windows_ops): Ditto.
10683         * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
10684         * config/i386/nm-cygwin64.h: Ditto.
10685         * config/i386/nm-fbsd.h: Ditto.
10686         * config/i386/nm-go32.h: Ditto.
10687
10688 2009-02-19  Joel Brobecker  <[email protected]>
10689
10690         * ada-typeprint.c (ada_typedef_print): Remove.  Unused.
10691
10692 2009-02-18  Vladimir Prus  <[email protected]>
10693
10694         * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
10695         (mi_interpreter_init): Register the above.
10696         * solib.c (clear_solib): Notify solib unload.
10697         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
10698         disable breakpoints on a.out targets.
10699
10700 2009-02-17  Vladimir Prus  <[email protected]>
10701
10702         * observer.c (observer_test_first_notification_function)
10703         (observer_test_second_notification_function)
10704         (observer_test_third_notification_function): Adjust prototype.
10705
10706 2009-02-17  Pedro Alves  <[email protected]>
10707
10708         * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
10709         (ALL_TARGET_OBS): Add dicos-tdep.o.
10710         (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
10711         * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
10712         gdb_target_obs.
10713         (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
10714         gdb_target_obs.
10715         * dicos-tdep.h, dicos-tdep.c: New.
10716         * amd64-dicos-tdep.c: New.
10717         * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
10718         inferior.h.  Include dicos-tdep.h.
10719         (i386_dicos_init_abi): Call dicos_init_abi.
10720         (i386_dicos_bfd_has_symbol_p): Delete.
10721         (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
10722
10723         * NEWS: Mention x86-64 DICOS target support.
10724
10725 2009-02-16  Doug Evans  <[email protected]>
10726
10727         * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
10728         All callers updated.
10729         (amd64_get_insn_details): Handle more 3-byte opcode insns.
10730         (amd64_breakpoint_p): Delete.
10731         (amd64_displaced_step_fixup): When fixing up after stepping an int3,
10732         don't back up pc to the start of the int3.
10733         * i386-tdep.c: #include opcode/i386.h.
10734         (i386_skip_prefixes): New function.
10735         (i386_absolute_jmp_p): Constify argument.
10736         (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
10737         (i386_breakpoint_p): Delete.
10738         (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
10739         When fixing up after stepping an int3, don't back up pc to the start
10740         of the int3.
10741
10742 2009-02-16  Pedro Alves  <[email protected]>
10743
10744         * corelow.c (core_close): Don't hardcode the core's pid.
10745         (core_open): Find core threads before calling
10746         post_create_inferior.
10747         (add_to_thread_list, get_core_register_section): Take into account
10748         systems where the regset section names encode the pid of the
10749         inferior.
10750
10751         * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
10752         * gdbarch.h, gdbarch.c: Regenerate.
10753
10754         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
10755         * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
10756         * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
10757         * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
10758
10759 2009-02-14  Vladimir Prus  <[email protected]>
10760
10761         Include frame information for *stopped due to CLI commands.
10762
10763         * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
10764         * infcmd.c (finish_command_continuation): Pass '1' for
10765         'print_frame' parameter to the observer.
10766         * infrun.c (normal_stop): Don't print mi-specific information
10767         here. Pass 'stop_print_frame' to the 'print_frame' parameter
10768         of the observer.
10769         * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
10770         If we need to print frame, and current uiout is not the MI one,
10771         print frame again.
10772
10773 2009-02-13  Pierre Muller  <[email protected]>
10774
10775         * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
10776         Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
10777
10778 2009-02-12  Jan Kratochvil  <[email protected]>
10779
10780         PR fortran/9806
10781         * dwarf2read.c (process_die <DW_TAG_module>, read_module)
10782         (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
10783
10784 2009-02-11  Pierre Muller  <[email protected]>
10785
10786         * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
10787         for DW_ATE_signed_char and DW_ATE_unsigned_char
10788         for pascal language.
10789
10790 2009-02-11  Jim Meyering  <[email protected]>
10791             Jan Kratochvil  <[email protected]>
10792
10793         Avoid NULL dereference.
10794         * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
10795         New variable func_type.
10796
10797 2009-02-11  Pedro Alves  <[email protected]>
10798
10799         * gdbarch.c: Regenerate.
10800
10801 2009-02-10  Pierre Muller  <[email protected]>
10802
10803         * p-lang.c (is_pascal_string_type): Fix comment.
10804         Determine exact size of char elements for GPC
10805         strings.
10806         (pascal_printstr): Handle char width of 2 or 4.
10807         * p-valprint.c (pascal_val_print): Handle char
10808         of width 2 or 4.
10809
10810 2009-02-07  Daniel Jacobowitz  <[email protected]>
10811
10812         * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
10813         inside the loop.  Only call addrmap_set_empty if the compilation unit
10814         had DW_AT_high_pc and DW_AT_low_pc.  Update call to
10815         scan_partial_symbols.
10816         (scan_partial_symbols): Take NEED_PC argument and pass it along with
10817         LOWPC and HIGHPC.
10818         (add_partial_namespace): Take NEED_PC argument and pass it through.
10819         (add_partial_subprogram): Take NEED_PC argument.  Update the addrmap
10820         if necessary.
10821
10822 2009-02-07  Pedro Alves  <[email protected]>
10823
10824         * NEWS: Mention inspecting extra signal information, $_siginfo,
10825         and the qXfer:siginfo:read and qXfer:siginfo:write packets.
10826
10827 2009-02-07  Pedro Alves  <[email protected]>
10828
10829         * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
10830         isn't defined.
10831
10832 2009-02-06  Pedro Alves  <[email protected]>
10833
10834         * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
10835         (compat_timer_t, compat_clock_t, struct compat_timeval)
10836         (compat_sigval_t, compat_siginfo_t): New types.
10837         (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
10838         (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
10839         (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
10840         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
10841         (amd64_linux_siginfo_fixup): New.
10842         * linux-nat.c (linux_nat_siginfo_fixup): New.
10843         (siginfo_fixup): New.
10844         (linux_xfer_siginfo): Use siginfo_fixup to convert between the
10845         siginfo layout expected by ptrace and the siginfo layout of the
10846         inferior.
10847         (linux_nat_set_siginfo_fixup): New.
10848         * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
10849
10850 2009-02-06  Pedro Alves  <[email protected]>
10851
10852         * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
10853         * infrun.c (siginfo_value_read, siginfo_value_write): New.
10854         (siginfo_value_funcs): New.
10855         (siginfo_make_value): New.
10856         (_initialize_infrun): Create the $_siginfo convenience variable.
10857         * gdbtypes.h (append_composite_type_field_aligned): Declare.
10858         * gdbtypes.c (append_composite_type_field): Rename to...
10859         (append_composite_type_field_aligned): ... this.  Add ALIGNMENT
10860         argument.  Handle it.
10861         (append_composite_type_field): Rewrite on top of
10862         append_composite_type_field_aligned.
10863         * value.h (internalvar_make_value): New typedef.
10864         (struct internalvar) <make_value>: New field.
10865         (create_internalvar_type_lazy): Declare.
10866         * value.c (create_internalvar): Clear make_value.
10867         (create_internalvar_type_lazy): New.
10868         (value_of_internalvar): If make_value is set use it.
10869         (preserve_values): Skip internal variables that don't have a
10870         value.
10871         * gdbarch.sh (get_siginfo_type): New.
10872         * gdbarch.h, gdbarch.c: Regenerate.
10873
10874         * linux-tdep.h, linux-tdep.c: New.
10875         * amd64-linux-tdep.c: Include "linux-tdep.h".
10876         (amd64_linux_init_abi): Register linux_get_siginfo_type and
10877         linux_get_siginfo_mapper.
10878         * i386-linux-tdep.c: Include "linux-tdep.h".
10879         (i386_linux_init_abi): Register linux_get_siginfo_type and
10880         linux_get_siginfo_mapper.
10881         * arm-linux-tdep.c: Include "linux-tdep.h".
10882         (i386_linux_init_abi): Register linux_get_siginfo_type and
10883         linux_get_siginfo_mapper.
10884
10885         * linux-nat.c (linux_xfer_siginfo): New.
10886         (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
10887         * remote.c (PACKET_qXfer_siginfo_read)
10888         (PACKET_qXfer_siginfo_write): New.
10889         (feature remote_protocol_features): Add "qXfer:siginfo:read" and
10890         "qXfer:siginfo:write" features.
10891         (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
10892         (_initialize_remote): Add "set/show remote read-siginfo-object"
10893         and "set/show remote write-siginfo-object" commands.
10894
10895         * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
10896         (HFILES_NO_SRCDIR): Add linux-tdep.h.
10897         (ALLDEPFILES): Add linux-tdep.c.
10898
10899         * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
10900         (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
10901         gdb_target_obs.
10902
10903 2009-02-06  Jim Blandy  <[email protected]>
10904             Daniel Jacobowitz  <[email protected]>
10905             Vladimir Prus  <[email protected]>
10906             Pedro Alves  <[email protected]>
10907
10908         * defs.h (enum lval_type): New value: lval_computed.
10909         * value.h (struct lval_funcs): New type.
10910         (allocate_computed_value, value_computed_funcs)
10911         (value_computed_closure): New declarations.
10912         * value.c (struct value): Add a structure to the location union
10913         for computed lvalues, containing 'funcs' and 'closure' members.
10914         (allocate_computed_value, value_computed_funcs)
10915         (value_computed_closure): New functions.
10916         (value_free): For computed lvalues, call the closure's
10917         'free_closure' function before freeing the value itself.
10918         (value_copy): If we're copying an lval_computed value, call the
10919         closure's 'copy_closure' function.
10920         (set_value_component_location): If the original value is a
10921         computed lvalue, then call the closure's 'copy_closure' function.
10922         (value_of_internalvar): If an internal variable's value is a
10923         computed lvalue, make retrieving its value produce an equivalent
10924         computed lvalue.
10925         * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
10926         their read function.
10927         (value_assign): Assign to computed lvalues by calling their write
10928         function.
10929
10930 2009-02-06  Pedro Alves  <[email protected]>
10931
10932         * linux-nat.c (linux_nat_wait): Adjust.
10933         (linux_nat_pid_to_str): Adjust.  Remove call to thread_db_init.
10934         * linux-nat.h (thread_db_init): Delete declaration.
10935         * linux-thread-db.c (target_beneath): Delete.
10936         (thread_db_init): Delete.
10937         (thread_db_detach): Use find_target_beneath.
10938         (thread_db_wait): Adjust interface.  Use find_target_beneath.
10939         (thread_db_mourn_inferior): Use find_target_beneath.
10940         (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
10941         (thread_db_async_mask): Delete.
10942         (thread_db_pid_to_str): Adjust interface.  Use
10943         find_target_beneath.
10944         (thread_db_get_thread_local_address): Adjust interface.  Use
10945         find_target_beneath.
10946         (init_thread_db_ops): Delete references to delete functions.
10947         * target.c (update_current_target): Don't inherit or default
10948         to_wait.  Don't inherit to_pid_to_str and
10949         to_get_thread_local_address.
10950         (target_translate_tls_address): Look for a pushed target that
10951         implements to_get_thread_local_address, and use it instead of
10952         checking for target_get_thread_local_address_p.
10953         (target_wait, target_pid_to_str): Reimplement as functions.
10954         (dummy_pid_to_str): New.
10955         (init_dummy_target): Register it.
10956         (debug_to_wait): Delete.
10957         * target.h (struct target_ops): Make to_wait, to_pid_to_str and
10958         to_get_thread_local_address accept a pointer to struct target_ops.
10959         (target_wait): Delete macro, and declare as function.
10960         (target_pid_to_str): Likewise.
10961         (target_get_thread_local_address)
10962         (target_get_thread_local_address_p): Delete.
10963         (noprocess): Add NORETURN and ATTR_NORETURN tags.
10964         * inf-ptrace.c (inf_ptrace_wait): Adjust.
10965         (inf_ptrace_pid_to_str): New.
10966         (inf_ptrace_target): Use inf_ptrace_pid_to_str.
10967         * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
10968         * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
10969         * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
10970         Adjust.
10971         * corelow.c (core_pid_to_str): Adjust.
10972         * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
10973         * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
10974         * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
10975         * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
10976         * hpux-thread.c (hpux_thread_wait): Adjust.
10977         * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
10978         * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
10979         * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
10980         * procfs.c (procfs_pid_to_str): Adjust.
10981         * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
10982         * remote-mips.c (mips_wait): Adjust.
10983         * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
10984         * remote.c (remote_wait, remote_pid_to_str)
10985         (remote_get_thread_local_address): Adjust.
10986         * rs6000-nat.c (rs6000_wait): Adjust.
10987         * sol-thread.c (procfs_pid_to_str): Adjust declaration.
10988         (sol_thread_wait, solaris_pid_to_str): Adjust.
10989         * spu-linux-nat.c (spu_child_wait): Adjust.
10990         * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
10991
10992 2009-02-06  Tom Tromey  <[email protected]>
10993
10994         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
10995         (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
10996         (python-cmd.o): New target.
10997         * cli/cli-decode.c (set_cmd_completer): Add self parameter to
10998         completer prototype.
10999         (add_cmd): Initialize destroyer member of cmd_list_element. Use
11000         make_symbol_completion_list_fn as completer.
11001         (delete_cmd): Call destroyer if one is set.
11002         * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
11003         completer member.  Add destroyer member.
11004         (set_cmd_completer): Add self parameter to
11005         completer prototype.
11006         * command.h (set_cmd_completer): Add cmd parameter to
11007         completer prototype.
11008         * completer.c (noop_completer, filename_completer,
11009         location_completer, expression_completer, command_completer): Adapt
11010         to new completer prototype.
11011         (complete_line_internal): Pass new parameter to completer function.
11012         * completer.h (noop_completer, filename_completer,
11013         location_completer, expression_completer, command_completer): Adapt
11014         prototypes to new completer prototype.
11015         * interps.c (interpreter_completer): Adapt to new completer
11016         prototype.
11017         * python/python-cmd.c: New file.
11018         * python/python-internal.h (gdbpy_initialize_commands): Add
11019         prototype.
11020         (gdbpy_doc_cst): Add forward declaration.
11021         * python/python.c (gdbpy_doc_cst): Declare.
11022         (_initialize_python): Call gdbpy_initialize_commands.  Initialize
11023         gdbpy_doc_cst.
11024         * symtab.c (make_symbol_completion_list_fn): New function.
11025         * symtab.h (make_symbol_completion_list_fn): Add prototype.
11026
11027 2009-02-06  Pedro Alves  <[email protected]>
11028
11029         * target.c (target_get_osdata): Check for equal or higher than
11030         process_stratum, not dummy_stratum.
11031
11032 2009-02-06  Pedro Alves  <[email protected]>
11033
11034         * remote.c (extended_remote_can_run): Delete.
11035         (init_remote_ops): Don't register it.
11036         * target.c (target_get_osdata): Don't check for target_can_run.
11037         Instead any target that has already been pushed, otherwise
11038         fallback to the default run target.
11039
11040 2009-02-06  Pedro Alves  <[email protected]>
11041
11042         * target.c (target_create_inferior, target_detach)
11043         (target_mourn_inferior, target_attach, target_close): Do target
11044         debug output.
11045         (debug_to_attach, debug_to_detach, debug_to_create_inferior)
11046         (debug_to_mourn_inferior, debug_to_close): Delete.
11047         (setup_target_debug): Adjust.
11048
11049 2009-02-05  Pedro Alves  <[email protected]>
11050
11051         * target.h (target_stopped_data_address_p): Delete declaration,
11052         and don't define as macro.
11053         * target.c (target_stopped_data_address_p): Delete.
11054
11055 2009-02-05  Thiago Jung Bauermann  <[email protected]>
11056             Tom Tromey  <[email protected]>
11057
11058         * python/python-utils.c (target_string_to_unicode): New function.
11059         * python/python-internal.h (target_string_to_unicode): New prototype.
11060         * python/python-value.c (valpy_string): New function.
11061         (value_object_methods): Add `string' entry.
11062
11063 2009-02-05  Pedro Alves  <[email protected]>
11064
11065         * target.h (target_tid_to_str): Delete.
11066         * thread.c (print_thread_info, thread_apply_all_command)
11067         (thread_apply_command, thread_command, do_captured_thread_select):
11068         Use target_pid_to_str instead of target_tid_to_str.
11069         * linux-fork.c (delete_fork_command): Likewise.
11070
11071 2009-02-05  Pedro Alves  <[email protected]>
11072
11073         * frame.c (has_stack_frames): Make public.
11074         (get_prev_frame): Don't allow a NULL this_frame anymore.
11075         * frame.h (has_stack_frames): Declare.
11076         * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
11077         to get_prev_frame, instead start at get_current_frame.
11078         (varobj_create): Check has_stack_frames before getting any frame;
11079         eliminate one usage of deprecated_safe_get_selected_frame.
11080
11081 2009-02-05  Tom Tromey  <[email protected]>
11082             Thiago Jung Bauermann  <[email protected]>
11083
11084         * python/python.c (GdbMethods): Move to bottom of file.
11085         (get_parameter, execute_gdb_command, gdbpy_write,
11086         gdbpy_flush): Remove forward declarations.
11087         (eval_python_from_control_command): Fix error checking of function
11088         PyRun_SimpleString.  Fix error string.
11089         (python_command): Likewise.
11090         (execute_gdb_command): Added from_tty argument.
11091
11092 2009-02-05  Thiago Jung Bauermann  <[email protected]>
11093
11094         * language.h (language_dfn): Add la_get_string member.
11095         (LA_GET_STRING): New macro.
11096         (default_get_string): New prototype.
11097         * language.c (default_get_string): New function.
11098         (unknown_language_defn, auto_language_defn, local_language_defn): Use
11099         default_get_string for la_get_string.
11100         * c-lang.c (c_get_string): New function.
11101         (c_language_defn, cplus_language_defn, asm_language_defn): Use
11102         c_get_string for la_get_string.
11103         (minimal_language_defn): Likewise
11104         * ada-lang.c (ada_language_defn): Likewise.
11105         * f-lang.c (f_language_defn): Use default_get_string for
11106         la_get_string.
11107         * jv-lang.c (java_language_defn): Likewise.
11108         * m2-lang.c (m2_language_defn): Likewise.
11109         * objc-lang.c (objc_language_defn): Likewise.
11110         * p-lang.c (p_language_defn): Likewise.
11111         * scm-lang.c (scm_language_defn): Likewise.
11112         * typeprint.c (type_to_string): New function.
11113         * value.h (type_to_string): New prototype.
11114         * valprint.c (val_print_string): Factor out code for reading string
11115         from the inferior into its own function.  Put 2 spaces after period
11116         in comments.
11117         (read_string): New function.
11118         * valprint.h (read_string): New prototype.
11119
11120 2009-01-07  Pierre Muller  <[email protected]>
11121             Tom Tromey  <[email protected]>
11122
11123         PR breakpoints/8079:
11124         * breakpoint.c (print_one_breakpoint): Use exp_string field
11125         to display expression of watchpoints.
11126         (mention): Likewise.
11127         (watch_command_1): Remove trailing whitespace from expression.
11128         * printcmd.c (struct display) <exp_string>: New field.
11129         (display_command): Set exp_string.
11130         (free_display): Free exp_string.
11131         (clear_displays): Use free_display.
11132         (do_one_display): Print exp_string.
11133         (display_info): Likewise.
11134
11135 2009-02-04  Tom Tromey  <[email protected]>
11136             Thiago Jung Bauermann  <[email protected]>
11137             Phil Muldoon  <[email protected]>
11138
11139         * python/python-internal.h (gdbpy_get_value_from_history): Rename
11140         prototype to gdbpy_history.
11141         (gdbpy_is_string): Declare.
11142         (python_string_to_host_string): Declare.
11143         * python/python-utils.c (gdbpy_is_string): New function.
11144         (unicode_to_encoded_string): New function.
11145         (unicode_to_target_string): Use it.
11146         (python_string_to_host_string): New function.
11147         * python/python-value.c (valpy_address): New function.
11148         (convert_value_from_python): Use gdbpy_is_string.  Change to throw
11149         Python exception instead of a GDB exception on error.  Properly check
11150         Python booleans.
11151         (valpy_getitem): Convert field name to host string.  Handle array
11152         accesses.  Adapt to new behaviour of convert_value_from_python.
11153         (valpy_new): Adapt to new behaviour of convert_value_from_python.
11154         (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
11155         VALPY_BITXOR, VALPY_BITOR>: New constants.
11156         (valpy_binop): Update.  Adapt to new behaviour of
11157         convert_value_from_python.
11158         (valpy_invert): New function.
11159         (valpy_lsh): Likewise.
11160         (valpy_rsh): Likewise.
11161         (valpy_and): Likewise.
11162         (valpy_or): Likewise.
11163         (valpy_xor): Likewise.
11164         (valpy_richcompare): Call convert_value_from_python instead of doing
11165         conversions itself.
11166         (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
11167         (gdbpy_get_value_from_history): Rename
11168         function to gdbpy_history.
11169         (gdbpy_initialize_values): Don't set tp_new.
11170         (value_object_type): Add valpy_new.
11171         (value_object_methods): Add `address' entry.
11172         (value_object_as_number): Update for new methods.
11173         * python/python.c (GdbMethods): Rename entry from
11174         `get_value_from_history' to `history'.
11175
11176 2009-02-04  Jerome Guitton  <[email protected]>
11177
11178         * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
11179         of type to guard against a crash.
11180
11181 2009-02-04  Jerome Guitton  <[email protected]>
11182
11183         * value.c (value_from_contents_and_address): Always return
11184         a lval_memory value, even if address is null.
11185
11186 2009-02-04  Tristan Gingold  <[email protected]>
11187
11188         * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
11189         (amd64_darwin_sigcontext_addr): Ditto.
11190         (darwin_dwarf_signal_frame_p): Ditto.
11191         (i386_darwin_init_abi): Handle signal frames, use the const for
11192         sc_num_regs.
11193         (x86_darwin_init_abi_64): Ditto.
11194
11195 2009-02-04  Tristan Gingold  <[email protected]>
11196
11197         * i386-tdep.c (i386_sigtramp_p): Make it public.
11198         * i386-tdep.h (i386_sigtramp_p): Declare.
11199
11200 2009-02-04  Tristan Gingold  <[email protected]>
11201
11202         * machoread.c (macho_symfile_read): Read minsymtab also from
11203         shared libraries.
11204         (macho_symfile_read): Try to read dwarf2 frame info from main
11205         object file, but not from OSO files.
11206         (macho_symfile_offsets): Update section names for latest BFD
11207         changes.
11208         * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
11209         (x86_darwin_init_abi_64): Ditto.
11210         * solib-darwin.c: New file.
11211         * solib-darwin.h: New file.
11212         * configure.tgt: Add solib.o solib-darwin.o for Darwin.
11213
11214 2009-02-04  Tristan Gingold  <[email protected]>
11215
11216         * solist.h (struct target_so_ops): Comment fallback behavior for
11217         operation same.
11218
11219 2009-02-03  Tom Tromey  <[email protected]>
11220
11221         * completer.c (add_struct_fields): Check type_name against NULL
11222         before use.
11223
11224 2009-02-03  Joel Brobecker  <[email protected]>
11225
11226         * MAINTAINERS: Update Elena's email address.
11227
11228 2009-02-02  Joel Brobecker  <[email protected]>
11229
11230         * breakpoint (update_watchpoint): Minor comment adjustment.
11231
11232 2009-02-02  Tom Tromey  <[email protected]>
11233
11234         PR gdb/9594:
11235         * completer.c (count_struct_fields): Count method names.
11236         (add_struct_fields): Add matching method names.
11237
11238 2009-02-02  Doug Evans  <[email protected]>
11239
11240         * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
11241         doing any further tcl/tk configury.  Don't configure gdbtk if
11242         tcl or tk check fails.
11243         * aclocal.m4: Regenerate.
11244         * configure: Regenerate.
11245
11246 2009-02-02  Tom Tromey  <[email protected]>
11247
11248         PR exp/9059:
11249         * valops.c (find_overload_match): Follow typedefs before taking
11250         address of object argument.
11251
11252 2009-02-01  Doug Evans  <[email protected]>
11253
11254         * target.h (target_waitstatus_to_string): Declare.
11255         * target.c (target_waitstatus_to_string): New function.  Copied from
11256         debug_to_wait.  Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
11257         TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
11258         TARGET_WAITKIND_NO_HISTORY.
11259         (debug_to_wait): Call it.
11260         * infrun.c (wait_for_inferior): If debug_infrun, print result of
11261         target_wait.
11262         (fetch_inferior_event): Ditto.
11263
11264 2009-01-30  Tom Tromey  <[email protected]>
11265
11266         * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
11267
11268 2009-01-30  Vladimir Prus  <[email protected]>
11269
11270         PR 8145.
11271         * thread.c (do_captured_list_thread_ids): Report the current
11272         thread id.
11273
11274 2009-01-30  Vladimir Prus  <[email protected]>
11275
11276         * breakpoint.c (create_breakpoint, create_breakpoints)
11277         (break_command_really, set_breakpoint): New parameter enabled.
11278         (create_breakpoint, break_command_really): Make breakpoint
11279         disabled if so requested.
11280         * breakpoint.h (set_breakpoint): New parameter enabled.
11281         * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
11282
11283 2009-01-28  Doug Evans  <[email protected]>
11284
11285         * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
11286         (amd64_displaced_step_fixup): Declare.
11287         * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
11288         (amd64_arch_regmap): Move out of amd64_analyze_stack_align
11289         and make static global.
11290         (amd64_arch_regmap_len): New static global.
11291         (amd64_arch_reg_to_regnum): New function.
11292         (struct amd64_insn): New struct.
11293         (struct displaced_step_closure): New struct.
11294         (onebyte_has_modrm,twobyte_has_modrm): New static globals.
11295         (rex_prefix_p,skip_prefixes)
11296         (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
11297         (amd64_insn_length,amd64_get_unused_input_int_reg)
11298         (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
11299         (amd64_displaced_step_copy_insn)
11300         (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
11301         (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
11302         (amd64_displaced_step_fixup): New functions.
11303         * amd64-linux-tdep.c: #include arch-utils.h.
11304         (amd64_linux_init_abi): Install displaced stepping support.
11305
11306 2009-01-28  Daniel Jacobowitz  <[email protected]>
11307             Jerome Guitton  <[email protected]>
11308
11309         * configure, config.in: Regenerated.
11310         * configure.ac: Add --with-system-gdbinit.
11311         * main.c (get_init_files): New.
11312         (captured_main): Use get_init_files.  Load system gdbinit before
11313         $HOME/.gdbinit.
11314         (print_gdb_help): Print location of init files.
11315
11316 2009-01-28  Pedro Alves  <[email protected]>
11317
11318         * corefile.c (generic_search): Delete disabled code.
11319         * gdbcore.h (generic_search): Delete declaration.
11320
11321 2009-01-26  Pedro Alves  <[email protected]>
11322
11323         * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
11324         parent to the child.
11325         * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
11326         * inf-ptrace.c (inf_ptrace_follow_fork): Likewise.  Use
11327         remove_breakpoints to remove breakpoints from the parent.
11328
11329 2009-01-26  Pedro Alves  <[email protected]>
11330
11331         PR backtrace/9458, PR backtrace/8864:
11332         * frame.c (create_new_frame): Update the frame's cached PC before
11333         finding its unwinder.  Use frame_id_build to build the new frame's
11334         id.
11335         * stack.c (parse_frame_specification_1): Correct setting ``addrs''
11336         array values from the ``args'' array values.
11337
11338 2009-01-26  Pedro Alves  <[email protected]>
11339
11340         * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
11341         (create_array_type, create_set_type, init_flags_type)
11342         (copy_type_recursive): Replace pairs of calls to XALLOC and memset
11343         with a call to XZALLOC or XCALLOC, and pairs of calls to
11344         obstack_alloc and memset with a call to OBSTACK_ZALLOC.
11345
11346 2009-01-26  Pedro Alves  <[email protected]>
11347
11348         Add "maint set|show internal-error|internal-warning quit|corefile
11349         ask|yes|no" commands.
11350
11351         PR gdb/7580:
11352         * utils.c (internal_problem_ask, internal_problem_yes)
11353         (internal_problem_no, internal_problem_modes): New.
11354         (struct internal_problem): Remove FIXME.  Make should_quit and
11355         should_dump_core types to char *.
11356         (internal_vproblem, internal_error_problem)
11357         (internal_warning_problem): Adjust.
11358         (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
11359         functions.
11360         (add_internal_problem_command): New.
11361         (_initialize_utils): New.
11362
11363 2009-01-25  Pedro Alves  <[email protected]>
11364
11365         * infcmd.c (program_info): Use paddress instead of casting stop_pc
11366         to unsigned long.
11367
11368 2009-01-24  Pedro Alves  <[email protected]>
11369
11370         * infrun.c (normal_stop): Don't call
11371         deprecated_update_frame_pc_hack.
11372         * frame.c (deprecated_update_frame_pc_hack)
11373         (deprecated_update_frame_base_hack): Delete, and ...
11374         (create_new_frame): ... inline here.
11375         * frame.h (deprecated_update_frame_pc_hack)
11376         (deprecated_update_frame_base_hack): Delete declarations.
11377
11378 2009-01-23  Pedro Alves  <[email protected]>
11379
11380         * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
11381         * cli/cli-setshow.c (do_setshow_command): Handle it.
11382         * command.h (enum var_types): Add var_zuinteger.
11383         (add_setshow_zuinteger_cmd): Declare.
11384
11385         * valprint.c (_initialize_valprint): Change the set input-radix
11386         and set output-radix commands to zuinteger type.
11387
11388 2009-01-23  Pedro Alves  <[email protected]>
11389
11390         PR gdb/9664:
11391         * infrun.c (normal_stop): Tag threads as stopped, and run the
11392         hook-stop before printing the stack frame.
11393
11394 2009-01-22  Pedro Alves  <[email protected]>
11395
11396         PR c++/9631:
11397         * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
11398         vbasetype.
11399
11400 2009-01-20  Kazu Hirata  <[email protected]>
11401
11402         * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
11403         unsigned long.
11404
11405 2009-01-20  Daniel Jacobowitz  <[email protected]>
11406
11407         PR gdb/9346
11408         * infcmd.c (signal_command): Do not specify a resume PC.
11409
11410 2009-01-19  Doug Evans  <[email protected]>
11411
11412         * dummy-frame.c (dummy_frame): Replace regcache member with
11413         caller_state.
11414         (dummy_frame_push): Replace caller_regcache arg with caller_state.
11415         All callers updated.
11416         (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
11417         (dummy_frame_pop): Rewrite.  Verify requested frame is in the
11418         dummy frame stack.  Restore program state.
11419         (cleanup_dummy_frames): Rewrite.
11420         (dummy_frame_sniffer): Update.  Make static.
11421         * dummy-frame.h (regcache,frame_info): Delete forward decls.
11422         (inferior_thread_state): New forward decl.
11423         (dummy_frame_push): Update prototype.
11424         * frame.c (frame_pop): dummy_frame_pop now does all the work for
11425         DUMMY_FRAMEs.
11426         * infcall.c (breakpoint_auto_delete_contents): Delete.
11427         (get_function_name,run_inferior_call): New fns.
11428         (call_function_by_hand): Simplify by moving some code to
11429         get_function_name, run_inferior_call.  Inferior function call wrapped
11430         in TRY_CATCH so there's less need for cleanups and all exits from
11431         proceed are handled similarily.  Detect program exit.
11432         Detect program stopping in a different thread.
11433         Make error messages more consistent.
11434         * inferior.h (inferior_thread_state): Declare (opaque type).
11435         (save_inferior_thread_state,restore_inferior_thread_state,
11436         make_cleanup_restore_inferior_thread_state,
11437         discard_inferior_thread_state, get_inferior_thread_state_regcache):
11438         Declare.
11439         (save_inferior_status): Update prototype.
11440         * infrun.c: (normal_stop): When stopped for the completion of an
11441         inferior function call, verify the expected stack frame kind.
11442         (inferior_thread_state): New struct.
11443         (save_inferior_thread_state,restore_inferior_thread_state,
11444         do_restore_inferior_thread_state_cleanup,
11445         make_cleanup_restore_inferior_thread_state,
11446         discard_inferior_thread_state,
11447         get_inferior_thread_state_regcache): New functions.
11448         (inferior_status): Move stop_signal, stop_pc, registers to
11449         inferior_thread_state.  Remove restore_stack_info.
11450         (save_inferior_status): Remove arg restore_stack_info.
11451         All callers updated.  Remove saving of state now saved by
11452         save_inferior_thread_state.
11453         (restore_inferior_status): Remove restoration of state now done by
11454         restore_inferior_thread_state.
11455         (discard_inferior_status): Remove freeing of registers, now done by
11456         discard_inferior_thread_state.
11457
11458 2009-01-18  Pedro Alves  <[email protected]>
11459
11460         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
11461         at a time, times NUM_TO_SCROLL.
11462         * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
11463         fetch the selected frame if there is no stack.
11464
11465 2009-01-18  Pedro Alves  <[email protected]>
11466
11467         PR gdb/9747:
11468         * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
11469         Declare.
11470         * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
11471         * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
11472         is thrown while handling an event, finish the thread state.
11473         (normal_stop): Use finish_thread_state cleanup.
11474         * infcmd.c (run_command_1): If an error is thrown while starting
11475         the inferior, finish the thread state.
11476
11477 2009-01-18  Pedro Alves  <[email protected]>
11478
11479         * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
11480         skip breakpoints without a location (pending breakpoints).
11481
11482 2009-01-18  Pedro Alves  <[email protected]>
11483
11484         PR build/9186:
11485         * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
11486
11487 2009-01-18  Nick Roberts  <[email protected]>
11488
11489         * thread.c (thread_command): Move call to annotate_thread_changed
11490         to...
11491         (do_captured_thread_select): ... here, to avoid printing an
11492         annotation if the thread change generates an exception.
11493
11494 2009-01-16  Joel Brobecker  <[email protected]>
11495
11496         * NEWS: Document x86_64/MinGW as a new native configuration.
11497
11498 2009-01-16  Joel Brobecker  <[email protected]>
11499
11500         * NEWS: Move the documentation of "info os processes" to
11501         the appropriate section (documenting the new commands).
11502
11503 2009-01-15  Doug Evans  <[email protected]>
11504
11505         * target.h (target_signal_to_string): Make return type const char *.
11506         (target_signal_to_name): Ditto.
11507         (target_signal_from_name): Make arg const char *.
11508         * infrun.c (sig_print_info): Update.
11509         * signals/signals.c (signals): Make array and struct members const.
11510         (target_signal_to_string): Make return type const char *.
11511         (target_signal_to_name): Ditto.
11512         (target_signal_from_name): Make arg const char *.
11513
11514 2009-01-15  Ulrich Weigand  <[email protected]>
11515             Tristan Gingold  <[email protected]>
11516
11517         * solist.h (struct target_so_ops): New member bfd_open.
11518         (solib_find): Add prototype.
11519         (solib_bfd_fopen): Add prototype.
11520         * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
11521         from solib_bfd_open.
11522         (solib_bfd_open): Use ops->bfd_open override if present.  Call
11523         solib_find and solib_bfd_open otherwise.
11524
11525         * objfiles.h (OBJF_KEEPBFD): New define.
11526         * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
11527         objfile flag is set.
11528         * solib.c (symbol_add_stub): Do not allocate second BFD for
11529         shared library; use OBJF_KEEPBFD flag on solib objfile.
11530
11531 2009-01-15  Ulrich Weigand  <[email protected]>
11532
11533         * frame.c (get_frame_arch): Abort if called with NULL this_frame.
11534
11535 2009-01-15  Ulrich Weigand  <[email protected]>
11536
11537         * value.h (address_of_variable): Add prototype.
11538         (locate_var_value): Remove prototype.
11539
11540         * findvar.c (read_var_value): Do not attempt to default frame
11541         to selected frame.
11542         (locate_var_value): Remove function.
11543         * valops.c (value_of_variable): Retrieve selected frame for
11544         symbols that require a frame when called with NULL block.
11545         * valops.c (address_of_variable): New function.
11546
11547         * eval.c (evaluate_subexp_for_address): Call address_of_variable
11548         instead of calling locate_var_value.
11549         (evaluate_subexp_with_coercion): Likewise.
11550
11551 2009-01-14  Daniel Jacobowitz  <[email protected]>
11552
11553         * NEWS: Document "define" for prefixed commands.
11554         * cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
11555         show_user_1 for prefix commands.
11556         * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
11557         * cli/cli-script.c (validate_comname): Rewrite to handle prefix
11558         commands.  Return the containing command list.
11559         (define_command, document_command): Update to handle prefix commands.
11560         (show_user_1): Add prefix and name arguments.  Handle prefix
11561         commands.
11562         * cli/cli-script.h (show_user_1): Update prototype.
11563
11564 2009-01-14  Kai Tietz  <[email protected]>
11565
11566         * ser-mingw.c (console_select_thread): Add return to make
11567         compiler happy.
11568         (pipe_select_thread): Likewise.
11569         (file_select_thread): Likewise.
11570
11571 2009-01-14  Pedro Alves  <[email protected]>
11572
11573         * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
11574         previous change.
11575
11576 2009-01-14  Pedro Alves  <[email protected]>
11577
11578         * remote.c (extended_remote_mourn_1): Invalidate our notion of
11579         current general thread.
11580
11581 2009-01-14  Pedro Alves  <[email protected]>
11582
11583         * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
11584         without a live selected thread.
11585
11586 2009-01-14  Joel Brobecker  <[email protected]>
11587
11588         Update the copyright notice of some of the files I missed
11589         in the previous copyright update.
11590
11591 2009-01-14  Joel Brobecker  <[email protected]>
11592
11593         * windows-nat.c (handle_unload_dll): Use %p to print the DLL
11594         base address instead of casting it to DWORD.
11595
11596 2009-01-13  Ulrich Weigand  <[email protected]>
11597
11598         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
11599         for NULL frame pointers.
11600
11601 2009-01-13  Mark Kettenis  <[email protected]>
11602
11603         * utils.c (host_address_to_string): Reimplement in a way that
11604         avoids the cast of the address to long.
11605
11606 2009-01-13  Joel Brobecker  <[email protected]>
11607
11608         * mdebugread.c (parse_symbol): Save the symbol private data
11609         using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
11610         (psymtab_to_symtab_1): Likewise.
11611         (parse_procedure): Declare variable "e" only in the scope
11612         where it is used. Extract the symbol private data using
11613         SYMBOL_VALUE_BYTES.
11614
11615 2009-01-13  Jim Blandy  <[email protected]>
11616
11617         Abstract out common code for copying value locations.
11618
11619         * value.h (set_value_component_location): New declaration.
11620         * value.c (set_value_component_location): New function.
11621         (value_primitive_field): Use it.
11622         * valarith.c (value_subscript, value_subscripted_rvalue): Same.
11623         * valops.c (search_struct_field, value_slice): Same.
11624         * ada-lang.c (coerce_unspec_val_to_type)
11625         (ada_value_primitive_packed_val): Same.
11626
11627 2009-01-13  Joel Brobecker  <[email protected]>
11628
11629         * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
11630
11631 2009-01-12  Christopher Faylor  <[email protected]>
11632
11633         * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
11634         throughout.
11635         * i386-cygwin-tdep.c: Ditto.
11636         * i386-windows-nat.c: Ditto.
11637         * windows-nat.h: Ditto.
11638         * windows-tdep.c: Ditto.
11639         * windows-tdep.h: Ditto.
11640         * windows-nat.c: Ditto.
11641         (cygwin_load_start): Redefine as CORE_ADDR.
11642         (cygwin_load_end): Ditto.
11643         (windows_make_so): Coerce result of address arithmetic to uintptr_t
11644         before coercing to CORE_ADDR to avoid a compiler warning.
11645         (handle_exception): Define addr as CORE_ADDR and coerce
11646         ExceptionAddress to uintptr_t before assigining to avoid a compiler
11647         warning.
11648         * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
11649         files.
11650
11651 2009-01-11  Jan Kratochvil  <[email protected]>
11652
11653         Fix linking with --enable-targets=all:
11654         * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
11655         (HFILES_NO_SRCDIR): Add windows-tdep.h.
11656         (ALLDEPFILES): Add windows-tdep.c.
11657
11658 2009-01-11  Chris Faylor  <[email protected]>
11659
11660         * win32-nat.h: Delete.
11661         * windows-nat.h: Rename from win32-nat.h.
11662         * win32-nat.c: Delete.
11663         * windows-nat.c: Rename from win32-nat.c.
11664         * win32-termcap.c: Delete.
11665         * windows-termcap.c: Rename from win32-termcap.c.
11666         * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
11667         * configure.ac: Handle rename from win32-termcap.c ->
11668         windows-termcap.c.
11669         * configure: Regenerate.
11670         * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
11671         -> windows-termcap.c.
11672         * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
11673         windows-tdep.h.
11674         * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
11675         * windows-nat.c: Ditto.  Also reflect rename from from win32-tdep.h ->
11676         windows-tdep.h.
11677         (win32_make_so): Handle cygwin compiler warning due to change of
11678         load_addr from DWORD to LPVOID.
11679         (handle_load_dll): Use %p in format string to properly print address
11680         and avoid a compiler warning.
11681         (DEBUG_EXCEPTION_SIMPLE): Ditto.
11682         (handle_exception): Ditto.
11683         * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
11684         * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
11685         windows-nat.o.
11686         * config/i386/mingw.mh: Ditto.
11687         * config/i386/mingw64.mh: Ditto.
11688
11689 2009-01-11  Jan Kratochvil  <[email protected]>
11690
11691         * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
11692         arrayprint_recurse_level to a parameter.  Update all the callers.  New
11693         comment at autovariables.
11694
11695 2009-01-11  Jan Kratochvil  <[email protected]>
11696
11697         * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
11698         coding style.
11699
11700 2009-01-11  Joel Brobecker  <[email protected]>
11701
11702         * target.c (target_xfer_partial): Use host_address_to_string to
11703         print the address of readbuf and writebuf. Cast the address of
11704         elements inside the myaddr buffer into intptr_t.
11705         (deprecated_debug_xfer_memory): Use paddress to print memaddr.
11706         Cast the address of elements inside the myaddr buffer into
11707         intptr_t.
11708
11709 2009-01-11  Joel Brobecker  <[email protected]>
11710
11711         * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
11712         * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
11713         * configure.host, configure.tgt: Add handling for x86_64/windows.
11714         * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
11715         and amd64-windows-tdep.c.
11716
11717 2009-01-11  Joel Brobecker  <[email protected]>
11718
11719         * win32-tdep.h, win32-tdep.c: New files.
11720         * i386-cygwin-tdep.h: Delete.
11721         * i386-cygwin-tdep.c: Include win32-tdep.h instead of
11722         i386-cygwin-tdep.h.
11723         (win32_xfer_shared_library): Delete.  Moved to win32-tdep.c.
11724         * win32-nat.c: Likewise.
11725         * configure.tgt: Add win32-tdep.o to the list of target object
11726         files for i386-cygwin and i386-mingw targets.
11727
11728 2009-01-11  Joel Brobecker  <[email protected]>
11729
11730         * win32-nat.h: New file.
11731         * win32-nat.c (mappings): Initialize to NULL.
11732         (win32_set_context_register_offsets): New function.
11733         * i386-windows-nat.c: New file.
11734         (mappings): Moved here from win32-nat.c.
11735         (_initialize_i386_windows_nat): New function.
11736         * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
11737         * config/i386/cygwin.mh (NATDEPFILES): Likewise.
11738
11739 2009-01-09  Andreas Schwab  <[email protected]>
11740
11741         * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
11742
11743 2009-01-09  Daniel Jacobowitz  <[email protected]>
11744
11745         * gdbtypes.c (append_composite_type_field): Correct the location of
11746         appended fields.
11747
11748 2009-01-09  Pedro Alves  <[email protected]>
11749
11750         * defs.h (deprecated_error_hook): Delete declaration.
11751         * interps.c (clear_interpreter_hooks): Adjust.
11752         * remote-sim.c (gdb_os_error): Don't try to call
11753         deprecated_error_hook.  No need to call exit anymore.
11754         * top.c (deprecated_error_hook): Delete.
11755
11756 2009-01-09  Joel Brobecker  <[email protected]>
11757
11758         * arch-utils.c (gdbarch_update_p): Use host_address_to_string
11759         to print the address of the gdbarch pointer.
11760
11761 2009-01-09  Joel Brobecker  <[email protected]>
11762
11763         * gdbarch.sh: Fix all the compilation errors on amd64-windows
11764         due to casting a pointer to a long when printing a function
11765         address. Instead, use host_address_to_string to convert our
11766         address to a string.
11767         * gdbarch.c: Regenerate.
11768
11769 2009-01-09  Joel Brobecker  <[email protected]>
11770
11771         * event-top.c (async_disconnect, async_stop_sig): use "raise"
11772         instead of "kill" to raise a signal.
11773
11774 2009-01-09  Joel Brobecker  <[email protected]>
11775
11776         * win32-nat.c (get_module_name): Change the type of parameter
11777         "base_address" to LPVOID.  Remove unnecessary cast.
11778         (struct lm_info): Change type of load_addr to LPVOID.
11779         (win32_make_so): Change the type of parameter "load_addr"
11780         to LPVOID.  Remove some unnecessary casts.
11781         (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
11782         (win32_xfer_shared_libraries): Add missing cast.
11783
11784 2009-01-09  Joel Brobecker  <[email protected]>
11785
11786         * win32-nat.c (has_detach_ability, set_process_privilege):
11787         Cast the result of GetProcAddress to (void *) to avoid
11788         a compilation warning.
11789
11790 2009-01-09  Joel Brobecker  <[email protected]>
11791
11792         * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
11793         already defined.
11794
11795 2009-01-09  Joel Brobecker  <[email protected]>
11796
11797         * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
11798         definition of local variable "done".
11799         (info_w32_command, handle_exception): Remove unnecessary cast.
11800
11801 2009-01-09  Joel Brobecker  <[email protected]>
11802
11803         * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
11804         DebugSetProcessKillOnExit.  Update all uses in this file.
11805         (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
11806         Update all uses in this file.
11807
11808 2009-01-09  Joel Brobecker  <[email protected]>
11809
11810         * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
11811         and use it when pushing the target.
11812         (win32_attach, win32_create_inferior): Update call to
11813         do_initial_win32_stuff.
11814         (win32_detach, win32_mourn_inferior): Use our ops parameter
11815         instead of the global win32_ops to unpush the target.
11816
11817 2009-01-09  Joel Brobecker  <[email protected]>
11818
11819         * ser-mingw.c (ser_windows_open): Use proper type when casting
11820         in call to _open_osfhandle.
11821
11822 2009-01-09  Kai Tietz  <[email protected]>
11823
11824         * coff-pe-read.c (read_pe_exported_syms): Fix typo.
11825
11826 2009-01-09  Joel Brobecker  <[email protected]>
11827
11828         * CONTRIBUTE: Minor reformatting.
11829
11830 2009-01-08  Kai Tietz  <[email protected]>
11831
11832         * MAINTAINERS: Add myself to Write After Approval.
11833         * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
11834         export directory.
11835
11836 2009-01-08  Nathan Froyd  <[email protected]>
11837
11838         * remote-sim.c (gdb_os_error): Mark as a noreturn function.
11839         Call exit to make it obvious to GCC.
11840
11841 2009-01-08  Tom Tromey  <[email protected]>
11842
11843         PR breakpoints/9350:
11844         * varobj.c (varobj_invalidate): Unconditionally free
11845         all_rootvarobj.
11846         * symfile.c (syms_from_objfile): Free local_addr when returning
11847         normally.
11848         * exec.c (exec_file_attach): Do cleanups before returning.
11849         (exec_file_command): Likewise.
11850         * corefile.c (reopen_exec_file): Do cleanups before returning.
11851         * breakpoint.c (insert_breakpoint_locations): Do cleanups before
11852         returning.
11853         (do_vec_free): New function.
11854         (update_global_location_list): Make a cleanup for old_locations.
11855         Do cleanups before returning.  Remove unused variable 'e'.
11856         (find_condition_and_thread): Free result of parsing the
11857         expression.
11858         (print_it_typical): Do cleanups before returning.
11859         (breakpoint_re_set_one): Always free sals.sals.
11860
11861 2009-01-08  Joel Brobecker  <[email protected]>
11862             Emi Suzuki  <[email protected]>
11863
11864         * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
11865         watchpoints.
11866
11867 2009-01-07  Doug Evans  <[email protected]>
11868
11869         * top.c (gdb_prompt_string): Delete, unused.
11870
11871 2009-01-07  Pedro Alves  <[email protected]>
11872
11873         Delete ONE_PROCESS_WRITETEXT leftovers.
11874
11875         * breakpoint.c (insert_bp_location): Delete process_warning
11876         argument.  Adjust.
11877         (insert_breakpoint_locations): Adjust.
11878         (reattach_breakpoints): Adjust.
11879         * infrun.c (normal_stop): Drop "It might be running in another
11880         process" notice.
11881
11882 2009-01-07  Stan Shebs  <[email protected]>
11883
11884         * config/pa/linux.mh (XDEPFILES): Remove.
11885
11886 2009-01-07  Doug Evans  <[email protected]>
11887
11888         * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
11889
11890 2009-01-07  Jan Kratochvil  <[email protected]>
11891
11892         * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
11893         spacing, a regression from 2008-04-22.
11894
11895 2009-01-07  Joel Brobecker  <[email protected]>
11896
11897         * utils.c (gdb_print_host_address): Adjust implementation to
11898         reuse host_address_to_string. Move comment explaining the conversion
11899         from host address to string from here...
11900         (host_address_to_string): ... to there.
11901
11902 2009-01-07  Emi Suzuki  <[email protected]>
11903
11904         * MAINTAINERS: Add myself for write after approval privileges.
11905
11906 2009-01-06  Tom Tromey  <[email protected]>
11907
11908         * value.c (set_internalvar): Use value_free, not xfree.
11909
11910 2009-01-06  Jim Blandy  <[email protected]>
11911
11912         Check return values of functions declared with warn_unused_result
11913         attribute in GLIBC 2.8.
11914         * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
11915         * inflow.c (check_syscall): New function.
11916         (new_tty): Use check_syscall to check return values from open and dup.
11917         * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
11918         * main.c (captured_main): Call cwd after setting up gdb_stderr;
11919         check for errors from getcwd.
11920         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
11921         * ui-file.c (stdio_file_write): Ignore return value from fwrite.
11922         (stdio_file_fputs): Same.
11923         * utils.c (internal_vproblem): abort if last-ditch error message
11924         write fails.
11925
11926         * top.c (gdb_init): Don't set the current directory here; that's
11927         already been done in captured_main.
11928
11929 2009-01-06  Sandra Loosemore  <[email protected]>
11930
11931         * ser-tcp.c: Adjust includes.
11932         (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
11933         (tcp_auto_retry, tcp_retry_limit): Declare.
11934         (TIMEOUT): Remove, in favor of tcp_retry_limit.
11935         (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
11936         (wait_for_connect): New function.
11937         (net_open): Use it.  Add auto-retry logic.
11938         (set_tcp_cmd, show_tcp_cmd): New functions.
11939         (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
11940         and "set/show tcp connect-timeout" commands.
11941         * NEWS: Document new commands.
11942
11943 2009-01-05  Tom Tromey  <[email protected]>
11944
11945         * python/python-internal.h (Py_ssize_t): Define as int.
11946
11947 2009-01-05  Jim Blandy  <[email protected]>
11948
11949         * MAINTAINERS: Fix my e-mail address as steering committee member.
11950
11951 2009-01-03  Joel Brobecker  <[email protected]>
11952
11953         Updated copyright notices for most files.
11954
11955 2009-01-03  Joel Brobecker  <[email protected]>
11956
11957         * top.c (print_gdb_version): Update copyright year.
11958
11959 2009-01-03  Joel Brobecker  <[email protected]>
11960
11961         * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
11962
11963 2009-01-01  Pedro Alves  <[email protected]>
11964
11965         PR breakpoints/9681:
11966         * exceptions.h (enum errors): New error type, MEMORY_ERROR.
11967         * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
11968         * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
11969         retrow all other exceptions.
11970
11971 For older changes see ChangeLog-2008.
11972 \f
11973 Local Variables:
11974 mode: change-log
11975 left-margin: 8
11976 fill-column: 74
11977 version-control: never
11978 coding: utf-8
11979 End:
This page took 0.688605 seconds and 4 git commands to generate.