OSDN Git Service

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