* remote.c (remote_pid_to_str): If printing a process id and we
[external/binutils.git] / gdb / ChangeLog
1 2009-08-13  Pedro Alves  <pedro@codesourcery.com>
2
3         * remote.c (remote_pid_to_str): If printing a process id and we
4         don't know what the remote pid could be, output "Remote target";
5         otherwise, use normal_pid_to_str.
6
7 2009-08-13  Tom Tromey  <tromey@redhat.com>
8
9         * language.h (longest_raw_hex_string): Remove unused declaration.
10
11 2009-08-13  Pedro Alves  <pedro@codesourcery.com>
12
13         PR gdb/8869:
14
15         * language.c (language, type, range, case_sensitive): Make const.
16         (show_language_command): Don't call deprecated_show_value_hack.
17         Special case "auto".
18         (set_language_command): An unrecognized language is now an
19         internal error instead of a user error.  Don't call set_lang_str.
20         (show_type_command): Don't call deprecated_show_value_hack.
21         Special case "auto".  Use warning.
22         (set_type_command): An unrecognized type is now an internal error
23         instead of a user error.  Output type check mismatch with language
24         here.  Don't call set_type_str.
25         (show_range_command): Don't call deprecated_show_value_hack.
26         Special case "auto".  Use warning.
27         (set_range_command): An unrecognized range check is now an
28         internal error instead of a warning.  Output range check mismatch
29         with language here.  Don't call set_range_str.
30         (show_case_command): Don't call deprecated_show_value_hack.
31         Special case "auto".  Use warning.
32         (set_case_command): Don't call set_case_str.  An unrecognized case
33         check is now an internal error instead of a warning.  Output range
34         check mismatch with language here.  Don't call set_case_str.
35         (set_type_range_case): Don't call set_type_str, set_range_str or
36         set_case_str here.
37         (set_lang_str, set_type_str, set_range_str, set_case_str): Delete.
38         (add_language): Install or reinstall the "set language" command
39         here, and make it an enum command.  Build the enumeration and the
40         help string from the current list of known languages.
41         (_initialize_language): Don't install "set language" here.  Make
42         "set check type", "set check range" and "set case-sensitive" enum
43         commands.  Register the "auto" "local" and "unknown" languages in
44         that order.
45
46 2009-08-13  Pedro Alves  <pedro@codesourcery.com>
47
48         Revert 2009-08-07 changes for PR gdb/8869:
49
50         * language.c (set_language_command): Strip whitespace.
51         (set_type_command): Likewise.
52         (set_range_command): Likewise.
53
54         * language.c (language_completer): New function.
55         (range_or_type_completer): New function.
56         (case_completer): New function.
57         (_initialize_language): Set completers.
58         * cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
59         command.
60         (add_setshow_string_noescape_cmd): Likewise.
61         (add_setshow_integer_cmd): Likewise.
62         (add_setshow_uinteger_cmd): Likewise.
63         (add_setshow_zinteger_cmd): Likewise.
64         (add_setshow_zuinteger_cmd): Likewise.
65         * command.h (add_setshow_string_cmd,
66         add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
67         add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
68
69 2009-08-12  Michael Snyder  <msnyder@vmware.com>
70
71         * remote.c (remote_add_inferior): Remove unused local.
72         (remote_add_thread): Ditto.
73         (read_ptid): Ditto.
74         (remote_current_thread): Ditto.
75         (remote_stop_ns): Ditto.
76         (remote_parse_stop_reply): Ditto.
77         (remote_get_pending_stop_replies): Ditto.
78         (remote_wait_ns): Ditto.
79         (remote_wait_as): Ditto.
80         (send_g_packet): Ditto.
81         (remote_fetch_registers): Ditto.
82         (store_register_using_P): Ditto.
83         (remote_store_registers): Ditto.
84         (remote_remove_breakpoint): Ditto.
85         (remote_write_qxfer): Ditto.
86         (remote_read_qxfer): Ditto.
87
88 2009-08-11  Tom Tromey  <tromey@redhat.com>
89
90         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Make a cleanup.
91         (dwarf2_loc_desc_needs_frame): Likewise.
92         * dwarf2expr.h (make_cleanup_free_dwarf_expr_context): Declare.
93         * dwarf2expr.c (free_dwarf_expr_context_cleanup): New function.
94         (make_cleanup_free_dwarf_expr_context): Likewise.
95         * dwarf2-frame.c (execute_stack_op): Make a cleanup.
96
97 2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
98
99         * objfiles.c (gdb_bfd_unref): Use the bfd_usrdata accessor.
100         * solib.c (symbol_add_stub): Likewise.
101         * symfile.c (symfile_bfd_open): Assert BFD_USRDATA is NULL.
102
103 2009-08-10  Paul Pluzhnikov  <ppluzhnikov@google.com>
104
105         * objfiles.c (qsort_cmp): Remove assert.
106         (preferred_obj_section): New function.
107         (update_section_map): Filter duplicates.
108         
109 2009-08-10  Tristan Gingold  <gingold@adacore.com>
110
111         * solib-darwin.c (find_program_interpreter): Simplify the code by
112         looking up for the load_dylinker command instead of reading the
113         corresponding (but deprecated) section.
114         (darwin_solib_create_inferior_hook): Adjust: do not free the
115         interpreter path.
116
117 2009-08-10  Tristan Gingold  <gingold@adacore.com>
118
119         * i386-darwin-tdep.c (i386_m128_p): New function.
120         (i386_darwin_arg_type_alignment): Ditto.
121         (i386_darwin_push_dummy_call): Ditto.
122         (i386_darwin_init_abi): Define Darwin specific push_dummy_call.
123         Adjust long_double size.  Adjust pc offset in setjump buffer.
124
125 2009-08-10  Hui Zhu  <teawater@gmail.com>
126
127         Add Linux AMD64 process record support.
128
129         * amd64-linux-tdep.c (amd64_linux_record_tdep): New variable.
130         This struct has the argument for the function
131         "record_linux_system_call".
132         (amd64_linux_syscall_record): New function. Parse the
133         system call instruction and call function
134         "record_linux_system_call" to record execute log.
135         (i386_linux_init_abi): Initialize "amd64_linux_record_tdep".
136         Set "amd64_linux_syscall_record" to "i386_syscall_record".
137
138 2009-08-10  Hui Zhu  <teawater@gmail.com>
139
140         Add process record Linux system call 64 bits support.
141
142         * linux-record.h (linux_record_tdep): Add size_pointer,
143         size_size_t, size_iovec and arg6.  Change the values of
144         size_int, size_long and size_ulong to
145         gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
146         gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT,
147         gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT.
148         * i386-linux-tdep.c (i386_linux_init_abi): Ditto.
149         (i386_linux_intx80_sysenter_record): Add a check for system
150         call number.
151         * linux-record.c (record_linux_system_call): Make this
152         function support 64 bits.
153
154 2009-08-10  Hui Zhu  <teawater@gmail.com>
155
156         Add AMD64 process record instruction set support.
157
158         * i386-tdep.h (gdbarch_tdep): Add record_regmap for registers
159         because the AMD64's registers order in GDB is not same with
160         I386 instructions.
161         Add i386_syscall_record to be the syscall function handle
162         interface.
163         (record_i386_regnum): Number for record_regmap.
164         * i386-tdep.c (OT_QUAD): For 64 bits.
165         (i386_record_s): Add rex_x, rex_b, rip_offset and
166         popl_esp_hack for AMD64 instruction set. And regmap for
167         record_regmap.
168         (i386_record_lea_modrm_addr): Support AMD64 instruction set
169         64 bits lea.
170         (i386_record_lea_modrm): Ditto.
171         (i386_record_push): New function.  Record the execution log
172         of push.
173         (I386_RECORD_ARCH_LIST_ADD_REG): New macro to record the
174         register.
175         (i386_process_record): Support AMD64 instruction set.
176         * amd64-tdep.c (amd64_record_regmap): For record_regmap.
177         (amd64_init_abi): Set amd64_record_regmap to record_regmap.
178
179 2009-08-08  Pedro Alves  <pedro@codesourcery.com>
180
181         * bfd-target.c (struct target_bfd_data): New.
182         (target_bfd_xfer_partial): Adjust to get at the section table from
183         the new structure.
184         (target_bfd_get_section_table): Ditto.
185         (target_bfd_xclose): Ditto.  Get the bfd pointer from the
186         target_bfd_data structure, from the section table.
187         (target_bfd_reopen): Store a struct target_bfd_data in the
188         target_ops to_data field, instead of a target_section_table.
189
190 2009-08-08  Aleksandar Ristovski  <aristovski@qnx.com>
191             Hui Zhu  <teawater@gmail.com>
192
193         * record.c (record_store_registers): Remove unused variable.
194
195 2009-08-07  Tom Tromey  <tromey@redhat.com>
196
197         * language.c (set_language_command): Strip whitespace.
198         (set_type_command): Likewise.
199         (set_range_command): Likewise.
200
201 2009-08-07  Tom Tromey  <tromey@redhat.com>
202
203         PR gdb/8869:
204         * language.c (language_completer): New function.
205         (range_or_type_completer): New function.
206         (case_completer): New function.
207         (_initialize_language): Set completers.
208         * cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
209         command.
210         (add_setshow_string_noescape_cmd): Likewise.
211         (add_setshow_integer_cmd): Likewise.
212         (add_setshow_uinteger_cmd): Likewise.
213         (add_setshow_zinteger_cmd): Likewise.
214         (add_setshow_zuinteger_cmd): Likewise.
215         * command.h (add_setshow_string_cmd,
216         add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
217         add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
218
219 2009-08-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
220         
221         gold/10400
222         * dwarf2-frame.c (qsort_fde_cmp): Use stable sort.      
223         
224 2009-08-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
225
226         * dwarf2-frame.c (struct dwarf2_cie): Remove 'next'.
227         (struct dwarf2_cie_table): New.
228         (struct dwarf2_fde): Remove 'next'.
229         (struct dwarf2_fde_table): New.
230         (struct comp_unit): Remove 'cie'.
231         (bsearch_cie_cmp, bsearch_fde_cmp): New function.
232         (find_cie, dwarf2_frame_find_fde): Use bsearch.
233         (add_cie, add_fde): Use array instead of linked list.
234         (decode_frame_entry, decode_frame_entry_1): New parameters.
235         (qsort_fde_cmp): New function.
236         (dwarf2_build_frame_info): Adjust.
237         
238 2009-08-06  Don Lee <don.lee@sunplusct.com>
239
240         * score-tdep.c: Support a new Sunplus CT S+core variant, S+core 3.
241         * score-tdep.h: Ditto.
242         * NEWS: Ditto.
243         * configure.tgt: Test do we have a simulator.
244         * MAINTAINERS: Add myself under target score
245
246 2009-08-06  Nick Roberts  <nickrob@snap.net.nz>
247
248         * utils.c (defaulted_query): Don't ask for confirmation if server
249         prefix is used.
250
251 2009-08-05  Tom Tromey  <tromey@redhat.com>
252
253         * spu-tdep.h (SPUADDR_SPU): Cast result to int.
254
255 2009-08-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
256
257         * objfiles.h (OBJF_KEEPBFD): Delete.
258         (gdb_bfd_unref): New prototype.
259         * objfiles.c (gdb_bfd_unref): New function.
260         (free_objfile): Call gdb_bfd_unref.
261         * solib.c (free_so): Likewise.
262         (symbol_add_stub): Set refcount.
263
264 2009-08-04  Hui Zhu  <teawater@gmail.com>
265             Michael Snyder  <msnyder@vmware.com>
266
267         * record.c (record_mem_entry): New field 'mem_entry_not_accessible'.
268         (record_arch_list_add_mem): Initialize 'mem_entry_not_accessible'.
269         (record_wait): Set 'mem_entry_not_accessible' flag if target
270         memory not readable.  Don't try to change target memory if
271         'mem_entry_not_accessible' is set.
272
273 2009-08-03  Richard Guenther  <rguenther@suse.de>
274             Jan Kratochvil  <jan.kratochvil@redhat.com>
275
276         Fix memory corruption on reread of file through a symbolic link.
277         * symfile.c (find_separate_debug_file): Initialize CANON_NAME earlier.
278         Allocate DEBUGFILE with length based on CANON_NAME.  Free CANON_NAME on
279         all the return paths.
280
281 2009-08-03  Jim Ingham  <jingham@apple.com>
282             Vladimir Prus  <vladimir@codesourcery.com>
283
284         Implement -break-commands
285
286         * breakpoint.c (get_breakpoint, breakpoint_set_commands): New.
287         (commands_command): Use breakpoint_set_commands.
288         * breakpoint.h (get_breakpoint, breakpoint_set_commands): Declare.
289
290         * mi/mi-cmds.h (mi_cmd_break_commands): New.
291         * mi/mi-cmds.c: Register -break-commands.
292         * mi/mi-cmd-break.c (mi_cmd_break_commands, mi_read_next_line)
293         (mi_command_line_array, mi_command_line_array_cnt)
294         (mi_command_line_array_ptr): New.
295
296 2009-08-03  Jim Ingham  <jingham@apple.com>
297             Vladimir Prus  <vladimir@codesourcery.com>
298
299         Refactor reading of commands
300
301         * defs.h (read_command_lines_1): Declare.
302         * cli/cli-script.c (read_next_line): Only return string,
303         do not process.
304         (process_next_line): New, extracted from read_next_line.
305         (recurse_read_control_structure): Take a function pointer to the
306         read function.
307         (get_command_line) Pass the read_next_line as reader function
308         into recurse_read_control_structure.
309         (read_command_lines_1): New, extracted from...
310         (read_command_lines): ...here.
311
312 2009-07-31  Kazu Hirata  <kazu@codesourcery.com>
313
314         * procfs.c (proc_set_current_signal): Populate mysinfo before
315         copying it to arg.
316         (proc_clear_current_signal): Likewise.
317         (proc_set_watchpoint): Populate pwatch before copying it to arg.
318
319 2009-07-31  Michael Snyder  <msnyder@vmware.com>
320
321         * remote.c (store_register_using_P): Call putpkt and getpkt
322         directly instead of calling remote_send.
323         (store_registers_using_G): Ditto.
324         (fetch_register_using_p): Ditto.
325
326         * remote.c (store_register_using_P): Make error msg more verbose.
327         (store_registers_using_G): Ditto.
328         (fetch_register_using_p): Ditto.
329
330 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
331
332         * spu-tdep.c: Include "infcall.h".
333         (spu_address_class_type_flags): New function.
334         (spu_address_class_type_flags_to_name): Likewise.
335         (spu_address_class_name_to_type_flags): Likewise.
336         (spu_pointer_to_address): Handle __ea pointers.
337         (spu_auto_flush_cache_p): New static variable.
338         (spu_objfile_from_frame): New function.
339         (flush_ea_cache, spu_attach_normal_stop): Likewise.
340         (show_spu_auto_flush_cache): Likewise.
341         (spu_gdbarch_init): Install address class handlers.
342         (_initialize_spu_tdep): Attach to normal_stop observer.
343         Install "set spu auto-flush-cache" / "show spu auto-flush-cache"
344         commands.
345
346         * NEWS: Mention "set/show spu auto-flush-cache" commands.
347
348 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
349
350         * spu-tdep.c: Include "block.h".
351         (setspucmdlist, showspucmdlist): New static variables.
352         (spu_stop_on_load_p): Likewise.
353         (spu_catch_start): New function.
354         (show_spu_command, set_spu_command): New functions.
355         (show_spu_stop_on_load): Likewise.
356         (_initialize_spu_tdep): Attach spu_catch_start to new_objfile observer.
357         Install "set spu" / "show spu" prefix command handler.
358         Install "set spu stop-on-load" / "show spu stop-on-load" command.
359
360         * NEWS: Mention "set/show spu stop-on-load" commands.
361
362 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
363
364         * ppc-linux-tdep.c: Include "solib.h", "solist.h", "exceptions.h",
365         "arch-utils.h", and "spu-tdep.h".
366         (spu_context_objfile, spe_context_lm_addr, spe_context_offset):
367         New static variables.
368         (spe_context_cache_ptid, spe_context_cache_address): Likewise.
369         (ppc_linux_spe_context_lookup): New function.
370         (ppc_linux_spe_context_inferior_created): Likewise.
371         (ppc_linux_spe_context_solib_loaded): Likewise.
372         (ppc_linux_spe_context_solib_unloaded): Likewise.
373         (ppc_linux_spe_context): Likewise.
374         (struct ppu2spu_cache, struct ppu2spu_data): New data types.
375         (ppu2spu_prev_arch, ppu2spu_this_id, ppu2spu_prev_register,
376         ppu2spu_unwind_register, ppu2spu_sniffer,
377         ppu2spu_dealloc_cache): New functions.
378         (ppu2spu_unwind): New static variable.
379         (ppc_linux_init_abi): Install cross-architecture unwinder.
380         (_initialize_ppc_linux_tdep): Attach to observers.
381
382         * spu-tdep.c (struct spu2ppu_cache): New data type.
383         (spu2ppu_prev_arch, spu2ppu_this_id, spu2ppu_prev_register,
384         spu2ppu_sniffer, spu2ppu_dealloc_cache): New functions.
385         (spu2ppu_unwind): New static variable.
386         (spu_gdbarch_init): Install cross-architecture unwinder.
387
388 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
389
390         * target.h (enum strata): New value arch_stratum.
391         * target.c (target_require_runnable): Skip arch_stratum targets.
392
393         * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
394         solib-spu.o and spu-multiarch.o to gdb_target_obs.
395         * Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o.
396         (ALLDEPFILES): Add solib-spu.c and spu-multiarch.c.
397
398         * solib-spu.c: New file.
399         * solib-spu.h: New file.
400         * spu-multiarch.c: New file.
401
402         * spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros.
403
404         * spu-tdep.c (struct gdbarch_tdep): New member id.
405         (spu_gdbarch_id): New function.
406         (spu_lslr): New function.
407
408         (spu_address_to_pointer): New function.
409         (spu_pointer_to_address): Support SPU ID address encoding.  Use
410         spu_gdbarch_id and spu_lslr.
411         (spu_integer_to_address): Likewise.
412         (spu_frame_unwind_cache): Update for encoded addresses.
413         (spu_unwind_pc, spu_unwind_sp): Likewise.
414         (spu_read_pc, spu_write_pc): Likewise.
415         (spu_push_dummy_call): Likewise.
416         (spu_software_single_step): Likewise.
417         (spu_get_longjmp_target): Likewise.
418         (spu_overlay_update_osect): Likewise.
419
420         (spu_dis_asm_print_address): New function.
421         (gdb_print_insn_spu): Likewise.
422
423         (spu_gdbarch_init): Store SPU ID in tdep structure.
424         Install spu_address_to_pointer and gdb_print_insn_spu.
425
426         * ppc-linux-tdep.c: Include "observer.h", "auxv.h", "elf/common.h"
427         and "solib-spu.h".
428         (ppc_linux_entry_point_addr): New static variable.
429         (ppc_linux_inferior_created): New function.
430         (ppc_linux_displaced_step_location): Likewise.
431         (ppc_linux_init_abi): Enable Cell/B.E. support if supported
432         by the target.
433         (_initialize_ppc_linux_tdep): Attach to inferior_created observer.
434
435         * NEWS: Mention multi-architecture and Cell/B.E. debugging
436         capabilities.
437
438 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
439
440         * linux-nat.c: Include <sys/vfs.h>.
441         (SPUFS_MAGIC): Define.
442         (spu_enumerate_spu_ids): New function.
443         (linux_proc_xfer_spu): New function.
444         (linux_xfer_partial): Handle TARGET_OBJECT_SPU.
445
446         (iterate_over_spus): New function.
447         (struct linux_spu_corefile_data): New data type.
448         (linux_spu_corefile_callback): New function.
449         (linux_spu_make_corefile_notes): New function.
450         (linux_nat_make_corefile_notes): Call it.
451
452         * corelow.c (struct spuid_list): New data type.
453         (add_to_spuid_list): New function.
454         (core_xfer_partial): Handle TARGET_OBJECT_SPU.
455
456 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
457
458         * features/Makefile: Allow sub-platform specific expedite settings.
459         (WHICH): Add rs6000/powerpc-cell32l and rs6000/powerpc-cell64l.
460         (rs6000/powerpc-cell32l-expedite): Define.
461         (rs6000/powerpc-cell64l-expedite): Likewise.
462         * features/rs6000/powerpc-cell32l.xml: New file.
463         * features/rs6000/powerpc-cell64l.xml: New file.
464         * features/rs6000/powerpc-cell32l.c: New generated file.
465         * features/rs6000/powerpc-cell64l.c: New generated file.
466
467         * regformats/rs6000/powerpc-cell32l.dat: New generated file.
468         * regformats/rs6000/powerpc-cell64l.dat: New generated file.
469
470         * config/djgpp/fnchange.lst: Add mappings for new files.
471
472         * ppc-linux-tdep.h (tdesc_powerpc_cell32l): Add prototype.
473         (tdesc_powerpc_cell64l): Likewise.
474         * ppc-linux-tdep.c: Include "features/rs6000/powerpc-cell32l.c"
475         and "features/rs6000/powerpc-cell64l.c".
476         (_initialize_ppc_linux_tdep): Initialize target descriptions.
477         (ppc_linux_spu_section): New function.
478         (ppc_linux_core_read_description): Detect Cell/B.E. core files.
479         * ppc-linux-nat.c (PPC_FEATURE_CELL): Define.
480         (ppc_linux_read_description): Detect Cell/B.E. architecture.
481
482         * rs6000-tdep.c (rs6000_gdbarch_init): Do not trust BFD wordsize
483         if exec file is not PowerPC architecture.
484
485 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
486
487         * features/gdb-target.dtd (target): Accept optional
488         <compatible> elements.
489         (compatible): Define element.
490
491         * target-descriptions.h (tdesc_compatible_p): New.
492         (tdesc_add_compatible): New.
493         * target-descriptions.c (arch_p): New VEC_P type.
494         (struct target_desc): New member compatible.
495         (free_target_description): Handle it.
496         (maint_print_c_tdesc_cmd): Likewise.
497         (tdesc_compatible_p): New function.
498         (tdesc_add_compatible): New function.
499
500         * xml-tdesc.c (tdesc_end_compatible): New function.
501         (target_children): Handle <compatible> element.
502
503         * arch-utils.c (choose_architecture_for_target): Accept target
504         description instead of BFD architecture as input.  Query target
505         description for compatible architectures.
506         (gdbarch_info_fill): Update call.
507
508         * NEWS: Mention <compatible> element of target descriptions.
509
510 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
511
512         * breakpoint.c (remove_breakpoints): If removing one breakpoint
513         location fails, still continue to remove other locations.
514         (remove_hw_watchpoints): Likewise.
515         (detach_breakpoints): Likewise.
516
517 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
518
519         * breakpoint.h (enum enable_state): Add bp_startup_disabled.
520         (disable_breakpoints_before_startup): Add prototype.
521         (enable_breakpoints_after_startup): Likewise.
522
523         * breakpoint.c (executing_startup): New static variable.
524         (describe_other_breakpoints): Handle bp_startup_disabled.
525         (check_duplicates_for): Likewise.
526         (disable_breakpoints_before_startup): New function.
527         (enable_breakpoints_after_startup): New function.
528         (create_breakpoint): Mark new breakpoints as bp_startup_disabled
529         if executing_startup flag is true.
530         (break_command_really): Likewise.
531         (breakpoint_re_set_one): Skip bp_startup_disabled breakpoints.
532
533 2009-07-31  Julian Brown  <julian@codesourcery.com>
534
535         * arm-linux-tdep.c (arch-utils.h, inferior.h, gdbthread.h, symfile.h):
536         Include files.
537         (arm_linux_cleanup_svc, arm_linux_copy_svc): New.
538         (cleanup_kernel_helper_return, arm_catch_kernel_helper_return): New.
539         (arm_linux_displaced_step_copy_insn): New.
540         (arm_linux_init_abi): Initialise displaced stepping callbacks.
541         * arm-tdep.c (DISPLACED_STEPPING_ARCH_VERSION): New macro.
542         (ARM_NOP): New.
543         (displaced_read_reg, displaced_in_arm_mode, branch_write_pc)
544         (bx_write_pc, load_write_pc, alu_write_pc, displaced_write_reg)
545         (insn_references_pc, copy_unmodified, cleanup_preload, copy_preload)
546         (copy_preload_reg, cleanup_copro_load_store, copy_copro_load_store)
547         (cleanup_branch, copy_b_bl_blx, copy_bx_blx_reg, cleanup_alu_imm)
548         (copy_alu_imm, cleanup_alu_reg, copy_alu_reg)
549         (cleanup_alu_shifted_reg, copy_alu_shifted_reg, cleanup_load)
550         (cleanup_store, copy_extra_ld_st, copy_ldr_str_ldrb_strb)
551         (cleanup_block_load_all, cleanup_block_store_pc)
552         (cleanup_block_load_pc, copy_block_xfer, cleanup_svc, copy_svc)
553         (copy_undef, copy_unpred): New.
554         (decode_misc_memhint_neon, decode_unconditional)
555         (decode_miscellaneous, decode_dp_misc, decode_ld_st_word_ubyte)
556         (decode_media, decode_b_bl_ldmstm, decode_ext_reg_ld_st)
557         (decode_svc_copro, arm_process_displaced_insn)
558         (arm_displaced_init_closure, arm_displaced_step_copy_insn)
559         (arm_displaced_step_fixup): New.
560         (arm_gdbarch_init): Initialise max insn length field.
561         * arm-tdep.h (DISPLACED_TEMPS, DISPLACED_MODIFIED_INSNS): New
562         macros.
563         (displaced_step_closure, pc_write_style): New.
564         (arm_displaced_init_closure, displaced_read_reg)
565         (arm_process_displaced_insn, arm_displaced_init_closure)
566         (displaced_read_reg, displaced_write_reg, arm_displaced_step_copy_insn)
567         (arm_displaced_step_fixup): Add prototypes.
568
569 2009-07-31  Pedro Alves  <pedro@codesourcery.com>
570             Julian Brown  <julian@codesourcery.com>
571
572         * infrun.c (displaced_step_fixup): If this is a software
573         single-stepping arch, don't tell the target to single-step.
574         (maybe_software_singlestep): Return 0 if we're using displaced
575         stepping.
576         (resume): If this is a software single-stepping arch, and
577         displaced-stepping is enabled, use it for all single-step
578         requests.
579
580 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
581
582         * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
583         (AUTOCONF, configure_deps, AUTOHEADER): New variables.
584         ($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
585         (am--refresh): New rules.
586         (stamp-h, config.status): List config.in and configure including
587         $(srcdir)/ prefix.
588         * aclocal.m4: Regenerate.
589         * configure: Regenerate.
590
591 2009-07-30  Thomas Schwinge  <tschwinge@gnu.org>
592
593         * gnu-nat.c (add_task_commands) <stopped>: Register the correct
594         callback function.
595
596 2009-07-30  H.J. Lu  <hongjiu.lu@intel.com>
597
598         * ia64-tdep.c (ia64_access_reg): Correct paddress.
599
600 2009-07-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
601
602         Replace public function varobj_list by all_root_varobjs iterator.
603         * mi/mi-cmd-var.c (struct mi_cmd_var_update, mi_cmd_var_update_iter):
604         New.
605         (mi_cmd_var_update): Replace the varobj_list call by all_root_varobjs.
606         Remove the variables rootlist, cr.  New variable data.
607         * varobj.c (rootcount, varobj_list): Remove.
608         (install_variable, uninstall_variable): Remove the rootcount updates.
609         (all_root_varobjs): New function.
610         (varobj_invalidate): Use the all_root_varobjs call.  Move the code to...
611         (varobj_invalidate_iter): ... a new function.
612         * varobj.h (varobj_list): Remove the prototype.
613         (all_root_varobjs): New prototype.
614
615 2009-07-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
616
617         PR gdb/6817
618         * dbxread.c (read_dbx_symtab): Reduce stack use.
619         
620 2009-07-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
621
622         Fix gcc-4.5 HEAD warnings.
623         * cp-name-parser.y (%union <typed_val_int>, %token GLOBAL)
624         (GLOBAL_CONSTRUCTORS, GLOBAL_DESTRUCTORS, demangler_special <GLOBAL>):
625         Remove.
626         (yylex <"global constructors keyed to ">)
627         (yylex <"global destructors keyed to ">): Base it on DEMANGLER_SPECIAL.
628         (cp_comp_to_string): Remove variables str, prefix and buf.  Remove the
629         GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS handling.
630         (cp_print): Remove the GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS
631         handling.
632
633 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
634
635         * NEWS: Mention ARM VFP support.
636         * target-descriptions.c (tdesc_register_type): Make public.
637         (tdesc_unnumbered_register): New function.
638         (tdesc_register_reggroup_p): Allow missing
639         pseudo_register_reggroup_p.
640         * target-descriptions.h (tdesc_register_type): Declare.
641         (tdesc_unnumbered_register): Declare.
642         * arm-tdep.c (arm_neon_quad_read, arm_neon_quad_write): New functions.
643         (arm_push_dummy_call): Use arm_neon_quad_write.
644         (arm_neon_double_type, arm_neon_quad_type): New functions.
645         (arm_register_type): Handle VFP and NEON registers.  Override the
646         types of double-precision registers for NEON.  Disable FPA registers
647         if they are not present.
648         (arm_dwarf_reg_to_regnum): Add current VFP and NEON register numbers.
649         (arm_return_value): Use arm_neon_quad_write and arm_neon_quad_read.
650         (arm_register_name): Handle VFP single and NEON quad registers.
651         (arm_pseudo_read, arm_pseudo_write): New functions.
652         (arm_gdbarch_init): Check for VFP and NEON in the target description.
653         Assign numbers to double-precision registers.  Register VFP and NEON
654         pseudo registers.  Remove a shadowed "i" variable.
655         * arm-tdep.h (enum gdb_regnum): Add ARM_D0_REGNUM and
656         ARM_D31_REGNUM.
657         (struct gdbarch_tdep): Add have_neon_pseudos, have_neon,
658         have_vfp_registers, have_vfp_pseudos, neon_double_type,
659         and neon_quad_type.
660
661         * features/Makefile: Make expedite settings only architecture
662         specific.
663         (WHICH): Add new ARM descriptions.
664         * features/arm-with-neon.xml, features/arm-with-vfpv2.c,
665         features/arm-with-vfpv3.c, features/arm-vfpv2.xml,
666         features/arm-vfpv3.xml, features/arm-with-vfpv2.xml,
667         features/arm-with-vfpv3.xml, features/arm-with-neon.c: New files.
668         * regformats/arm-with-neon.dat, regformats/arm-with-vfpv2.dat,
669         regformats/arm-with-vfpv3.dat: Generate.
670
671 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
672
673         * infrun.c (handle_inferior_event): Clear trap_expected after
674         stepping past a single-step breakpoint.
675
676 2009-07-28  Joseph Myers  <joseph@codesourcery.com>
677
678         * arm-tdep.c (enum arm_vfp_cprc_base_type,
679         arm_vfp_cprc_unit_length, arm_vfp_cprc_reg_char,
680         arm_vfp_cprc_sub_candidate, arm_vfp_call_candidate,
681         arm_vfp_abi_for_function): New.
682         (arm_push_dummy_call): Handle VFP ABI.
683         (arm_extract_return_value, arm_store_return_value): Handle
684         ARM_FLOAT_VFP case.
685         (arm_return_value): Handle VFP ABI.
686         (arm_gdbarch_init): Default fp_model based on Tag_ABI_VFP_args for
687         EABI binaries.
688
689 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
690
691         * arch-utils.c (displaced_step_at_entry_point): Do not call
692         gdbarch_convert_from_func_ptr_addr.
693         * cris-tdep.c: Remove outdated comment.
694         * infcall.c (call_function_by_hand): Do not call
695         gdbarch_convert_from_func_ptr_addr after entry_point_address.
696         * objfiles.c (entry_point_address): Call both
697         gdbarch_convert_from_func_ptr_addr and
698         gdbarch_addr_bits_remove.
699
700 2009-07-28  Aleksandar Ristovski  <aristovski@qnx.com>
701
702         * nto-tdep.c (nto_thread_state_str): New array.
703         (nto_extra_thread_info): New function definition.
704         * nto-tdep.h (gdbthread.h): New include.
705         (private_thread_info): New struct.
706         (nto_extra_thread_info): New declaration.
707         * nto-procfs.c (procfs_thread_alive): Properly check if
708         thread is still alive.
709         (update_thread_private_data_name, update_thread_private_data): New
710         function definition.
711         (procfs_find_new_threads): Fetch thread private data.
712         (init_procfs_ops): Register to_extra_thread_info.
713
714 2009-07-25  Pedro Alves  <pedro@codesourcery.com>
715
716         * stack.c (backtrace_command_1): Remove dead check of NULL current
717         frame.
718
719 2009-07-23  Keith Seitz  <keiths@redhat.com>
720
721         * source.c (forward_search_command): Don't fclose the stream,
722         just run the cleanups.
723         (reverse_search_command): Likewise.
724
725 2009-07-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
726
727         * symtab.c (search_symbols): Add QUIT.
728         
729 2009-07-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
730
731         * symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.
732         
733 2009-07-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
734
735         * objfiles.h (objfiles_changed): New prototype.
736         * objfiles.c (objfiles_updated_p): Rename to objfiles_changed_p.
737         (allocate_objfile, free_objfile): Must rebuild section map.
738         (objfile_relocate): Likewise.
739         (update_section_map, find_pc_section): Adjust.
740         (set_objfiles_updated_on_exe_change): Remove.
741         (set_objfiles_updated_on_solib_activity): Remove.
742         (_initialize_objfiles): Remove.
743         (objfiles_changed): New function.
744         * symfile.c (reread_symbols): Call objfiles_changed.    
745         
746 2009-07-22  Hui Zhu  <teawater@gmail.com>
747
748         * record.c (record_xfer_partial): Call error When nquery
749         return "n".
750
751 2009-07-21  Paul Pluzhnikov  <ppluzhnikov@google.com>
752         
753         * objfiles.c (objfiles_updated_p): New variable.
754         (qsort_cmp, bsearch_cmp, update_section_map): New function.
755         (find_pc_section): Use bsearch.
756         (set_objfiles_updated_on_exe_change): New function.
757         (set_objfiles_updated_on_solib_activity): New function.
758         (_initialize_objfiles): New function.
759         
760 2009-07-21 Michael Eager <eager@eagercon.com>
761
762         * features/rs6000/powerpc-405.xml: New.
763         * rs6000-tdep.c: Add include & initialize for
764         powerpc-405.c, add 405 to variants.
765         * features/rs6000/powerpc-405.c: Generate.
766
767 2009-07-21  Paul Pluzhnikov  <ppluzhnikov@google.com>
768
769         * utils.c (internal_vproblem): Always print failure message.
770
771 2009-07-21  Daniel Jacobowitz  <dan@codesourcery.com>
772             Vladimir Prus <vladimir@codesourcery.com>
773
774         * valops.c (value_fetch_lazy): Handle bitfields explicitly.
775         (value_assign): Remove unnecessary FIXME.  Honor the container
776         type of bitfields if possible.
777         * value.c (struct value): Add parent field.
778         (value_parent): New function.
779         (value_free): Free the parent also.
780         (value_copy): Copy the parent also.
781         (value_primitive_field): Do not read the contents of a lazy
782         value to create a child bitfield value.  Set bitpos and offset
783         according to the container type if possible.
784         (unpack_bits_as_long): Rename from unpack_field_as_long.  Take
785         field_type, bitpos, and bitsize instead of type and fieldno.
786         (unpack_field_as_long): Use unpack_bits_as_long.
787         * value.h (value_parent, unpack_bits_as_long): New prototypes.
788
789 2009-07-21  Daniel Jacobowitz  <dan@codesourcery.com>
790
791         * value.c (struct value): Add reference_count field.
792         (allocate_value_lazy): Initialize reference_count.
793         (value_incref): New function.
794         (value_free): Check the reference count.
795         * value.h (value_incref): New prototype.
796
797 2009-07-20  Marc Khouzam  <marc.khouzam@ericsson.com>
798
799         * utils.c (defaulted_query): Update comment and remove dead code.
800
801 2009-07-20  Doug Evans  <dje@google.com>
802
803         Add support for "comdat types" from DWARF4.
804         * dwarf2read.c (dwarf2_per_objfile): New member types,
805         signatured_types.
806         (TYPES_SECTION): New macro.
807         (dwarf2_per_cu_data): Change size of length field from 30 bits
808         to 29 bits.  New member from_debug_types.
809         (signatured_type): New struct.
810         (struct attribute): New union member signatured_type.
811         (DW_SIGNATURED_TYPE): New macro.
812         (dwarf2_attr_no_follow): New function.
813         (read_type_unit_scope): New function.
814         (follow_die_ref_or_sig, follow_die_sig): New functions.
815         (dwarf2_locate_sectoins): Handle .debug_types.
816         (dwarf2_build_psymtabs): Read .debug_types.
817         (read_type_comp_unit_head): New function.
818         (hash_type_signature, eq_type_signature): New functions.
819         (create_debug_types_hash_table): New function.
820         (lookup_signatured_type): New function.
821         (process_psymtab_comp_unit): Handle type units too.
822         (process_type_comp_unit, build_type_psymtabs): New functions.
823         (dwarf2_build_psymtabs_hard): Call build_type_psymtabs.
824         (load_partial_comp_unit): Assert not called for a type unit.
825         (skip_one_die): Handle DW_FORM_sig8.
826         (queue_comp_unit): Don't call load_full_comp_unit here, or
827         update read_in_chain.
828         (psymtab_to_symtab_1): Call read_signatured_type_at_offset for
829         type units, or load_full_comp_unit for comp units after
830         queue_comp_unit returns.
831         (load_full_comp_unit): Assert not called for type units.
832         (load_full_comp_unit): Update read_in_chain here.
833         (process_die): Handle DW_TAG_type_unit.
834         (read_structure_type): Look for signatured types.
835         (read_enumeration_type): Ditto.
836         (init_cu_die_reader): Handle .debug_types.
837         (read_comp_unit): Assert hash not computed yet.
838         (read_die_and_children): Expand debugging printf to handle .debug_types.
839         (read_partial_die): Handle DW_TAG_type_unit:
840         (find_patial_die): Handle .debug_types.
841         (read_attribute_value): Handle DW_FORM_sig8.
842         (die_type): Call follow_die_ref_or_sig instead of follow_die_ref.
843         (die_containing_type): Ditto.
844         (dwarf_tag_name): Handle DW_TAG_type_unit.
845         (dwarf_attr_name): Handle DW_AT_signature.
846         (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
847         DW_FORM_flag_present, DW_FORM_sig8.
848         (dump_die_shallow): Handlel DW_FORM_sig8.
849         (maybe_queue_comp_unit): Change return type to int from void.
850         All callers updated.
851         (follow_die_ref): Handle .debug_types.
852         (lookup_signatured_type_at_offset): New function.
853         (read_signatured_type_at_offset): New function.
854         (read_signatured_type): New function.
855
856 2009-07-20  Ulrich Weigand  <uweigand@de.ibm.com>
857
858         * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT
859         if the macro is defined.
860
861 2009-07-20  Pedro Alves  <pedro@codesourcery.com>
862
863         * features/gdb-target.dtd (target): Accept an optional 'osabi'
864         element.
865         (osabi): Define element.
866         * features/mips-linux.xml (target): Add an osabi subelement set to
867         GNU/Linux.
868         * regformats/regdat.sh (xmlarch, xmlosabi): New variables.  Don't
869         write the architecture into $xmltarget.  Store it in $xmlarch.
870         Handle the 'osabi' type.  Handle outputting the osabi element of
871         the target description.
872         * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
873         * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
874
875         * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
876         * target-descriptions.c (struct target_desc) <osabi>: New field.
877         (tdesc_osabi): New function.
878         (set_tdesc_osabi): New function.
879         * xml-tdesc.c: Include osabi.h.
880         (tdesc_end_osabi): New.
881         (target_children): Parse "osabi" elements.
882         * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
883         target description if the user didn't override it or it is not
884         extractable from the bfd.  If that still fails, fallback to the
885         configured in default.
886         * osabi.h (osabi_from_tdesc_string): Declare.
887         * osabi.c (osabi_from_tdesc_string): New.
888         (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
889         GDB_OSABI_DEFAULT.
890
891         * NEWS: Mention that target descriptions can now describe the
892         target OS ABI.
893
894 2009-07-20  Mike Frysinger  <vapier@gentoo.org>
895
896         * configure.ac (AC_CHECK_FUNCS): Check for pipe.
897         * config.in, configure: Regenerate.
898         * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
899
900 2009-07-20  Pedro Alves  <pedro@codesourcery.com>
901
902         * gnu-nat.c: Include "inf-child.h".
903         (gnu_mourn_inferior): Use the passed in target_ops
904         instead of the gnu_ops global.
905         (gnu_create_inferior): Inline `attach_to_child', use the passed in
906         target_ops instead of the gnu_ops global.
907         (gnu_can_run): Delete.
908         (gnu_attach): Use the passed in target_ops instead of the gnu_ops
909         global.
910         (gnu_detach): Ditto.
911         (gnu_prepare_to_store, gnu_open): Delete.
912         (gnu_store_registers, gnu_fetch_registers): Delete declarations.
913         (gnu_ops): Delete.
914         (init_gnu_ops): Delete.
915         (gnu_target): New.
916         (_initialize_gnu_nat): Don't call init_gnu_ops or add_target here.
917         * gnu-nat.h (gnu_target): Declare.
918         * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Make
919         static.
920         (_initialize_i386gnu_nat): New.
921
922 2009-07-20  Ulrich Weigand  <uweigand@de.ibm.com>
923
924         * dwarf2loc.c (find_location_expression): Retrieve beginning and
925         ending address offsets in location list entries as integers,
926         not as addresses.
927
928 2009-07-20  Ulrich Weigand  <uweigand@de.ibm.com>
929
930         * infrun.c (wait_for_inferior): Invalidate registers and overlay
931         cache every time before calling target_wait.
932         (handle_inferior_event): Make static. Always reset waiton_ptid.
933         Never call registers_changed.
934         (prepare_to_wait): Do not invaliate registers or overlay cache
935         (moved to wait_for_inferior).  Do not reset waiton_ptid (moved
936         to handle_inferior_event).
937         (fetch_inferior_event): Remove check for always-true condition.  
938
939 2009-07-20  Thomas Schwinge  <tschwinge@gnu.org>
940
941         * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Adjust to
942         2009-02-23 target_ops changes.
943
944 2009-07-18  Michael Snyder  <msnyder@vmware.com>
945
946         * infrun.c (handle_inferior_event): Remove an execution_direction
947         check in the "check for subroutine calls" test, and add some 
948         additional handling for reverse-stepping through shared libraries.
949
950 2009-07-18  Anthony Green  <green@moxielogic.com>
951
952         * moxie-tdep.c (moxie_analyze_prologue): Take gdbarch as last
953         parameter instead of frame_info.
954         (moxie_frame_cache): Call moxie_analyze_prologue with different
955         args.
956
957 2009-07-17  Ulrich Weigand  <uweigand@de.ibm.com>
958
959         * solib.c (solib_bfd_open): Do not call ops->bfd_open.
960         (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
961         * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
962         * solib-irix.c (_initialize_irix_solib): Likewise.
963         * solib-null.c (_initialize_null_solib): Likewise.
964         * solib-osf.c (_initialize_osf_solib): Likewise.
965         * solib-pa64.c (_initialize_pa64_solib): Likewise.
966         * solib-som.c (_initialize_som_solib): Likewise.
967         * solib-sunos.c (_initialize_sunos_solib): Likewise.
968         * solib-svr4.c (_initialize_svr4_solib): Likewise.
969         * solib-target.c (_initialize_solib_target): Likewise.
970
971 2009-07-17  Ulrich Weigand  <uweigand@de.ibm.com>
972
973         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
974
975 2009-07-16  Doug Evans  <dje@google.com>
976
977         * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
978
979 2007-07-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
980
981         * linux-thread-db.c (thread_db_find_new_threads_silently):
982         New function.
983         (try_thread_db_load_1): Call it.
984
985 2009-07-15  Doug Evans  <dje@google.com>
986
987         Code reorg in preparation for adding comdat types support.
988         * dwarf2read.c (struct die_reader_specs): New struct.
989         (locate_pdi_sibling): New arg buffer.  All callers updated.
990         (load_partial_dies, read_partial_die): Ditto.
991         (read_8_bytes): Change return type to ULONGEST.
992         (read_comp_unit): Delete arg abfd.  All callers updated.
993         (read_die_and_children_1): Delete args abfd, cu.  New arg reader.
994         All callers updated.
995         (read_die_and_children, read_die_and_siblings): Ditto.
996         (read_full_die): Ditto.  Move closer to callers.
997         (skip_one_die): New arg buffer.  All callers updated.
998         (load_full_comp_unit): Change return type to void.  All callers
999         updated.
1000         (partial_read_comp_unit_head): New args buffer, buffer_size.
1001         All callers updated.
1002         (process_psymtab_comp_unit): New function, split out from
1003         dwarf2_build_psymtabs_hard.
1004         (dwarf2_build_psymtabs_hard): Call it.
1005         (load_partial_comp_unit): Renamed from load_comp_unit.
1006         All callers updated.
1007         (skip_children): New arg buffer.  All callers updated.
1008         (init_cu_die_reader): New function.
1009         (is_ref_attr): New function.
1010         (dwarf2_get_ref_die_offset): Call it.
1011         (alloc_one_comp_unit): New function.
1012
1013 2009-07-14  Stan Shebs  <stan@codesourcery.com>
1014
1015         * MAINTAINERS (Global Maintainers): Add Doug Evans.
1016
1017 2009-07-14  Stan Shebs  <stan@codesourcery.com>
1018
1019         Conditional tracepoints.
1020         * ax-gdb.h (gen_eval_for_expr): Declare.
1021         * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
1022         and other comparisons.
1023         (gen_eval_for_expr): New function.
1024         (agent_eval_command): New maintenance command.
1025         (_initialize_ax_gdb): Define the command.
1026         * remote.c (struct remote_state): New field cond_tracepoints.
1027         (PACKET_ConditionalTracepoints): New packet config type.
1028         (remote_cond_tracepoint_feature): New function.
1029         (remote_protocol_features): Add ConditionalTracepoints.
1030         (remote_supports_cond_tracepoints): New function.
1031         (_initialize_remote): Add ConditionalTracepoints.
1032         * tracepoint.c (download_tracepoint): Add conditional.
1033         * NEWS: Mention conditional tracepoints.
1034
1035 2009-07-14  Ulrich Weigand  <uweigand@de.ibm.com>
1036
1037         * objfiles.c (objfile_relocate): Do not relocate the same
1038         BLOCKVECTOR_MAP address map multiple times.
1039
1040 2009-07-14  Ulrich Weigand  <uweigand@de.ibm.com>
1041
1042         * remote.c (process_stop_reply): Access expedited target registers
1043         in target_gdbarch.
1044
1045 2009-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1046
1047         Fix memory access from signed 32bit inferior registers on 64bit GDB.
1048         * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
1049         addr_bit.  Mask OFFSET by the ADDR_BIT width.
1050
1051 2009-07-13  Anthony Green  <green@moxielogic.com>
1052
1053         * moxie-tdep.c (moxie_gdbarch_init): Call
1054         set_gdbarch_process_record.
1055         (moxie_process_record): New.
1056         (moxie_process_readu): New.
1057
1058 2009-07-12  Michael Snyder  <msnyder@vmware.com>
1059
1060         * i386-tdep.c: Add a frame unwinder for function epilogues.
1061         (i386_in_function_epilogue_p): New function.
1062         (i386_epilogue_frame_sniffer): New function.
1063         (i386_epilogue_frame_cache): New function.
1064         (i386_epilogue_frame_this_id): New function.
1065         (i386_epilogue_frame_unwind): New struct frame_unwind.
1066         (i386_gdbarch_init): Hook the new unwinder.
1067
1068 2009-07-11  Hui Zhu  <teawater@gmail.com>
1069
1070         * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
1071         to "disassemble" command to print the raw instructions in hex as
1072         well as in symbolic form.
1073         (init_cli_cmds): Ditto.
1074         (print_disassembly): Change "mixed" to "flags" to translate
1075         the behavior of disassemble.
1076         (disassemble_current_function): Ditto.
1077         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
1078         * stack.c (gdb_disassembly_stub): Ditto.
1079         * disasm.c (do_mixed_source_and_assembly): Ditto.
1080         (do_mixed_source_and_assembly): Ditto.
1081         (do_assembly_only): Ditto.
1082         (gdb_disassembly): Ditto.
1083         (dump_insns): print the raw instructions in hex as well as in
1084         symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
1085         * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
1086         assembly if it and flags is true.
1087         (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
1088         the assembly if it and flags is true.
1089         (gdb_disassembly): Update extern.
1090         * NEWS: Document disassemble/r support.
1091
1092 2009-07-10  Tom Tromey  <tromey@redhat.com>
1093
1094         * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
1095         * dwarf2expr.c: Likewise.
1096         * dwarf2loc.c: Likewise.
1097         * dwarf2read.c: Likewise.
1098         * sh-tdep.c: Likewise.
1099         * xtensa-tdep.c: Likewise.
1100
1101 2009-07-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1102
1103         Tidy up the code.
1104         * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv.  Move
1105         variables var, rootlist and cr to their local sub-block.  Move the
1106         make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
1107         and do_cleanups calls to the common base block.  Remove the zero NV
1108         check.
1109
1110 2009-07-10 Phil Muldoon  <pmuldoon@redhat.com>
1111
1112         * python/python-internal.h (apply_varobj_pretty_printer): Update
1113         definition.
1114         (python_string_to_target_python_string): Add definition.
1115         * python/python-utils.c (unicode_to_encoded_python_string)
1116         (unicode_to_target_python_string)
1117         (python_string_to_target_python_string): New Functions.
1118         * python/python-prettyprint.c (pretty_print_one_value): Likewise.
1119         (print_string_repr): Refactor to logic to account for PyObject
1120         returned strings.
1121         (apply_varobj_pretty_printer): Likewise.
1122         * python/python-value.c (valpy_string): Parse length keyword. Use
1123         length keyword in LA_GET_STRING.
1124         * varobj.c (value_get_print_value): Refactor logic to account for
1125         PyObject returned strings.
1126         * c-lang.c (c_get_string): If the length parameter is specified,
1127         use that. Return value in characters. Update comments.
1128         * language.h: Update c_get_string prototype comments.
1129
1130 2009-07-09  Doug Evans  <dje@google.com>
1131
1132         * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
1133         to read_memory_unsigned_integer.
1134
1135 2009-07-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
1136
1137         Report error on inaccessible memory.
1138         * cli/cli-dump.c: Include gdbcore.h.
1139         (dump_memory_to_file): Call read_memory instead of target_read_memory.
1140
1141 2009-07-09  Hui Zhu  <teawater@gmail.com>
1142
1143         * solib.c (solib_bfd_open): Output a warning if solib's
1144         architecture is not compatible with inferior's architecture.
1145
1146 2009-07-09  Ulrich Weigand  <uweigand@de.ibm.com>
1147             Jan Kratochvil  <jan.kratochvil@redhat.com>
1148
1149         * target.h (struct target_ops <to_thread_architecture>): Describe it.
1150         (target_thread_architecture): Refer to to_thread_architecture.
1151
1152 2009-07-08  Pierre Muller  <muller@ics.u-strasbg.fr>
1153
1154         * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
1155
1156 2009-07-07  Ulrich Weigand  <uweigand@de.ibm.com>
1157
1158         * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
1159
1160 2009-07-07  Pierre Muller  <muller@ics.u-strasbg.fr>
1161
1162         * breakpoint.c (set_raw_breakpoint): Remove static modifier.
1163
1164 2009-07-07  Tom Tromey  <tromey@redhat.com>
1165
1166         * c-lang.c (convert_octal): Only allow 3 octal digits.
1167         (print_wchar): Prefer 3-digit octal form.  Fall back to hex if
1168         needed.
1169         * c-exp.y (c_parse_escape): Only allow 3 octal digits.
1170
1171 2009-07-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
1172
1173         * python/python-value.c (valpy_getitem): Remove incorrect assert.
1174         
1175 2009-07-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
1176
1177         * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
1178
1179 2009-07-07  Sami Wagiaalla  <swagiaal@redhat.com>
1180
1181         * cp-support.h (struct using_direct): Rename members inner and
1182         outer to import_src, and import_dest respectively.
1183         * cp-namespace.c (cp_add_using_directive): Update.
1184         (cp_add_using): Update.
1185         (cp_copy_usings): Update.
1186         (cp_lookup_symbol_namespace): Update.
1187         (cp_scan_for_anonymous_namespaces): Update.
1188         * cp-support.c (make_symbol_overload_list_using): Update.
1189         * cp-support.h (cp_add_using_directive, cp_add_using): Rename
1190         arguments from inner and outer to src and dest respectively.
1191         * cp-namespace.c (cp_add_using_directive): Ditto.
1192         (cp_add_using): Ditto.
1193
1194 2009-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1195
1196         * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
1197         * varobj.c (varobj_invalidate): Replace a while loop by for loop.
1198
1199 2009-07-07  Vladimir Prus  <vladimir@codesourcery.com>
1200
1201         Fix hang in floating varobjs.
1202
1203         * varobj.c (varobj_invalidate): Advance to next
1204         element when processing floating varobj.
1205
1206 2009-07-07  Vladimir Prus  <vladimir@codesourcery.com>
1207
1208         * varobj.c: Remove unnecessary include.
1209
1210 2009-07-07  Tristan Gingold  <gingold@adacore.com>
1211
1212         * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
1213         Remove excServer.c target.  Remove _all target.
1214         * darwin.defs: Removed.
1215
1216 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
1217
1218         * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
1219
1220 2009-07-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
1221
1222         * source.c (find_and_open_source): Remove the `objfile' parameter.
1223         Update the function comment.
1224         (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
1225         find_and_open_source callers.
1226
1227 2009-07-05  Pedro Alves  <pedro@codesourcery.com>
1228
1229         * coff-pe-read.c (read_pe_exported_syms): Recognize
1230         "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
1231         targets.
1232
1233 2009-07-05  Pedro Alves  <pedro@codesourcery.com>
1234
1235         * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
1236         (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
1237         callback.
1238
1239 2009-06-29  Tristan Gingold  <gingold@adacore.com>
1240
1241         * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
1242         (amd64_darwin_thread_state_num_regs)
1243         (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
1244         amd64-darwin-tdep.c
1245         (_initialize_i386_darwin_tdep): Remove 64 bits parts.
1246         (darwin_dwarf_signal_frame_p): Make public.
1247         * amd64-darwin-tdep.c: New file with most chunks from
1248         i386-darwin-tdep.c      
1249         * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
1250         (amd64_darwin_thread_state_reg_offset)
1251         (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
1252         * amd64-darwin-tdep.h: New file.
1253         * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
1254         if BFD64 is defined.
1255         (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
1256         64 bits parts.
1257         (i386_darwin_store_inferior_registers): Ditto.
1258         (darwin_set_sstep): Ditto.
1259         (darwin_complete_target): Ditto.
1260         (amd64_darwin_sstep_at_sigreturn): Ditto.
1261         * configure.tgt: Create a separate entry for x86_64-*-darwin.
1262         Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
1263         * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
1264         i386-darwin-tdep.c i386-darwin-nat.c
1265         (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
1266         
1267 2009-07-02  Pedro Alves  <pedro@codesourcery.com>
1268
1269         * linux-fork.c (forks_exist_p): Drop unnecessary extern.
1270         (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
1271         (linux_fork_detach): Ditto.
1272         (delete_fork_command): Rename to ...
1273         (delete_checkpoint_command): ... this.
1274         (detach_fork_command): Rename to ...
1275         (detach_checkpoint_command): ... this.
1276         (info_forks_command): Rename to ...
1277         (info_checkpoints_command): ... this.
1278         (_initialize_linux_fork): Remove stale comments.  Adjust.
1279
1280 2009-07-02  Pedro Alves  <pedro@codesourcery.com>
1281
1282         * linux-nat.c (linux_child_follow_fork): If we're staying attached
1283         to the child process, enable event reporting on it.  Don't handle
1284         checkpoints here.  Instead, add the child fork to the lwp thread
1285         and inferior lists without clobbering the previous inferior.  Let
1286         the thread_db layer learn about a new child process, even if
1287         following the parent.
1288         (linux_nat_switch_fork): Delete lwps of the current inferior only,
1289         instead of clearing the whole list.  Use thread_change_ptid to
1290         give the core the illusion the new checkpoint is still the same
1291         inferior.  Clear the register cache.
1292         (linux_handle_extended_wait): Handle checkpoints here.
1293         (linux_multi_process): Turn on.
1294         * linux-fork.c (struct fork_info) <pc>: Remove field.
1295         (init_fork_list): Do not delete the checkpoint from the inferior
1296         list (it is not there).
1297         (fork_load_infrun_state): Don't switch inferior_ptid here.  Pass
1298         the new checkpoint's ptid to linux_nat_switch_fork.
1299         (fork_save_infrun_state): Make static.  Don't stop the pc field of
1300         fork_info, it's gone.
1301         (linux_fork_mourn_inferior): Don't delete the checkpoint from the
1302         inferior list, it's not there.
1303         (linux_fork_detach): Ditto.
1304         (delete_fork_command): Replace mention of fork/checkpoint by
1305         checkpoint only.
1306         (detach_fork_command): Likewise.  Don't delete the checkpoint from
1307         the inferior list.
1308         (info_forks_command): Adjust.
1309         (restore_detach_fork): Delete.
1310         (checkpointing_pid): New.
1311         (linux_fork_checkpointing_p): New.
1312         (save_detach_fork): Delete.
1313         (checkpoint_command): Delete temp_detach_fork.  Don't remove
1314         breakpoints, that's a nop.  Store the pid of the process we're
1315         checkpointing, and use make_cleanup_restore_integer to restore it.
1316         Don't reinsert breakpoints here.
1317         (process_command, fork_command): Delete.
1318         (restart_command): Update comments to only mention checkpoints,
1319         not forks.
1320         (_initialize_linux_fork): Delete "fork", "process", "info forks"
1321         commands.
1322         * linux-fork.h (fork_save_infrun_state, fork_list): Delete
1323         declarations.
1324         (linux_fork_checkpointing_p): Declare.
1325         * cli/cli-cmds.c (killlist): New.
1326         * cli/cli-cmds.h (killlist): Declare.
1327         * gdbcmd.h (killlist): Declare.
1328         * inferior.c: Include "gdbthread.h".
1329         (detach_inferior_command, kill_inferior_command)
1330         (inferior_command): New.
1331         (info_inferiors_command): Allow specifying a specific inferior id.
1332         (_initialize_inferiors): Register "inferior", "kill inferior" and
1333         "detach inferior" commands.
1334         * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
1335         * gdbthread.h (any_thread_of_process): Declare.
1336         * thread.c (any_thread_of_process): New.
1337
1338         * NEWS: Mention multi-inferior debugging.  Mention 'info
1339         inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
1340         new commands.
1341         (Removed commands): New section, mentioning that 'info forks',
1342         'fork', 'process', 'delete fork' and 'detach fork' are now gone.
1343
1344 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
1345
1346         * gdbarch.sh (current_gdbarch): Remove global variable.
1347         (find_arch_by_info): Remove, inline into ...
1348         (gdbarch_find_by_info): ... this.  Remove current_gdbarch swapping.
1349         (deprecated_current_gdbarch_select_hack): Rename to ...
1350         (deprecated_target_gdbarch_select_hack): ... this.  Do not set
1351         or access current_gdbarch.
1352         * gdbarch.c, gdbarch.h: Regenerate.
1353
1354         * arch-utils.c (gdbarch_update_p): Update call.
1355         (set_gdbarch_from_file): Likewise.
1356
1357 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
1358
1359         * defs.h (extract_signed_integer, extract_unsigned_integer,
1360         extract_long_unsigned_integer, store_signed_integer,
1361         store_unsigned_integer): Add BYTE_ORDER parameter.
1362         * findvar.c (extract_signed_integer, extract_unsigned_integer,
1363         extract_long_unsigned_integer, store_signed_integer,
1364         store_unsigned_integer): Add BYTE_ORDER parameter.  Use it
1365         instead of current_gdbarch.
1366
1367         * gdbcore.h (read_memory_integer, safe_read_memory_integer,
1368         read_memory_unsigned_integer, write_memory_signed_integer,
1369         write_memory_unsigned_integer): Add BYTE_ORDER parameter.
1370         * corefile.c (struct captured_read_memory_integer_arguments): Add
1371         BYTE_ORDER member.
1372         (safe_read_memory_integer): Add BYTE_ORDER parameter.  Store it into
1373         struct captured_read_memory_integer_arguments.
1374         (do_captured_read_memory_integer): Pass it to read_memory_integer.
1375         (read_memory_integer): Add BYTE_ORDER parameter.  Pass it to
1376         extract_signed_integer.
1377         (read_memory_unsigned_integer): Add BYTE_ORDER parameter.  Pass it to
1378         extract_unsigned_integer.
1379         (write_memory_signed_integer): Add BYTE_ORDER parameter.  Pass it
1380         to store_signed_integer.
1381         (write_memory_unsigned_integer): Add BYTE_ORDER parameter.  Pass it
1382         to store_unsigned_integer.
1383
1384         * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
1385         * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
1386         Pass it to extract_unsigned_integer.
1387
1388
1389         Update calls to extract_signed_integer, extract_unsigned_integer,
1390         extract_long_unsigned_integer, store_signed_integer,
1391         store_unsigned_integer, read_memory_integer,
1392         read_memory_unsigned_integer, safe_read_memory_integer,
1393         write_memory_signed_integer, write_memory_unsigned_integer, and
1394         get_target_memory_unsigned to pass byte order:
1395         * ada-lang.c (ada_value_binop): Update.
1396         * ada-valprint.c (char_at): Update.
1397         * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
1398         * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
1399         alpha_extract_return_value, alpha_read_insn,
1400         alpha_get_longjmp_target): Update.
1401         * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
1402         * amd64obsd-tdep.c (amd64obsd_supply_uthread,
1403         amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
1404         * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
1405         amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
1406         amd64_displaced_step_fixup): Update.
1407         * arm-linux-tdep.c (arm_linux_sigreturn_init,
1408         arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
1409         * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
1410         arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
1411         arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
1412         arm_return_value): Update.
1413         * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
1414         * auxv.c (default_auxv_parse): Update.
1415         * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
1416         avr_scan_prologue, avr_extract_return_value,
1417         avr_frame_prev_register, avr_push_dummy_call): Update.
1418         * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
1419         bsd_uthread_wait, bsd_uthread_thread_alive,
1420         bsd_uthread_extra_thread_info): Update.
1421         * c-lang.c (c_printstr, print_wchar): Update.
1422         * cp-valprint.c (cp_print_class_member): Update.
1423         * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
1424         cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
1425         cris_extract_return_value, find_step_target, dip_prefix,
1426         sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
1427         move_mem_to_reg_movem_op, get_data_from_address): Update.
1428         * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
1429         * dwarf2-frame.c (execute_cfa_program): Update.
1430         * dwarf2loc.c (find_location_expression): Update.
1431         * dwarf2read.c (dwarf2_const_value): Update.
1432         * expprint.c (print_subexp_standard): Update.
1433         * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
1434         unsigned_address_to_pointer, address_to_signed_pointer,
1435         read_var_value): Update.
1436         * frame.c (frame_unwind_register_signed,
1437         frame_unwind_register_unsigned, get_frame_memory_signed,
1438         get_frame_memory_unsigned): Update.
1439         * frame-unwind.c (frame_unwind_got_constant): Update.
1440         * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
1441         frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
1442         Update.
1443         * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
1444         frv_extract_return_value, find_func_descr,
1445         frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
1446         * f-valprint.c (f_val_print): Update.
1447         * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
1448         Update.
1449         * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
1450         h8300_push_dummy_call, h8300_extract_return_value,
1451         h8300h_extract_return_value, h8300_store_return_value,
1452         h8300h_store_return_value): Update.
1453         * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
1454         * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
1455         Update.
1456         * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
1457         hppa64_hpux_in_solib_call_trampoline,
1458         hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
1459         hppa_hpux_sigtramp_frame_unwind_cache,
1460         hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
1461         hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
1462         hppa32_hpux_search_dummy_call_sequence,
1463         hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
1464         hppa_hpux_unwind_adjust_stub): Update.
1465         * hppa-linux-tdep.c (insns_match_pattern,
1466         hppa_linux_find_global_pointer): Update.
1467         * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
1468         hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
1469         skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
1470         hppa_pseudo_register_read, hppa_frame_prev_register_helper,
1471         hppa_match_insns): Update.
1472         * hpux-thread.c (hpux_thread_fetch_registers): Update.
1473         * i386-tdep.c (i386bsd_sigcontext_addr): Update.
1474         * i386-cygwin-tdep.c (core_process_module_section): Update.
1475         * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
1476         amd64_darwin_sstep_at_sigreturn): Update.
1477         * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
1478         amd64_darwin_sigcontext_addr): Likewise.
1479         * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
1480         * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
1481         * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
1482         * i386obsd-nat.c (i386obsd_supply_pcb): Update.
1483         * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
1484         i386obsd_trapframe_cache): Update.
1485         * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
1486         i386_analyze_frame_setup, i386_analyze_prologue,
1487         i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
1488         i386_get_longjmp_target, i386_push_dummy_call,
1489         i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
1490         i386_fetch_pointer_argument): Update.
1491         * i387-tdep.c (i387_supply_fsave): Update.
1492         * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
1493         * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
1494         examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
1495         ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
1496         ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
1497         ia64_libunwind_frame_prev_register,
1498         ia64_libunwind_sigtramp_frame_this_id,
1499         ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
1500         find_extant_func_descr, find_func_descr,
1501         ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
1502         ia64_unwind_pc): Update.
1503         * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
1504         iq2000_scan_prologue, iq2000_extract_return_value,
1505         iq2000_push_dummy_call): Update.
1506         * irix5nat.c (fill_gregset): Update.
1507         * jv-lang.c (evaluate_subexp_java): Update.
1508         * jv-valprint.c (java_value_print): Update.
1509         * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call, 
1510         lm32_extract_return_value, lm32_store_return_value): Update.
1511         * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
1512         m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
1513         m32c_m16c_pointer_to_address): Update.
1514         * m32r-tdep.c (m32r_store_return_value, decode_prologue,
1515         m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
1516         Update.
1517         * m68hc11-tdep.c (m68hc11_pseudo_register_read,
1518         m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
1519         m68hc11_push_dummy_call): Update.
1520         * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
1521         m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
1522         Update.
1523         * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
1524         m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
1525         m68k_get_longjmp_target): Update.
1526         * m88k-tdep.c (m88k_fetch_instruction): Update.
1527         * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
1528         mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
1529         * mi/mi-main.c (mi_cmd_data_write_memory): Update.
1530         * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
1531         mips64_linux_get_longjmp_target, mips64_fill_gregset,
1532         mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
1533         * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
1534         * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
1535         mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
1536         mips_o32_push_dummy_call, mips_o64_push_dummy_call, 
1537         mips_single_step_through_delay, mips_skip_pic_trampoline_code,
1538         mips_integer_to_address): Update.
1539         * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
1540         Update.
1541         * monitor.c (monitor_supply_register, monitor_write_memory,
1542         monitor_read_memory_single): Update.
1543         * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
1544         moxie_analyze_prologue): Update.
1545         * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
1546         mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
1547         mt_push_dummy_call): Update.
1548         * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
1549         read_objc_methlist_method, read_objc_object, read_objc_super,
1550         read_objc_class, find_implementation_from_class): Update.
1551         * ppc64-linux-tdep.c (ppc64_desc_entry_point,
1552         ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
1553         Update.
1554         * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
1555         ppcobsd_sigtramp_frame_cache): Update.
1556         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
1557         do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
1558         ppc64_sysv_abi_return_value): Update.
1559         * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
1560         * procfs.c (procfs_auxv_parse): Update.
1561         * p-valprint.c (pascal_val_print): Update.
1562         * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
1563         regcache_raw_write_signed, regcache_raw_write_unsigned,
1564         regcache_cooked_read_signed, regcache_cooked_read_unsigned,
1565         regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
1566         * remote-m32r-sdi.c (m32r_fetch_register): Update.
1567         * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
1568         Update.
1569         * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
1570         rs6000_convert_from_func_ptr_addr, branch_dest, 
1571         rs6000_software_single_step): Update.
1572         * rs6000-tdep.c (rs6000_in_function_epilogue_p,
1573         ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
1574         bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
1575         rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
1576         rs6000_frame_cache): Update.
1577         * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
1578         s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
1579         s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
1580         extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
1581         * scm-exp.c (scm_lreadr): Update.
1582         * scm-lang.c (scm_get_field, scm_unpack): Update.
1583         * scm-valprint.c (scm_val_print): Update.
1584         * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
1585         score_fetch_inst): Update.
1586         * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
1587         sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
1588         sh64_pseudo_register_read, sh64_pseudo_register_write,
1589         sh64_frame_prev_register): Update:
1590         * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
1591         sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
1592         sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
1593         * solib-darwin.c (darwin_load_image_infos): Update.
1594         * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
1595         find_canonical_descriptor_in_load_object): Update.
1596         * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
1597         irix_open_symbol_file_object): Update.
1598         * solib-som.c (som_solib_create_inferior_hook, link_map_start,
1599         som_current_sos, som_open_symbol_file_object): Update.
1600         * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
1601         Update.
1602         * solib-svr4.c (read_program_header, scan_dyntag_auxv,
1603         solib_svr4_r_ldsomap): Update.
1604         * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
1605         * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
1606         sparc64obsd_collect_uthread): Update.
1607         * sparc64-tdep.c (sparc64_pseudo_register_read,
1608         sparc64_pseudo_register_write, sparc64_supply_gregset,
1609         sparc64_collect_gregset): Update.
1610         * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
1611         * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
1612         sparc32obsd_collect_uthread): Update.
1613         * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
1614         sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
1615         sparc_collect_rwindow): Update.
1616         * spu-linux-nat.c (parse_spufs_run): Update.
1617         * spu-tdep.c (spu_pseudo_register_read_spu,
1618         spu_pseudo_register_write_spu, spu_pointer_to_address,
1619         spu_analyze_prologue, spu_in_function_epilogue_p,
1620         spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
1621         spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
1622         info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
1623         info_spu_dma_command, info_spu_proxydma_command): Update.
1624         * stack.c (print_frame_nameless_args, frame_info): Update.
1625         * symfile.c (read_target_long_array, simple_read_overlay_table,
1626         simple_read_overlay_region_table): Update.
1627         * target.c (debug_print_register): Update.
1628         * tramp-frame.c (tramp_frame_start): Update.
1629         * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
1630         v850_extract_return_value, v850_store_return_value, 
1631         * valarith.c (value_binop, value_bit_index): Update.
1632         * valops.c (value_cast): Update.
1633         * valprint.c (val_print_type_code_int, val_print_string,
1634         read_string): Update.
1635         * value.c (unpack_long, unpack_double, unpack_field_as_long,
1636         modify_field, pack_long): Update.
1637         * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
1638         vax_skip_prologue): Update.
1639         * xstormy16-tdep.c (xstormy16_push_dummy_call,
1640         xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
1641         xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
1642         xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
1643         * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
1644         xtensa_pseudo_register_write, xtensa_frame_cache,
1645         xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
1646
1647
1648         * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
1649         decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
1650         BYTE_ORDER parameter.
1651         (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
1652         parameters.
1653         (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
1654         (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
1655         * dfp.c (match_endianness): Add BYTE_ORDER parameter.  Use it
1656         instead of current_gdbarch.
1657         (decimal_to_string, decimal_from_integral, decimal_from_floating,
1658         decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
1659         Pass it to match_endianness.
1660         (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
1661         parameters.  Pass them to match_endianness.
1662         (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
1663         Pass them to match_endianness.
1664         (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
1665         Pass them to match_endianness.
1666         * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
1667         BYTE_ORDER_Y output parameters.
1668         (value_binop): Update call to value_args_as_decimal.
1669
1670         Update calls to decimal_to_string, decimal_from_string,
1671         decimal_from_integral, decimal_from_floating, decimal_to_doublest,
1672         decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
1673         to pass/receive byte order:
1674         * c-exp.y (parse_number): Update.
1675         * printcmd.c (printf_command): Update.
1676         * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
1677         value_equal, value_less): Update.
1678         * valops.c (value_cast, value_one): Update.
1679         * valprint.c (print_decimal_floating): Update.
1680         * value.c (unpack_long, unpack_double): Update.
1681         * python/python-value.c (valpy_nonzero): Update.
1682
1683
1684         * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
1685         (printstr): Update calls to char_at.
1686         (ada_val_print_array): Likewise.
1687         * valprint.c (read_string): Add BYTE_ORDER parameter.
1688         (val_print_string): Update call to read_string.
1689         * c-lang.c (c_get_string): Likewise.
1690         * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
1691         * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
1692         Use it instead of current_gdbarch.
1693         * printcmd.c (printf_command): Update calls to target_wide_charset.
1694         * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
1695         Pass to target_wide_charset.  Use it instead of current_gdbarch.
1696         (classify_type): Add BYTE_ORDER parameter.  Pass to
1697         charset_for_string_type.  Allow NULL encoding pointer.
1698         (print_wchar): Add BYTE_ORDER parameter.
1699         (c_emit_char): Update calls to classify_type and print_wchar.
1700         (c_printchar, c_printstr): Likewise.
1701
1702
1703         * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
1704         * gdbarch.c, gdbarch.h: Regenerate.
1705         * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
1706         parameter.
1707         * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
1708         * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
1709         * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
1710         (rs6000_skip_trampoline_code): Update call.
1711
1712         * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1713         dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
1714         (alpha_read_insn): Add GDBARCH parameter.
1715         * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
1716         (alpha_register_to_value): Pass architecture to alpha_sts.
1717         (alpha_extract_return_value): Likewise.
1718         (alpha_value_to_register): Pass architecture to alpha_lds.
1719         (alpha_store_return_value): Likewise.
1720         (alpha_read_insn): Add GDBARCH parameter.
1721         (alpha_skip_prologue): Pass architecture to alpha_read_insn.
1722         (alpha_heuristic_proc_start): Likewise.
1723         (alpha_heuristic_frame_unwind_cache): Likewise.
1724         (alpha_next_pc): Likewise.
1725         (alpha_sigtramp_frame_this_id): Pass architecture to
1726         tdep->dynamic_sigtramp_offset callback.
1727         (alpha_sigtramp_frame_sniffer): Pass architecture to
1728         tdep->pc_in_sigtramp callback.
1729         * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
1730         (alphafbsd_sigtramp_offset): Likewise.
1731         * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
1732         parameter.  Pass to alpha_read_insn.
1733         (alpha_linux_sigtramp_offset): Add GDBARCH parameter.  Pass to
1734         alpha_linux_sigtramp_offset_1.
1735         (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
1736         alpha_linux_sigtramp_offset.
1737         (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
1738         and alpha_linux_sigtramp_offset.
1739         * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
1740         (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
1741         alphanbsd_sigtramp_offset.
1742         * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
1743         (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter.  Pass to
1744         alpha_read_insn.
1745         (alphaobsd_sigcontext_addr): Pass architecture to
1746         alphaobsd_sigtramp_offset.
1747         * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
1748         parameter.
1749
1750         * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
1751         (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
1752         (amd64_frame_cache): Likewise.
1753
1754         * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
1755         (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
1756         thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
1757         * arm-wince-tdep.c: Include "frame.h".
1758
1759         * avr-tdep.c (EXTRACT_INSN): Remove.
1760         (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
1761         (avr_skip_prologue): Pass architecture to avr_scan_prologue.
1762         (avr_frame_unwind_cache): Likewise.
1763
1764         * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
1765         (find_step_target): Initialize it.
1766         (get_data_from_address): Add BYTE_ORDER parameter.
1767         (bdap_prefix): Pass byte order to get_data_from_address.
1768         (handle_prefix_assign_mode_for_aritm_op): Likewise.
1769         (three_operand_add_sub_cmp_and_or_op): Likewise.
1770         (handle_inc_and_index_mode_for_aritm_op): Likewise.
1771
1772         * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
1773         (frv_linux_sigcontext_reg_addr): Pass architecture to
1774         frv_linux_pc_in_sigtramp.
1775         (frv_linux_sigtramp_frame_sniffer): Likewise.
1776
1777         * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
1778         (h8300_analyze_prologue): Add GDBARCH parameter.  Pass to
1779         h8300_is_argument_spill.
1780         (h8300_frame_cache, h8300_skip_prologue): Pass architecture
1781         to h8300_analyze_prologue.
1782
1783         * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
1784         in_solib_call_trampoline callback.
1785         (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
1786         * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
1787         parameter.
1788         (hppa64_push_dummy_call): Pass architecture to
1789         hppa64_convert_code_addr_to_fptr.
1790         (hppa_match_insns): Add GDBARCH parameter.
1791         (hppa_match_insns_relaxed): Add GDBARCH parameter.  Pass to
1792         hppa_match_insns.
1793         (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
1794         (hppa_in_solib_call_trampoline): Add GDBARCH parameter.  Pass to
1795         hppa_match_insns_relaxed.
1796         (hppa_stub_unwind_sniffer): Pass architecture to
1797         tdep->in_solib_call_trampoline callback.
1798         * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
1799         (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
1800         hppa_hpux_search_pattern.
1801         * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
1802         (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
1803         Pass to insns_match_pattern.
1804         (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
1805         hppa_linux_sigtramp_find_sigcontext.
1806         (hppa_linux_sigtramp_frame_sniffer): Likewise.
1807         (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
1808         (hppa64_hpux_in_solib_call_trampoline): Likewise.
1809
1810         * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
1811         (i386_analyze_frame_setup): Add GDBARCH parameter.
1812         (i386_analyze_prologue): Add GDBARCH parameter.  Pass to
1813         i386_follow_jump and i386_analyze_frame_setup.
1814         (i386_skip_prologue): Pass architecture to i386_analyze_prologue
1815         and i386_follow_jump.
1816         (i386_frame_cache): Pass architecture to i386_analyze_prologue.
1817         (i386_pe_skip_trampoline_code): Add FRAME parameter.
1818         * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
1819         * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
1820         frame to i386_pe_skip_trampoline_code.
1821
1822         * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
1823         to sigcontext_register_address callback.
1824         * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
1825         (ia64_find_unwind_table): Pass architecture to
1826         ia64_find_global_pointer.
1827         (find_extant_func_descr): Add GDBARCH parameter.
1828         (find_func_descr): Pass architecture to find_extant_func_descr
1829         and ia64_find_global_pointer.
1830         (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
1831         tdep->sigcontext_register_address callback.
1832         * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
1833         GDBARCH parameter.
1834
1835         * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
1836         (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
1837
1838         * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
1839         (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
1840         lm32_analyze_prologue.
1841
1842         * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
1843         (m32r_skip_prologue): Pass architecture to decode_prologue.
1844
1845         * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
1846         (m68hc11_scan_prologue): Pass architecture to
1847         m68hc11_analyze_instruction.
1848
1849         * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
1850         (m68k_analyze_prologue): Pass architecture to
1851         m68k_analyze_frame_setup.
1852
1853         * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
1854         (m88k_analyze_prologue): Add GDBARCH parameter.  Pass byte order
1855         to m88k_fetch_instruction.
1856         (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
1857         (m88k_frame_cache): Likewise.
1858
1859         * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
1860         (mep_analyze_prologue): Pass architecture to mep_get_insn.
1861
1862         * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
1863         (mips32_next_pc): Pass architecture to mips_fetch_instruction.
1864         (deal_with_atomic_sequence): Likewise.
1865         (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
1866         (mips16_scan_prologue): Likewise.
1867         (mips32_scan_prologue): Likewise.
1868         (mips16_in_function_epilogue_p): Likewise.
1869         (mips32_in_function_epilogue_p): Likewise.
1870         (mips_about_to_return): Likewise.
1871         (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
1872         (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
1873         (mips_skip_prologue): Pass architecture to mips16_scan_prologue
1874         and mips32_scan_prologue.
1875         (mips_in_function_epilogue_p): Pass architecture to
1876         mips16_in_function_epilogue_p and
1877         mips32_in_function_epilogue_p.
1878         (heuristic_proc_start): Pass architecture to mips_fetch_instruction
1879         and mips_about_to_return.
1880         (mips_skip_mips16_trampoline_code): Pass architecture to
1881         mips_fetch_instruction.
1882         (fetch_mips_16): Add GDBARCH parameter.
1883         (mips16_next_pc): Pass architecture to fetch_mips_16.
1884         (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
1885         fetch_mips_16.
1886
1887         * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
1888         read_objc_methlist_method, read_objc_object, read_objc_super,
1889         read_objc_class): Add GDBARCH parameter.
1890         (find_implementation_from_class): Add GDBARCH parameter, pass
1891         to read_objc_class, read_objc_methlist_nmethods, and
1892         read_objc_methlist_method.
1893         (find_implementation): Add GDBARCH parameter, pass to
1894         read_objc_object and find_implementation_from_class.
1895         (resolve_msgsend, resolve_msgsend_stret): Pass architecture
1896         to find_implementation.
1897         (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
1898         architecture to read_objc_super and find_implementation_from_class.
1899
1900         * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
1901         (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
1902         ppc64_standard_linkage3_target): Pass architecture to
1903         ppc64_desc_entry_point.
1904         * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
1905         (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
1906         (rs6000_fetch_instruction): Add GDBARCH parameter.
1907         (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
1908         rs6000_fetch_instruction.
1909         (skip_prologue): Pass architecture to rs6000_fetch_instruction.
1910         
1911         * remote-mips.c (mips_store_word): Return old_contents as host
1912         integer value instead of target bytes.
1913
1914         * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
1915         (s390_analyze_prologue): Initialize it.
1916         (extend_simple_arg): Add GDBARCH parameter.
1917         (s390_push_dummy_call): Pass architecture to extend_simple_arg.
1918
1919         * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
1920         * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
1921         (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
1922         * scm-valprint.c (scm_scmval_print): Likewise.
1923         (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
1924         SCM_BYTE_ORDER.
1925
1926         * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
1927         (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
1928         look_for_args_moves.
1929         (sh64_skip_prologue): Pass architecture to
1930         sh64_skip_prologue_hard_way.
1931         * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
1932         (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
1933         (sh_frame_cache): Likewise.
1934
1935         * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
1936         (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
1937         Pass architecture to extract_mips_address.
1938
1939         * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
1940         * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
1941         (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
1942         to sparc_fetch_wcookie.
1943         (sparc32_frame_prev_register): Likewise.
1944         * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
1945         * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
1946         * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
1947
1948         * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
1949         (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
1950         (spu_virtual_frame_pointer): Likewise.
1951         (spu_frame_unwind_cache): Likewise.
1952         (info_spu_mailbox_list): Add BYTE_ORER parameter.
1953         (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
1954         (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
1955         (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
1956         to info_spu_dma_cmdlist.
1957
1958         * symfile.c (read_target_long_array): Add GDBARCH parameter.
1959         (simple_read_overlay_table, simple_read_overlay_region_table,
1960         simple_overlay_update_1): Pass architecture to read_target_long_array.
1961
1962         * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
1963         (v850_frame_cache): Pass architecture to v850_analyze_prologue.
1964
1965         * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
1966         parameter.
1967         (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
1968         to xstormy16_analyze_prologue.
1969         (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
1970         (xstormy16_find_jmp_table_entry): Likewise.
1971         (xstormy16_skip_trampoline_code): Pass architecture to
1972         xstormy16_resolve_jmp_table_entry.
1973         (xstormy16_pointer_to_address): Likewise.
1974         (xstormy16_address_to_pointer): Pass architecture to
1975         xstormy16_find_jmp_table_entry.
1976
1977         * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
1978         (call0_analyze_prologue): Add GDBARCH parameter, pass to
1979         call0_track_op.
1980         (call0_frame_cache): Pass architecture to call0_analyze_prologue.
1981         (xtensa_skip_prologue): Likewise.
1982
1983 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
1984
1985         * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
1986         (paddress): Add GDBARCH parameter.
1987         * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
1988         (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
1989         * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
1990         * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
1991         use it instead of current_gdbarch.
1992
1993         Update calls to ui_out_field_core_addr to pass architecture:
1994         * ada-lang.c (print_one_exception): Update.
1995         * breakpoint.c (print_one_breakpoint_location,
1996         print_one_exception_catchpoint): Update.
1997         * disasm.c (dump_insns): Update.
1998         * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
1999         * mi/mi-main.c (mi_cmd_data_read_memory): Update.
2000         * mi/mi-symbol-cmds.c: Include "objfiles.h".
2001         (mi_cmd_symbol_list_lines): Update.
2002         * stack.c (print_frame_info, print_frame): Update.
2003
2004         Update callers of paddress to pass architecture:
2005         * ada-tasks.c (info_task): Update.
2006         * ada-valprint.c (ada_val_print_1): Update.
2007         * annotate.c (annotate_source, annotate_frame_begin): Update.
2008         * breakpoint.c (insert_bp_location, describe_other_breakpoints,
2009         mention): Update.
2010         * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
2011         Update.
2012         * corefile.c (memory_error): Update.
2013         * c-valprint.c (print_function_pointer_address, c_val_print): Update.
2014         * disasm.c (dis_asm_print_address): Update.
2015         * exec.c (print_section_info): Update.
2016         * f-valprint.c (f_val_print): Update.
2017         * infcmd.c: Include "arch-utils.h".
2018         (jump_command, program_info): Update.
2019         * linux-fork.c: Include "arch-utils.h".
2020         (info_forks_command): Update.
2021         * m2-valprint.c (print_function_pointer_address,
2022         print_unpacked_pointer, print_variable_at_address,
2023         m2_val_print): Update.
2024         * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
2025         Update.
2026         * printcmd.c (print_address, print_address_demangle, address_info):
2027         Update.
2028         * p-valprint.c (pascal_val_print): Update.
2029         * source.c: Include "arch-utils.h".
2030         (line_info): Update.
2031         * stack.c (frame_info, print_block_frame_labels): Update.
2032         * symfile.c (add_symbol_file_command, list_overlays_command): Update.
2033         * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
2034         print_symbol, print_partial_symbols, maintenance_info_psymtabs,
2035         maintenance_check_symtabs): Update.
2036         * symtab.c (find_pc_sect_symtab): Update.
2037         * target.c (deprecated_debug_xfer_memory): Update.
2038         * tracepoint.c (scope_info): Update.
2039         * tui/tui-stack.c (tui_make_status_line): Update.
2040         * valprint.c (val_print_string): Update.
2041
2042         Update callers of paddr_nz to use paddress instead (keeping
2043         user-visible output identical):
2044         * alpha-tdep.c (alpha_heuristic_proc_start): Update.
2045         * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
2046         amd64_displaced_step_fixup): Update.
2047         * arch-utils.c (simple_displaced_step_copy_insn): Update.
2048         * auxv.c (fprint_target_auxv): Update.
2049         * breakpoint.c (insert_single_step_breakpoint): Update.
2050         * buildsym.c (finish_block): Update.
2051         * cli/cli-dump.c (restore_section_callback): Update.
2052         * fbsd-nat.c (fbsd_find_memory_regions): Update.
2053         * frame.c (frame_unwind_register_value): Update.
2054         * gcore.c (gcore_create_callback): Update.
2055         * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
2056         * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
2057         i386_record_lea_modrm_addr, i386_record_lea_modrm,
2058         i386_process_record): Update.
2059         * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
2060         ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
2061         ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
2062         * infrun.c (displaced_step_prepare, displaced_step_fixup,
2063         handle_inferior_event, insert_step_resume_breakpoint_at_sal,
2064         insert_longjmp_resume_breakpoint): Update.
2065         * linux-nat.c (linux_nat_find_memory_regions): Update.
2066         * linux-record.c (record_linux_system_call): Update.
2067         * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
2068         mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
2069         mips_o64_push_dummy_call): Update.
2070         * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
2071         * record.c (record_arch_list_add_mem, record_wait,
2072         record_xfer_partial): Update.
2073         * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
2074         mips_common_breakpoint): Update.
2075         * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
2076         * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
2077         * solib-som.c (som_current_sos): Update.
2078         * symfile.c (load_progress, generic_load): Update.
2079         * symfile-mem.c (add_vsyscall_page): Update.
2080         * valops.c (value_fetch_lazy): Update.
2081         * windows-tdep.c (windows_xfer_shared_library): Update.
2082
2083         Update callers of paddr_nz to use paddress instead (changing
2084         user-visible output to make it more correct):
2085         * dwarf2loc.c (locexpr_describe_location): Update.
2086         * ia64-tdep.c (ia64_memory_insert_breakpoint,
2087         ia64_memory_remove_breakpoint): Update.
2088         * jv-valprint.c (java_value_print): Update.
2089         * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
2090         * monitor.c (monitor_read_memory): Update.
2091
2092         Update callers of paddr to use paddress instead (changing
2093         user-visible output to make it more correct):
2094         * arm-tdep.c (arm_push_dummy_call): Update.
2095         * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
2096         create_breakpoint): Update.
2097         * darwin-nat-info.c (darwin_debug_regions): Update.
2098         * dcache.c (dcache_info): Update.
2099         * dsrec.c (load_srec, make_srec): Update.
2100         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
2101         dwarf2_frame_cache): Update.
2102         * gcore.c (gcore_copy_callback): Update.
2103         * gnu-nat.c (gnu_xfer_memory): Update.
2104         * mips-linux-nat.c (mips_show_dr): Update.
2105         * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
2106         monitor_remove_breakpoint): Update.
2107         * remote.c (compare_sections_command): Update.
2108         * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
2109         m32r_remove_breakpoint, m32r_insert_watchpoint,
2110         m32r_remove_watchpoint): Update.
2111         * sol-thread.c (info_cb): Update.
2112         * symfile.c (load_progress): Update.
2113
2114         Update callers of paddress or paddr_nz to use hex_string instead
2115         (changes output of internal/error/debug messages only):
2116         * dwarf2read.c (dump_die_shallow): Update.
2117         * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
2118         get_frame_func, create_new_frame): Update.
2119         * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
2120         * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
2121         ia64_get_dyn_info_list): Update.
2122         * maint.c (maintenance_translate_address): Update.
2123         * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
2124         * target.c (target_flash_erase): Update.
2125
2126         Update callers of paddr/paddr_nz to use phex/phex_nz instead,
2127         using an appropriate address size.  Remove use of strlen_paddr.
2128         * exec.c (exec_files_info): Update.
2129         * i386-nat.c (i386_show_dr): Update.
2130         * remote.c (remote_flash_erase): Update.
2131         * m32r-rom.c (m32r_load_section): Update.
2132         * monitor.c (monitor_vsprintf, monitor_store_register): Update.
2133         * remote.c (remote_check_symbols, remote_search_memory): Update.
2134         * remote-mips.c (mips_request, mips_common_breakpoint): Update.
2135         * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
2136         * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
2137         * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
2138         sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
2139         sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
2140         sh_dsp_show_regs): Update.
2141         * xcoffsolib.c (sharedlibrary_command): Update.
2142
2143
2144         * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
2145         Use hex_string_custom instead of paddr.
2146         (print_bfd_section_info): Pass address size.
2147         (print_objfile_section_info): Likewise.
2148
2149         * annotate.h (annotate_source): Add GDBARCH parameter.
2150         (annotate_frame_begin): Likewise.
2151         * annotate.c (annotate_source): Add GDBARCH parameter.
2152         (annotate_frame_begin): Likewise.
2153         * source.c (identify_source_line): Update call to annotate_source.
2154         * stack.c (print_frame_info, print_frame): Update call to
2155         annotate_frame_begin.
2156
2157         * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
2158         (create_breakpoint, create_ada_exception_breakpoint): Update call.
2159
2160         * stack.c (print_block_frame_labels): Add GDBARCH parameter.
2161         (print_frame_label_vars): Update call.
2162
2163         * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
2164         (dump_psymtab): Update call to print_partial_symbols.
2165         (struct print_symbol_args): Add GDBARCH member.
2166         (dump_symtab_1): Set print_symbol_args architecture member.
2167         (print_symbol): Use it.
2168
2169         * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
2170         parameter.
2171         * windows-tdep.c (windows_xfer_shared_library): Likewise.
2172         * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
2173         (core_process_module_section): Pass architecture from cpms_data to
2174         windows_xfer_shared_library.
2175         (windows_core_xfer_shared_libraries): Initialize cmps_data 
2176         architecture member.
2177         * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
2178         to windows_xfer_shared_library.
2179
2180         * defs.h (print_address): Add GDBARCH parameter.
2181         * printcmd.c (print_address): Add GDBARCH parameter.
2182         (print_scalar_formatted, do_examine): Update call.
2183         * findcmd.c (find_command): Update call.
2184         * tracepoint.c: Include "arch-utils.h".
2185         (trace_find_line_command): Update call.
2186         * tui/tui-disasm.c (tui_disassemble): Update call.
2187
2188         * value.h (print_address_demangle): Add GDBARCH parameter.
2189         * printcmd.c (print_address_demangle): Add GDBARCH parameter.
2190         * c-valprint.c (print_function_pointer_address, c_val_print):
2191         Update call.
2192         * f-valprint.c (f_val_print): Update call.
2193         * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
2194         * jv-valprint.c (java_val_print): Update call.
2195         * m2-valprint.c (print_function_pointer_address, m2_val_print):
2196         Update call.
2197         * p-valprint.c (pascal_val_print): Update call.
2198
2199         * disasm.c (gdb_disassemble_info): Install architecture into
2200         di.application_data field.
2201
2202 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2203
2204         * disasm.h (gdb_disassembly): Add GDBARCH parameter.
2205         (gdb_print_insn): Likewise.
2206         * disasm.c (dump_insns): Add GDBARCH parameter.  Use it instead
2207         of current_gdbarch.
2208         (do_mixed_source_and_assembly): Add GDBARCH parameter.  Pass to
2209         dump_insns.
2210         (do_assembly_only): Likewise.
2211         (gdb_disassembly): Add GDBARCH parameter.  Use it instead of
2212         current_gdbarch.  Pass to subroutines.
2213         (gdb_print_insn): Add GDBARCH parameter.  Use it instead of
2214         current_gdbarch.
2215
2216         * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
2217         (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
2218         (do_gdb_disassembly): Add GDBARCH argument.  Store into args.
2219         (print_frame_info): Pass architecture to do_gdb_disassembly.
2220
2221         * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
2222
2223         * mi/mi-cmd-disas.c: Include "arch-utils.h"
2224         (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
2225
2226         * cli/cli-cmds.c: Include "arch-utils.h".
2227         (print_disassembly): Add GDBARCH parameter.  Pass to gdb_disassembly
2228         and tui_show_assembly.
2229         (disassemble_current_function): Pass architecture to
2230         tui_get_low_disassembly_address and print_disassembly.
2231         (disassemble_command): Pass architecture to
2232         tui_get_low_disassembly_address and print_disassembly.
2233
2234         * tui/tui.c (tui_show_assembly): Add GDBARCH parameter.  Pass to
2235         tui_update_source_windows_with_addr.
2236
2237         * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
2238         (struct tui_source_info): Likewise.
2239         * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
2240
2241         * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
2242         Pass to gdb_print_insn.
2243         (tui_find_disassembly_address): Add GDBARCH parameter.  Pass to
2244         tui_disassemble.
2245         (tui_set_disassem_content): Add GDBARCH parameter.  Install into
2246         source_info.gdbarch.  Pass to tui_disassemble.
2247         (tui_show_disassem): Add GDBARCH parameter.  Pass to 
2248         tui_update_source_window.
2249         (tui_show_disassem_and_update_source): Add GDBARCH parameter.  Pass to
2250         tui_show_disassem and tui_update_source_window.
2251
2252         (tui_get_begin_asm_address): Return locator architecture in addition
2253         to locator PC value.
2254
2255         (tui_get_low_disassembly_address): Add GDBARCH parameter.   Pass to
2256         tui_get_low_disassembly_address.
2257
2258         (tui_vertical_disassem_scroll): Pass architecture to subroutines.
2259
2260         * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
2261         (tui_show_disassem): Likewise.
2262         (tui_show_disassem_and_update_source): Likewise.
2263         (tui_get_begin_asm_address): Return architecture and PC value.
2264
2265         * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
2266         (tui_show_assembly): Add GDBARCH parameter.
2267
2268         * tui/tui-layout.c (extract_display_start_addr): Return current window
2269         architecture in addition to current PC value.
2270
2271         (tui_set_layout): Update calls to tui_get_low_disassembly_address and
2272         extract_display_start_addr.  Pass architecture to
2273         tui_update_source_windows_with_addr.
2274
2275         * tui/tui-source.c: Include "objfiles.h".
2276         (tui_set_source_content): Initialize window architecture.
2277         (tui_show_symtab_source): Add GDBARCH parameter.  Pass to
2278         tui_update_source_window_as_is
2279
2280         * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
2281
2282         * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
2283         Install locator architecture.
2284         (tui_set_locator_filename): Update call.
2285         (tui_show_frame_info): Pass architecture to tui_set_locator_info
2286         and subroutines.
2287
2288         * tui/tui-win.c (make_visible_with_new_height): Pass architecture
2289         to tui_update_source_window.
2290
2291         * tui/tui-winsource.c: Include "objfiles.h".
2292         (tui_display_main): Update call to tui_get_begin_asm_address.
2293         Pass architecture to tui_update_source_windows_with_addr.
2294         (tui_update_source_window): Add GDBARCH parameter.  Pass to
2295         tui_update_source_window_as_is.
2296         (tui_update_source_window_as_is): Add GDBARCH parameter.
2297         Pass to tui_set_disassem_content.
2298         (tui_update_source_windows_with_addr): Add GDBARCH parameter.
2299         Pass to subroutines.
2300         (tui_update_source_windows_with_line): Pass objfile architecture
2301         to subroutines.
2302         (tui_horizontal_source_scroll): Pass architecture to 
2303         tui_update_source_window_as_is.
2304         
2305         * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
2306         parameter.
2307         (tui_update_source_window_as_is): Likewise.
2308         (tui_update_source_windows_with_addr): Likewise.
2309
2310 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2311
2312         * breakpoint.h (struct breakpoint): New member GDBARCH.
2313         * breakpoint.c: Include "arch-utils.h".
2314         (set_raw_breakpoint_without_location): Add GDBARCH parameter.
2315         Use it to set breakpoint architecture.
2316         (set_raw_breakpoint): Add GDBARCH parameter.
2317         (create_internal_breakpoint): Likewise.
2318         (create_catchpoint): Likewise.
2319         (create_fork_vfork_event_catchpoint): Likewise.
2320         (create_breakpoint): Likewise.
2321         (create_breakpoints): Likewise.
2322         (break_command_really): Likewise.
2323         (create_ada_exception_breakpoint): Likewise.
2324         Update local callers to pass architecture:
2325         (create_internal_breakpoint): Update.
2326         (create_overlay_event_breakpoint): Update.
2327         (create_longjmp_master_breakpoint): Update.
2328         (create_thread_event_breakpoint): Update.
2329         (create_solib_event_breakpoint): Update.
2330         (create_catchpoint): Update.
2331         (create_fork_vfork_event_catchpoint): Update.
2332         (set_momentary_breakpoint): Update.
2333         (clone_momentary_breakpoint): Update.
2334         (create_breakpoint): Update.
2335         (create_breakpoints): Update.
2336         (break_command_really): Update.
2337         (break_command_1): Update.
2338         (set_breakpoint): Update.
2339         (watch_command_1): Update.
2340         (catch_fork_command_1): Update.
2341         (catch_exec_commnd_1): Update.
2342         (handle_gnu_v3_exceptions): Update.
2343         (create_ada_exception_breakpoint): Update.
2344         (catch_ada_exception_command): Update.
2345         (catch_assert_command): Update.
2346         (trace_command): Update.
2347
2348         * breakpoint.h (struct bp_location): New member GDBARCH.
2349         * breakpoint.c (get_sal_arch): New function.
2350         (set_raw_breakpoint): Set location architecture.
2351         (add_location_to_breakpoint): Likewise.
2352         (clone_momentary_breakpoint): Likewise.
2353         (watch_command_1): Likewise.
2354         (update_watchpoint): Likewise.
2355         (bp_loc_is_permanent): Use location architecture instead of
2356         current_gdbarch.
2357         (adjust_breakpoint_address): Add GDBARCH parameter; use it
2358         instead of current_gdbarch.
2359         Update callers of adjust_breakpoint_address to pass
2360         breakpoint location architecture:
2361         (set_raw_breakpoint): Update.
2362         (watch_command_1): Update.
2363
2364         * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
2365         of current_gdbarch.
2366         (add_local_symbols): Add GDBARCH parameter.  Pass to collect_symbol.
2367         (encode_actions): Pass tracepoint architecture to add_local_symbols
2368         (encode_actions): Use tracepoint architecture instead of
2369         current_gdbarch.  Pass it to add_local_symbols and collect_symbol.
2370
2371         * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
2372         of print_one callback with last_loc.
2373         * breakpoint.c (print_one_breakpoint_location): Replace last_addr
2374         parameter with last_loc.
2375         (print_one_breakpoint): Likewise.
2376         (do_captured_breakpoint_query): Update call.
2377         (breakpoint_1): Pass last_loc instead of last_addr to
2378         print_one_breakpoint.  Pass last location architecture instead of
2379         current_gdbarch to set_next_address.
2380         Update all implementations of the print_one callback:
2381         * breakpoint.c (print_one_catch_fork): Update.
2382         (print_one_catch_vfork): Update.
2383         (print_one_catch_exec): Update.
2384         (print_one_exception_catchpoint): Update.
2385         * ada-lang.c (print_one_exception): Update.
2386         (print_one_catch_exception): Update.
2387         (print_one_catch_exception_unhandled): Update.
2388         (print_one_catch_assert): Update.
2389
2390         * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
2391         parameter.  Use it instead of gdbarch_addr_bit (current_gdbarch).
2392         (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
2393         to print_one_breakpoint_location.
2394         (breakpoint_address_bits): New function.
2395         (do_captured_breakpoint_query): Compute number of address bits to print
2396         and pass it to print_one_breakpoint.
2397         (breakpoint_1): Likewise.  Use it instead of current_gdbarch.
2398
2399         * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
2400         * breakpoint.c (create_thread_event_breakpoint): Likewise.
2401         Update callers to create_thread_event_breakpoint:
2402         * aix-thread.c (pd_enable): Update.
2403         * linux-thread-db.c (enable_thread_event): Update.
2404
2405         * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
2406         * breakpoint.c (create_solib_event_breakpoint): Likewise.
2407         Update callers to create_solib_event_breakpoint:
2408         * solib-frv.c (enable_break, enable_break2): Update.
2409         * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
2410         * solib-som.c (som_solib_create_inferior_hook): Update.
2411         * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
2412         * solib-svr4.c (enable_break): Update.
2413
2414         * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
2415         * breakpoint.c (insert_single_step_breakpoint): Likewise.
2416         Update callers to insert_single_step_breakpoint:
2417         * alpha-tdep.c (alpha_software_single_step): Update.
2418         * arm-linux-tdep.c (arm_linux_software_single_step): Update.
2419         * arm-tdep.c (arm_software_single_step): Update.
2420         * cris-tdep.c (cris_software_single_step): Update.
2421         * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
2422         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
2423         * sparc-tdep.c (sparc_software_single_step): Update.
2424         * spu-tdep.c (spu_software_single_step): Update.
2425         * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
2426         Pass it to insert_single_step_breakpoint.
2427         (mips_software_single_step): Pass architecture to
2428         deal_with_atomic_sequence and insert_single_step_breakpoint.
2429
2430         * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
2431         (deprecated_remove_raw_breakpoint): Likewise.
2432         * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
2433         (deprecated_remove_raw_breakpoint): Likewise.
2434         Update callers to deprecated_insert_raw_breakpoint and
2435         deprecated_remove_raw_breakpoint:
2436         * breakpoint.c (single_step_gdbarch): New static variable.
2437         (insert_single_step_breakpoint): Pass GDBARCH parameter to
2438         deprecated_insert_raw_breakpoint.  Store it in single_step_gdbarch.
2439         (remove_single_step_breakpoints): Pass architecture stored in
2440         single_step_gdbarch to deprecated_remove_raw_breakpoint.
2441         * rs6000-nat.c (exec_one_dummy_insn): Update.
2442         * solib-irix.c (enable_break, disable_break): Update.
2443         * procfs.c (procfs_mourn_inferior): Update.
2444         (remove_dbx_link_breakpoint): Update.
2445
2446         * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
2447         (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
2448         * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
2449         (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
2450         Update callers to set_breakpoint, set_momentary_breakpoint and
2451         set_momentary_breakpoint_at_pc:
2452         * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
2453         (until_break_command): Update.
2454         * infcall.c (call_function_by_hand): Update.
2455         * infcmd.c (finish_backward, finish_forward): Update.
2456         * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
2457         parameter.  Pass it to set_momentary_breakpoint.
2458         (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
2459         Pass it to set_momentary_breakpoint_at_pc.
2460         (handle_inferior_event): Update.
2461         (insert_step_resume_breakpoint_at_frame): Update.
2462         (insert_step_resume_breakpoint_at_caller): Update..
2463         * mi/mi-cmd-break.c: Include "arch-utils.h".
2464         (mi_cmd_break_insert): Update.
2465
2466         * target.h (struct target_ops): Add GDBARCH parameter to
2467         to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
2468         and to_remove_hw_breakpoint members.
2469         (target_insert_breakpoint, target_remove_breakpoint,
2470         target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
2471         parameter, pass to target routine.
2472         (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
2473         parameter.
2474         * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
2475         debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
2476         GDBARCH parameter, pass to target routine.
2477         (update_current_target): Update function signature.
2478         * breakpoint.c (insert_bp_location, remove_breakpoint,
2479         deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
2480         Pass architecture to target_ routines.
2481         Update all implementations of the target breakpoint routines to take
2482         GDBARCH parameter and use it instead of GDBARCH as appropriate:
2483         * corelow.c (ignore): Update.
2484         * exec.c (ignore): Update.
2485         * mem-break.c (memory_insert_breakpoint): Update.
2486         (memory_remove_breakpoint): Update.
2487         * monitor.c (monitor_insert_breakpoint): Update.
2488         (monitor_remove_breakpoint): Update.
2489         * record.c (record_insert_breakpoint): Update.
2490         (record_beneath_to_insert_breakpoint): Update.
2491         (record_remove_breakpoint): Update.
2492         (record_beneath_to_remove_breakpoint): Update.
2493         * remote.c (remote_insert_breakpoint): Update.
2494         (remote_remove_breakpoint): Update.
2495         (remote_insert_hw_breakpoint): Update.
2496         (remote_remove_hw_breakpoint): Update.
2497         * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
2498         (m32r_remove_breakpoint): Update.
2499         * remote-mips.c (mips_insert_breakpoint): Update.
2500         (mips_remove_breakpoint): Update.
2501         * i386-nat.c (i386_insert_hw_breakpoint): Update.
2502         (i386_remove_hw_breakpoint): Update.
2503         * nto-procfs.c (procfs_insert_breakpoint):  Update.
2504         (procfs_remove_breakpoint): Update.
2505         (procfs_insert_hw_breakpoint): Update.
2506         (procfs_remove_hw_breakpoint): Update.
2507
2508 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2509
2510         * frame.h (frame_unwind_arch): New.
2511         (frame_unwind_caller_arch): Likewise.
2512         * frame-unwind.h (frame_prev_arch_ftype): New type.
2513         (struct frame_unwind): New member prev_arch.
2514         * frame.c (struct frame_info): New member prev_arch.
2515         (frame_unwind_arch): New function.
2516         (frame_unwind_caller_arch): Likewise..
2517         (get_frame_arch): Reimplement in terms of frame_unwind_arch.
2518         * sentinel-frame.c (sentinel_frame_prev_arch): New function.
2519         (sentinel_frame_unwinder): Install it.
2520
2521         * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
2522         of get_frame_arch.
2523         (frame_unwind_register_value): Likewise.
2524         (frame_unwind_register_signed): Likewise.
2525         (frame_unwind_register_unsigned): Likewise.
2526         * frame-unwind.c (frame_unwind_got_optimized): Likewise.
2527         (frame_unwind_got_register): Likewise.
2528         (frame_unwind_got_constant): Likewise.
2529         (frame_unwind_got_bytes): Likewise.
2530         (frame_unwind_got_address): Likewise.
2531
2532         * frame.h (enum frame_type): New value ARCH_FRAME.
2533         * frame.c (fprint_frame_type): Handle ARCH_FRAME.
2534         * stack.c (print_frame_info): Likewise.
2535
2536 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2537
2538         * target.h (struct target_ops): New member to_thread_architecture.
2539         (target_thread_architecture): New macro.
2540         * target.c (update_current_target): Inherit to_thread_architecture.
2541         (default_thread_architecture): New function.
2542         (debug_to_thread_architecture): New function.
2543         (setup_target_debug): Handle to_thread_architecture.
2544
2545         * regcache.h (get_thread_arch_regcache): New.
2546         * regcache.c (struct regcache_list): New data type.
2547         (current_regcache): Hold regcache list instead of single regcache.
2548         (current_thread_ptid, current_thread_arch): New static variables.
2549         (get_thread_arch_regcache): New function.
2550         (get_thread_regcache): Use it.  Call target_thread_architecture.
2551         (regcache_thread_ptid_changed): Update to current_regcache changes.
2552         (registers_changed): Likewise.  Reset current_thread_arch and
2553         current_thread_ptid.
2554
2555         * remote.c (remote_wait): Access target registers in target_gdbarch.
2556         * linux-nat.c (linux_nat_do_thread_registers): Likewise.
2557         * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
2558         (ps_lgetfpregs, ps_lsetfpregs): Likewise.
2559         * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
2560         (ps_lgetfpregs, ps_lsetfpregs): Likewise.
2561         * solib-svr4.c (enable_break): Likewise.
2562         (svr4_relocate_main_executable): Likewise.
2563
2564 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2565
2566         * python/python-internal.h (struct language_defn): Declare.
2567         (python_gdbarch, python_language): Likewise.
2568         (ensure_python_env): Add prototype.
2569         (make_cleanup_py_restore_gil): Remove prototype.
2570
2571         * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
2572         (python_gdbarch, python_language): New global variables.
2573         (struct python_env): New data type.
2574         (ensure_python_env, restore_python_env): New functions.
2575         (eval_python_from_control_command): Call ensure_python_env to
2576         install current architecture and language.
2577         (python_command, gdbpy_new_objfile): Likewise.
2578         * python/python-cmd.c: Include "arch-utils.h" and "language.h".
2579         (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
2580         ensure_python_env.
2581         * python/python-type.c (clean_up_objfile_types): Likewise.
2582         * python/python-objfile.c: Include "language.h".
2583         (clean_up_objfile): Call ensure_python_env.
2584         * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
2585         (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
2586         * varobj.c (varobj_ensure_python_env): New helper function.
2587         (varobj_get_display_hint, update_dynamic_varobj_children,
2588         install_default_visualizer, varobj_set_visualizer, free_variable,
2589         value_get_print_value): Call it.
2590         (value_get_print_value): Add varobj argument instead of pretty
2591         printer argument.  Update all callers.
2592
2593         * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
2594         Remove.
2595
2596         * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
2597         (call_internal_function): Likewise.
2598         * value.c (call_internal_function): Likewise.  Pass to handler.
2599         * eval.c (evaluate_subexp_standard): Update call.
2600         * python/python-function.c: Include "language.h".
2601         (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
2602         make_cleanup_python_env.
2603
2604         * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
2605         builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
2606         valpy_str): Use python_gdbarch and python_language instead of
2607         current_gdbarch and current_language.
2608         * python/python-type.c (typy_lookup_typename): Likewise.
2609
2610 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2611
2612         * arch-utils.c (selected_byte_order): Return target_byte_order_user.
2613         (show_endian): Use target_byte_order_user if specified; otherwise
2614         use get_current_arch () instead of current_gdbarch.
2615         (show_architecture): Use set_architecture_string if specified;
2616         otherwise use get_current_arch () instead of current_gdbarch.
2617         (get_current_arch): New function.
2618         * arch-utils.h (get_current_arch): Add prototype.
2619
2620         * osabi.c (show_osabi): Use get_current_arch () instead of
2621         current_gdbarch.
2622
2623         * findcmd.c: Include "arch-utils.h".
2624         (parse_find_args): Add BIG_P argument.  Use it instead of byte order
2625         of current_gdbarch.
2626         (find_command): Use get_current_arch () instead of current_gdbarch.
2627         Pass byte order to parse_find_args.
2628
2629         * maint.c: Include "arch-utils.h".
2630         (maintenance_print_architecture): Use get_current_arch () instead
2631         of current_gdbarch.
2632
2633         * reggroups.c: Include "arch-utils.h".
2634         (maintenance_print_reggroups): Use get_current_arch () instead
2635         of current_gdbarch.
2636
2637         * symfile.c: Include "arch-utils.h".
2638         (overlay_load_command): Use get_current_arch () instead of
2639         current_gdbarch.
2640
2641         * value.c: Include "arch-utils.h".
2642         (show_convenience): Use get_current_arch () instead of
2643         current_gdbarch.
2644
2645         * tui/tui-regs.c: Include "arch-utils.h".
2646         (tui_reg_next_command): Use get_current_arch () instead of
2647         current_gdbarch.
2648
2649         * mi/mi-main.c: Include "arch-utils.h".
2650         (mi_cmd_data_read_memory): Use get_current_arch () instead of
2651         current_gdbarch.
2652
2653         * parse.c: Include "arch-utils.h".
2654         (parse_exp_in_context): Use get_current_arch () instead of
2655         current_gdbarch.
2656
2657 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2658
2659         * gdbtypes.c (make_pointer_type, make_reference_type,
2660         smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
2661         Use type architecture instead of current_gdbarch.
2662
2663         * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
2664         Add GDBARCH paramter.
2665         * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
2666         Add GDBARCH parameter.   Use it instead of current_gdbarch.
2667         * c-typeprint.c (c_type_print_modifier): Update call.
2668         * parse.c (push_type_address_space): Likewise.
2669
2670         * findvar.c (extract_typed_address, store_typed_address): Use type
2671         architecture instead of current_gdbarch.
2672
2673         * value.c (value_as_address, unpack_field_as_long): Use type architecture
2674         instead of current_gdbarch.
2675
2676         * doublest.c (floatformat_from_length): Add GDBARCH argument.  Use it
2677         instead of current_gdbarch.
2678         (floatformat_from_type): Pass type architecture.
2679
2680         * infcall.c (find_function_addr): Use type architecture instead
2681         of current_gdbarch.
2682
2683         * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
2684         value_bit_index): Use type architecture instead of current_gdbarch.
2685         * valops.c (value_cast, value_slice): Likewise.
2686
2687         * value.h (modify_field): Add TYPE argument.
2688         * value.c (modify_field): Add TYPE argument.  Use type architecture
2689         instead of current_gdbarch.
2690         (set_internalvar_component): Likewise.
2691         * eval.c (evaluate_struct_tuple): Update call.
2692         * valops.c (value_assign): Likewise.
2693         * ada-lang.c (modify_general_field): Likewise.  Add TYPE argument.
2694         (make_array_descriptor): Update calls.
2695         (move_bits): Add BITS_BIG_ENDIAN_P argument.  Use it instead of
2696         current_gdbarch.
2697         (ada_value_assign, value_assign_to_component): Update calls.
2698         (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
2699         value_assign_to_component): Use type arch instead of current_gdbarch.
2700
2701         * printcmd.c (float_type_from_length): Remove GDBARCH argument,
2702         use type architecture instead.
2703         (print_scalar_formatted, printf_command): Update calls.  Use type
2704         architecture instead of current_gdbarch.
2705         * valprint.c (val_print_type_code_int): Use type architecture
2706         instead of current_gdbarch.
2707         * varobj.c (value_get_print_value): Likewise.
2708         * python/python-prettyprint.c (print_string_repr): Add GDBARCH
2709         argument.  Use it instead of current_gdbarch.
2710         (apply_val_pretty_printer): Update call.
2711
2712         * ada-valprint.c (ada_val_print_1): Use type architecture instead
2713         of current_gdbarch.
2714         * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
2715         Use it instead of current_gdbarch.
2716         (c_val_print): Update calls passing type architecture.
2717         * f-valprint.c (f_val_print): Use type architecture instead of
2718         current_gdbarch.
2719         * jv-valprint (java_value_print): Likewise.
2720         * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
2721         Use it instead of current_gdbarch.
2722         (print_unpacked_pointer): Update calls passing type architecture.
2723         * scm-valprint.c (scm_scmval_print): Use type architecture instead of
2724         current_gdbarch.
2725
2726         * gnu-v3-abi.c (get_class_arch): Remove.
2727         (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch.  Remove
2728         special-case check for Java classes.
2729         (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
2730         gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
2731         Use get_type_arch instead of get_class_arch.
2732
2733 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2734
2735         * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
2736         (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
2737         (alloc_type_arch): Add prototype.
2738         (alloc_type_copy): Likewise.
2739         (get_type_arch): Likewise.
2740         (arch_type): Likewise.
2741         (arch_integer_type): Likewise.
2742         (arch_character_type): Likewise.
2743         (arch_boolean_type): Likewise.
2744         (init_float_type): Remove, replace by ...
2745         (arch_float_type): ... this.
2746         (init_complex_type): Remove, replace by ...
2747         (arch_complex_type): ... this.
2748         (init_flags_type): Remove, replace by ...
2749         (arch_flags_type): ... this.
2750         (init_composite_type): Remove, replace by ...
2751         (arch_composite_type): ... this.
2752
2753         * gdbtypes.c (alloc_type): No longer support NULL objfile.
2754         (init_type): Likewise.
2755         (alloc_type_arch): New function.
2756         (alloc_type_copy): New function.
2757         (get_type_arch): New function.
2758
2759         (smash_type): Preserve type ownership information.
2760         (make_pointer_type, make_reference_type, make_function_type,
2761         smash_to_memberptr_type, smash_to_method_type): No longer
2762         preserve OBJFILE across smash_type calls.
2763         (make_pointer_type, make_reference_type, make_function_type,
2764         lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
2765         create_range_type, create_array_type, create_set_type, copy_type):
2766         Use alloc_type_copy when allocating types.
2767         (check_typedef): Use alloc_type_arch.
2768         (copy_type_recursive): Likewise.  Preserve type ownership data
2769         after copying type.
2770         (recursive_dump_type): Dump type ownership data.
2771         (alloc_type_instance): Update type ownership check.
2772         (copy_type, copy_type_recursive): Likewise.
2773
2774         (arch_type): New function.
2775         (arch_integer_type): Likewise.
2776         (arch_character_type): Likewise.
2777         (arch_boolean_type): Likewise.
2778         (init_float_type): Remove, replace by ...
2779         (arch_float_type): ... this.
2780         (init_complex_type): Remove, replace by ...
2781         (arch_complex_type): ... this.
2782         (init_flags_type): Remove, replace by ...
2783         (arch_flags_type): ... this.
2784         (append_flags_type_flag): Move down.
2785         (init_composite_type): Remove, replace by ...
2786         (arch_composite_type): ... this.
2787         (append_composite_type_field_aligned,
2788         append_composite_type_field): Move down.
2789
2790         * gdbarch.c (gdbtypes_post_init): Allocate all types
2791         using per-architecture routines.
2792         * ada-lang.c (ada_language_arch_info): Likewise.
2793         * f-lang.c (build_fortran_types): Likewise.
2794         * jv-lang.c (build_java_types): Likewise.
2795         * m2-lang.c (build_m2_types): Likewise.
2796         * scm-lang.c (build_scm_types): Likewise.
2797
2798         * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
2799         (packed_array_type): Likewise.
2800         (ada_template_to_fixed_record_type_1): Likewise.
2801         (template_to_static_fixed_type): Likewise.
2802         (to_record_with_fixed_variant_part): Likewise.
2803         (to_fixed_variant_branch_type): Likewise.
2804         (to_fixed_array_type): Likewise.
2805         (to_fixed_range_type): Likewise.
2806         (empty_record): Use type instead of objfile argument.
2807         Use alloc_type_copy.
2808         (to_fixed_variant_branch_type): Update call to empty_record.
2809         * jv-lang.c (type_from_class): Use alloc_type_arch.
2810
2811         * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
2812         * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
2813         i386_mmx_type, i386_sse_type): Likewise.
2814         * ia64-tdep.c (ia64_ext_type): Likewise.
2815         * m32c-tdep.c (make_types): Likewise.
2816         * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
2817         * rs6000-tdep.c (rs6000_builtin_type_vec64,
2818         rs6000_builtin_type_vec128): Likewise.
2819         * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
2820         * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
2821         sparc64_fprs_type): Likewise.
2822         * spu-tdep.c (spu_builtin_type_vec128): Likewise.
2823         * xtensa-tdep.c (xtensa_register_type): Likewise.
2824         * linux-tdep.c (linux_get_siginfo_type): Likewise.
2825         * target-descriptions.c (tdesc_gdb_type): Likewise.
2826         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2827
2828 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2829
2830         * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
2831         i386_mxcsr_type members.
2832         (i386_eflags_type): Make into function.
2833         (i386_mxcsr_type): Likewise.
2834         * i386-tdep.c (i386_eflags_type): Make into function.
2835         (i386_mxcsr_type): Likewise.
2836         (i386_register_type): Update uses.
2837         (i386_init_types): Remove.
2838         (_initialize_i386_tdep): Do not call it.
2839         * amd64-tdep.c (amd64_register_type): Update uses.
2840
2841         * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
2842         * m68k-tdep.c (m68k_ps_type): Make into function.
2843         (m68k_register_type): Update use.
2844         (m68k_init_types): Remove.
2845         (_initialize_m68k_tdep): Do not call it.
2846
2847         * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
2848         sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
2849         sparc64_fprs_type members.
2850         * sparc-tdep.c (sparc_psr_type): Make into function.
2851         (sparc_fsr_type): Likewise.
2852         (sparc32_register_type): Update uses.
2853         (sparc_init_types): Remove.
2854         (_initialize_sparc_tdep): Do not call it.
2855         * sparc64-tdep.c (sparc64_pstate_type): Make into function.
2856         (sparc64_fsr_type): Likewise.
2857         (sparc64_fprs_type): Likewise.
2858         (sparc64_register_type): Update uses.
2859         (sparc64_init_types): Remove.
2860         (_initialize_sparc64_tdep): Likewise.
2861
2862 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2863
2864         * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
2865         builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2866         builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2867         (init_float_type, init_complex_type): Add prototypes.
2868         * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
2869         builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
2870         builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
2871         (_initialize_gdbtypes): Do not initialize them.
2872         (build_flt): Rename to ...
2873         (init_float_type): ... this.  Make global.
2874         (build_complex): Rename to ...
2875         (init_complex_type): ... this.  Make global.  Remove BIT argument.
2876         (gdbtypes_post_init): Update calls.
2877
2878         * ada-lang.c (ada_language_arch_info): Use init_float_type.
2879         * jv-lang.c (build_java_types): Likewise.
2880         * m2-lang.c (build_m2_types): Likewise.
2881         * f-lang.c (build_fortran_types): Use init_float_type and
2882         init_complex_type.
2883
2884         * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
2885         of using builtin_type_ieee_single, builtin_type_ieee_double, or
2886         builtin_type_arm_ext.
2887
2888         * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
2889         * ia64-tdep.c (builtin_type_ia64_ext): Remove.
2890         (_initialize_ia64_tdep): Do not initialize it.
2891         (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
2892         Move up.
2893         (ia64_ext_type): New function.
2894         (ia64_register_reggroup_p, ia64_convert_register_p,
2895         ia64_register_to_value, ia64_value_to_register,
2896         ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
2897         instead of builtin_type_ia64_ext.
2898
2899         * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
2900         (i387_ext_type): Add prototype.
2901         * i386-tdep.c (i387_ext_type): New function.
2902         (i386_extract_return_value, i386_store_return_value,
2903         i386_register_type): Use it instead of builtin_type_i387_ext.
2904         * amd64-tdep.c (amd64_register_type): Likewise.
2905         * i387-tdep.c (print_i387_value, i387_register_to_value,
2906         i387_value_to_register): Likewise.
2907         (print_i387_value, print_i387_ext): Add GDBARCH argument.
2908         (print_i387_ext, i387_print_float_info): Pass to subroutines.
2909
2910         * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
2911         * m68k-tdep.c (m68881_ext_type): New function.
2912         (m68k_register_type, m68k_convert_register_p): Use it instead
2913         of builtin_type_m68881_ext.
2914
2915         * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
2916         * arm-tdep.c (arm_ext_type): New function.
2917         (arm_register_type): Use it instead of builtin_type_arm_ext.
2918
2919         * alpha-tdep.c (alpha_register_type): Use builtin types
2920         instead of builtin_type_ieee_double.
2921
2922         * mips-tdep.c (mips_float_register_type, mips_double_register_type):
2923         Remove.
2924         (mips_register_type): Use builtin types instead of
2925         builtin_type_ieee_single and builtin_type_ieee_double.
2926         (mips_print_fp_register): Use builtin types instead of
2927         mips_float_register_type and mips_double_register_type.
2928
2929         * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
2930         Use builtin types instead of builtin_type_ieee_single and
2931         builtin_type_ieee_double.
2932
2933 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
2934
2935         * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2936         builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2937         builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2938         builtin_type_int128, builtin_type_uint128): Remove.
2939         (struct builtin_type): New members builtin_int0, builtin_int8,
2940         builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
2941         builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
2942         and builtin_uint128.
2943         * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
2944         builtin_type_int16, builtin_type_uint16, builtin_type_int32,
2945         builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
2946         builtin_type_int128, builtin_type_uint128): Remove.
2947         (_initialize_gdbtypes): Do not initialize them.
2948         (gdbtypes_post_init): Initialize fixed-size integer types.
2949
2950         * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
2951         GDBARCH argument.  Return platform-specific type.
2952         (dwarf2_read_address, execute_stack_op): Update calls.
2953
2954         * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
2955         instead of global builtin_int_... variables.
2956         * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
2957         * printcmd.c (do_examine): Likewise.
2958         * jv-exp.y (parse_number): Likewise.
2959
2960         * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
2961         alpha_store_return_value): Likewise.
2962         * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
2963         * amd64-tdep.c (amd64_register_type): Likewise.
2964         * arm-tdep.c (arm_register_type): Likewise.
2965         * avr-tdep.c (avr_register_type): Likewise.
2966         * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
2967         * frv-tdep.c (frv_register_type): Likewise.
2968         * h8300-tdep.c h8300_register_type): Likewise.
2969         * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
2970         hppa64_register_type): Likewise.
2971         * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
2972         * iq2000-tdep.c (iq2000_register_type): Likewise.
2973         * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
2974         * m32r-tdep.c (m32r_register_type): Likewise.
2975         * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
2976         m68hc11_pseudo_register_write): Likewise.
2977         * m68k-tdep.c (m68k_register_type): Likewise.
2978         * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
2979         * mep-tdep.c (mep_register_type): Likewise.
2980         * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
2981         mips_print_fp_register): Likewise.
2982         * moxie-tdep.c (moxie_register_type): Likewise.
2983         * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
2984         * rs6000-tdep.c (rs6000_builtin_type_vec64,
2985         rs6000_builtin_type_vec128): Likewise.
2986         * score-tdep.c (score_register_type): Likewise.
2987         * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
2988         Likewise.
2989         * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
2990         Likewise.
2991         * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
2992         * v850-tdep.c (v850_register_type): Likewise.
2993         * xstormy16-tdep.c (xstormy16_register_type): Likewise.
2994         * xtensa-tdep.c (xtensa_register_type): Likewise.
2995
2996         * mt-tdep.c (struct gdbarch_tdep): New data structure.
2997         (mt_gdbarch_init): Alloc TDEP structures.
2998         (mt_register_type): Cache coprocessor type in TDEP instead of
2999         static global variable.
3000
3001         * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
3002         * xtensa-tdep.c (type_entries): Remove.
3003         (xtensa_register_type): Cache fixed-size types in TDEP instead
3004         of in global variable.
3005
3006 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3007
3008         * gdbtypes.h (builtin_type_true_char): Remove.
3009         (builtin_type_true_unsigned_char): Likewise.
3010         (struct builtin_type): Add builtin_true_char and
3011         builtin_true_unsigned_char members.
3012         * gdbtypes.c (builtin_type_true_char): Remove.
3013         (builtin_type_true_unsigned_char): Likewise.
3014         (_initialize_gdbtypes): Do not initialize them.
3015         (gdbtypes_post_init): Initialize builtin_true_char and
3016         builtin_true_unsigned_char members of builtin_type.
3017
3018         * printcmd.c (print_scalar_formatted): Use builtin_type
3019         members instead of builtin_type_true_char and
3020         builtin_type_true_unsigned_char.
3021         * ada-valprint.c (ada_val_print_1): Likewise.
3022
3023 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3024
3025         * gdbtypes.h (builtin_type_void): Remove.
3026         * gdbtypes.c (builtin_type_void): Remove.
3027         (_initialize_gdbtypes): Do not initialize it.
3028
3029         (safe_parse_type): Add GDBARCH argument.  Use it to construct
3030         void return type.
3031         (check_stub_method): Update call.
3032
3033         * infcall.c (call_function_by_hand): Use platform-specific type
3034         instead of builtin_type_void.
3035         * valops.c (value_cast): Use input void type instead of
3036         builtin_type_void.
3037
3038 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3039
3040         * ada-lang.c (assign_component): Use platform-specific integer type
3041         instead of builtin_type_int32 type.
3042         (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
3043
3044         * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
3045         instead of builtin_type_int8 type.
3046         * valarith.c (value_x_unop): Likewise.
3047         * python/python-value.c (valpy_absolute): Avoid reference to
3048         builtin_type_int8 type.
3049
3050         * eval.c (evaluate_subexp_standard): Use platform-specific integer
3051         type instead of builtin_type_int8 as EVAL_SKIP return value type.
3052         * ada-lang.c (ada_evaluate_subexp): Likewise.
3053         * jv-lang.c (evaluate_subexp_java): Likewise.
3054         * m2-lang.c (evaluate_subexp_modula2): Likewise.
3055         * scm-lang.c (evaluate_exp): Likewise.
3056
3057         * value.h (value_bitstring): Add INDEX_TYPE argument.
3058         * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
3059         of builtin_type_int32 as base range type.
3060         * eval.c (evaluate_subexp_standard): Update value_bitstring call.
3061
3062 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3063
3064         * gdbtypes.c (lookup_array_range_type): Add prototype.
3065         (lookup_string_range_type): Likewise.
3066         * gdbtypes.c (lookup_array_range_type): New function.
3067         (lookup_string_range_type): Likewise.
3068
3069         * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
3070         * parse.c (follow_types): Likewise.
3071         * jv-lang.c (java_array_type): Likewise.
3072         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
3073         * mt-tdep.c (mt_register_type): Likewise.
3074         * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
3075         * sh64-tdep.c (sh64_build_float_register_type): Likewise.
3076         * value.c (allocate_repeat_value): Likewise.
3077         * valops.c (value_array, value_cstring): Likewise.
3078         * valops.c (value_string): Use lookup_string_range_type.
3079
3080 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3081
3082         * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
3083         redundant check for NULL TYPE_TARGET_TYPE.
3084         * m2-valprint.c (m2_print_long_set): Likewise.
3085         * p-valprint.c (pascal_type_print_base): Likewise.
3086
3087 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3088
3089         * printcmd.c (next_gdbarch): New static variable.
3090         (set_next_address, do_examine, x_command): Set it.
3091         (decode_format): Use 'a' size to indicate width of an address.
3092         (do_examine): Add GDBARCH argument.  Handle 'a' size.
3093         (x_command): Pass architecture to do_examine.
3094         Error if called without argument the first time.  
3095         (do_one_display): Pass architecture to do_examine.
3096
3097         (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
3098         examine_g_type): Remove.
3099         (_initialize_printcmd): Do not initialize them.
3100         (do_examine): Use builin_type_int... instead of examine_..._type.
3101
3102 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3103
3104         * gdbtypes.h (struct builtin_type): Add internal_fn member.
3105         * gdbtypes.c (gdbtypes_post_init): Initialize it.
3106         * value.c (internal_fn_type): Remove.
3107         (_initialize_values): Do not initialize it.
3108
3109         * value.c (struct internalvar): Add enum internalvar_kind type and
3110         kind member.  Restructure union internalvar_data type.  Remove type,
3111         canonical, and make_value members.
3112         (init_if_undefined_command): Update for data structure changes.
3113         (create_internalvar): Likewise.
3114         (create_internalvar_type_lazy): Likewise.
3115         (get_internalvar_integer): Likewise.
3116         (get_internalvar_function): Likewise.
3117         (set_internalvar_component): Likewise.
3118         (set_internalvar): Likewise.
3119         (set_internalvar_integer): Likewise.
3120         (set_internalvar_function): Likewise.
3121         (clear_internalvar): Likewise.
3122         (add_internal_function): Likewise.
3123         (preserve_one_internalvar): New function.
3124         (preserve_values): Call it.
3125
3126         * value.h (value_of_internalvar): Add GDBARCH parameter.
3127         (internalvar_make_value): Likewise.
3128         * value.c (value_of_internalvar): Add GDBARCH parameter.  Pass it to
3129         make_value callback.  Use it to generate per-architecture result value
3130         types for internal variables with no pre-defined type.  Update for data
3131         structure changes.
3132         (show_convenience): Pass architecture to value_of_internalvar.
3133         * eval.c (evaluate_subexp_standard): Likewise.
3134         * infrun.c (siginfo_make_value): Add GDBARCH parameter.  Use it
3135         instead of current frame architecture.  Return per-architecture type.
3136
3137         * value.h (set_internalvar_string): Add prototype.
3138         * value.c (set_internalvar_string): New function.
3139         * tracepoint.c (set_traceframe_context): Use it.
3140
3141 2009-07-02  Ulrich Weigand  <uweigand@de.ibm.com>
3142
3143         * jv-lang.h (java_int_type, java_byte_type, java_short_type,
3144         java_long_type, java_boolean_type, java_char_type, java_float_type,
3145         java_double_type, java_void_type): Remove.
3146         (struct builtin_java_type): New data type.
3147         (builtin_java_type): Add prototype.
3148         (java_primitive_type): Add GDBARCH argument.
3149         (java_primitive_type_from_name): Likewise.
3150         (type_from_class): Likewise.
3151
3152         * jv-lang.c (java_int_type, java_byte_type, java_short_type,
3153         java_long_type, java_boolean_type, java_char_type, java_float_type,
3154         java_double_type, java_void_type): Remove.
3155
3156         (build_java_types, builtin_java_type): New functions.
3157         (java_type_data): New static variable.
3158         (_initialize_java_language): Initialize it.  No longer initialize
3159         global types.
3160         (java_language_arch_info): Use per-architecture types.
3161
3162         (java_primitive_type): Add GDBARCH argument.  Return per-architecture
3163         type instead of refering to global variable.
3164         (java_primitive_type_from_name): Add GDBARCH argument.
3165         (java_primitive_type_name): New function.
3166         (java_demangled_signature_length): Use it instead of
3167         java_primitive_type_from_name.
3168         (java_demangled_signature_copy): Likewise.
3169
3170         (type_from_class): Add GDBARCH argument.  Pass to java_link_class_type,
3171         java_primitive_type, and recursive type_from_class call.
3172         (java_link_class_type): Add GDBARCH argument.  Pass to type_from_class
3173         calls.  Use per-architecture types instead of global types.
3174
3175         * jv-exp.y (parse_java_type): New define.
3176         Use per-architecture types instead of global types througout.
3177
3178         * jv-valprint.c (java_value_print): Pass architecture to
3179         type_from_class and java_primitive_type_from_name.  Use per-
3180         architecture types instead of global types.
3181
3182 2009-07-01  Doug Evans  <dje@google.com>
3183
3184         * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
3185         support for i386-linux, amd64-linux, and i386-win32 builds of
3186         gdbserver.
3187
3188 2009-07-01  Nick Roberts  <nickrob@snap.net.nz>
3189
3190         * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
3191
3192 2009-06-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
3193
3194         * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
3195         (check//%): Construct FORCE_PARALLEL for the sub-make.  Extend the
3196         comment for it.
3197
3198 2009-06-30  Paul Pluzhnikov  <ppluzhnikov@google.com>
3199
3200         gdb/10275
3201         * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
3202         cfa_how and cfa_exp into regs and adjust users.
3203         
3204 2009-06-30  Daniel Jacobowitz  <dan@codesourcery.com>
3205
3206         * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
3207
3208 2009-06-30  Vladimir Prus  <vladimir@codesourcery.com>
3209
3210         * mi/mi-cmd-stack.c (parse_print_values): New.
3211         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
3212
3213 2009-06-30  Vladimir Prus  <vladimir@codesourcery.com>
3214
3215         * varobj.c (varobj_get_type): Use type_to_string.
3216
3217 2009-06-29  Pedro Alves  <pedro@codesourcery.com>
3218
3219         * infrun.c (handle_inferior_event): Context switch to the new
3220         thread when resuming for a new_thread_event.
3221
3222 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3223
3224         * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
3225         * ada-lang.c (convert_actual): Remove stale prototype.
3226         (ensure_lval, make_array_descriptor, ada_convert_actual):
3227         Add GDBARCH argument and pass through to subroutine calls.
3228         (ensure_lval): Use GDBARCH instead of current_gdbarch.
3229         * infcall.c (value_arg_coerce): Update ada_convert_actual call.
3230
3231 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3232
3233         * ada-lang.c (resolve): Use per-architecture void type instead
3234         of platform-independent one.
3235         (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
3236         (ada_resolve_function): Reimplement fallback logic to avoid
3237         explicit reference to builtin_type_void.
3238
3239 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3240
3241         * ada-valprint.c (ada_print_scalar): Accept NULL type argument
3242         to indicate scalar should be printed as default integer.
3243         (print_optional_low_bound): Pass NULL to ada_print_scalar to
3244         indicate default integer output.
3245         * ada-typeprint.c (print_range, print_range_bound): Likewise.
3246         (print_choices): Likewise.  Thus, accept NULL as val_type.
3247         * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
3248         to look up controlling discriminant name.
3249
3250 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3251
3252         * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
3253         Fall back to orig_type as index type if symbol lookup fails.
3254         Allocate result types from ORIG_TYPE's objfile.
3255         (ada_array_bound_from_type, to_fixed_array_type,
3256         ada_evaluate_subexp): Pass original index type to
3257         to_fixed_range_type.  Do not pass objfile.
3258
3259         * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
3260         Fall back to orig_type as index type if symbol lookup fails.
3261         (print_array_type, ada_print_type): Pass original index type
3262         to print_range_type_named.
3263
3264 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3265
3266         * ada-lang.c (ada_index_type): Update comment.
3267
3268 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3269
3270         * ada-lang.c (ada_index_type): Make static.  Add NAME argument.
3271         Throw error on invalid input arguments.  Return NULL if unable
3272         to determine index type.
3273
3274         (ada_array_bound_from_type): Remove TYPEP argument.
3275         (ada_array_bound): Make static.  Return LONGEST instead of value.
3276         Update for ada_array_bound_from_type change.
3277         (ada_array_length): Return LONGEST instead of value.
3278         Update for ada_array_bound_from_type change.
3279         (make_array_descriptor): Update for ada_array_bound change.
3280
3281         (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
3282         OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
3283         ada_array_bound, ada_array_length, ada_index_type changes.
3284         Always use ada_index_type to compute result type; fall back
3285         to architecture-specific integer type if ada_index_type fails.
3286
3287         * ada-lang.h (ada_index_type): Remove prototype.
3288         (ada_array_bound): Likewise.
3289
3290 2009-06-29  Pedro Alves  <pedro@codesourcery.com>
3291
3292         * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
3293         a psymtab.
3294
3295 2009-06-29  Tom Tromey  <tromey@redhat.com>
3296
3297         * README: Mention parallel check.
3298
3299 2009-06-29  Sami Wagiaalla  <swagiaal@redhat.com>
3300
3301         * dwarf2read.c (read_import_statement): Properly set import location
3302         and destination.
3303         * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
3304         inner, char* outer arguments. Updated callers.
3305
3306 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3307
3308         * value.h (value_subscript, value_subscripted_rvalue,
3309         value_bitstring_subscript, value_ptradd): Use LONGEST instead
3310         of value as type of the index argument.
3311         (value_ptrsub): Remove.
3312         * valarith.c (value_subscript, value_subscripted_rvalue,
3313         value_bitstring_subscript, value_ptradd): Use LONGEST instead
3314         of value as type of the index argument.
3315         (value_ptrsub): Remove.
3316
3317         * wrapper.h (gdb_value_subscript): Use LONGEST instead of
3318         value as type of the index argument.
3319         * wrapper.c (gdb_value_subscript): Likewise.
3320
3321         Update calls to gdb_value_subscript, value_subscript,
3322         value_subscripted_rvalue, value_bitstring_subscript and
3323         value_ptradd to use LONGEST instead of value as index
3324         argument type.  Use value_ptradd instead of value_ptrsub.
3325         * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
3326         ada_tag_name_2): Update.
3327         * ada-tasks.c (read_atcb): Update.
3328         * eval.c (evaluate_subexp_standard): Update.
3329         * valarith.c (value_subscript): Update.
3330         * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
3331         * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
3332         gnuv3_method_ptr_to_value): Update.
3333         * jv-lang.c (evaluate_subexp_java): Update.
3334         * m2-lang.c (evaluate_subexp_modula2): Update.
3335         * python/python-value.c (valpy_getitem, valpy_binop): Update.
3336         * wrapper.c (gdb_value_subscript): Update.
3337         * varobj.c (c_describe_child): Update.
3338
3339 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3340
3341         * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
3342         * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
3343         (lookup_function_type): Update call.
3344         * stabsread.c (read_type): Likewise.
3345         * dwarf2read.c (read_subroutine_type): Use lookup_function_type
3346         instead of make_function_type.
3347         * jv-lang.c (type_from_class): Likewise.  Do not allocate types
3348         on the fake "dynamics" obstack.
3349
3350 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3351
3352         * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
3353         nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
3354         and nodebug_tls_symbol members.
3355         (struct objfile_type): New data structure.
3356         (objfile_type): Add prototype.
3357         * gdbtypes.c (gdbtypes_post_init): Remove initialization code
3358         for types no longer in struct builtin_type.
3359         (objfile_type_data): New static variable.
3360         (_initialize_gdbtypes): Initialize it.
3361         (objfile_type): New function.
3362
3363         * gdbtypes.h (builtin_type_error): Remove.
3364         * gdbtypes.c (build_complex): Do not use builtin_type_error.
3365         * symtab.c (builtin_type_error): Remove.
3366         (_initialize_symtab): Remove initialization.
3367
3368         * stabsread.c (dbx_lookup_type, define_symbol, error_type,
3369         rs6000_builtin_type, read_range_type): Use per-objfile types
3370         instead of global or per-architecture builtin types.
3371         * coffread.c (decode_type): Likewise.
3372         * dwarf2read.c (read_array_type, read_tag_string_type,
3373         new_symbol, die_type): Likewise.
3374         * mdebugread.c (parse_symbol, basic_type, upgrade_type,
3375         parse_procedure, psymtab_to_symtab_1): Likewise.
3376         * xcoffread.c (process_xcoff_symbol): Likewise.
3377         * parse.c (write_exp_msymbol): Likewise.
3378
3379         * stabsread.c (rs6000_builtin_type_data): New static variable.
3380         (_initialize_stabsread): Initialize it.
3381         (rs6000_builtin_type): Add OBJFILE argument.  Allocate builtin
3382         types per-objfile instead of globally.
3383
3384         * stabsread.c (dbx_lookup_type): Add OBJFILE argument.  Use it
3385         instead of current_objfile; pass it to rs6000_builtin_type.
3386         (dbx_alloc_type, read_type, read_range_type): Update calls.
3387         (cleanup_undefined_types_noname): Add OBJFILE argument and
3388         pass it to dbx_lookup_type.
3389         (cleanup_undefined_types): Add OBJFILE argument and pass it
3390         to cleanup_undefined_types_noname.
3391         * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
3392         * buildsym.c (end_symtab): Update call.
3393
3394 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3395
3396         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3397         target_gdbarch instead of current_gdbarch.
3398
3399 2009-06-29  Ulrich Weigand  <uweigand@de.ibm.com>
3400
3401         * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
3402         (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
3403         solib-darwin.o.
3404
3405         * configure.tgt: Add comment.
3406
3407 2009-06-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
3408
3409         * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
3410         
3411 2009-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
3412             Jan Kratochvil  <jan.kratochvil@redhat.com>
3413
3414         * NEWS: Document inlined function support.
3415         * Makefile.in (SFILES): Add inline-frame.c.
3416         (COMMON_OBS): Add inline-frame.o.
3417         * block.c (contained_in): Rewrite to use lexical nesting.
3418         (block_linkage_function): Skip inlined function blocks.
3419         (block_inlined_p): New.
3420         * block.h (struct block): Update comment.
3421         (block_inlined_p): New prototype.
3422         * blockframe.c (get_frame_block): Handle inlined functions.
3423         (get_frame_function): Do not use block_linkage_function.
3424         (block_innermost_frame): Use get_frame_block and contained_in.
3425         * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
3426         Skip over inlined functions.  Simplify epilogue check.
3427         (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
3428         Update comments.
3429         (set_momentary_breakpoint): Only accept non-inlined frames.
3430         (watch_command_1): Use frame_unwind_caller_pc and
3431         frame_unwind_caller_id instead of get_prev_frame.
3432         (until_break_command): Likewise.  Use get_stack_frame_id.
3433         * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
3434         * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
3435         * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
3436         (read_func_scope, new_symbol): Likewise.  Handle arguments specially
3437         for inlined functions without call site information.
3438         (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
3439         (die_specification): Treat DW_AT_abstract_origin as a specification.
3440         (read_type_die): Handle DW_TAG_inlined_subroutine.
3441         * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
3442         * frame.c (fprint_frame_id): Print inline depth.
3443         (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
3444         (skip_inlined_frames, get_stack_frame_id): New.
3445         (frame_unwind_caller_id): Use skip_inlined_frames.
3446         (frame_id_inlined_p): New.
3447         (frame_id_eq): Make the logic match the comments.  Add inline_depth
3448         check.
3449         (frame_id_inner): Handle inlined functions.
3450         (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
3451         (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
3452         (get_prev_frame_1): Check for inline frames.  Split out frame
3453         allocation to get_prev_frame_raw.
3454         (get_prev_frame_raw): New function.
3455         (get_prev_frame): Handle inline frames.
3456         (get_frame_pc): Use frame_unwind_pc.
3457         (get_frame_address_in_block): Skip inlined frames on both sides.
3458         (pc_notcurrent): Delete.
3459         (find_frame_sal): Rewrite to handle inline call sites.  Use
3460         get_frame_address_in_block.
3461         (deprecated_update_frame_pc_hack): Make static.
3462         * frame.h: Update comments.
3463         (struct frame_id): Add inline_depth.
3464         (enum frame_type): Add INLINE_FRAME.
3465         (frame_id_inlined_p, get_stack_frame_id): New prototypes.
3466         * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
3467         * infcmd.c (set_step_frame): New function.
3468         (step_once): Use set_step_frame.  Handle inlined functions.
3469         (until_next_command): Use set_step_frame.
3470         (finish_backward), finish_forward): Use get_stack_frame_id.
3471         (finish_command): Support inlined functions.
3472         * inferior.h (set_step_info): New prototype.
3473         * infrun.c (RESUME_ALL): Use minus_one_ptid.
3474         (clear_proceed_status): Clear step_stack_frame_id.
3475         (init_wait_for_inferior): Call clear_inline_frame_state.
3476         (init_execution_control_state): Make static.
3477         (set_step_info): New function.
3478         (init_thread_stepping_state): Do not set the symtab or line here.
3479         (stepped_in_from): New function.
3480         (handle_inferior_event): Handle inlined functions.  Use set_step_info.
3481         (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
3482         (struct inferior_status): Add step_stack_frame_id.
3483         (save_inferior_status, restore_inferior_status): Save and restore
3484         step_stack_frame_id.
3485         * inline-frame.c, inline-frame.h: New files.
3486         * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
3487         * regcache.c (regcache_write_pc): Call reinit_frame_cache.
3488         * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
3489         * stack.c (frame_show_address): New.
3490         (print_frame_info, print_frame): Use it.
3491         (find_frame_funname): Use get_frame_function.  Handle inlined blocks.
3492         (frame_info): Mark inlined functions.
3493         (backtrace_command_1): Use get_current_user_frame.
3494         (print_frame_local_vars, print_frame_label_vars): Update comments.
3495         (return_command): Refuse inlined functions.
3496         * symtab.c (lookup_symbol_aux_local): Stop at inlined function
3497         boundaries.
3498         (find_function_start_sal): Avoid inlined functions.
3499         (completion_list_add_fields): New function.
3500         (default_make_symbol_completion_list): Use it.  Use block_static_block
3501         and block_global_block.  Check for inlined functions.
3502         (skip_prologue_using_sal): Avoid line number comparison across
3503         inlining.
3504         * symtab.h (struct symbol): Add is_inlined.
3505         (SYMBOL_INLINED): New.
3506         * target.c (target_resume): Call clear_inline_frame_state.
3507         * valops.c (value_of_variable): Check block_inlined_p.
3508
3509 2009-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
3510
3511         * frame.c (frame_unwind_id): Renamed to ...
3512         (frame_unwind_caller_id): ... this.  All callers updated.
3513         (frame_pc_unwind): Renamed to ...
3514         (frame_unwind_caller_pc): ... this.  All callers updated.
3515         * frame.h: Document frame_unwind_caller_WHAT functions.
3516         (frame_unwind_id): Renamed to ...
3517         (frame_unwind_caller_id): ... this.
3518         (frame_pc_unwind): Renamed to ...
3519         (frame_unwind_caller_pc): ... this.
3520         * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
3521         * stack.c (parse_frame_specification_1): Do not rely on
3522         frame_unwind_id.
3523
3524 2009-06-27  Michael Snyder  <msnyder@vmware.com>
3525
3526         * infrun.c (handle_inferior_event): Improve handling of
3527         reverse-stepping into and over shared library functions.
3528
3529 2009-06-25  Karen Osmond  <karen.osmond@gmail.com>
3530
3531         * linespec.c (find_method): Add new not_found_ptr parameter to
3532         bring in line with symtab_from_filename, decode_variable.
3533         (decode_compound): Likewise.  Also propagate not_found_ptr to 
3534         find_method.
3535         (decode_line_1): Propagate not_found_ptr to decode_compound.
3536         (cplusplus_error): Now throws NOT_FOUND_ERROR.
3537
3538 2009-06-25  Karen Osmond  <karen.osmond@gmail.com>
3539
3540         * MAINTAINERS (Write After Approval): Add self.
3541
3542 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
3543
3544         * valops.c (value_one): Reimplement broken decimal-float case.
3545
3546 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
3547
3548         * eval.c (evaluate_subexp_standard): Use expression architecture
3549         instead of current_gdbarch.
3550
3551         * infrun.c (handle_inferior_event): Avoid unncessary reference
3552         to current_gdbarch and get_current_frame ().
3553
3554 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
3555
3556         * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
3557         (enum bptype): Add bp_longjmp_master.
3558
3559         * breakpoint.c (create_longjmp_master_breakpoint): New function.
3560         (update_breakpoints_after_exec): Handle bp_longjmp_master
3561         breakpoints.  Call create_longjmp_master_breakpoint.
3562         (print_it_typical, bpstat_stop_status, bpstat_what,
3563         print_one_breakpoint_location, allocate_bp_location, mention,
3564         delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
3565         (breakpoint_re_set): Call create_longjmp_master_breakpoint.
3566         (create_longjmp_breakpoint): Delete.
3567         (set_longjmp_breakpoint): Add THREAD argument.  Reimplement
3568         to install momentary clones of bp_longjmp_master breakpoints.
3569
3570         * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
3571
3572 2009-06-23  Cary Coutant  <ccoutant@google.com>
3573
3574         * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
3575         Set basic_block to 0 after a special opcode.
3576
3577 2009-06-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
3578
3579         Fix a regression by the mmap patch from 2009-06-16.
3580         * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
3581         calls before deleting the OBJFILE obstack.  Extend the comment.
3582
3583 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
3584
3585         * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
3586         (get_java_object_header_size): Add GDBARCH parameter.
3587         * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
3588         Use it instead of current_gdbarch.
3589         (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
3590         get_java_object_header_size.
3591         * jv-valprint.c (java_value_print): Likewise.
3592
3593 2009-06-23  Sami Wagiaalla  <swagiaal@redhat.com>
3594
3595         * dwarf2read.c (process_die): Handle import statements
3596         (DW_TAG_imported_declaration, case DW_TAG_imported_module)
3597         (read_import_statement): New.
3598         (read_func_scope): Update using_directives to point to current context
3599         (read_lexical_block_scope): Ditto.
3600         * cp-support.h: Added prototype for cp_add_using.
3601         * cp-namespace.c: Removed local context_stack.
3602         (cp_initialize_namespace): Deleted.
3603         (cp_finalize_namespace): Deleted.
3604         (cp_add_using_directive): Use using_directives instead of using_list.
3605         (cp_add_using): No longer static.
3606         * buildsym.h: Created global using_direct variable.
3607         Created using_direct variable in context_stack.
3608         * buildsym.c (finish_block): Set using directives for the block under
3609         construction.
3610         (start_symtab): Removed call to cp_initialize_namespace().
3611         (end_symtab): Removed call to cp_finalize_namespace().
3612         (push_context): Save and reset using_directives.
3613         * block.c (block_using): Return using directives for given
3614         block instead of static block.
3615
3616 2009-06-23  Ulrich Weigand  <uweigand@de.ibm.com>
3617
3618         * target-descriptions.h (struct type): Do not declare.
3619         (struct tdesc_type): Declare.
3620         (tdesc_named_type): Change return type to struct tdesc_type *.
3621         (tdesc_record_type): Remove.
3622         (tdesc_create_vector): Add prototype.
3623         (tdesc_create_union): Likewise.
3624         (tdesc_add_field): Likewise.
3625
3626         * target-descriptions.c (struct tdesc_reg): Replace gdb_type
3627         member by tdesc_type member.
3628         (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
3629         (struct tdesc_type, tdesc_type_p): Likewise.
3630         (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
3631         (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
3632         (struct tdesc_arch_data): Replace registers member by arch_regs.
3633
3634         (tdesc_predefined_types): Change to array of pre-defined
3635         struct tdesc_type structures.  Add "code_ptr" and "data_ptr".
3636         (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
3637         (tdesc_gdb_type): New function.
3638
3639         (target_find_description): Update for data structure changes.
3640         (tdesc_data_cleanup): Likewise.
3641         (tdesc_numbered_register): Likewise.
3642         (tdesc_use_registers): Likewise.
3643         (tdesc_create_reg): Likewise.
3644         
3645         (tdesc_find_arch_register): New function.
3646         (tdesc_find_register): Use it.
3647         (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
3648         tdesc_type on demand; cache generated types in tdesc_arch_reg.
3649
3650         (tdesc_free_type): New function.
3651         (tdesc_free_feature): Call it.
3652
3653         (tdesc_create_vector): New function.
3654         (tdesc_create_union): Likewise.
3655         (tdesc_add_field): Likewise.
3656         (tdesc_record_type): Remove.
3657
3658         (tdesc_type_id): Remove.
3659         (maint_print_c_tdesc_cmd): Update for data structure changes.  Update
3660         generated code to create tdesc_type structures instead of GDB types.
3661
3662         * xml-tdesc.c: Do not include "gdbtypes.h".
3663         (struct tdesc_parsing_data): Change type of current_union to
3664         struct tdesc_type *.
3665         (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
3666         (tdesc_start_union): Call tdesc_create_union.
3667         (tdesc_start_field): Call tdesc_add_field.
3668         (tdesc_start_vector): Call tdesc_create_vector.
3669         (tdesc_end_union): Remove.
3670         (feature_children): Remove reference to tdesc_end_union.
3671
3672         * features/arm-with-iwmmxt.c: Regenerate.
3673         * features/mips-linux.c: Regenerate.
3674         * features/mips64-linux.c: Regenerate.
3675         * features/rs6000/powerpc-32.c: Regenerate.
3676         * features/rs6000/powerpc-32l.c: Regenerate.
3677         * features/rs6000/powerpc-403.c: Regenerate.
3678         * features/rs6000/powerpc-403gc.c: Regenerate.
3679         * features/rs6000/powerpc-505.c: Regenerate.
3680         * features/rs6000/powerpc-601.c: Regenerate.
3681         * features/rs6000/powerpc-602.c: Regenerate.
3682         * features/rs6000/powerpc-603.c: Regenerate.
3683         * features/rs6000/powerpc-604.c: Regenerate.
3684         * features/rs6000/powerpc-64.c: Regenerate.
3685         * features/rs6000/powerpc-64l.c: Regenerate.
3686         * features/rs6000/powerpc-7400.c: Regenerate.
3687         * features/rs6000/powerpc-750.c: Regenerate.
3688         * features/rs6000/powerpc-860.c: Regenerate.
3689         * features/rs6000/powerpc-altivec32.c: Regenerate.
3690         * features/rs6000/powerpc-altivec32l.c: Regenerate.
3691         * features/rs6000/powerpc-altivec64.c: Regenerate.
3692         * features/rs6000/powerpc-altivec64l.c: Regenerate.
3693         * features/rs6000/powerpc-e500.c: Regenerate.
3694         * features/rs6000/powerpc-e500l.c: Regenerate.
3695         * features/rs6000/powerpc-isa205-32l.c: Regenerate.
3696         * features/rs6000/powerpc-isa205-64l.c: Regenerate.
3697         * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
3698         * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
3699         * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
3700         * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
3701         * features/rs6000/powerpc-vsx32.c: Regenerate.
3702         * features/rs6000/powerpc-vsx32l.c: Regenerate.
3703         * features/rs6000/powerpc-vsx64.c: Regenerate.
3704         * features/rs6000/powerpc-vsx64l.c: Regenerate.
3705         * features/rs6000/rs6000.c: Regenerate.
3706
3707 2009-06-23  Joel Brobecker  <brobecker@adacore.com>
3708
3709         * ada-lang.c (decode_packed_array): If the value is a pointer to
3710         an array, then use value_ind to dereference it, not ada_value_ind.
3711         (ada_template_to_fixed_record_type_1): Handle the case where a
3712         dynamic field is an aligner type.
3713         (to_fixed_array_type): Add handling for packed array types.
3714         (ada_get_base_type): Do not follow the XVS type if the type is
3715         an aligner type.
3716         (ada_evaluate_subexp): Split a few statements up for clarity
3717         and debuggability.
3718         <OP_FUNCALL>: Add handling of the case of a packed array that
3719         has already been fixed.
3720
3721 2009-06-23  Joel Brobecker  <brobecker@adacore.com>
3722
3723         * ada-lang.c (evaluate_subexp): Delete.  Use the version from eval.c.
3724         (evaluate_subexp_type): Reimplement using evaluate_subexp.
3725         * value.h (evaluate_subexp): Add declaration.
3726         * eval.c (evaluate_subexp): Make non-static.
3727         * objc-lang.c (print_object_command): Use evaluate_subexp.
3728
3729 2009-06-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
3730
3731         Revert 2009-05-14 breakpoint commit (no longer needed).
3732         * breakpoint.h (breakpoint_re_set_objfile): Remove
3733         * breakpoint.c (breakpoint_re_set_objfile): Likewise
3734         (create_overlay_event_breakpoint): Remove objfile parameter,
3735         iterate over all objfiles.
3736         * objfiles.c (objfile_relocate): Update.
3737         * symfile.c (new_symfile_objfile): Likewise.    
3738         
3739 2009-06-23  Tom Tromey  <tromey@redhat.com>
3740
3741         PR gdb/10309:
3742         * c-lang.c (classify_type): Iterate over typedefs.
3743         * c-valprint.c (textual_element_type): Iterate over typedefs.
3744
3745 2009-06-22  Tristan Gingold  <gingold@adacore.com>
3746
3747         * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
3748         instead of "%p".
3749
3750 2009-06-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
3751
3752         PR gdb/9988:
3753         * buildsym.c (block_compar): New function.
3754         (end_symtab): Replace the bubble sort by a qsort based code.
3755
3756 2009-06-22  Sami Wagiaalla  <swagiaal@redhat.com>
3757
3758         * MAINTAINERS (Write After Approval): Add self.
3759
3760 2009-06-22  Ulrich Weigand  <uweigand@de.ibm.com>
3761
3762         * spu-tdep.c (spu_get_longjmp_target): New function.
3763         (spu_gdbarch_init): Install it.
3764
3765 2009-06-22  H.J. Lu  <hongjiu.lu@intel.com>
3766
3767         PR server/10306
3768         * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
3769
3770 2009-06-21  Michael Snyder  <msnyder@vmware.com>
3771
3772         * inferior.h: Update ancient comment.
3773
3774 2009-06-20  Aleksandar Ristovski  <aristovski@qnx.com>
3775             Pedro Alves  <pedro@codesourcery.com>
3776
3777         * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
3778         NULL pointer.
3779         (scan_dyntag): Skip if input bfd isn't elf flavoured.
3780         (locate_base): Call elf_locate_base even without an exec_bfd.
3781
3782 2009-06-19  Samuel Bronson  <naesten@gmail.com>
3783
3784         PR cli/9903:
3785         * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
3786         for prefix commands to avoid duplicates in the output.
3787
3788 2009-06-19  Samuel Bronson  <naesten@gmail.com>
3789
3790         PR cli/9903:
3791         * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
3792         printing.
3793
3794 2009-06-19  Jerome Guitton  <guitton@adacore.com>
3795
3796         * breakpoint.c (expand_line_sal_maybe): When explicit_line,
3797         skip prologue on each sals.
3798         (skip_prologue_sal): Return explicit_line and explicit_pc
3799         unmodified.
3800
3801 2009-06-19  Tristan Gingold  <gingold@adacore.com>
3802
3803         * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
3804         line.
3805
3806 2009-06-19  Tristan Gingold  <gingold@adacore.com>
3807         * machoread.c (macho_symtab_read): Adjust for bfd changes.
3808         * darwin-nat.h (struct darwin_exception_msg): New type to describe
3809         a mach exception.
3810         (struct private_thread_info): New type to describe the state of the
3811         thread.
3812         (DEF_VEC_I thread_t): Removed, replaced by ...
3813         (DEF_VEC_O darwin_thread_t): ... this new type.
3814         (struct darwin_inferior): Renamed to ...
3815         (struct private_inferior): ... this type.  Fields added.
3816         (darwin_not_port): Moved into the private inferior structure.
3817         * darwin-nat.c: Add includes, improve comments.
3818         Rewrite to handle multiple threads and processes.
3819         (darwin_resume_to): New function and protype.
3820         (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
3821         (darwin_kill_inferior): Add ops argument.
3822         (darwin_pid_to_str): New function.
3823         (darwin_thread_alive): Ditto.
3824         (darwin_inf, darwin_not_port): Removed.
3825         (darwin_inf_fake_stop): New variable.
3826         (msgin, msgout, msg_state, exc_msg): Removed.
3827         (mach_check_error): Use warning instead of error.
3828         (darwin_ptrace): Adjust debug level.
3829         (cmp_thread_t): Fix names (typo).
3830         (darwin_check_new_threads): Argument is now an inferior,
3831         adjust for new structures, add no change check, ignore dead ports,
3832         handle first thread case.
3833         (find_inferior_task_it): New function.
3834         (find_inferior_notify_it): Ditto.
3835         (darwin_find_inferior_by_task): Ditto.
3836         (darwin_find_inferior_by_notify): Ditto.
3837         (darwin_find_thread): Ditto.
3838         (darwin_suspend_inferior): Ditto.
3839         (darwin_resume_inferior): Ditto.
3840         (catch_exception_raise_state): Removed.
3841         (catch_exception_raise_state_identity): Removed.
3842         (darwin_suspend_inferior_it): New function.
3843         (darwin_resume_inferior_it): Ditto.
3844         (darwin_dump_message): New function, extracted from darwin_wait.
3845         (darwin_decode_exception_message): New function.
3846         (darwin_encode_reply): New function.
3847         (catch_exception_raise): Removed.
3848         (darwin_send_reply): New function, extracted from darwin_resume.
3849         (darwin_resume_thread): New function, extracted from darwin_resume.
3850         (struct resume_inferior_threads_param): New type.
3851         (darwin_resume_inferior_threads_it): New function.
3852         (darwin_resume_inferior_threads): New function.
3853         (darwin_suspend_inferior_threads): New function.
3854         (darwin_resume): Mostly rewritten to handle multiple threads and
3855         some corner cases.
3856         (darwin_decode_message): New function extracted from darwin_wait.
3857         (cancel_breakpoint): New function.
3858         (darwin_wait): Mostly rewritten.  Handle multiple threads.
3859         (darwin_mourn_inferior): Adjust for per process structures.
3860         (darwin_reply_to_all_pending_messages): New function.
3861         (darwin_stop_inferior): Adjust for per inferior structures.
3862         (darwin_attach_pid): Ditto.
3863         (darwin_init_thread_list): Ditto.
3864         (darwin_attach): Ditto.
3865         (darwin_detach): Ditto.
3866         (darwin_files_info): Now empty.
3867         (darwin_pid_to_str): Adjust returns string to match one expected by
3868         the testsuite.
3869         (darwin_read_write_inferior): Rename err variable to match other uses.
3870         Adjust debug message.  Handle submaps.
3871         (darwin_xfer_memory): Adjust for per inferior structures.
3872         (set_enable_mach_exceptions): Ditto.
3873         (darwin_pid_to_exec_file): New function.
3874         (darwin_get_ada_task_ptid): Ditto.
3875         (darwin_supports_multi_process): Ditto.
3876         (_initialize_darwin_inferior): Remove useless assertion, adjust for
3877         per inferior structures.  Add new target operations.
3878
3879 2009-06-18  Hui Zhu  <teawater@gmail.com>
3880             Michael Snyder  <msnyder@vmware.com>
3881
3882         * infrun.c (handle_inferior_event): Improve reverse stepping
3883         through function epilogue.
3884
3885         * infrun.c (handle_inferior_event): Reverse-next through
3886         trampoline.
3887
3888 2009-06-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
3889
3890         * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
3891         dwarf_frame_size.
3892
3893 2009-06-17  Tom Tromey  <tromey@redhat.com>
3894
3895         * dwarf2read.c (zlib_decompress_section): Use a cleanup.
3896
3897 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
3898
3899         * gdbarch.sh (pointer_to_address): Change to type 'm'.
3900         (address_to_pointer): Likewise.
3901         * gdbarch.c, gdbarch.h: Regenerate.
3902
3903         * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
3904         (signed_pointer_to_address): Likewise.
3905         (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3906         * findvar.c (unsigned_pointer_to_address): Likewise.
3907         (signed_pointer_to_address): Likewise.
3908         (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
3909
3910         * avr-tdep.c (avr_address_to_pointer): Likewise.
3911         (avr_pointer_to_address): Likewise.
3912         * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
3913         (iq2000_address_to_pointer): Likewise.
3914         * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
3915         (m32c_m16c_pointer_to_address): Likewise.
3916         * spu-tdep.c (spu_pointer_to_address): Likewise.
3917         * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
3918         (xstormy16_address_to_pointer): Likewise.
3919
3920 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
3921
3922         * printcmd.c (print_scalar_formatted): Always truncate
3923         unsigned data types.
3924
3925         * cli-dump.c (struct callback_data): Change type of load_offset
3926         to CORE_ADDR.
3927         (restore_binary_file): Update type casts.
3928         (restore_command): Parse load_offset as address, not long.
3929
3930         * utils.c (string_to_core_addr): Do not sign-extend value.
3931         * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
3932         before comparing against requested frame address.
3933
3934 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
3935
3936         * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
3937         * gdbarch.h, gdbarch.c: Regenerate.
3938
3939         * gcore.c (default_gcore_target): Make return value const.
3940         Call gdbarch_gcore_bfd_target if present.
3941         (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
3942
3943         * corelow.c (core_read_description): Call gdbarch_core_read_description
3944         on core_gdbarch instead of current_gdbarch.
3945
3946         * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
3947
3948 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
3949
3950         * gdbtypes.c (create_string_type): Receive character type as argument.
3951         * gdbtypes.h (create_string_type): Add character type argument.
3952         * dwarf2read.c (read_tag_string_type): Pass character type to
3953         create_string_type.
3954
3955         * value.h (value_string): Add character type argument.
3956         * valops.c (value_string): Add character type argument.  Pass it to
3957         create_string_type.  Do not allocate space in inferior.
3958         * valarith.c (value_concat): Pass character type to value_string.
3959
3960         * value.h (value_typed_string): Rename to ...
3961         (value_cstring): ... this.
3962         * valops.c (value_typed_string): Rename to ...
3963         (value_cstring): ... this.
3964         * c-lang.c (evaluate_subexp_c): Update.
3965
3966         * python/python-value.c (builtin_type_pychar): New define.
3967         (convert_value_from_python): Call value_cstring instead
3968         of value_from_string.
3969         * value.c (value_from_string): Remove.
3970         * value.h (value_from_string): Remove.
3971
3972         * eval.c (evaluate_subexp_standard): Pass character type to
3973         value_string.  Pass expression architecture to value_nsstring
3974         and lookup_child_selector.
3975         * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
3976         (lookup_child_selector): Likewise.
3977         (value_nsstring): Likewise.
3978         * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
3979         Pass character type to value_string..
3980         (lookup_child_selector): Likewise.
3981         (value_nsstring): Add GDBARCH parameter, use it instead of
3982         objfile architecture.  Pass architecture to lookup_objc_class
3983         and lookup_child_selector. Pass character type to value_string.
3984         (end_msglist): Pass architecture to lookup_objc_class.
3985         * objc-exp.y: Pass architecture to lookup_objc_class.
3986
3987 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
3988
3989         * gdbtypes.h (struct language_defn): Add forward declaration.
3990         (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3991         (lookup_unsigned_typename): Likewise.
3992         (lookup_signed_typename): Likewise.
3993         * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
3994         Use them instead of current_language and current_gdbarch.
3995         (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
3996         Pass them to lookup_typename.
3997         (lookup_signed_typename): Likewise.
3998
3999         * c-exp.y: Pass parse_language and parse_gdbarch to
4000         lookup_unsigned_typename and lookup_signed_typename.
4001         * objc-exp.y: Likewise.
4002         * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
4003
4004         * c-lang.c (evaluate_subexp_c): Pass expression language and
4005         gdbarch to lookup_typename.
4006         * printcmd.c (printf_command): Pass current language and
4007         gdbarch to lookup_typename.
4008         * python/python-type.c (typy_lookup_typename): Likewise.
4009         Include "language.h".
4010
4011 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4012
4013         * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
4014         Use it instead of current_gdbarch.  Pass architecture to
4015         sparc32_gregset_supplies_p.
4016         (sparc64_fpregset_supplies_p): Add GDBARCH parameter.  Use it instead
4017         of current_gdbarch.  Pass architecture to sparc32_fpregset_supplies_p.
4018         * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
4019         sparc64nbsd_fpregset_supplies_p): Likewise.
4020         * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
4021         Add GDBARCH parameter.
4022         (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
4023         (sparc_fetch_inferior_registers): Pass regcache architecture to
4024         sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
4025         (sparc_store_inferior_registers): Likewise.
4026         * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
4027         Add GDBARCH parameter.
4028         (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
4029
4030 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4031
4032         * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
4033         of current_gdbarch.
4034         * aix-thread.c (pd_enable): Likewise.
4035         * amd64-linux-nat.c (ps_get_thread_area): Likewise.
4036         * bsd-uthread.c (bsd_uthread_activate): Likewise.
4037         * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
4038         * linux-thread-db.c (enable_thread_event): Likewise.
4039         * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
4040         * nto-procfs.c (procfs_open): Likewise.
4041         * procfs.c (invalidate_cache, procfs_insert_watchpoint,
4042         info_proc_mappings, info_mappings_callback): Likewise.
4043         * record.c (record_open): Likewise.
4044         * rs6000-nat.c (ARCH64): Likewise.
4045         * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
4046         (darwin_bfd_open): Likewise.
4047         * memattr.c (mem_info_command): Likewise.
4048
4049         * windows-nat.c (win32_resume): Use current regcache architecture
4050         instead of current_gdbarch.
4051
4052         * dbug-rom.c (dbug_regname): Remove check against number of
4053         registers in current_gdbarch.
4054         * solib-pa64.c (read_dynamic_info): Remove unused variable.
4055
4056 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4057
4058         * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
4059         use it instead of current_gdbarch.
4060         * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
4061         * arm-tdep.c (arm_skip_prologue): Pass architecture to
4062         deprecated_pc_in_call_dummy.
4063
4064         * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
4065         Use it instead of current_gdbarch.
4066         * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
4067         * breakpoint.c (expand_line_sal_maybe): Pass architecture to
4068         skip_prologue_using_sal.
4069         * arm-tdep.c (skip_prologue_using_sal): Likewise.
4070         * lm32-tdep.c (lm32_skip_prologue): Likewise.
4071         * m32-tdep.c (m32c_skip_prologue): Likewise.
4072         * mips-tdep.c (mips_skip_prologue): Likewise.
4073         * moxie-tdep.c (moxie_skip_prologue): Likewise.
4074         * mt-tdep.c (mt_frame_unwind_cache): Likewise.
4075         * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
4076         * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
4077         it to skip_prologue_using_sal.  Update call sites ...
4078         (frv_skip_prologue, frv_frame_unwind_cache): ... here.
4079
4080         * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
4081         (check_for_saved): Use it instead of current_gdbarch.
4082         (mn10300_analyze_prologue): Set it.
4083
4084         * value.c (using_struct_return): Add GDBARCH parameter.  Use it
4085         instead of current_gdbarch.
4086         * value.h (using_struct_return): Add GDBARCH parameter.
4087         * eval.c (evaluate_subexp_standard): Pass architecture to
4088         using_struct_return.
4089         * infcall.c (call_function_by_hand): Likewise.
4090         * stack.c (return_command): Likewise.
4091         * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
4092
4093         * symtab.c (in_prologue): Add GDBARCH parameter.  Use it instead of
4094         current_gdbarch.
4095         * symtab.h (in_prologue): Add GDBARCH parameter.
4096         * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
4097
4098         * eval.c (evaluate_subexp_standard): Use expression architecture
4099         instead of current_gdbarch.
4100
4101         * c-lang.c (evaluate_subexp_c): Use expression architecture and
4102         language instead of current_gdbarch and current_language.
4103
4104         * printcmd.c (do_one_display): Use expression architecture instead
4105         of current_gdbarch.
4106
4107         * infcmd.c (print_return_value): Use architecture of stop_regcache
4108         instead of current_gdbarch.
4109         (print_vector_info, print_float_info): Remove GDBARCH argument,
4110         use frame architecture instead.
4111         (vector_info, float_info): Update calls.
4112
4113         * objc-lang.c (objc_skip_trampoline): Use frame architecture
4114         instead of current_gdbarch.
4115
4116         * parse.c (write_dollar_variable): Use parse architecture instead
4117         of current_gdbarch.
4118
4119         * source.c (line_info): Use objfile architecture instead of
4120         current_gdbarch.
4121
4122         * symtab.c (find_function_start_sal): Use gdbarch instead of
4123         current_gdbarch.
4124         (print_msymbol_info): Use objfile architecture instead of
4125         current_gdbarch.
4126
4127         * valops.c (value_assign): Use frame architecture instead of
4128         current_gdbarch.
4129
4130 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4131
4132         * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
4133
4134         * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
4135         calling record_line.
4136         (enter_linenos): Likewise.
4137         * dbxread.c (process_one_symbol): Likewise.
4138         * dwarf2read.c (dwarf_decode_lines): Likewise.
4139         * mdebugread.c (psymtab_to_symtab_1): Likewise.
4140         * xcoffread.c (enter_line_range): Likewise.
4141
4142 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4143
4144         * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
4145         architecture instead of current_gdbarch.
4146         (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
4147         (gen_expr): Pass expression to get_struct_ref.
4148
4149         * symtab.h (struct symbol_ops): Add GDBARCH parameter to
4150         tracepoint_var_ref callback.
4151         * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
4152         symbol operation callback.
4153         * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
4154         Use it instead of current_gdbarch.
4155         (locexpr_tracepoint_var_ref): Add GDBARCH parameter.  Pass it to
4156         dwarf2_tracepoint_var_ref.
4157         (loclist_tracepoint_var_ref): Likewise.
4158
4159 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4160
4161         * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
4162         Use it instead of address bits of current_gdbarch.
4163         * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
4164         * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
4165         make_pv_area.
4166         (arm_scan_prologue): Likewise.
4167         * m32c-tdep.c (m32c_analyze_prologue): Likewise.
4168         * mep-tdep.c (mep_analyze_prologue): Likewise.
4169         * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
4170         * s390-tdep.c (s390_analyze_prologue): Likewise.
4171
4172 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4173
4174         * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
4175         frame architecture instead of current_gdbarch.
4176         (mi_cmd_data_list_changed_registers): Likewise.
4177         (mi_cmd_data_list_register_values): Likewise.  Pass selected
4178         frame to get_register.
4179         (get_register): Add FRAME argument, use it as frame to retrieve
4180         registers from (instead of selected frame).  Use frame architecture
4181         instead of current_gdbarch.
4182         (mi_cmd_data_write_register_values): Use current regcache
4183         architecture instead of current_gdbarch.
4184
4185 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4186
4187         * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
4188         use frame architecture instead.  Replace current_gdbarch uses.
4189         (tui_show_registers): Update call.
4190         (tui_get_register): Remove GDBARCH parameter; use frame architecture
4191         instead.
4192         (tui_show_register_group): Update call.
4193         (tui_check_register_values): Likewise.
4194         (tui_register_format): Remove GDBARCH parameter; use frame
4195         architecture instead.  Replace current_gdbarch uses.
4196         (tui_get_register): Update call.
4197
4198 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4199
4200         * gdbarch.sh (construct_inferior_arguments): Remove.
4201         * gdbarch.c, gdbarch.h: Regenerate.
4202         * infcmd.c (get_inferior_args): Call construct_inferior_arguments
4203         directly instead of gdbarch_construct_inferior_arguments.
4204         (construct_inferior_arguments): Remove GDBARCH argument.
4205         * inferior.h (construct_inferior_arguments): Likewise.
4206
4207 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4208
4209         * symfile.c (section_is_mapped): Use objfile architecture instead
4210         of current_gdbarch.
4211         (TARGET_LONG_BYTES): Remove.
4212         (read_target_long_array): Add SIZE argument.  Use it instead of
4213         TARGET_LONG_BYTES.
4214         (simple_read_overlay_table): Retrieve long size from objfile
4215         architecture; pass it to read_target_long_array.
4216         (simple_read_overlay_region_table): Likewise.
4217         (simple_overlay_update_1): Likewise.
4218
4219 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4220
4221         * infrun.c (cleanup_displaced_step_closure): Remove.
4222         (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
4223         (displaced_step_prepare): Use displaced_step_clear_cleanup instead
4224         of cleanup_displaced_step_closure.
4225         (handle_inferior_event, keep_going): Use thread architecture instead
4226         of current_gdbarch.
4227
4228 2009-06-17  Ulrich Weigand  <uweigand@de.ibm.com>
4229
4230         * infrun.c (handle_inferior_event): Use current frame architecture
4231         or thread architecture instead of current_gdbarch.  Pass to
4232         handle_step_into_function and handle_step_into_function_backward.
4233         (handle_step_into_function): Add GDBARCH parameter.  Use it instead
4234         of current_gdbarch.
4235         (handle_step_into_function_backward): Likewise.
4236         (insert_step_resume_breakpoint_at_frame): Use frame architecture
4237         instead of current_gdbarch.
4238         (insert_step_resume_breakpoint_at_caller): Likewise.
4239
4240 2009-06-17  Pierre Muller  <muller@ics.u-strasbg.fr>
4241         Pedro Alves  <pedro@codesourcery.com>
4242         
4243         * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
4244         is pushed for watchpoint promotion to hardware watchpoint.
4245
4246 2009-06-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
4247
4248         * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
4249         (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
4250         (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
4251         (dwarf_ranges_section, dwarf_frame_section)
4252         (dwarf_eh_frame_section): Removed.
4253         (dwarf2_resize_section): Likewise.
4254         (dwarf2_read_section): Now static, use bfd_mmap() if possible.
4255         (dwarf2_get_section_info): New function.
4256         (munmap_section_buffer): Likewise.
4257         (dwarf2_per_objfile_cleanup): Likewise.
4258         (section_is_p): Signature change.
4259         * dwarf2-frame.c (dwarf2_build_frame_info): Use
4260         dwarf2_get_section_info instead of dwarf2_read_section.
4261         
4262 2009-06-16  Paul Pluzhnikov  <ppluzhnikov@google.com>
4263
4264         * solib.c (symbol_add_stub): New FLAGS parameter.
4265         (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
4266         directly.
4267         (solib_add): Defer breakpoint_re_set until after all solibs.
4268         * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
4269         * rs6000-nat.c (objfile_symbol_add): Adjust.
4270         * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
4271         (new_symfile_objfile): Likewise.
4272         (symbol_file_add_with_addrs_or_offsets): Likewise.
4273         (symbol_file_add_from_bfd): Likewise.
4274         (symbol_file_add): Likewise.
4275         * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
4276         * symfile-mem.c (symbol_file_add_from_memory): Adjust.
4277         * windows-nat.c (safe_symbol_file_add_stub): Adjust.
4278         * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
4279         
4280 2009-06-16  Keith Seitz  <keiths@redhat.com>
4281
4282         * linespec.c (collect_methods): Delete.
4283         (add_matching_methods): Reove destructor special case.
4284         (find_method): Call find_methods directly instead of
4285         collect_methods.
4286         * valops.c (value_struct_elt): Remove destructor
4287         special cases.
4288         (check_field): Likewise.
4289         (value_struct_elt_for_reference): Likewise.
4290         (destructor_name_p): Remove misleading comment about dtors
4291         being "special cases". 
4292         * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
4293         * gdbtypes.c (get_destructor_fn_field): Likewise. 
4294
4295 2009-06-16  Pedro Alves  <pedro@codesourcery.com>
4296
4297         * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
4298         TARGET_OJECT_MEMORY reads to the topmost target, not to the
4299         flattened current_target.
4300
4301 2009-06-16  Tristan Gingold  <gingold@adacore.com>
4302
4303         * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
4304         call_length field.
4305         (avr_register_name): Add const to register_names.
4306         (avr_scan_arg_moves): Move inside avr_scan_prologue.
4307         (avr_scan_prologue): Add pc_end argument.
4308         Only read prologue bytes that can be read.
4309         Limit the scan to the known prologue length.
4310         Makes pattern variables static and const.
4311         Fix indentation.
4312         (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
4313         Fix indentation.
4314         (avr_breakpoint_from_pc): Constify avr_break_insn.
4315         (avr_extract_return_value): Fix function comment.
4316         (avr_frame_unwind_cache): Fix GNU style violations.
4317         Pass current_pc argument to avr_scan_prologue to stop prologue
4318         analysis to the current pc.  This fixes the bug with the 'next'
4319         command.
4320         Correctly set the SP register of the previous frame (use call_length).
4321         (avr_frame_prev_register): Fix indentation.
4322         Correctly read PC from the stack on avr6 architectures.
4323         (avr_push_dummy_call): Fix indentation.
4324         (avr_gdbarch_init): Set call_length according to the architecture.
4325
4326 2009-06-15  Phil Muldoon  <pmuldoon@redhat.com>
4327
4328         * infcall.c (show_unwind_on_terminating_exception_p): New
4329         function.
4330         (call_function_by_hand): Create breakpoint and clean-up call for
4331         std::terminate.breakpoint. Add unwind_on_terminating_exception_p
4332         gate. Pop frame on breakpoint hit.
4333         (_initialize_infcall): Add add_setshow_boolean_cmd for
4334         unwind-on-terminating-exception.
4335
4336 2009-06-12  Kevin Buettner  <kevinb@redhat.com>
4337
4338         * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
4339         `has_section_at_zero' flag from stripped objfile to separate,
4340         debug info only, objfile.
4341
4342 2009-06-12  Pedro Alves  <pedro@codesourcery.com>
4343
4344         * exec.h (section_table_xfer_memory_partial): Improve description,
4345         mention SECTION_NAME.
4346         * exec.c (section_table_xfer_memory_partial): Remove stale
4347         description.
4348
4349 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
4350
4351         * nto-tdep.h (nto_generic_supply_gpregset)
4352         (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
4353         * nto-tdep.c (nto_generic_supply_gpregset)
4354         (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
4355
4356 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
4357
4358         * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
4359         (i386nto_sigcontext_addr): Change the way context address is calculated.
4360         (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
4361         sc_sp_offset and set sc_reg_offset and sc_num_regs.
4362
4363 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
4364
4365         * i386-nto-tdep.c (i386_nto_target): Remove definition.
4366         (init_i386nto_ops): Use macros to set fields to global
4367         current_nto_target directly.
4368         (i386nto_init_abi): Remove unused nto_set_target call.
4369         * nto-tdep.h (nto_set_target): Remove unused declaration.
4370         * nto-tdep.c (nto_set_target): Remove unused function.
4371
4372 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
4373
4374         * breakpoint.c (break_command_really): Rename local variable
4375         breakpoint_chain to bkpt_chain.
4376
4377 2009-06-11  Aleksandar Ristovski  <aristovski@qnx.com>
4378
4379         Add support for XMM registers.
4380         * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
4381         (i386nto_register_area): Correctly calculate offsets and sizes for
4382         all supported registers.
4383
4384 2009-06-11  Tom Tromey  <tromey@redhat.com>
4385
4386         * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
4387         'static' from local variable definitions.
4388
4389 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
4390
4391         * symtab.c (append_expanded_sal): Remove unused local variables.
4392
4393 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
4394
4395         * infrun.c (sched_multi): New global.
4396         (resume): If sched_multi is set, resume only threads of the
4397         current inferior.
4398         (prepare_to_proceed): Don't switch over to wait_ptid if we're
4399         resuming a different inferior, and sched_multi is off.
4400         (show_schedule_multiple): New.
4401         (_initialize_infrun): Register new "set schedule-multiple" command.
4402         * inferior.h (sched_multi): Declare.
4403         * NEWS: Mention new "schedule-multiple" setting.
4404
4405 2009-06-11  Pedro Alves  <pedro@codesourcery.com>
4406
4407         * varobj.c (varobj_create): Properly restore the selected frame.
4408
4409 2009-06-05  Tom Tromey  <tromey@redhat.com>
4410
4411         * inferior.c (print_inferior): Make a table, not a list.  Emit
4412         table headers.
4413
4414 2009-06-10  Jonas Maebe  <jonas.maebe@elis.ugent.be>
4415
4416         * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
4417         darwin_wait (blocking wait).
4418         (darwin_kill_inferior): Likewise.
4419
4420 2009-06-10  Pedro Alves  <pedro@codesourcery.com>
4421
4422         * infrun.c (handle_inferior_event): Update comment around trying
4423         to revert back to a stepping thread that has exited.
4424
4425 2009-06-10  Cary Coutant  <ccoutant@google.com>
4426
4427         * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
4428         DW_LNE_set_discriminator.
4429
4430 2009-06-10  Pierre Muller  <muller@ics.u-strasbg.fr>
4431
4432         * breakpoint.c: ARI fixes.
4433         (create_overlay_event_breakpoint): Avoid assignment inside if statement.
4434         (print_one_breakpoint_location): Likewise.
4435         (create_longjmp_breakpoint): Likewise.
4436         (tracepoint_save_command): Likewise
4437         (bpstat_find_step_resume_breakpoint): No operator at end of line.
4438         (bpstat_stop_status): Likewise.
4439         (describe_other_breakpoints): Likewise.
4440         (hw_watchpoint_used_count): Likewise.
4441         (expand_line_sal_maybe): Likewise.
4442         (break_command_really): Likewise.
4443         (delete_command): Likewise.
4444         (do_enable_breakpoint): Likewise.
4445         (delete_trace_command): Likewise.
4446         (catch_exception_command_1): Likewise and remove extra parentheses.
4447
4448 2009-06-08  Pierre Muller  <muller@ics.u-strasbg.fr>
4449
4450         * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
4451         "ubreak" command that does not exist.
4452
4453 2009-06-08  Pierre Muller  <muller@ics.u-strasbg.fr>
4454
4455         * cli/cli-decode.c (add_alias_cmd): Correct assertion.
4456
4457 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
4458
4459         * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
4460
4461 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
4462
4463         * procfs.h: New.
4464         * proc-utils.h (procfs_first_available): Don't declare here.
4465         * sol-thread.c: Include procfs.h instead of sys/procfs.h and
4466         proc-utils.h.
4467         * procfs.c: Include procfs.h.
4468         (procfs_target): Make it public.  Don't register
4469         procfs_can_use_hw_breakpoint here.
4470         (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
4471         defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
4472         (procfs_can_use_hw_breakpoint): Remove check of
4473         TARGET_HAS_HARDWARE_WATCHPOINTS.
4474         (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
4475         here.
4476         (_initialize_procfs): Don't add the procfs target here.
4477
4478         * i386-sol2-nat.c: Include target.h and procfs.h.
4479         (_initialize_amd64_sol2_nat): Install the procfs target here,
4480         customized with watchpoints support.
4481         * irix5-nat.c: Include target.h.
4482         (_initialize_core_irix5): Rename to ...
4483         (_initialize_irix5_nat): ... this.  Install the procfs target
4484         here, customized with watchpoints support.
4485         * alpha-nat.c: Include procfs.h.
4486         (_initialize_core_alpha): Rename to...
4487         (_initialize_alpha_nat): ... this.  Install the procfs target
4488         here, customized with watchpoints support.
4489         * sparc-sol2-nat.c: Include target.h and procfs.h.
4490         (_initialize_sparc_sol2_nat): New.
4491
4492         * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
4493         * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
4494         * config/mips/irix5.mh (NAT_FILE): Delete.
4495         * config/mips/irix6.mh (NAT_FILE): Delete.
4496         * config/mips/nm-irix5.h: Delete.
4497
4498 20009-06-07  Pedro  Alves  <pedro@codesourcery.com>
4499
4500         * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
4501         to enum target_object.  Cleanup comments.
4502         * auxv.h: Include "target.h".  Cleanup comments to not mention
4503         NATIVE_XFER_AUXV anymore.
4504
4505 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
4506
4507         * inferior.h (procfs_first_available): Move declaration to...
4508         * proc-utils.h: ... here.
4509         * sol-thread.c: Include procfs.h and proc-utils.h.
4510
4511 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
4512
4513         * inferior.h (proc_iterate_over_mappings): Delete declaration.
4514         * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
4515         * procfs.c (proc_iterate_over_mappings): Delete.
4516
4517 2009-06-07  Pedro Alves  <pedro@codesourcery.com>
4518
4519         * target.h (struct target_ops): Make to_has_all_memory,
4520         to_has_memory, to_has_stack, to_has_registers and to_has_execution
4521         methods instead of variables.
4522         (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
4523         (target_has_registers_1, target_has_execution_1): Declare
4524         functions.
4525         (target_has_all_memory): Rewrite to call target_has_all_memory_1.
4526         (target_has_memory): Rewrite to call target_has_memory_1.
4527         (target_has_stack): Rewrite to call target_has_all_stack_1.
4528         (target_has_registers): Rewrite to call target_has_registers_1.
4529         (target_has_execution): Rewrite to call target_has_execution_1.
4530         (default_child_has_all_memory, default_child_has_memory)
4531         (default_child_has_stack, default_child_has_registers)
4532         (default_child_has_execution): Declare.
4533         (target_mark_running, target_mark_exited): Delete declarations.
4534         * target.c (default_child_has_all_memory,
4535         default_child_has_memory, default_child_has_stack,
4536         default_child_has_registers, default_child_has_execution): New.
4537         (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
4538         target_has_registers_1, target_has_execution_1): New.
4539         (add_target): Default the to_has_all_memory, to_has_all_memory,
4540         to_has_memory, to_has_stack, to_has_registers and to_has_execution
4541         callbacks to return 0.
4542         (update_current_target): Do not inherit to_has_all_memory,
4543         to_has_memory, to_has_stack, to_has_registers or to_has_execution.
4544         (target_mark_running, target_mark_exited): Delete.
4545         (memory_xfer_partial): Adjust.
4546         (target_read_memory, target_write_memory, target_search_memory):
4547         Dispatch to the the top-most target, not the flattened
4548         current_target.
4549         (target_info): Adjust.
4550         (init_dummy_target): Install return_zero as callback for
4551         to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
4552         to_has_execution.
4553         (set_maintenance_target_async_permitted): Use have_live_inferiors
4554         instead of target_has_execution.
4555         * target-memory.c (target_write_memory_blocks): Dispatch memory
4556         writes to the the top-most target, not the flattened
4557         current_target.
4558
4559         * breakpoint.c (insert_breakpoints): Don't check for
4560         target_has_execution here.
4561         (update_global_location_list): Check if there are live inferiors
4562         to debug instead of target_has_execution.
4563         * infcmd.c (kill_command, detach_command): Check if there are
4564         inferiors instead of target_has_execution.
4565         * inferior.h (have_live_inferiors): Declare.
4566         * inferior.c (have_live_inferiors): New.
4567         * infrun.c (normal_stop): Don't check for target_has_execution to
4568         finish the thread states.
4569         * thread.c (is_thread_state, is_stopped, is_exited, is_running)
4570         (any_running, is_executing): Remove checks for
4571         target_has_execution.
4572         * top.c (kill_or_detach): Don't try to kill core inferiors.
4573         (quit_target): Don't check for target_has_execution.
4574
4575         * corelow.c (core_has_memory, core_has_stack, core_has_registers):
4576         New.
4577         (init_core_ops): Install core_has_memory, core_has_stack and
4578         core_has_registers.
4579         * exec.c (exec_has_memory): New.
4580         (init_exec_ops): Install exec_has_memory.
4581         * remote.c (remote_add_inferior): Don't call target_mark_running.
4582         (remote_start_remote): Don't call target_mark_exited or call
4583         target_mark_running.
4584         (remote_open_1): Use have_inferiors instead of
4585         target_has_execution.  Don't use target_mark_exited.
4586         (init_remote_ops): Install deafult_child_has_all_memory,
4587         default_child_has_memory, default_child_has_stack,
4588         default_child_has_registers, default_child_has_execution.
4589         * bsd-kvm.c (bsd_kvm_return_one): New.
4590         (bsd_kvm_add_target): Register bsd_kvm_return_one as
4591         to_has_memory, to_has_stack and to_has_registers callbacks.
4592         * remote-m32r-sdi.c (m32r_return_one): New.
4593         (init_m32r_ops): Register it.
4594         * inf-child.c (inf_child_target): Adjust to register
4595         default_child_has_all_memory, default_child_has_memory,
4596         default_child_has_stack, default_child_has_registers,
4597         default_child_has_execution callbacks.
4598         * gnu-nat.c (init_gnu_ops): Likewise.
4599         * go32-nat.c (init_go32_ops): Likewise.
4600         * hpux-thread.c (init_hpux_thread_ops): Likewise.
4601         * monitor.c (init_base_monitor_ops): Likewise.
4602         * nto-procfs.c (init_procfs_ops): Likewise.
4603         * remote-mips.c (_initialize_remote_mips): Likewise.
4604         * windows-nat.c (init_windows_ops): Likewise.
4605         * remote-sim.c (gdbsim_create_inferior): Don't use
4606         target_mark_running or target_mark_exited.
4607         (gdbsim_mourn_inferior): Don't call target_mark_exited.
4608         (init_gdbsim_ops): Adjust to register
4609         default_child_has_all_memory, default_child_has_memory,
4610         default_child_has_stack, default_child_has_registers,
4611         default_child_has_execution callbacks.
4612
4613         * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
4614         there's no inferior selected, defer to a lower stratum.
4615
4616 2009-06-05  Tom Tromey  <tromey@redhat.com>
4617
4618         * varobj.c (update_dynamic_varobj_children): Wrap error text in
4619         _().
4620         (install_visualizer): Likewise.
4621         (varobj_set_visualizer): Likewise.
4622
4623 2009-06-05  Marc Khouzam  <marc.khouzam@ericsson.com>
4624
4625         * mi/mi-main.c (mi_cmd_exec_continue)
4626         (mi_cmd_exec_interrupt): Adjust parsing of thread group
4627         ids to current reality, where they don't have any 'p' prefix.
4628
4629 2009-06-05  Aleksandar Ristovski  <aristovski@qnx.com>
4630
4631         * corelow.c (core_open): Check for core_gdbarch before calling
4632         gdbarch_target_signal_from_host.
4633
4634 2009-06-05  Tom Tromey  <tromey@redhat.com>
4635
4636         * c-exp.y (parse_number): Don't use K&R definition.
4637         (yylex): Likewise.
4638         (yyerror): Likewise.
4639
4640 2009-06-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
4641
4642         * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
4643
4644 2009-06-04  Ulrich Weigand  <uweigand@de.ibm.com>
4645
4646         * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
4647         * ax-gdb.c (gen_var_ref): Likewise.
4648         * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
4649         * printcmd.c (address_info): Likewise.
4650         * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
4651         * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
4652         * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
4653         * dwarf2loc.h: Likewise.
4654         * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
4655
4656         * symtab.h: (struct symbol_register_ops): New struct definition.
4657         (struct symbol): Make "ops" member a union of symbol_computed_ops and
4658         symbol_register_ops callback pointers.
4659         (SYMBOL_REGISTER_OPS): New macro.
4660         * tracepoint.c: Include "objfiles.h".
4661         (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
4662         callback to retrieve register numbers.
4663         * ax-gdb.c (gen_var_ref): Likewise.
4664         * findvar.c (read_var_value): Likewise.
4665         * printcmd.c (address_info): Likewise.
4666
4667         * coffread.c (coff_reg_to_regnum): New function.
4668         (coff_register_funcs): New static variable.
4669         (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
4670         Install SYMBOL_REGISTER_OPS callbacks.
4671         * mdebugread.c (mdebug_reg_to_regnum): New function.
4672         (mdebug_register_funcs): New static variable.
4673         (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
4674         Install SYMBOL_REGISTER_OPS callbacks.
4675         * stabsread.c (stab_reg_to_regnum): New function.
4676         (stab_register_funcs): New static variable.
4677         (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
4678         Install SYMBOL_REGISTER_OPS callbacks.
4679
4680 2009-06-03  Doug Evans  <dje@google.com>
4681
4682         * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
4683         after discarding its contents.
4684
4685 2009-06-03  Pedro Alves  <pedro@codesourcery.com>
4686
4687         * target.c: Include "exec.h".
4688         (update_current_target): Don't inherit to_sections or
4689         to_sections_end.
4690         (target_get_section_table): New.
4691         (target_section_by_addr): Fetch the section table from the passed
4692         in target.
4693         (memory_xfer_partial): Handle unmapped overlay sections before
4694         anything else.  Get the overlay mapped address here.  Adjust to
4695         use section_table_xfer_memory_partial.
4696         (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
4697         instead of TARGET_OBJECT_MEMORY.
4698         (target_resize_to_sections): Delete.
4699         (remove_target_sections): Adjust to remove target sections from
4700         `current_target_sections', and use resize_section_table.
4701         * target.h (struct target_ops) <to_sections, to_sections_end>:
4702         Remove fields.
4703         <to_get_section_table>: New method.
4704         (xfer_memory, print_section_info): Delete declarations.
4705         (struct target_section_table): New type.
4706         (target_get_section_table): Declare.
4707         (target_resize_to_sections): Delete declaration.
4708         (remove_target_sections): Delete declaration.
4709         * bfd-target.c (target_bfd_xfer_partial): Get the section table
4710         from to_data.
4711         (target_bfd_get_section_table): New.
4712         (target_bfd_xclose): Adjust.
4713         (target_bfd_reopen): Store the section table in the to_data field.
4714         * corelow.c (core_data): New.
4715         (core_close): Adjust to release core_data and its sections.
4716         (core_open): Allocate core_data, and build its target sections
4717         table.
4718         (deprecated_core_resize_section_table): New.
4719         (core_files_info): Pass core_data to print_section_info.
4720         (core_xfer_partial): Adjust to use
4721         section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
4722         (init_core_ops): Do not install a deprecated_xfer_memory callback
4723         anymore.
4724         * solib.c (update_solib_list): Add the shared library sections
4725         to the current target sections table.
4726         * exec.c (current_target_sections_1): New global.
4727         (current_target_sections): New global.
4728         (exec_close_1): New function, refactored from exec_close.  Remove
4729         the exec_bfd's sections from the current target sections table.
4730         Adjust to not use to_sections.
4731         (exec_close): Remove all target sections.  Call exec_close_1.
4732         (exec_file_clear): Use exec_close_1 instead of unpushing the
4733         target.
4734         (exec_file_attach): Likewise.  Adjust to not use to_sections.  Add
4735         exec_bfd's sections to the current target sections table.  Don't
4736         push the exec_ops target here.
4737         (resize_section_table): New.
4738         (add_target_sections): New.
4739         (remove_target_sections): Moved here.
4740         (section_table_xfer_memory): Adjust to implement the xfer_partial
4741         interface, and rename to...
4742         (section_table_xfer_memory_partial): ... this, replacing the
4743         current function of that same name.
4744         (exec_get_section_table): New.
4745         (exec_xfer_partial): New.
4746         (xfer_memory): Delete.
4747         (print_section_info): Replace the target_ops parameter by a
4748         target_section_table parameter.
4749         (exec_files_info, set_section_command, exec_set_section_address):
4750         Adjust to use the current sections table.
4751         (init_exec_ops): Do not register a deprecated_xfer_memory
4752         callback.  Register to_xfer_partial and to_get_section_table
4753         callbacks.
4754         * infrun.c (handle_inferior_event): Update comments around
4755         solib_add.
4756         * rs6000-nat.c (xcoff_relocate_core): Adjust to use
4757         deprecated_core_resize_section_table.
4758         * exec.h (resize_section_table): Declare.
4759         (section_table_xfer_memory_partial): Add const char * argument.
4760         (remove_target_sections): Declare here.
4761         (add_target_sections): Declare.
4762         (print_section_info): Declare here.
4763         * gdbcore.h (deprecated_core_resize_section_table): Declare.
4764
4765 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
4766
4767         * value.h (struct internalvar): Remove.
4768         (get_internalvar_integer): Add prototype.
4769         (set_internalvar_integer): Add prototype.
4770         (clear_internalvar): Add prototype.
4771
4772         * value.c (struct internalvar): Move here.  Add type member.  Remove
4773         endian member.  Add union_internalvar member instead of value member.
4774         (init_if_undefined_command): Use intvar->type.
4775         (create_internalvar): Do not initialize value/endian, but type.
4776         (create_internalvar_type_lazy): Call create_internalvar.
4777         (value_of_internalvar): Handle host-side internalvar contents.
4778         (set_internalvar_component): Likewise.
4779         (set_internalvar): Likewise.
4780         (get_internalvar_integer): New function.
4781         (clear_internalvar): Likewise.
4782         (set_internalvar_integer): Likewise.
4783         (preserve_values): Handle host-side internalvar contents.
4784
4785         * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
4786         set_internalvar_integer instead of set_internalvar.
4787         * findcmd.c (find_command): Likewise.
4788         * infrun.c (handle_inferior_event): Likewise.
4789         * source.c (forward_search_command, reverse_search_command): Likewise.
4790         * tracepoint.c (set_traceframe_num, set_tracepoint_num,
4791         set_traceframe_context): Likewise.
4792
4793         * printcmd.c (x_command): Call clear_internalvar instead of
4794         set_internalvar.
4795         * tracepoint.c (set_traceframe_context): Likewise.
4796         
4797         * breakpoint.c (get_number_trailer): Call get_internalvar_integer
4798         instead of value_of_internalvar.
4799         * linespec.c (decode_dollar): Likewise.
4800
4801         * expprint.c (dump_subexp_body_standard): Use internalvar_name
4802         instead of accessing internalvar private elements.
4803         * valops.c (value_assign): Copy from original source instead of
4804         accessing internalvar private elements.
4805
4806 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
4807
4808         * scm-lang.c (builtin_type_scm): Remove.
4809         (scm_lookup_name): Add GDBARCH parameter.  Use it instead of
4810         objfile architecture.  Use per-architecture builtin_scm_type instead
4811         of builtin_type_scm.
4812         (evaluate_exp): Pass expression architecture to scm_lookup_name.
4813
4814         (scm_get_field): Add SIZE parameter.  Use it instead of 
4815         TYPE_LENGTH (builtin_type_scm).
4816
4817         (build_scm_types): New function.
4818         (scm_type_data): New variable.
4819         (builtin_scm_type): New function.
4820         (_initialize_scheme_language): Do not initialize builtin_type_scm.
4821         Register build_scm_types as post-init function for scm_type_data.
4822
4823         * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
4824         instead of builtin_type_scm.
4825
4826         * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
4827         (scm_get_field): Add SIZE paramter.
4828         (scm_scmval_print): Remove prototype.
4829         (builtin_type_scm): Remove.
4830         (struct builtin_scm_type): Add structure definition.
4831         (builtin_scm_type): Add prototype.
4832
4833         * scm-valprint.c (scm_inferior_print): Add TYPE parameter.  Use it
4834         instead of builtin_core_addr type; do not use objfile architecture.
4835         (scm_scmlist_print): Add TYPE parameter.  Use it to define SCM_SIZE.
4836         Pass type to scm_scmval_print.
4837         (scm_ipruk): Add TYPE parameter.  Use it to define SCM_SIZE.
4838         (scm_scmval_print): Make static.  Add TYPE parameter.  Use it to
4839         define SCM_SIZE.  Pass type to scm_ipruk and scm_scmlist_print.
4840         (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
4841
4842 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
4843
4844         * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
4845         mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
4846         mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
4847         mdebug_type_unsigned_char, mdebug_type_unsigned_short,
4848         mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
4849         mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
4850         mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
4851         mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
4852         mdebug_type_complex, mdebug_type_double_complex,
4853         mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
4854         Remove.
4855
4856         (basic_type_data): New global variable.
4857         (basic_type): New function.
4858         (parse_type): Remove static basic type map map_bt.  Call basic_type
4859         to get basic types instead of using mdebug_type_ variables.
4860
4861         (parse_symbol): Use builtin types instead of mdebug_type_ variables.
4862         (upgrade_type): Likewise.
4863         (parse_procedure): Likewise.
4864         (psymtab_to_symtab_1): Likewise.
4865
4866         (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
4867         Initialize basic_type_data.
4868
4869 2009-06-03  Ulrich Weigand  <uweigand@de.ibm.com>
4870
4871         * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
4872         * dfp.c (promote_decimal): Remove.
4873         (decimal_binop): Convert LEN_RESULT to input parameter.
4874         Remove call to decimal_binop.
4875         (decimal_compare): Remove call to decimal_binop.
4876
4877         * valarith.c (value_binop): Pass desired result type length
4878         to decimal_binop.
4879
4880 2009-06-01  Tristan Gingold  <gingold@adacore.com>
4881
4882         * configure.tgt (avr): Set gdb_sim to use the simulator.
4883
4884 2009-05-29  Doug Evans  <dje@google.com>
4885
4886         * infrun.c (prepare_to_proceed): Document.  Assert !non_stop.
4887         If scheduler-locking is enabled, we're not going to be singlestepping
4888         any other previously stopped thread.
4889
4890 2009-05-29  Pedro Alves  <pedro@codesourcery.com>
4891
4892         * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
4893
4894 2009-05-29  Eli Zaretskii  <eliz@gnu.org>
4895
4896         * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
4897         for stabs and COFF debug info.
4898
4899 2009-05-28  Pedro Alves  <pedro@codesourcery.com>
4900
4901         * infrun.c (handle_inferior_event): When thread hoping, switch
4902         inferior_ptid to the event thread before removing breakpoints from
4903         the target.  If not stopping, also try to revert back to a thread
4904         that was doing a "next".  Check if that thread still exists before
4905         resuming.
4906         (currently_stepping_thread): Delete and merge with ...
4907         (currently_stepping): ... this.
4908         (currently_stepping_callback): Rename to ...
4909         (currently_stepping_or_nexting_callback): ... this, and also
4910         return true if the thread was stepping over a call (has a
4911         step-resume breakpoint).
4912
4913 2009-05-28  Tom Tromey  <tromey@redhat.com>
4914
4915         * python/python.c (gdbpy_parameter): Rename.  Fix error message.
4916         (GdbMethods): Change "get_parameter" to "parameter".
4917
4918 2009-05-28  Pierre Muller  <muller@ics.u-strasbg.fr>
4919             Paul Pluzhnikov  <ppluzhnikov@google.com>
4920
4921         * configure.ac (!have_libpython): Add python-prettyprint source
4922         and object files.
4923         * configure: Regenerate.
4924         * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
4925         python headers.
4926         
4927 2009-05-27  Vladimir Prus  <vladimir@codesourcery.com>
4928             Tom Tromey  <tromey@redhat.com>
4929             Thiago Jung Bauermann  <bauerman@br.ibm.com>
4930
4931         * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
4932         * varobj.h (varobj_set_visualizer): Declare.
4933         (varobj_get_display_hint): Likewise.
4934         (varobj_update_result_t) <children_changed, value_installed>: New
4935         fields.
4936         * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
4937         * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
4938         mi_cmd_var_set_child_range): Declare.
4939         * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
4940         (mi_cmd_var_list_children): Emit display hint.
4941         (varobj_update_one): Emit display hint.  Handle dynamic children.
4942         * python/python.c (GdbMethods): Add "default_visualizer".
4943         * python/python-internal.h (apply_varobj_pretty_printer,
4944         gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
4945         Declare.
4946         (gdbpy_default_visualizer): Likewise.
4947         * varobj.c: Include python.h, python-internal.h.
4948         (PyObject): New typedef.
4949         (struct varobj) <children_requested, pretty_printer>: New fields.
4950         (varobj_create): Call install_default_visualizer.
4951         (instantiate_pretty_printer): New function.
4952         (varobj_set_display_format): Update.
4953         (varobj_get_display_hint): New function.
4954         (update_dynamic_varobj_children): New function.
4955         (varobj_get_num_children): Handle dynamic children.
4956         (varobj_list_children): Likewise.
4957         (install_new_value): Likewise.
4958         (varobj_add_child): New function.
4959         (install_visualizer): Likewise.
4960         (install_default_visualizer): Likewise.
4961         (varobj_set_visualizer): Likewise.
4962         (varobj_update): Handle dynamic children.
4963         (create_child): Use create_child_with_value.
4964         (create_child_with_value): New function.
4965         (value_get_print_value): Call pretty printer.  Add value_formatter
4966         argument.
4967         (c_value_of_variable): Update.
4968         (varobj_invalidate): Always free all_rootvarobj.
4969         * python/python-prettyprint.c (apply_varobj_pretty_printer): New
4970         function.
4971         (gdbpy_get_varobj_pretty_printer): Likewise.
4972         (gdbpy_default_visualizer): Likewise.
4973
4974 2009-05-27  Tom Tromey  <tromey@redhat.com>
4975             Thiago Jung Bauermann  <bauerman@br.ibm.com>
4976             Phil Muldoon  <pmuldoon@redhat.com>
4977             Paul Pluzhnikov  <ppluzhnikov@google.com>
4978             Vladimir Prus  <vladimir@codesourcery.com>
4979
4980         * python/python-value.c (value_object_to_value): New function.
4981         * python/python-internal.h: Include frameobject.h.
4982         (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
4983         Declare.
4984         (value_object_to_value): Declare.
4985         * printcmd.c (struct format_data) <raw>: New field.
4986         (last_format): Default to 0.
4987         (decode_format): Initialize val.raw.  Handle /r flag.
4988         (print_command_1): Initialize fmt.raw and opts.raw.
4989         (output_command): Likewise.
4990         (x_command): Fix initialization of fmt.format.  Initialize
4991         fmt.raw.
4992         (display_command): Initialize fmt.raw.
4993         (do_one_display): Set opts.raw.
4994         * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
4995         gdbpy_display_hint_cst): New globals.
4996         (_initialize_python): Initialize them.  Set gdb.pretty_printers.
4997         * cp-valprint.c: Include python.h.
4998         (cp_print_value): Call apply_val_pretty_printer.
4999         * python/python.h (apply_val_pretty_printer): Declare.
5000         * stack.c (print_this_frame_argument_p): Remove.
5001         (print_frame_args): Compute summary flag.  Don't use
5002         print_this_frame_argument_p.
5003         * valprint.c: Include python.h.
5004         (user_print_options): Initialize new fields.
5005         (scalar_type_p): New function.
5006         (val_print): Handle 'raw' and 'summary' modes.  Call
5007         apply_val_pretty_printer.
5008         (value_print): Handle 'raw' mode.
5009         * valprint.h (struct value_print_options) <raw, summary>: New
5010         fields.
5011         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
5012         (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
5013         (python-prettyprint.o): New target.
5014         * python/python-prettyprint.c: New file.
5015
5016 2009-05-27  Tom Tromey  <tromey@redhat.com>
5017             Paul Pluzhnikov  <ppluzhnikov@google.com>
5018
5019         * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
5020         value_address.
5021         * cli/cli-dump.c (dump_value_to_file): Use value_address.
5022         * valprint.c (common_val_print): Likewise.
5023         * v850-tdep.c (v850_push_dummy_call): Use value_address.
5024         * tracepoint.c (encode_actions): Use value_address.
5025         * printcmd.c (print_formatted): Use value_address.
5026         (x_command): Likewise.
5027         * p-valprint.c (pascal_object_print_static_field): Use
5028         value_address.
5029         * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
5030         * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
5031         * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
5032         * jv-valprint.c (java_value_print): Use value_address.
5033         * infcall.c (find_function_addr): Use value_address.
5034         * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
5035         * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
5036         * frv-tdep.c (frv_push_dummy_call): Use value_address.
5037         * frame.c (frame_register_unwind): Use value_address.
5038         (frame_unwind_register_value): Likewise.
5039         * darwin-nat-info.c (info_mach_region_command): Use
5040         value_address.
5041         * cp-valprint.c (cp_print_static_field): Use value_address.
5042         * c-valprint.c (c_value_print): Use value_address.
5043         * breakpoint.c (update_watchpoint): Use value_address.
5044         (can_use_hardware_watchpoint): Likewise.
5045         * ada-valprint.c (ada_val_print_1): Use value_address.
5046         (ada_value_print): Likewise.
5047         * ada-tasks.c (read_fat_string_value): Use value_address.
5048         * jv-lang.c (java_link_class_type): Use set_value_address.
5049         (java_link_class_type): Likewise.
5050         (get_java_utf8_name): Use value_address.
5051         (type_from_class): Likewise.
5052         (java_link_class_type): Likewise.
5053         * findvar.c (value_of_register): Use set_value_address.
5054         (read_var_value): Likewise.
5055         (read_var_value): Likewise.
5056         * eval.c (evaluate_subexp_standard): Use set_value_address.
5057         (evaluate_subexp_standard): Use value_address.
5058         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
5059         * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
5060         (ada_value_primitive_packed_val): Likewise.
5061         (ensure_lval): Likewise.
5062         (thin_data_pntr): Use value_address.
5063         (desc_bounds): Likewise.
5064         (ada_value_primitive_packed_val): Likewise.
5065         (value_assign_to_component): Likewise.
5066         (ensure_lval): Likewise.
5067         (make_array_descriptor): Likewise.
5068         (ada_to_fixed_value): Likewise.
5069         (unwrap_value): Likewise.
5070         * value.c (deprecated_value_address_hack): Remove.
5071         (value_address): New function.
5072         (value_raw_address): Likewise.
5073         (set_value_address): Likewise.
5074         (value_fn_field): Use set_value_address.
5075         (value_from_contents_and_address): Likewise.
5076         (value_fn_field): Likewise.
5077         (allocate_value_lazy): Don't use VALUE_ADDRESS.
5078         (value_as_address): Use value_address.
5079         (value_static_field): Likewise.
5080         * valops.c (search_struct_field): Use set_value_address.
5081         (value_at): Likewise.
5082         (value_at_lazy): Likewise.
5083         (value_repeat): Likewise.
5084         (value_cast_structs): Use value_address.
5085         (value_cast): Likewise.
5086         (value_fetch_lazy): Likewise.
5087         (value_assign): Likewise.
5088         (value_repeat): Likewise.
5089         (address_of_variable): Likewise.
5090         (value_coerce_array): Likewise.
5091         (value_coerce_function): Likewise.
5092         (value_addr): Likewise.
5093         (search_struct_field): Likewise.
5094         (search_struct_method): Likewise.
5095         (find_method_list): Likewise.
5096         (value_struct_elt_for_reference): Likewise.
5097         (value_full_object): Likewise.
5098         * jv-valprint.c (java_value_print): Use set_value_address.
5099         * value.h (deprecated_value_address_hack): Remove.
5100         (VALUE_ADDRESS): Remove.
5101         (value_address): Declare.
5102         (value_raw_address): Declare.
5103         (set_value_address): Declare.
5104
5105 2009-05-27  Tom Tromey  <tromey@redhat.com>
5106             Thiago Jung Bauermann  <bauerman@br.ibm.com>
5107             Phil Muldoon  <pmuldoon@redhat.com>
5108             Paul Pluzhnikov  <ppluzhnikov@google.com>
5109
5110         * python/python.c (_initialize_python): Call
5111         gdbpy_initialize_types.
5112         (GdbMethods): Add "lookup_type".
5113         * python/python-value.c (value_object) <type>: New field.
5114         (valpy_dealloc): Decref type.
5115         (valpy_new): Initialize type.
5116         (valpy_get_type): New function.
5117         (value_to_value_object): Initialize type.
5118         (valpy_cast): New function.
5119         (value_object_getset): Add "type".
5120         (value_object_methods): Add "cast".
5121         * python/python-internal.h (type_to_type_object): Declare.
5122         (type_object_to_type): Likewise.
5123         (gdbpy_initialize_types): Likewise.
5124         (gdbpy_lookup_type): Declare.
5125         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
5126         (SUBDIR_PYTHON_SRCS): Add python-type.c.
5127         (python-type.o): New target.
5128         * python/python-type.c: New file.
5129
5130 2009-05-27  Tom Tromey  <tromey@redhat.com>
5131             Thiago Jung Bauermann  <bauerman@br.ibm.com>
5132             Phil Muldoon  <pmuldoon@redhat.com>
5133
5134         * python/python.c: Include objfiles.h, observer.h.
5135         (gdbpy_auto_load): New global.
5136         (gdbpy_current_objfile): Likewise.
5137         (GDBPY_AUTO_FILENAME): New define.
5138         (gdbpy_new_objfile): New function.
5139         (gdbpy_get_current_objfile): Likewise.
5140         (gdbpy_objfiles): Likewise.
5141         (_initialize_python): Add "maint set auto-load".  Call
5142         gdbpy_initialize_objfile.  Attach objfile observer.
5143         (GdbMethods): New methods current_objfile, objfiles.
5144         * python/python-objfile.c: New file.
5145         * python/python-internal.h (objfile_to_objfile_object): Declare.
5146         (objfpy_get_printers): Likewise.
5147         (gdbpy_initialize_objfile): Likewise.
5148         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
5149         (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
5150         (python-objfile.o): New target.
5151
5152 2009-05-27  Pedro Alves  <pedro@codesourcery.com>
5153
5154         * infrun.c (follow_exec): Clear the stop_requested flag.
5155         * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
5156         Add debug output.
5157
5158 2009-05-27  Aleksandar Ristovski  <aristovski@qnx.com>
5159
5160         * nto-procfs.c (get_regset): Pass correct pointer.
5161
5162 2009-05-26  Doug Evans  <dje@google.com>
5163
5164         * dwarf2read.c (follow_die_ref): Add comment.
5165         (dwarf2_mark_helper): Tweak comment.
5166         (dwarf2_mark): Move description to its proper place.
5167
5168 2009-05-25  Pierre Muller  <muller@ics.u-strasbg.fr>
5169
5170         * procfs.c (procfs_wait): Add options parameter.
5171
5172 2009-05-24  Doug Evans  <dje@google.com>
5173
5174         Global renaming of find_thread_pid to find_thread_ptid.
5175         * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
5176         * thread.c (find_thread_ptid): Renamed from find_thread_pid.
5177         All callers updated.
5178
5179         * infrun.c (follow_fork): Initialize new step_* locals
5180         to avoid "may be used uninitialized" warnings.
5181
5182 2009-05-24  Pedro Alves  <pedro@codesourcery.com>
5183
5184         * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
5185
5186 2009-05-24  Pedro Alves  <pedro@codesourcery.com>
5187
5188         * gdbthread.h (struct thread_info): New `pending_follow' field.
5189         * thread.c (new_thread): New function.
5190         (add_thread_silent): Use it.
5191         * breakpoint.c (internal_breakpoint_number): New global, moved
5192         from inside...
5193         (create_internal_breakpoint): ... this.
5194         (clone_momentary_breakpoint): New.
5195         * breakpoint.h (clone_momentary_breakpoint): Declare.
5196         * infrun.c (nullify_last_target_wait_ptid): Move declaration
5197         higher.
5198         (pending_follow): Delete.
5199         (follow_fork): Handle pending follow fork event here.  Moved the
5200         preserving of thread stepping state here.
5201         (resume): Don't handle pending follow fork events here.  Only
5202         install the inferior's terminal modes if we're about to resume it.
5203         (proceed): Handle possible pending follow fork events here.
5204         (init_wait_for_inferior): No need to clear pending_follow anymore,
5205         it's gone.
5206         (handle_inferior_event): Adjust to per-thread `pending_follow'.
5207         Call `follow_fork' to handle following the fork.  If the
5208         follow-fork is cancelled, stop stepping.
5209         * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
5210         `pending_follow' events.  Remove code that handled preserving the
5211         thread stepping state.
5212         * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
5213         * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
5214
5215 2009-05-24  Pierre Muller  <muller@ics.u-strasbg.fr>
5216
5217         * symfile.c (add_shared_symbol_files_command): Remove
5218         prototype and function.
5219         (_initialize _symfile): Move "add-shared-symbol-files"
5220         command and "assf" alias.
5221         * windows-nat.c (_initialize_windows_nat): to here.
5222         Change "add-shared-symbol-files" to alias.
5223         
5224         * config/i386/cygwin.mh: Remove NAT_FILE.
5225         * config/i386/mingw.mh: Remove NAT_FILE.
5226         * config/i386/mingw64.mh: Remove NAT_FILE.
5227         * config/i386/nm-cygwin.h: Remove file.
5228         * config/i386/nm-cygwin64.h: Remove file.
5229
5230 2009-05-24  Hui Zhu  <teawater@gmail.com>
5231
5232         * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
5233         I386_LINUX_RECORD_IOCTL_*,
5234         I386_LINUX_RECORD_FCNTL_*) Removed.
5235         (i386_linux_init_abi): Change size of record from macros to
5236         numbers.
5237
5238 2009-05-24  Hui Zhu  <teawater@gmail.com>
5239
5240         * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
5241         * linux-record.c (record_linux_system_call): Ditto.
5242         * linux-record.h (linux_record_tdep): Ditto.
5243
5244 2009-05-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5245
5246         Replace the savestring calls by xstrdup calls where possible.
5247         * breakpoint.c (condition_command, set_raw_breakpoint)
5248         (create_catchpoint, update_breakpoint_locations): Replace the
5249         savestring calls by xstrdup calls where possible.
5250         * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
5251         (record_producer): Likewise.
5252         * coffread.c (coff_start_symtab, complete_symtab): Likewise.
5253         * corefile.c (set_gnutarget): Likewise.
5254         * dbxread.c (add_new_header_file): Likewise.
5255         * demangle.c (set_demangling_command, set_demangling_style): Likewise.
5256         * event-top.c (push_prompt, pop_prompt, command_line_handler)
5257         (set_async_prompt): Likewise.
5258         * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
5259         Likewise.
5260         * language.c (set_language_command, _initialize_language): Likewise.
5261         * linespec.c (decode_line_2): Likewise.
5262         * rs6000-nat.c (add_vmap): Likewise.
5263         * top.c (set_prompt, init_history, init_main): Likewise.
5264         * tracepoint.c (stringify_collection_list): Likewise.
5265         * varobj.c (varobj_create): Remove variable expr_len.  Replace the 
5266         savestring calls by xstrdup calls where possible.
5267         (value_of_root, c_name_of_variable, c_describe_child): Replace the
5268         savestring calls by xstrdup calls where possible.
5269         * xcoffread.c (complete_symtab): Likewise.
5270         * cli/cli-script.c (build_command_line, define_command): Likewise.
5271         * cli/cli-setshow.c (do_setshow_command): Likewise.
5272
5273 2009-05-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5274
5275         Remove already unreachable code.
5276         * varobj.c (varobj_get_handle): Fix comment when error is called.
5277         All callers updated.
5278
5279 2009-05-23  Eli Zaretskii  <eliz@gnu.org>
5280
5281         * README (`configure' options): Document GDB-specific options to
5282         `configure'.
5283
5284         * symtab.c (skip_prologue_using_lineinfo): New function.
5285         (find_function_start_sal): Use it to get to the first line of
5286         function's body that has an entry in the lineinfo table.
5287
5288         * symmisc.c (dump_symtab): Switch the current language to
5289         the language of the symtab we are dumping only if the symtab's
5290         language is neither language_auto nor language_unknown.
5291
5292         * coffread.c (coff_symtab_read): Set language_minimal as the
5293         language for the "_globals_" pseudo-file.
5294         (process_coff_symbol): Set the symbol's language to the language
5295         of current_subfile.
5296
5297 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
5298
5299         * target.h (struct section_table): Rename to ...
5300         (struct target_section): ... this.
5301         * exec.c: Adjust all references.
5302         * exec.h: Adjust all references.
5303         * nto-tdep.c: Adjust all references.
5304         * nto-tdep.h: Adjust all references.
5305         * ppc-linux-tdep.c: Adjust all references.
5306         * rs6000-nat.c: Adjust all references.
5307         * s390-tdep.c: Adjust all references.
5308         * solib-darwin.c: Adjust all references.
5309         * solib-frv.c: Adjust all references.
5310         * solib-irix.c: Adjust all references.
5311         * solib-null.c: Adjust all references.
5312         * solib-osf.c: Adjust all references.
5313         * solib-pa64.c: Adjust all references.
5314         * solib-som.c: Adjust all references.
5315         * solib-sunos.c: Adjust all references.
5316         * solib-svr4.c: Adjust all references.
5317         * solib-target.c: Adjust all references.
5318         * solib.c: Adjust all references.
5319         * solist.h: Adjust all references.
5320         * symfile.c: Adjust all references.
5321         * symfile.h: Adjust all references.
5322         * target.c: Adjust all references.
5323
5324 2009-05-22  Hui Zhu  <teawater@gmail.com>
5325
5326         Add sys_fcntl argument interfaces to linux_record_tdep.
5327
5328         * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
5329         fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
5330         interfaces.
5331         * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
5332         I386_LINUX_RECORD_FCNTL_F_GETLK64,
5333         I386_LINUX_RECORD_FCNTL_F_SETLK64,
5334         I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
5335         of I386 Linux sys_fcntl arguments.
5336         (i386_linux_init_abi): Set macros values to linux_record_tdep.
5337         * linux-record.c (record_linux_system_call): Change to use
5338         the interface in linux_record_tdep in sys_fcntl and
5339         sys_fcntl64.
5340
5341         * linux-record.c (record_linux_system_call): Fix the process
5342         record build error about type in CYGWIN.
5343
5344 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
5345
5346         * inflow.c (kill_command): Delete left over static declaration.
5347
5348 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
5349
5350         * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
5351         Include exec.h.
5352         (struct section_closure): Delete.
5353         (add_to_section_table): Delete.
5354         (build_target_sections_from_bfd): Delete.
5355         (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
5356         (target_bfd_reopen): Use build_section_table.
5357         * exec.c (xfer_memory): Move most code except for overlay
5358         debugging support from here...
5359         (section_table_xfer_memory): ... to this new function.
5360         (section_table_xfer_memory_partial): New.
5361         * exec.h (section_table_xfer_memory_partial): Declare.
5362         * bfd-target.h (build_target_sections_from_bfd): Delete
5363         declaration.
5364
5365 2009-05-22  Pedro Alves  <pedro@codesourcery.com>
5366
5367         * remote.c (compare_sections_command): Don't declare exec_bfd.
5368         * tracepoint.c: Include "gdbcore.h".
5369         (remote_set_transparent_ranges): Don't declare exec_bfd.
5370
5371 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
5372
5373         * aix-thread.c (init_aix_thread_ops): Whitespace.
5374
5375 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
5376
5377         * dec-thread.c (dec_thread_wait): Add options parameter.  Use it
5378         to call the to_wait method in the target beneath.
5379         * remote-m32r-sdi.c (m32r_wait): Add options parameter.
5380
5381 2009-05-21  Joel Brobecker  <brobecker@adacore.com>
5382
5383         * aix-thread.c (aix_thread_wait): Add options parameter.  Use it
5384         to call the to_wait method in the target_beneath.
5385
5386 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
5387
5388         * linux-nat.c (linux_nat_terminal_inferior)
5389         (linux_nat_terminal_ours): Don't check sync_execution.
5390         * remote.c (remote_terminal_inferior, remote_terminal_ours):
5391         Don't check sync_execution.  Update comments.
5392         * target.c (target_terminal_inferior): New.
5393         * target.h (target_terminal_inferior): Delete macro, and declare
5394         as function.
5395         * event-top.c (async_disable_stdin): Make idempotent.  Don't give
5396         the target the terminal here.
5397         * inflow.c (terminal_ours_1): Don't return early without setting
5398         `terminal_is_ours'.
5399
5400 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
5401
5402         * target.h (TARGET_WNOHANG): New.
5403         * target.c (target_wait): Add `options' argument.  Adjust.
5404         (struct target_ops) <to_wait>: Add `options' argument.
5405         (target_wait): Add `options' argument.
5406         * infrun.c (wait_for_inferior): Pass 0 as options to
5407         target_wait (blocking wait).
5408         (fetch_inferior_event): Pass TARGET_WNOHANG as options to
5409         target_wait.
5410         * fork-child.c (startup_inferior): Pass 0 as options to
5411         target_wait (blocking wait).
5412         * linux-nat.c (linux_nat_create_inferior): Remove async masking.
5413         (linux_nat_wait_1): Add `target_options' argument.  Use it instead
5414         of checking on target_can_async_p.
5415         (linux_nat_wait): Add `target_options' argument.  Adjust.
5416         * remote.c (remote_wait_ns): Add `options' argument.  Adjust to
5417         check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
5418         (remote_wait_as): Add `options' argument.  Adjust to check on
5419         TARGET_WNOWAIT instead of checking on remote_is_async_p.  If doing
5420         a blocking wait, keep waiting until an interesting event comes
5421         out.
5422         (remote_wait): Add `options' argument.  Don't loop here if the
5423         target is in async mode, and a blocking wait has been requested.
5424
5425         * top.c (deprecated_target_wait_hook): Add `options' argument.
5426         * linux-thread-db.c (thread_db_wait): Add `options' argument, and
5427         pass it down to the layer beneath.
5428         * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
5429         * record.c (record_beneath_to_wait): Add `options' argument.
5430         (record_wait): Add `options' argument, and pass it down to the
5431         layer beneath.
5432         * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
5433         * darwin-nat.c (darwin_wait): Likewise.
5434         * defs.h (deprecated_target_wait_hook): Likewise.
5435         * gnu-nat.c (gnu_wait): Add `options' argument.
5436         * go32-nat.c (go32_wait): Likewise.
5437         * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
5438         pass it down to the layer beneath.
5439         * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
5440         * monitor.c (monitor_wait): Likewise.
5441         * nto-procfs.c (procfs_wait): Likewise.
5442         * remote-mips.c (mips_wait): Add `options' argument.
5443         * remote-sim.c (gdbsim_wait): Likewise.
5444         * rs6000-nat.c (rs6000_wait): Add `options' argument.
5445         * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
5446         it down to the layer beneath.
5447         * spu-linux-nat.c (spu_child_wait): Add `options' argument.
5448         * windows-nat.c (windows_wait): Likewise.
5449         * tui/tui-hooks.c (tui_target_wait_hook): Likewise.  Adjust.
5450
5451 2009-05-21  Pedro Alves  <pedro@codesourcery.com>
5452
5453         * mi/mi-interp.c (mi_on_resume): Account for whole process
5454         resumes.
5455
5456 2009-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5457
5458         * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
5459
5460 2009-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5461
5462         * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
5463
5464 2009-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5465
5466         Fix parsing DW_AT_const_value using DW_FORM_string.
5467         * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
5468
5469 2009-05-20  Joel Brobecker  <brobecker@adacore.com>
5470
5471         * aix-thread.c (giter_count): Do not count the main thread.
5472         (giter_accum): Do not include the main thread.
5473
5474 2009-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
5475
5476         Remove the PROT parameter from openp.
5477         * source.c (openp): Remove the parameter PROT.  Assertion check MODE.
5478         defs.h (openp): Update the prototype.
5479         Update all the openp callers.
5480
5481 2009-05-19  Pedro Alves  <pedro@codesourcery.com>
5482
5483         * inflow.c (kill_command): Moved to infcmd.c.
5484         (_initialize_inflow): Don't add the "kill" command or clear
5485         inferior_ptid here.
5486         * infcmd.c (kill_command): Moved here from inflow.c.
5487         (_initialize_infcmd): Add the "kill" command here.
5488
5489 2009-05-19  Pedro Alves  <pedro@codesourcery.com>
5490
5491         * fork-child.c: Don't include frame.h.  Include terminal.h.
5492         (fork_inferior): Call new_tty_postfork after forking adn adding
5493         the child to the inferior list.
5494         * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
5495         here.
5496         * inflow.c (struct terminal_info): Remove const qualifier from
5497         `run_terminal' field.
5498         (inferior_thisrun_terminal): Tweak comment.
5499         (inflow_inferior_exit): Release the `run_terminal' field.
5500         (copy_terminal_info): New function.
5501         (new_tty_postfork): New function.
5502         * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
5503         (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
5504         * inf-ptrace.c: Include terminal.h.
5505         (inf_ptrace_follow_fork): Copy the parent's terminal info to the
5506         child.
5507         * linux-nat.c: Include terminal.h.
5508         (linux_child_follow_fork): Copy the parent's terminal info to the
5509         child.
5510         * inf-ttrace.c: Include terminal.h.
5511         (inf_ttrace_follow_fork): Copy the parent's terminal info to the
5512         child.
5513
5514 2009-05-19  Pedro Alves  <pedro@codesourcery.com>
5515
5516         * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
5517         (update_global_location_list): Use gdbarch_has_global_breakpoints
5518         instead of gdbarch_has_global_solist and
5519         target_supports_multi_process.
5520         * dicos-tdep.c (dicos_init_abi): Set
5521         gdbarch_has_global_breakpoints.
5522         * gdbarch.sh (has_global_solist): Update comment.
5523         (has_global_breakpoints): New.
5524         * remote.c (remote_start_remote): Use
5525         gdbarch_has_global_breakpoints instead of
5526         gdbarch_has_global_solist.
5527         * target.c (target_detach): Use gdbarch_has_global_breakpoints
5528         instead of gdbarch_has_global_solist.
5529         * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
5530         of target_supports_multi_process.
5531
5532 2009-05-18  Paul Pluzhnikov  <ppluzhnikov@google.com>
5533
5534         * objc-lang.c (find_methods): Plug a small memory leak.
5535
5536 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
5537
5538         * solib-svr4.c: Include observer.h.
5539         (debug_base, debug_loader_offset_p, debug_loader_offset)
5540         (debug_loader_name, main_lm_addr): Move these globals...
5541         (struct svr4_info): ... into this new structure.
5542         (svr4_info_p): New typedef.
5543         (svr4_info): New global.
5544         (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
5545         functions.
5546         (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
5547         (solib_svr4_r_ldsomap): Add svr4_info argument.  Adjust to
5548         per-inferior svr4.
5549         (open_symbol_file_object): Adjust to per-inferior svr4.
5550         (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
5551         Ditto.
5552         (enable_break): Add svr4_info argument.  Adjust to per-inferior
5553         svr4.
5554         (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
5555         Adjust to per-inferior svr4.
5556         (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
5557         observer.
5558
5559 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
5560
5561         * linux-nat.h (linux_proc_get_tgid): Declare.
5562         * linux-nat.c (linux_proc_get_tgid): New.
5563         * linux-thread-db.c (struct thread_db_info): New field
5564         `need_stale_parent_threads_check'.
5565         (add_thread_db_info): Set it.
5566         (find_new_threads_callback): Ignore stale fork parent threads.
5567         (thread_db_resume): New.
5568         (init_thread_db_ops): Install thread_db_resume.
5569
5570 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
5571
5572         * fork-child.c (fork_inferior): Only reset the thread list if this
5573         is the first inferior.
5574         (startup_inferior): If the target support multi-process, tell it
5575         to resume only the new process.
5576         * linux-nat.c (num_lwps): Delete global.
5577         (purge_lwp_list): New function.
5578         (num_lwps): New function.
5579         (add_lwp, delete_lwp): Adjust.
5580         (ptid_match): New.
5581         (iterate_over_lwps): Add filter argument.  Handle it.
5582         (linux_nat_attach): Remove FIXME note.
5583         (linux_nat_detach): Adjust to iterate over threads of the inferior
5584         we're detaching from.  Adjust to num_lwps being a function.  Don't
5585         assume the head of the lwp list is the main thread of the process
5586         we're detaching from.  Don't destroy the LWP list.
5587         (resume_callback): Add debug output.
5588         (linux_nat_resume): Handle resuming a single inferior.  Allow a
5589         wildcard resume in non-stop mode.
5590         (linux_handle_extended_wait): Don't assume inferior_ptid is the
5591         correct inferior of the parent LWP.
5592         (status_callback): Also check lp->waitstatus.
5593         (select_event_lwp): Add new filter parameter.  Handle it.
5594         (linux_nat_filter_event): Adjust to num_lwps being a function.
5595         (linux_nat_wait_1): When adding the first lwp of the inferior, use
5596         an is_lwp check instead of checking for the number of lwps.
5597         (linux_nat_wait_1): Handle waiting for a specific tgid.  Handle
5598         pending process exit statuses.
5599         (linux_nat_mourn_inferior): Don't destroy all the LWP info.
5600         Instead delete LWPs of the inferior that we're mourning.  Don't
5601         unregister from the event loop here.
5602         (linux_nat_pid_to_str): Use `num_lwps'.
5603         (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
5604         single inferior.
5605         (linux_nat_is_async_p): Check if async was masked out.
5606         (linux_multi_process): New global.
5607         (linux_nat_supports_multi_process): New.
5608         (linux_nat_stop_lwp): Remove LWP filtering.  It is done by the
5609         caller.
5610         (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
5611         LWP filtering.
5612         (linux_nat_close): New.
5613         (linux_nat_add_target): Register linux_nat_close and
5614         linux_nat_supports_multi_process.
5615         * linux-nat.h (iterate_over_lwps): Add filter argument.
5616         * linux-thread-db.c (thread_db_handle): Delete.
5617         (proc_handle, thread_agent, td_init_p, td_ta_new_p)
5618         (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
5619         (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
5620         (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
5621         (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
5622         longer globals, moved to...
5623         (struct thread_db_info): ... this new structure.
5624         (thread_db_list): New.
5625         (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
5626         New.
5627         (have_threads_callback): Filter out threads of all inferiors but
5628         the one specified by the ARGS argument.
5629         (have_threads): Add ptid argument specifying the inferior we're
5630         interested in.  Handle it.
5631         (struct thread_get_info_inout): New.
5632         (thread_get_info_callback, thread_from_lwp): Adjust to use it.
5633         (thread_db_attach_lwp): Check that inferior of the passed in
5634         thread is using thread-db.  Adjust.
5635         (enable_thread_event): Remove thread_agent parameter.  Instead,
5636         get it from the per-inferior thread-db info.
5637         (dladdr_to_soname): Move higher up.
5638         (enable_thread_event_reporting): Adjust to use per-inferior
5639         thread-db info.
5640         (try_thread_db_load_1): Replace `handle' parameter by a
5641         thread_db_info parameter.  Adjust to use per-inferior thread-db
5642         info.
5643         (try_thread_db_load): Adjust to use per-inferior thread-db info.
5644         (thread_db_load, disable_thread_event_reporting): Ditto.
5645         (check_for_thread_db): Remove conditional reporting of which
5646         libthread_db is in use.
5647         (thread_db_new_objfile): Add comment about inferior_ptid.
5648         (attach_thread): Adjust to use per-inferior thread-db info.
5649         (thread_db_detach): Adjust to use per-inferior thread-db info.
5650         Remove thread event breakpoints of the current inferior.  Only
5651         unpush the thread-db target if there are no more processes using
5652         it.
5653         (check_event): Adjust to use per-inferior thread-db info.
5654         (thread_db_wait): Adjust to use per-inferior thread-db info.  Only
5655         unpush the thread-db target if there are no more processes using
5656         it.
5657         (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
5658         info.  Mark breakpoints of the current inferior out before
5659         deleting them.  Only unpush the thread-db target if there are no
5660         more processes using it.
5661         (find_new_threads_callback): Adjust to use per-inferior thread_db
5662         info.
5663         (thread_db_find_new_threads_1): Add new ptid argument.  Adjust to
5664         use per-inferior thread-db info.
5665         (thread_db_find_new_threads): Adjust to use per-inferior thread-db
5666         info.
5667         (thread_db_get_thread_local_address): Adjust.
5668         (thread_db_get_ada_task_ptid): Adjust.
5669         * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
5670         if there no more processes left to debug.
5671         * thread.c (set_running, set_executing): Handle resuming all
5672         threads of a single inferior.
5673         * mi/mi-interp.c (mi_output_running_pid): New.
5674         (mi_inferior_count): New.
5675         (mi_on_resume): For backwards compatibility, if resuming all
5676         threads of an inferior, and there is only one inferior, output
5677         "all".
5678
5679 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
5680
5681         * ada-lang.c (ada_find_any_type): Move check for primitive types ...
5682         (to_fixed_range_type): ... to here.
5683
5684 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
5685
5686         * ada-lang.c (desc_data_type): Remove, replace by ...
5687         (desc_data_target_type): ... this.
5688         (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
5689         (ada_is_array_descriptor_type): Likewise.
5690         (ada_type_of_array): Likewise.
5691         (ada_coerce_to_simple_array_type): Likewise.
5692         (ada_array_element_type): Likewise.
5693
5694 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
5695
5696         * ada-valprint.c (ada_val_print_1): Use val_print_string to print
5697         result of ada_vax_float_print_function inferior call.
5698
5699 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
5700
5701         * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
5702         avoid creating a dummy value.
5703
5704 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
5705
5706         * p-valprint.c (pascal_val_print): Use extract_typed_address
5707         to extract reference value.
5708
5709 2009-05-18  Ulrich Weigand  <uweigand@de.ibm.com>
5710
5711         * doublest.c (NAN): Remove unused define.
5712         (extract_floating_by_length, deprecated_extract_floating): Remove.
5713         (store_floating_by_length, deprecated_store_floating): Remove.
5714         (extract_typed_floating): Do not call extract_floating_by_length.
5715         (store_typed_floating): Do not call store_floating_by_length.
5716         (convert_typed_floating): Remove redundant assertions.
5717         * doublest.h (deprecated_extract_floating): Remove.
5718         (deprecated_store_floating): Remove.
5719         * sh64-tdep.c (sh64_register_convert_to_raw): Call
5720         extract_typed_floating instead of deprecated_extract_floating.
5721
5722 2009-05-18  Jon Beniston <jon@beniston.com>
5723         
5724         * MAINTAINERS: Add lm32 target.        
5725         * Makefile.in: Add lm32 dependencies.        
5726         * NEWS: Indicate lm32 is a new target.
5727         * configure.tgt: Add lm32 targets.
5728         * lm32-tdep.c: New file.
5729
5730 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
5731
5732         * corelow.c (core_open): Flush the register cache before doing
5733         anything with registers.
5734
5735 2009-05-18  Pedro Alves  <pedro@codesourcery.com>
5736
5737         * inflow.h (our_process_group): Remove declaration.
5738         (inferior_process_group): Delete global variable declaration.
5739         (inferior_process_group): New function declaration.
5740         * inflow.c: Include observer.h.
5741         (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
5742         Delete.
5743         (struct terminal_info): New struct.
5744         (our_terminal_info): New global.
5745         (inferior_process_group): New function.
5746         (inferior_thisrun_terminal): Extend description comment.
5747         (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
5748         instead of globals.
5749         (terminal_init_inferior_with_pgrp): Adjust to per-inferior
5750         terminal settings.
5751         (terminal_inferior): Ditto.
5752         (terminal_ours_1): Ditto.
5753         (inflow_new_inferior, inflow_inferior_exit): New functions.
5754         (child_terminal_info): Adjust to per-inferior terminal settings.
5755         (osig_set): New global.
5756         (set_sigint_trap): Adjust to per-inferior terminal settings.  Set
5757         or clear `osig_set' accordingly.
5758         (clear_sigint_trap): Check `osig_set' to decide wheater to restore
5759         SIGINT handler, instead of checking the current inferior (which
5760         may be none).
5761         (_initialize_inflow): Attach inflow_new_inferior and
5762         inflow_inferior_exit to the "new_inferior" and "inferior_exit"
5763         notifications, respectively.
5764         * inferior.h (struct terminal_info): Forward declare.
5765         (struct inferior): Add `terminal_info' field.
5766         * inferior.c (delete_inferior_1): Notify the inferior_exit
5767         observers before removing the inferior from the lists and deleting
5768         it.
5769         * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
5770         a function instead of a variable.  Adjust.
5771         * procfs.c (procfs_stop): Ditto.
5772
5773 2009-05-17  Pedro Alves  <pedro@codesourcery.com>
5774
5775         * infrun.c (handle_inferior_event): When handling a
5776         TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
5777         immediatelly.
5778         * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
5779         from the child if vforking.
5780         * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
5781         breakpoints from the child here.
5782
5783 2009-05-17  Pedro Alves  <pedro@codesourcery.com>
5784
5785         * infrun.c (pending_follow): Remove execd_pathname member.
5786         (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
5787         (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
5788         event, don't copy `execd_pathname' to pending_follow, use the
5789         event copy instead.  Release `execd_pathname' once done with
5790         handling the event.
5791
5792         * infrun.c (pending_follow): Remove mention of exec events.
5793
5794 2009-05-17  Hui Zhu  <teawater@gmail.com>
5795
5796         * i386-tdep.c (i386_process_record): Make it extern.
5797         (i386_gdbarch_init): Don't call set_gdbarch_process_record
5798         here.
5799         * i386-tdep.h (i386_process_record): Declare.
5800         * i386-linux-tdep.c (i386_linux_init_abi): Call
5801         set_gdbarch_process_record.
5802
5803 2009-05-17  Vladimir Prus  <vladimir@codesourcery.com>
5804
5805         Always report varobj as changed when in_scope attribute changes.
5806
5807         * varobj.c (install_new_value): If non-NULL-ness of value
5808         changed, return 1.
5809
5810 2009-05-15  Paul Pluzhnikov  <ppluzhnikov@google.com>
5811         
5812         * NEWS: Mention set/show libthread-db-search-path.
5813         * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
5814         (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
5815         * linux-thread-db.c (libthread_db_search_path): New setting.
5816         (thread_db_handle): New variable (replaces using_thread_db).
5817         (try_thread_db_load_1): New function.
5818         (try_thread_db_load, thread_db_load_search): Likewise.
5819         (dladdr_to_soname): Likewise.
5820         (thread_db_load): Iterate over possibly multiple libthread_db's.
5821         (check_for_thread_db): Attempt to load new libthread_db.
5822         (thread_db_detach, thread_db_wait): Unload libthread_db.
5823         (thread_db_mourn_inferior): Likewise.
5824         (_initialize_thread_db): Add new libthread-db-search-path option.
5825         Defer loading of libthread_db to check_for_thread_db.
5826         * solib.c (libpthread_name_p): New function.
5827         (libpthread_solib_p): Call it.
5828         * solib.h (libpthread_name_p): New prototype.
5829         
5830 2009-05-15  Pierre Muller  <muller@ics.u-strasbg.fr>
5831
5832         * MAINTAINERS: Update my email address.
5833         
5834 2009-05-14  Paul Pluzhnikov  <ppluzhnikov@google.com>
5835
5836         * breakpoint.h: Add breakpoint_re_set_objfile prototype.
5837         * breakpoint.c (create_overlay_event_breakpoint): Renamed
5838         from create_overlay_event_breakpoint_1, old
5839         create_overlay_event_breakpoint deleted.
5840         (breakpoint_re_set_objfile): Don't rescan all objfiles
5841         unnecessarily.
5842         (breakpoint_re_set): New function.
5843         * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
5844         instead of breakpoint_re_set.
5845         * objfiles.c (objfile_relocate): Likewise.
5846         
5847 2009-05-14  Joel Brobecker  <brobecker@adacore.com>
5848
5849         * gdbarch.sh: Add comment documenting the target_gdbarch global.
5850         gdbarch.h does NOT need to be regenerated as the corresponding
5851         change has already been made in a previous commit.
5852
5853 2009-05-14  Pierre Muller  <muller@ics.u-strasbg.fr>
5854
5855         Remove all i386 debug register low level macros in config nm files.
5856         (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
5857         (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
5858         (I386_USE_GENERIC_WATCHPOIINTS): Remove.
5859
5860         * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
5861         (struct i386_dr_low_type): New type.
5862         (i386_dr_low): New global variable.
5863         * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
5864         (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
5865         i386_dr_low struct variable fields.
5866         (i386_remove_aligned_watchpoint): Likewise.
5867         (i386_stopped_data_address): Likewise.
5868         (i386_stopped_by_hwbp): Likewise.
5869         (show_debug_regs_command_added): New static variable.
5870         (add_show_debug_regs_command): New static function.
5871         (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
5872         (i386_set_debug_register_length): New function.
5873         (_initialize_i386_nat): Delete.
5874         
5875         * amd64-linux-nat.c: Include "i386-nat.h".
5876         (amd64_linux_dr_set_control):  Change to static.
5877         (amd64_linux_dr_get_status): Change to static.
5878         (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
5879         (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
5880         
5881         * go32-nat.c: Include "i386-nat.h".
5882         (go32_set_addr): Change to static.
5883         (go32_set_dr7): Change to static. Change arg type to unisgned long.
5884         (go32_get_dr6): Change to static. Change return type to unisnged long.
5885         (init_go32_ops):  Set i386_dr_low variable fields.
5886         * i386-linux-nat.c: Include "i386-nat.h".
5887         (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
5888         (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
5889         (_initialize_i386_linux_nat):  Set i386_dr_low variable fields.
5890         * i386bsd-nat.h: Declare functions used for
5891         i386_dr_low fields in i386fbsd-nat.c.
5892         * i386fbsd-nat.c: Include "i386-nat.h".
5893         (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
5894         * windows-nat.c: Include "i386-nat.h".
5895         (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
5896         Change to static.
5897         (cygwin_get_dr6): Change return type to unisnged long.
5898         (cygwin_set_dr7): Change arg type to unisgned long.
5899         (init_windows_ops): Set i386_dr_low function fields.
5900
5901         * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call 
5902         i386_set_debug_register_length.
5903         * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
5904
5905         * config/i386/nm-cygwin.h: Remove all I386_* macros.
5906         * config/i386/nm-cygwin64.h: Likewise.
5907         * config/i386/nm-fbsd.h: Likewise.
5908         * config/i386/nm-linux.h: Likewise.
5909         * config/i386/nm-i386.h: Remove completely.
5910         * config/i386/nm-go32.h: Remove completely.
5911         * config/i386/nm-linux64.h: Remove completely.
5912         * config/i386/go32.mh (NAT_FILE): Remove entry.
5913         * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
5914
5915 2009-05-14  Jon Beniston  <jon@beniston.com>
5916
5917         * MAINTAINERS: Add Jon Beniston to write after approval list.
5918
5919 2009-05-13  Paul Pluzhnikov  <ppluzhnikov@google.com>
5920
5921         * objc-lang.c (objc_objfile_data): New variable.
5922         (find_methods): Skip objfiles without Obj-C methods.
5923         (_initialize_objc_lang): New function.
5924
5925 2009-05-13  Joel Brobecker  <brobecker@adacore.com>
5926
5927         * c-lang.c (print_wchar): Remove unnecessary cast.
5928
5929 2009-05-12  Jim Blandy  <jimb@red-bean.com>
5930
5931         * MAINTAINERS: Remove self as m32c target maintainer.
5932
5933 2009-05-12  Pedro Alves  <pedro@codesourcery.com>
5934
5935         * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
5936         * command.h (deprecated_add_set_cmd): Delete declaration.
5937         * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
5938         'set debug gnu-nat' and 'show debug gnu-nat'.
5939         * i386-nat.c (_initialize_i386_nat): Replace 'maint
5940         show-debug-registers' with 'maint set show-debug-registers' and
5941         'maint show show-debug-registers'.
5942         * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
5943         show-debug-registers' with 'maint set show-debug-registers' and
5944         'maint show show-debug-registers'.
5945
5946 2009-05-12  Joel Brobecker <brobecker@adacore.com>
5947
5948         * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
5949         pushing it on the output obstack.
5950
5951 2009-05-11  Joel Brobecker <brobecker@adacore.com>
5952
5953         Fix internal error on breaking at a multi-locations caller source line.
5954         * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
5955         command with no parameters.
5956
5957 2009-05-11  Pedro Alves  <pedro@codesourcery.com>
5958
5959         * linux-nat.c (enum sigchld_state): Delete.
5960         (linux_nat_async_events_state): Delete.
5961         (struct waitpid_result): Delete.
5962         (waitpid_queue): Delete.
5963         (queued_waitpid_1): Delete.
5964         (async_file_flush): New.
5965         (queued_waitpid, push_waitpid): Delete.
5966         (async_file_mark): New.
5967         (drain_queued_events): Delete.
5968         (my_waitpid): Remove locally queued events handling.
5969         (linux_test_for_tracefork): Upjust.
5970         (linux_child_follow_fork): Ditto.
5971         (sync_sigchld_action): Delete.
5972         (blocked_mask): Reinstate.
5973         (async_sigchld_action): Rename to...
5974         (sigchld_action): ... this.
5975         (block_child_signals): New.
5976         (restore_child_signals_mask): New.
5977         (lin_lwp_attach_lwp): Adjust.
5978         (linux_nat_create_inferior): Ditto.
5979         (linux_nat_attach): Also use lp->status in async mode.
5980         (get_pending_status): Don't use queued_waitpid.
5981         (linux_nat_detach): Don't drain locally queued events.
5982         (linux_nat_resume): Allow pending wait statuses stored lp->status
5983         in async mode.  If returning early due to a pending event,
5984         re-register the event source.
5985         (stop_wait_callback): Allow pending wait statuses stored
5986         lp->status in async mode.
5987         (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
5988         (linux_nat_wait): Rename to ...
5989         (linux_nat_wait_1): ... this.  Allow pending wait statuses stored
5990         lp->status in async mode.  Always add WNOHANG to the waitpid
5991         options in async mode.
5992         (linux_nat_wait): New.
5993         (kill_callback): Don't drain locally queued events.
5994         (sigchld_handler): Rewrite.
5995         (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
5996         refer to "set target-async".
5997         (linux_nat_async_mask): If in non-stop, and re-enabling async
5998         mode, re-register the target event source in the event loop.
5999         (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
6000         (get_pending_events, async_sigchld_handler)
6001         (linux_nat_async_events): Delete.
6002         (handle_target_event): New.
6003         (linux_nat_async_file_handler): Delete.
6004         (linux_async_pipe): New.
6005         (linux_nat_async): Only re-register in the event loop if not
6006         registered yet.  Always notify the event-loop once if enabling the
6007         event source.
6008         (linux_nat_stop_lwp): Rewrite to handle pending events stored in
6009         lp->status, not in the locally queued event list.
6010         (linux_nat_stop): Don't mask out async event handling.
6011         (linux_nat_setup_async): Delete.
6012         (_initialize_linux_nat): Adjust.
6013         (lin_thread_get_thread_signals): blocked_mask is global again.
6014         Adjust.
6015
6016 2009-05-11  Pierre Muller  <muller@ics.u-strasbg.fr>
6017
6018         Unify target macros.
6019
6020         * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
6021         (target_stoppped_by_watchpoint): New macro.
6022         (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
6023         (target_have_steppable_watchpoint): New macro.
6024         (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
6025         (target_have_continuable_watchpoint): New macro.
6026         (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
6027         (target_can_use_hardware_watchpoint): New macro.
6028         (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
6029         (target_region_ok_for_hw_watchpoint): New macro.
6030
6031         * breakpoint.c (update_watchpoint): Use new macros.
6032         (bpstat_alloc): Likewise.
6033         (create_breakpoint): Likewise.
6034         (watch_command_1): Likewise.
6035         (can_use_hardware_watchpoint): Likewise.
6036         (do_enable_breakpoint): Likewise.
6037         * infrun.c (handle_inferior_event): Adapt to new macros.
6038         * mips-tdep.c (mips_gdbarch_init): Update comments.
6039         * procfs.c (procfs_set_watchpoint): Update comment.
6040         (procfs_insert_watchpoint): Adapt to new macros.
6041         * remote-m32r-sdi.c (m32r_stop):
6042         * remote-mips.c (mips_remove_breakpoint):
6043         * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
6044         (debug_to_stopped_by_watchpoint): Likewise.
6045
6046
6047 2009-05-10  Pierre Muller  <muller@ics.u-strasbg.fr>
6048
6049         * src/gdb/target.h: Remove all tests for already defined
6050         macros. All macros defined here should not be set in config
6051         headers anymore.
6052
6053 2009-05-08  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
6054
6055         * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
6056         (have_ptrace_getsetfpregs): Likewise.
6057         fetch_all_gp_regs): New function.
6058         (fetch_gp_regs): New function.
6059         (fetch_all_fp_regs): Likewise.
6060         (fetch_fp_regs): New function.
6061         (fetch_ppc_registers): Using the new methods to fetch general-
6062         purpose and floating-pointer registers.
6063         (store_all_gp_regs): New function.
6064         (store_gp_regs): Likewise.
6065         (store_all_fp_regs): New function.
6066         (store_fp_regs): Likewise.
6067         (store_ppc_registers): Using the new methods to store general-
6068         purpose and floating-pointer registers.
6069
6070 2009-05-08  Doug Evans  <dje@google.com>
6071
6072         * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
6073
6074 2009-05-07  Sergio Durigan Junior  <sergiodj@linux.vnet.ibm.com>
6075
6076         * MAINTAINERS (Write After Approval): Add self.
6077
6078 2009-05-07  Joel Brobecker  <brobecker@adacore.com>
6079
6080         * gdbarch.h (target_gdbarch): Add comment documenting this global.
6081
6082 2009-05-06  Joel Brobecker  <brobecker@adacore.com>
6083
6084         * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
6085         system iconv.
6086         * configure: Regenerate.
6087
6088 2009-05-06  Joel Brobecker  <brobecker@adacore.com>
6089
6090         * utils.c: Add include of gdb_usleep.h.
6091         (defaulted_query): Detect false EOF conditions that happen
6092         on terminals opened with the O_NONBLOCK flag when there is
6093         nothing to read.
6094
6095 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
6096
6097         * inferior.c (add_inferior): Move observer_notify_new_inferior
6098         call to ...
6099         (add_inferior_silent): ... here.
6100
6101 2009-05-06  Pierre Muller  <muller@ics.u-strasbg.fr>
6102             Pedro Alves  <pedro@codesourcery.com>
6103
6104         * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
6105         (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
6106         functions.
6107         (procfs_stopped_by_watchpoint): Made static, ptid argument
6108         removed.
6109         (_initialize_procfs): Register new watchpoint related target
6110         functions.
6111         * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
6112         (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
6113         (HAVE_CONTINUABLE_WATCHPOINT): Delete.
6114         (target_insert_watchpoint, target_remove_watchpoint): Delete.
6115         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
6116         declarations.
6117         * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
6118         (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
6119         (target_insert_watchpoint, target_remove_watchpoint): Delete.
6120         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
6121         declarations.
6122         * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
6123         (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
6124         (target_insert_watchpoint, target_remove_watchpoint): Delete.
6125         (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
6126         declarations.
6127
6128 2009-05-06  Hui Zhu  <teawater@gmail.com>
6129
6130         * i386-tdep.c (i386_process_record): Change bzero to memset.
6131
6132 2009-05-06  Hui Zhu  <teawater@gmail.com>
6133
6134         * NEWS: Add item for process record and replay.
6135
6136 2009-05-05  Maxim Grigoriev  <maxim2405@gmail.com>
6137
6138         * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
6139
6140 2009-05-05  Ulrich Weigand  <uweigand@de.ibm.com>
6141
6142         * inferior.h (read_pc, write_pc): Remove.
6143         * regcache.c (read_pc, write_pc): Remove.
6144
6145         * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
6146         of read_pc.
6147         (handle_inferior_event): Use regcache_read_pc instead of read_pc
6148         when determining value of stop_pc.  Replace subsequent uses of
6149         read_pc by inspecting already-retrieved stop_pc value.
6150         (keep_going): Use regcache_read_pc instead of read_pc.
6151
6152         * breakpoint.c (watchpoint_check): Use current frame architecture
6153         and PC instead of current_gdbarch and read_pc ().
6154         * tracepoint.c (set_traceframe_context): Replace PC argument
6155         with FRAME argument.
6156         (trace_start_command, finish_tfind_command): Update calls.
6157         (finish_tfind_command): Compare frame IDs to identify transitions
6158         between frames.
6159         (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
6160         * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
6161         of gdbarch.  Use regcache_read_pc and regcache_write_pc instead
6162         of read_pc and write_pc.
6163         (store_register): Make regcache argument non-const.  Update call
6164         to exec_one_dummy_insn.
6165
6166         * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
6167         * infcmd.c (post_create_inferior): Likewise.
6168         * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
6169         * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
6170         * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
6171         * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
6172         * linux-fork.c (fork_load_infrun_state): Likewise.
6173         * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
6174         * record.c (record_wait): Likewise.
6175         * procfs.c (procfs_wait): Likewise.
6176         * remote-mips.c (common_open, mips_wait): Likewise.
6177         * remote-m32r-sdi.c (m32r_resume): Likewise.
6178
6179         * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
6180         * monitor.c (monitor_create_inferior, monitor_load): Likewise.
6181         * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
6182         * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
6183         * remote-mips.c (mips_create_inferior, mips_load): Likewise.
6184
6185         * solib-darwin.c: Include "regcache.h".
6186         * solib-pa64.c: Include "regcache.h".
6187         * solib-svr4.c: Include "regcache.h.".
6188
6189         * symfile.c: Do not mention read_pc or write_pc in comments.
6190         * dink32-rom.c: Likewise.
6191         * m32r-rom.c: Likewise.
6192         * mips-tdep.c: Likewise.
6193
6194 2009-05-05  Ulrich Weigand  <uweigand@de.ibm.com>
6195
6196         * fork-child.c (startup_inferior): Move setting stop_pc ...
6197         * infcmd.c (post_create_inferior): ... to here.
6198
6199 2009-05-04  Michael Snyder  <msnyder@vmware.com>
6200
6201         * NEWS: Add item for reverse debugging commands.
6202
6203 2009-05-04  Pedro Alves  <pedro@codesourcery.com>
6204
6205         * go32-nat.c (go32_stop): Delete.
6206         (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
6207         (go32_create_inferior): Don't call go32_stop or
6208         go32_kill_inferior.
6209         (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
6210         here.
6211         (init_go32_ops): Don't register go32_stop.
6212
6213 2009-05-02  Eli Zaretskii  <eliz@gnu.org>
6214
6215         * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
6216         sym_name.
6217
6218         * infcall.c (find_function_addr): Avoid compiler warnings for
6219         funaddr.
6220
6221 2009-05-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6222
6223         * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
6224         (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
6225
6226 2009-05-01  Doug Evans  <dje@google.com>
6227
6228         * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
6229         to thread_info.
6230
6231 2009-05-01  Eli Zaretskii  <eliz@gnu.org>
6232
6233         * record.c (_initialize_record): Reformat and clarify doc strings
6234         for stop-at-limit and insn-number-max.
6235
6236         * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
6237
6238 2009-05-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6239
6240         Make specifiable the make_function_type type memory ownership.
6241         * gdbtypes.c (make_function_type): New parameter `objfile', use it
6242         explicitely instead of TYPE-initialized removed local variable
6243         `objfile'.  Describe `objfile' it in the function comment.
6244         (lookup_function_type): Update make_function_type callers.
6245         * gdbtypes.h (make_function_type): Update the prototype.
6246         * jv-lang.c (java_link_class_type): Update make_function_type callers.
6247         * dwarf2read.c (read_subroutine_type): Likewise.
6248         * stabsread.c (read_type): Likewise.
6249
6250 2009-05-01  Eli Zaretskii  <eliz@gnu.org>
6251
6252         * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
6253         printing a bogus "Thread <main>".
6254         (go32_thread_alive): Don't return 1 for null_ptid.
6255
6256         * i386-tdep.c (i386_go32_init_abi): Override the number of
6257         registers due to non-support of SSE.
6258
6259 2009-04-30  Anthony Green  <green@moxielogic.com>
6260
6261         * configure.tgt: Link the moxie simulator in with gdb.
6262
6263 2009-04-30  Paul Pluzhnikov  <ppluzhnikov@google.com>
6264
6265         * elfread.c (elf_symtab_read): Don't assume .data and .rodata
6266         are present.
6267
6268 2009-04-30  Hui Zhu  <teawater@gmail.com>
6269             Michael Snyder  <msnyder@vmware.com>
6270
6271         I386 Linux process record and replay support.
6272
6273         * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
6274         This struct has the argument for the function
6275         "record_linux_system_call".
6276         (i386_linux_intx80_sysenter_record): New function. Parse the
6277         system call instruction and call function
6278         "record_linux_system_call" to record execute log.
6279         (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
6280         Set "i386_linux_intx80_sysenter_record" to
6281         "i386_intx80_record" and "i386_sysenter_record".
6282
6283 2009-04-30  Hui Zhu  <teawater@gmail.com>
6284             Michael Snyder  <msnyder@vmware.com>
6285
6286         I386 architecture process record and replay support.
6287
6288         * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
6289         PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
6290         instruction set.
6291         (aflag, dflag, override, modrm, mod, reg, rm, ot,
6292         i386_record_pc): New variables. Ditto.
6293         (i386_record_modrm, i386_record_lea_modrm_addr,
6294         i386_record_lea_modrm): New functions. Ditto.
6295         (i386_process_record): New function. Parse the instruction in
6296         address "addr" and record the values of registers and memory
6297         that will be changed by this instruction.
6298         (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
6299         "process_record" interface.
6300         * i386-tdep.h (gdbarch_tdep): New function pointers
6301         "i386_intx80_record" and "i386_sysenter_record" that point to
6302         the function that can record "intx80" and "sysenter" execute
6303         log.
6304
6305 2009-04-30  Hui Zhu  <teawater@gmail.com>
6306             Michael Snyder  <msnyder@vmware.com>
6307
6308         * infrun.c (use_displaced_stepping): Return false if process
6309         record and replay target is used.
6310         (proceed): Call function "record_not_record_set" if pocess
6311         record and replay target is used.
6312
6313 2009-04-30  Hui Zhu  <teawater@gmail.com>
6314             Michael Snyder  <msnyder@vmware.com>
6315
6316         Linux process record and replay support.
6317
6318         * Makefile.in (ALLDEPFILES): Add linux-record.c.
6319         (ALL_TARGET_OBS): Add linux-record.o.
6320         * configure.tgt (x86_64-*-linux*): Add linux-record.o.
6321         (i[34567]86-*-linux*): Add linux-record.o.
6322         * linux-record.c, linux-record.h: New file.
6323
6324 2009-04-30  Hui Zhu  <teawater@gmail.com>
6325             Michael Snyder  <msnyder@vmware.com>
6326
6327         Process record and replay target.
6328
6329         * Makefile.in (SFILES): Add record.c.
6330         (COMMON_OBS): Add record.o.
6331         * record.c, record.h: New file.
6332
6333 2009-04-30  Hui Zhu  <teawater@gmail.com>
6334             Michael Snyder  <msnyder@vmware.com>
6335
6336         * target.h (strata): New stratum "record_stratum".
6337
6338 2009-04-30  Hui Zhu  <teawater@gmail.com>
6339             Michael Snyder  <msnyder@vmware.com>
6340
6341         GDBARCH interface for process record and replay.
6342
6343         * gdbarch.sh (process_record): This interface point to the
6344         function that records the inferior execute log.
6345
6346 2009-04-29  Doug Evans  <dje@google.com>
6347
6348         * i386-nat.c (child_post_startup_inferior): Delete, unused.
6349
6350 2009-04-29  Pedro Alves  <pedro@codesourcery.com>
6351
6352         * breakpoint.c (print_exception_catchpoint): Access `b' directly
6353         instead of `b->loc->owner'.
6354         (print_mention_exception_catchpoint): Ditto.
6355
6356 2009-04-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
6357
6358         * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
6359
6360 2009-04-27  Tom Tromey  <tromey@redhat.com>
6361
6362         * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
6363
6364 2009-04-27  Jerome Guitton  <guitton@adacore.com>
6365
6366         * symtab.c (append_exact_match_to_sals): New function, extracted
6367         from expand_line_sal.
6368         (expand_line_sal): Use append_exact_match_to_sals to append exact
6369         matches. If none found, append all best items.
6370
6371 2009-04-27  Jerome Guitton  <guitton@adacore.com>
6372
6373         * main.c (captured_main): Move gdbinit lookups after gdb_init.
6374
6375 2009-04-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
6376
6377         PR gdb/9675:
6378         * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
6379         (read_func_scope): Call inherit_abstract_dies.
6380
6381 2009-04-25  Eli Zaretskii  <eliz@gnu.org>
6382
6383         * Makefile.in (ALLDEPFILES): Remove duplicate entries for
6384         sparc-sol2-nat.c and sparc-sol2-tdep.c.
6385
6386         * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
6387
6388 2009-04-24  Pierre Muller  <muller@ics.u-strasbg.fr>
6389
6390         ARI change: Use "/* ARI: rule */" pattern.
6391         * utils.c: Update ARI patterns.
6392         * gdb_dirent.h: Likewise.
6393
6394 2009-04-23  Anthony Green  <green@moxielogic.com>
6395
6396         * MAINTAINERS: Add moxie target.
6397         * configure.tgt: Add moxie-*-elf target.
6398         * moxie-tdep.c: New file.
6399         * moxie-tdep.h: New file.
6400
6401 2009-04-23  Joel Brobecker  <brobecker@adacore.com>
6402
6403         * ada-lang.c: Remove an extra empty line. No code change.
6404
6405 2009-04-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6406
6407         Fix double free on error inserting the breakpoint instruction.
6408         * breakpoint.c (create_breakpoints): Move the
6409         update_global_location_list call to ...
6410         (break_command_really): ... here together with the second local call
6411         both unified after all the cleanups.
6412
6413 2009-04-23  Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
6414             Tom Tromey  <tromey@redhat.com>
6415
6416         * configure, config.in: Regenerate.
6417         * configure.ac: Support for relocatable GDB datadir.  Use
6418         GDB_AC_WITH_DIR.  Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
6419         * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
6420         * top.c (init_main): Add "set data-directory".
6421         * defs.h (gdb_datadir): Declare.
6422         * main.c (gdb_datadir): New global.
6423         (captured_main): Initialize gdb_datadir.  Use relocate_directory.
6424         (relocate_path): New function.
6425         (relocate_directory): Likewise.
6426         (get_init_files): Use relocate_path.
6427         (README): Mention --with-gdb-datadir.
6428
6429 2009-04-23  Joel Brobecker  <brobecker@adacore.com>
6430
6431         * ada-tasks (task_command_1): Call target_find_new_threads.
6432
6433 2009-04-23  Joel Brobecker  <brobecker@adacore.com>
6434
6435         * stack.c (do_gdb_disassembly): Print the exception message if an
6436         error was thrown while trying to perform the disassembly.
6437
6438 2009-04-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
6439
6440         * varobj.c (free_variable): Replace free_current_contents by xfree.
6441
6442 2009-04-22  Kazu Hirata  <kazu@codesourcery.com>
6443
6444         * arm-linux-nat.c (fetch_register, store_register): Use
6445         ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
6446         * arm-linux-tdep.c (arm_linux_supply_gregset,
6447         arm_linux_collect_gregset): Likewise.
6448         * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
6449         * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
6450
6451 2009-04-22  Hui Zhu  <teawater@gmail.com>
6452
6453         * stack.c (_initialize_stack): Set the default of
6454         disassemble-next-line to off.
6455
6456 2009-04-21  Tom Tromey  <tromey@redhat.com>
6457
6458         * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
6459         * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
6460
6461 2009-04-21  Andreas Schwab  <schwab@linux-m68k.org>
6462
6463         * configure.ac: Add quotes to not lose brackets in help text.
6464         * configure: Rebuild.
6465
6466 2009-04-21  Andreas Schwab  <schwab@linux-m68k.org>
6467
6468         * configure.ac: Don't postprocess Makefile in config.status.
6469         Substitute GDB_NM_FILE.  Don't substitute nm_h.
6470         * Makefile.in (GDB_NM_FILE): Substitute.
6471         (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
6472         * configure: Regenerate.
6473         * gnulib/Makefile.in: Regenerate.
6474
6475 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
6476
6477         * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
6478         --with-htmldir): New.
6479         * configure: Regenerate.
6480
6481 2009-04-21  Tom Tromey  <tromey@redhat.com>
6482
6483         * configure: Rebuild.
6484         * configure.ac: Use lower case for start of help strings.  Clean
6485         up --with-sysroot help.
6486
6487 2009-04-21  Tom Tromey  <tromey@redhat.com>
6488
6489         * configure: Rebuild.
6490         * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
6491         * configure.ac: Use AC_HELP_STRING.  Use upper case for variables
6492         in help.
6493
6494 2009-04-21  Pierre Muller  <muller@ics.u-strasbg.fr>
6495
6496         ARI fix: remove "%p".
6497         * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
6498         (ia64_sigtramp_frame_this_id): Ditto.
6499         (ia64_libunwind_frame_this_id): Ditto.
6500         (ia64_libunwind_sigtramp_frame_this_id): Ditto.
6501         * symmisc.c (maintenance_info_psymtabs): Ditto.
6502
6503 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
6504
6505         * configure.ac (--with-relocated-sources): New.
6506         * configure, config.in: Regenerate.
6507         * source.c (add_substitute_path_rule): Remove static.
6508         * source.h (add_substitute_path_rule): Declare.
6509         * main.c: Include "source.h".
6510         (captured_main): Add substitution rule if RELOC_SRCDIR.
6511
6512 2009-04-21  Pierre Muller  <muller@ics.u-strasbg.fr>
6513
6514         * gnu-nat.h (proc_debug): Add missing continuation line in macro.
6515
6516 2009-04-20  David Daney  <ddaney@caviumnetworks.com>
6517
6518         * NEWS: Mention MIPS/Linux hardware watchpoint support.
6519
6520 2009-04-20  David Daney  <ddaney@caviumnetworks.com>
6521
6522         * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
6523         (maint_show_dr, super_close): New variables.
6524         (super_fetch_registers, super_store_registers): Make static.
6525         (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
6526         (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
6527         (pt_watch_style): Define new enum.
6528         (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
6529         Define new structs.
6530         (watch_readback_valid, watch_readback, current_watches, watch_mirror):
6531         New variables.
6532         (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
6533         (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
6534         (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
6535         (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
6536         (type_to_irw, fill_mask, try_one_watch)
6537         (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
6538         (mips_linux_new_thread, populate_regs_from_watches)
6539         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6540         (mips_linux_close): New functions.
6541         (_initialize_mips_linux_nat): Register watchpoint functions with
6542         the target_ops.  Add show-debug-regs maintenance command.
6543
6544 2009-04-20  David Daney  <ddaney@caviumnetworks.com>
6545
6546         * infrun.c (handle_inferior_event): Move gegisters_changed call down.
6547
6548 2009-04-19  Pedro Alves  <pedro@codesourcery.com>
6549
6550         * NEWS: Mention gdbserver support for x86 Windows CE.
6551
6552 2009-04-19  Eli Zaretskii  <eliz@gnu.org>
6553
6554         * config/djgpp/fnchange.lst: Fix typos.
6555
6556         Set default host and target charsets in the DJGPP port.
6557
6558         * config/djgpp/config.sed (am_cv_langinfo_codeset)
6559         (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
6560         in all configure scripts that define ac_cv_env_CPP_value.
6561
6562         * go32-nat.c (dos_codepage, nl_langinfo): New functions.
6563         Include langinfo.h.
6564
6565         * config/djgpp/nl_types.h: New file.
6566
6567         * config/djgpp/langinfo.h: New file.
6568
6569         * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
6570
6571 2009-04-18  Carlos O'Donell  <carlos@codesourcery.com>
6572
6573         * Makefile.in (MAKEHTML): Set to makeinfo --html.
6574         (MAKEHTMLFLAGS): Set to empty.
6575
6576 2009-04-18  Eli Zaretskii  <eliz@gnu.org>
6577
6578         * NEWS: Mention all new set/show commands added since GDB 6.8 was
6579         released.
6580
6581         * go32-nat.c (go32_sysinfo): Check if the call to
6582         __dpmi_get_capabilities fills the buffer with information, and
6583         don't use the buffer if not.
6584
6585 2009-04-17  Tom Tromey  <tromey@redhat.com>
6586
6587         * charset.c (_initialize_charset): Add special case for "646".
6588
6589 2009-04-17  Carlos O'Donell  <carlos@codesourcery.com>
6590
6591         * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
6592         * configure: Regenerate.
6593         * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
6594         configure substitutions.
6595         (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
6596
6597 2009-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
6598
6599         ARI fix: Do not use %p, replace by call to host_address_to_string
6600         for host pointers.
6601         * darwin-nat.c (darwin_xfer_partial): Apply change.
6602         * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
6603         * gnu-nat.h (proc_debug): Ditto.
6604         * symmisc.c (maintenance_info_symtabs): Ditto.
6605         (maintenance_info_psymtabs): Ditto.
6606         * windows-nat.c (handle_load_dll): Ditto.
6607         (handle_unload_dll, info_w32_command, handle_exception): Ditto.
6608         * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
6609
6610 2009-04-17  Joseph Myers  <joseph@codesourcery.com>
6611
6612         * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
6613         --enable-64-bit-bfd.
6614         (sparc-*-linux*): Likewise.
6615
6616 2009-04-17  Eli Zaretskii  <eliz@gnu.org>
6617
6618         * go32-nat.c (go32_sysinfo): Update list of Windows versions of
6619         the NT family.
6620
6621 2009-04-16  Pedro Alves  <pedro@codesourcery.com>
6622
6623         * remote.c (remote_query_attached): Fix pasto in packet_ok result
6624         checking.
6625
6626 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
6627
6628         * procfs.c (solib_mappings_callback, find_memory_regions_callback):
6629         Revert the previous change.  Might not be correct, actually.
6630
6631 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
6632
6633         * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
6634         (ada_get_current_task, ada_print_exception_breakpoint_nontask)
6635         (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
6636         Remove declaration. These are non-existent functions.
6637
6638 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
6639
6640         * procfs.c (solib_mappings_callback, find_memory_regions_callback):
6641         Fix a compilation warning on mips-irix due to casting from
6642         a pointer of different size.
6643
6644 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
6645
6646         * ada-lang.c (symtab_for_sym): Delete.
6647         (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
6648
6649 2009-04-16  Joel Brobecker  <brobecker@adacore.com>
6650
6651         * ada-lang.c (extract_string): Delete.
6652         (ada_main_name): Reimplement using target_read_string instead of
6653         extract_string.
6654
6655 2009-04-16  Andreas Schwab  <schwab@linux-m68k.org>
6656
6657         * m68klinux-nat.c: Remove obsolete comment.
6658         (fetch_register, store_register): Don't call
6659         gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
6660         which are always nops here.
6661
6662 2009-04-14  Tom Tromey  <tromey@redhat.com>
6663
6664         * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
6665         (c_printstr): Likewise.
6666         * charset.c: Include gdb_wait.h.
6667         (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
6668         (find_charset_names): Use pexecute.  Handle libiconv's output.
6669         Detect errors.
6670         (_initialize_charset): Use xstrdup.
6671         * gdb_wchar.h: Check HAVE_BTOWC.  Split PHONY_ICONV and wchar
6672         cases.
6673         (INTERMEDIATE_ENCODING): New define.
6674         * configure, config.in: Rebuild.
6675         * configure.ac: Check for btowc.
6676
6677 2009-04-15  Tom Tromey  <tromey@redhat.com>
6678
6679         * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
6680
6681 2009-04-15  Eli Zaretskii  <eliz@gnu.org>
6682
6683         * utils.c (parse_escape): Initialize target_char to pacify GCC.
6684
6685 2009-04-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
6686
6687         * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
6688
6689 2009-04-14  Pierre Muller  <muller@ics.u-strasbg.fr>
6690
6691         ARI fix: sprintf rule.
6692         * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
6693         * ada-lang.c (add_angle_brackets): Use xstrprintf.
6694         (ada_decode): Replace sprintf by xsnprintf.
6695         (find_old_style_renaming_symbol): Ditto.
6696         (ada_to_fixed_type_1, ada_enum_name): Ditto.
6697
6698
6699 2009-04-14  Joel Brobecker  <brobecker@adacore.com>
6700
6701         * target.c (target_mourn_inferior): Call bfd_cache_close_all
6702         after having executed the target mourn_inferior routine.
6703
6704 2009-04-14  Eli Zaretskii  <eliz@gnu.org>
6705
6706         * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
6707         undefined.
6708
6709 2009-04-13  David Daney  <ddaney@caviumnetworks.com>
6710
6711         * infrun.c (maybe_software_singlestep): New function.
6712         (resume): Call maybe_software_singlestep.
6713         (handle_inferior_event): Same.
6714
6715 2009-04-13  Tom Tromey  <tromey@redhat.com>
6716
6717         * python/python-frame.c (frapy_richcompare): Return
6718         Py_NotImplemented, not an error.  Handle Py_NE as well.
6719
6720 2009-04-13  Eli Zaretskii  <eliz@gnu.org>
6721
6722         * charset.c (EILSEQ): Define if not defined by system headers.
6723
6724 2009-04-11  Eli Zaretskii  <eliz@gnu.org>
6725
6726         * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
6727         to be consistent with renaming config.intl.in into config_intl.in.
6728
6729         * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
6730         consistent with the change from 2008-11-09.
6731
6732 2009-04-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
6733
6734         * gdbtypes.c: Remove excessive parentheses at the return keywords.
6735         * varobj.c (varobj_invalidate): Fix indentation.
6736         * varobj.c (varobj_invalidate): Fix formatting text width.
6737
6738 2009-04-08  Vladimir Prus  <vladimir@codesourcery.com>
6739
6740         Implement -exec-jump.
6741
6742         * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
6743         * mi/mi-main.c (mi_cmd_exec_jump): New.
6744         * mi/mi-cmds.c (mi_cmds): Register exec-jump.
6745
6746 2009-04-07  Doug Evans  <dje@google.com>
6747
6748         * symfile.c (symbol_file_clear): Fix indentation.
6749
6750 2009-04-06  Mark Kettenis  <kettenis@gnu.org>
6751
6752         * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
6753
6754 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
6755
6756         * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
6757         (ppc_linux_auxv_parse): New function.
6758         (ppc_linux_read_description): Use ppc_linux_target_wordsize.
6759         (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
6760
6761 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
6762
6763         * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
6764         BFD to contents of SPU name note.
6765         (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
6766         with "from_tty" argument 1 instead of 0.
6767
6768 2009-04-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
6769
6770         * dwarf2read.c
6771         (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
6772         Create the symbol in local scope.
6773         * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
6774
6775 2009-04-02  Keith Seitz  <keiths@redhat.com>
6776
6777         * stabsread.c (read_member_functions): GCC may emit an extra space
6778         at the end of the names "__base_ctor" and "__base_dtor"; so ignore
6779         whitespace when looking for these functions.
6780
6781 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
6782
6783         Change the default value for "set print frame-arguments" to scalars.
6784
6785         * stack.c (print_frame_arguments): Set initial value to "scalars".
6786
6787 2009-04-01  Aleksandar Ristovski  <aristovski@qnx.com>
6788
6789         * mips-tdep.c (mips_numeric_register_alieses): New definition.
6790         (mips_gdbarch_init): Add user registers from
6791         mips_numeric_register_aliases.
6792
6793 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
6794
6795         * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
6796
6797 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
6798
6799         * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
6800         this is the last one.
6801
6802 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
6803
6804         * remote.c (append_resumption): New.
6805         (remote_vcont_resume): Use it.
6806
6807 2009-04-01  Joel Brobecker  <brobecker@adacore.com>
6808
6809         * windows-nat.c (+windows_get_ada_task_ptid): New function.
6810         (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
6811
6812 2009-03-31  Daniel Jacobowitz  <dan@codesourcery.com>
6813             Keith Seitz  <keiths@redhat.com>
6814             Jan Kratochvil  <jan.kratochvil@redhat.com>
6815
6816         PR gdb/6817
6817         * Makefile.in (dbxread.o): Update.
6818         * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
6819         * dwarf2read.c (GDB_FORM_cached_string): New.
6820         (read_partial_die): Use dwarf2_canonicalize_name.
6821         (dwarf2_linkage_name): Use dwarf2_name.
6822         (dwarf2_canonicalize_name): New.
6823         (dwarf2_name): Use dwarf2_canonicalize_name.
6824         (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
6825         * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
6826         * symtab.c (lookup_symbol_in_language): Canonicalize input before
6827         searching.
6828         * cp-name-parser.y: operator() requires two parameters,
6829         according to libiberty.
6830         * minsyms.c (lookup_minimal_symbol): Canonicalize input
6831         before searching.
6832         * NEWS: Update.
6833
6834 2009-03-31  Joel Brobecker  <brobecker@adacore.com>
6835
6836         Provide support for (Ada) task-specific breakpoints.
6837
6838         * ada-lang.h (ada_get_task_number): Add declaration.
6839         (breakpoint_ada_task_match): Delete declaration.
6840         * ada-tasks.c (ada_get_task_number): Make non-static.
6841         * breakpoint.h (struct breakpoint): Add field "task".
6842         * breakpoint.c (print_one_breakpoint_location): Add handling of
6843         task-specific breakpoints.
6844         (create_breakpoint, create_breakpoints, find_condition_and_thread):
6845         New parameter "task".
6846         (break_command_really): Update calls to find_condition_and_thread
6847         and create_breakpoints.
6848         (breakpoint_re_set_one): Update call to find_condition_and_thread.
6849         Set b->task.
6850
6851 2009-03-31  Joel Brobecker  <brobecker@adacore.com>
6852
6853         * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
6854
6855 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
6856
6857         * remote.c (remote_notice_new_inferior): Use ptid_is_pid.  Check
6858         if the thread's ptid without a thread id field is in the list
6859         before calling thread_change_ptid.
6860         (extended_remote_attach_1): In non-stop mode, do not rely on
6861         querying the current thread, instead, query the thread list, and
6862         select the first thread of the process.
6863         * gdbthread.h (first_thread_of_process): Declare.
6864         * thread.c (first_thread_of_process): Define.
6865
6866 2009-03-30  Stan Shebs  <stan@codesourcery.com>
6867
6868         Make tracepoints into a type of breakpoint.
6869         * breakpoint.h (enum bptype): Add bp_tracepoint.
6870         (struct breakpoint): Add fields step_count, pass_count, actions.
6871         (get_tracepoint, get_tracepoint_by_number): Declare.
6872         (all_tracepoints): Declare.
6873         * breakpoint.c: Include tracepoint.h, readline.h.
6874         (ALL_TRACEPOINTS): Move here from tracepoint.c.
6875         (tracepoint_count): Ditto.
6876         (should_be_inserted): GDB does not insert tracepoints itself.
6877         (print_it_typical): Add tracepoint case.
6878         (bpstat_what): Ditto.
6879         (print_one_breakpoint_location): Ditto, and add printing for
6880         pass count, step count, and action list.
6881         (user_settable_breakpoint): Add tracepoint case.
6882         (allocate_bp_location): Ditto.
6883         (set_breakpoint_location_function): Ditto.
6884         (disable_breakpoints_in_shlibs): Ditto.
6885         (mention): Ditto.
6886         (break_command_really): Add argument traceflag, use to choose
6887         basic breakpoint type.
6888         (break_command_1): Pass extra argument.
6889         (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
6890         (breakpoint_re_set_one): Add tracepoint case.
6891         (disable_command, enable_command): Ditto.
6892         (set_tracepoint_count): Move here from tracepoint.c.
6893         (trace_command): Move here from tracepoint.c and use
6894         break_command_really.
6895         (tracepoints_info): Move here from tracepoint.c and call
6896         breakpoints_info.
6897         (enable_trace_command): Move here from tracepoint.c and call
6898         enable_command.
6899         (disable_trace_command): Move here from tracepoint.c and call
6900         disable_command.
6901         (delete_trace_command): Move here from tracepoint.c and call
6902         delete_breakpoint.
6903         (trace_pass_command): Move here from tracepoint.c.
6904         (get_tracepoint_by_number): Ditto.
6905         (tracepoint_save_command): Ditto.
6906         (get_tracepoint): New function.
6907         (all_tracepoints): New function.
6908         (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
6909         deprecate "enable trace" and "disable trace" commands.
6910         * tracepoint.h (struct tracepoint): Remove.
6911         (tracepoint_chain): Remove decl.
6912         (deprecated_create_tracepoint_hook): Remove decl.
6913         (deprecated_delete_tracepoint_hook): Remove decl.
6914         (deprecated_modify_tracepoint_hook): Remove decl.
6915         (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
6916         (free_actions): Update signature.
6917         (validate_actionline): Update signature.
6918         (end_actions_pseudocommand): Declare.
6919         (while_stepping_pseudocommand): Declare.
6920         * tracepoint.c: Include breakpoint.h.
6921         (tracepoint_chain, tracepoint_count): Remove.
6922         (free_actions, make_cleanup_free_actions): Update signature.
6923         (trace_command, set_raw_tracepoint): Remove.
6924         (trace_mention): Remove.
6925         (tracepoints_info): Remove.
6926         (tracepoint_operation, map_args_over_tracepoints): Remove.
6927         (get_tracepoint_by_number): Remove.
6928         (enable_trace_command, disable_trace_command): Remove.
6929         (delete_trace_command, trace_pass_command): Remove.
6930         (trace_actions_command, read_actions): Update signature.
6931         (validate_actionline): Update signature, use bp loc.
6932         (encode_actions): Ditto.
6933         (download_tracepoint): New function, body of trace_start_command.
6934         (trace_start_command): Call it, use all_tracepoints.
6935         (tracepoint_save_command): Remove.
6936         (tracepoint_dump_command): Use get_tracepoint.
6937         (end_actions_pseudocommand): Make globally visible.
6938         (while_stepping_pseudocommand): Ditto.
6939         (_initialize_tracepoint): Move command definitions to breakpoint.c.
6940
6941 2009-03-30  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6942
6943         Expose frames to Python.
6944         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
6945         (SUBDIR_PYTHON_SRCS): Add python-frame.c.
6946         (python-frame.o): New target.
6947         * python/python-frame.c: New file.
6948         * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
6949         gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
6950         gdbpy_initialize_frames): New prototypes.
6951         * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
6952         (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
6953         entries.
6954         * stack.c (find_frame_funname): New function, factored out of
6955         print_frame.
6956         (print_frame): Call find_frame_funname.
6957         * stack.h (find_frame_funname): Add prototype.
6958
6959 2009-03-29  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6960
6961         Remove unused value_object attribute `owned_by_gdb'.
6962         * python/python-value.c (value_object): Remove owned_by_gdb
6963         attribute.
6964         (valpy_dealloc): Remove reference to self->owned_by_gdb.
6965         (valpy_new): Likewise.
6966         (value_to_value_object): Likewise.
6967
6968 2009-03-29  Thiago Jung Bauermann  <bauerman@br.ibm.com>
6969
6970         Change gdb.Value.address from a method to an attribute.
6971         * python/python-value.c (value_object): Add `address' element.
6972         (valpy_dealloc): Decrement reference to self->address if set.
6973         (valpy_new): Initialize val_obj->address.
6974         (valpy_address): Rename to ...
6975         (valpy_get_address): ... this.  Change signature from method to
6976         attribute.  Update self->address if not set.
6977         (value_to_value_object): Initialize val_obj->address.
6978         (value_object_getset): Add `address' element.
6979         (value_object_methods): Remove `address' element.
6980
6981 2009-03-29  Andreas Schwab  <schwab@linux-m68k.org>
6982
6983         * observer.sh: Set LANG/LC_ALL to C, not c.
6984
6985 2009-03-28  Kevin Buettner  <kevinb@redhat.com>
6986
6987         * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
6988         `char' is unsigned.
6989
6990 2009-03-28  Pedro Alves  <pedro@codesourcery.com>
6991
6992         * remote.c (remote_stop_ns): If multi-process extensions are off,
6993         and GDB is requesting the whole process to stop, sent "vCont;t",
6994         not "vCont;t:-1"
6995
6996 2009-03-28  Pedro Alves  <pedro@codesourcery.com>
6997
6998         * inf-loop.c (inferior_event_handler): Avoid calling is_running on
6999         null inferior_ptid.
7000
7001 2009-03-27  Eli Zaretskii  <eliz@gnu.org>
7002
7003         * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
7004
7005 2009-03-26  Doug Evans  <dje@google.com>
7006
7007         * thread.c (do_restore_current_thread_cleanup): Redo test for
7008         whether to restore old->inferior_ptid.
7009
7010 2009-03-26  Tom Tromey  <tromey@redhat.com>
7011
7012         * breakpoint.c (resolve_sal_pc): Preserve original line number
7013         when skipping prologue.
7014
7015 2009-03-26  Doug Evans  <dje@google.com>
7016
7017         * thread.c (inferior_thread) Remove "extern" in definition.
7018
7019 2009-03-26  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7020
7021         Add gdb.Value.is_optimized_out attribute.
7022         * python/python-value.c (valpy_get_is_optimized_out): New
7023         function.
7024         (value_object_getset): New variable.
7025         (value_object_type): Initialize tp_getset element.
7026
7027 2009-03-26  Joel Brobecker  <brobecker@adacore.com>
7028
7029         Recognize missing DW_AT_location as <value optimized out>.
7030         * dwarf2read.c
7031         (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
7032         Call add_symbol_to_list.
7033
7034 2009-03-25  Tom Tromey  <tromey@redhat.com>
7035
7036         * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
7037         * stack.c (print_this_frame_argument_p): Use check_typedef.
7038
7039 2009-03-25  Tom Tromey  <tromey@redhat.com>
7040
7041         * configure: Rebuild.
7042         * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
7043         Rearrange flags setting.  Add comments.
7044
7045 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
7046
7047         * config/i386/nm-i386.h: Remove code within
7048         I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
7049         * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
7050         macro.
7051         * config/i386/nm-cygwin64.h: Ditto.
7052         * config/i386/nm-fbsd.h: Ditto.
7053         * config/i386/nm-go32.h: Ditto.
7054         * config/i386/nm-linux.h: Ditto.
7055         * config/i386/nm-linux64.h: Ditto.
7056
7057 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
7058
7059         ARI fix: "xasprintf" rule.
7060         * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
7061
7062 2009-03-25  Pedro Alves  <pedro@codesourcery.com>
7063
7064         * remote.c (remote_start_remote): In non-stop mode, call
7065         init_wait_for_inferior before adding threads and inferiors.
7066
7067 2009-03-25  Joel Brobecker  <brobecker@adacore.com>
7068
7069         * breakpoint.c (breakpoint_thread_match): Split a large condition
7070         into several smaller conditions.  No behavior change.
7071
7072 2009-03-25  Pedro Alves  <pedro@codesourcery.com>
7073
7074         * infrun.c (infrun_thread_thread_exit): New.
7075         (_initialize_infrun): Attach it to the thread_exit observer.
7076         * thread.c (delete_thread_1): Always call the observer, passing it
7077         the silent flag.
7078         * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter.  If
7079         SILENT, return immediately.
7080
7081 2009-03-25  Pedro Alves  <pedro@codesourcery.com>
7082
7083         * infrun.c (normal_stop): Use has_stack_frames instead of
7084         target_has_stack.
7085         * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
7086         when there is no thread selected.
7087         (mi_cmd_execute): Don't special case commands that can run without
7088         a valid selected thread.
7089         * top.c (execute_command): Don't special case commands that can
7090         run without a valid selected thread.  Use has_stack_frames.
7091         * infcmd.c (ensure_valid_thread): New.
7092         (continue_1, step_1, jump_command, signal_command): Use it.
7093         (detach_command): Error out if there's no selected thread/inferior.
7094         * thread.c (print_thread_info): Allow having no thread selected.
7095         (switch_to_thread): Don't read the PC if there is no current thread.
7096         (do_restore_current_thread_cleanup): Don't record the current
7097         frame if there is no current thread.
7098         (make_cleanup_restore_current_thread): Don't read frame info if
7099         there is no selected thread.
7100         (_initialize_thread): Don't mark commands as
7101         "no_selected_thread_ok".
7102         * frame.c (get_current_frame): Error out if there is no valid
7103         selected thread.
7104         (has_stack_frames): Return false if there is no valid
7105         selected thread.
7106         * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
7107         "no_selected_thread_ok".
7108         * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
7109         (get_cmd_no_selected_thread_ok): Delete.
7110         * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
7111         (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
7112         Delete declaration.
7113         * stack.c (get_selected_block): Use has_stack_frames.
7114
7115 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7116
7117         Fix size of FPSCR in Power 7 processors.
7118         * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7119         (PPC_FEATURE_HAS_DFP): New #define.
7120         (ppc_linux_read_description): Check for DFP feature instead of
7121         ISA 2.05 to decide on size of the FPSCR.
7122
7123 2009-03-25  Kevin Buettner  <kevinb@redhat.com>
7124
7125         * mn10300-tdep.c (trad-frame.h): Don't include.
7126         (prologue-value.h): Include.
7127         (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
7128         (struct mn10300_prologue): Define.
7129         (push_reg, translate_rreg, check_for_saved): New functions.
7130         (mn10300_analyze_prologue): Rewrite, using prologue-value
7131         machinery.  Handle more instructions than before.  Permit
7132         instructions to occur in any order.
7133         (mn10300_skip_prologue): Find the extents of the function
7134         in question; mn10300_analyze_prologue no longer does this.
7135         (mn10300_analyze_frame_prologue): New function.
7136         (mn10300_frame_base): New function.
7137         (mn10300_frame_this_id): Rewrite, no longer using trad-frame
7138         implementation.
7139         (mn10300_frame_prev_register): Likewise.
7140         (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
7141         (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
7142         `this_frame'.
7143         (mn10300_frame_unwind_init): Don't call frame_base_set_default().
7144
7145 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
7146
7147         Fix completer problem for filename completion on the first try.
7148
7149         * gdb/completer.h (gdb_completion_word_break_characters): New function.
7150         * gdb/completer.c: Include gdb_assert.h.
7151         (complete_line_internal_reason): New enum.
7152         (complete_line_internal): Change last argument type to
7153         complete_line_internal_reason.
7154         Modify function to handle the different complete_line_internal_reason
7155         argument values.
7156         (complete_line): Adapt to change in complete_line_internal.
7157         (command_completer): Ditto.
7158         (gdb_completion_word_break_characters): Implement new function.
7159         * top.c (init_main): Set  rl_completion_word_break_hook to
7160         gdb_completion_word_break_characters.
7161
7162
7163 2009-03-25  Pierre Muller  <muller@ics.u-strasbg.fr>
7164
7165         ARI fix: "strlen d_name" rule.
7166         * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
7167
7168
7169 2009-03-24  Tom Tromey  <tromey@redhat.com>
7170             Pedro Alves  <pedro@codesourcery.com>
7171
7172         * configure, config.in: Rebuild.
7173         * configure.ac: Check for libiconvlist.
7174         * charset.c: Check HAVE_LIBICONVLIST.
7175         * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
7176         LIBICONV_LIBDIR.  Update CPPFLAGS and LIBS.
7177         * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
7178         Remove.
7179         (INTERNAL_CFLAGS_BASE): Update.
7180         (INTERNAL_LDFLAGS): Update.
7181         (CLIBS): Update.
7182
7183 2009-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7184
7185         * configure.ac: Initialize the variable $PREFER_CURSES.
7186         * configure: Regenerated.
7187
7188 2009-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7189
7190         * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
7191         * configure: Regenerated.
7192
7193 2009-03-24  Pierre Muller  <muller@ics.u-strasbg.fr>
7194
7195         ARI fix: "strerror" rule.
7196         * darwin-nat.c (darwin_ptrace): Use safe_strerror.
7197         (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
7198
7199 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7200
7201         * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
7202         before looking up the fields inside our struct type.
7203
7204 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7205
7206         * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
7207         trying to resolve the type qualification.
7208
7209 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7210
7211         * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
7212         we try to apply the attribute on the real type, rather than
7213         its associated typedef.
7214
7215 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7216
7217         * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
7218         to make sure we try to get the modulus of the actual type, not the
7219         associated typedef.
7220
7221 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7222
7223         * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
7224         [OP_ATR_LENGTH]: When using the attribute on a type, make sure
7225         to get the real type, not the associated typedef.
7226
7227 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7228
7229         * ada-lang.c (ada_get_field_index): Add handling of the case
7230         when TYPE is a typedef of a struct.
7231
7232 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7233
7234         Add gdb_usleep as a portable version of usleep based on gdb_select.
7235         * gdb_usleep.h, gdb_usleep.c: New files.
7236         * Makefile.in (SFILES): Add gdb_usleep.c.
7237         (HFILES_NO_SRCDIR): Add gdb_usleep.h.
7238         (COMMON_OBS): Add gdb_usleep.o.
7239         * ser-unix.c (hardwire_send_break): Replace call to gdb_select
7240         by call to gdb_usleep.
7241
7242 2009-03-23  Joel Brobecker  <brobecker@adacore.com>
7243
7244         * buildsym.c (end_symtab): If we ignore the subfiles, then
7245         unlink the associated symtabs if they were already allocated.
7246
7247 2009-03-23  Jerome Guitton  <guitton@adacore.com>
7248
7249         Provide a way to force building of GDB with libcurses.
7250         * configure.ac: Add --with-curses.
7251         * configure: Regenerated.
7252
7253 2009-03-23  Tom Tromey  <tromey@redhat.com>
7254
7255         * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
7256         error message.
7257
7258 2009-03-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
7259
7260         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
7261         solib_contains_address_p instead of searching.
7262
7263 2009-03-23  Tom Tromey  <tromey@redhat.com>
7264
7265         * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
7266         (iconv): Make 'inbuf' argument const.
7267         (convert_between_encodings): Use ICONV_CONST.
7268         (wchar_iterate): Likewise.
7269
7270 2009-03-22  Christopher Faylor  <me+cygwin@cgf.cx>
7271
7272         * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
7273         dynamically loaded function.
7274         (LookupPrivilegeValueA): Ditto.
7275         (OpenProcessToken): Ditto.
7276         (AdjustTokenPrivileges): Rename and define placeholder for address of
7277         dynamically loaded function.
7278         (LookupPrivilegeValueA): Ditto.
7279         (OpenProcessToken): Ditto.
7280         (set_process_privilege): Remove check for loaded functions.
7281         (bad_OpenProcessToken): Define.
7282         (_initialize_loadable): Load token functions from advapi here, setting
7283         OpenProcessToken function to a dummy static function which always return
7284         error if OS doesn't support this functionality.
7285
7286 2009-03-22   Nicolas Roche  <roche@adacore.com>
7287              Christopher Faylor <me+cygwin@cgf.cx>
7288
7289         * win32-nat.c (ctrl_c_handler): New function.
7290         (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
7291         is run in a separate console.
7292
7293 2009-03-22  Christopher Faylor  <me+cygwin@cgf.cx>
7294
7295         * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
7296         for dynamically loaded function.
7297         (DebugBreakProcess): Ditto.
7298         (DebugSetProcessKillOnExit): Ditto.
7299         (EnumProcessModules): Ditto.
7300         (GetModuleFileNameExA): Ditto.
7301         (GetModuleInformation): Ditto.
7302         (DebugActiveProcessStop): Rename and define placeholder for address of
7303         dynamically loaded function.
7304         (DebugBreakProcess): Ditto.
7305         (DebugSetProcessKillOnExit): Ditto.
7306         (EnumProcessModules): Ditto.
7307         (GetModuleFileNameExA): Ditto.
7308         (GetModuleInformation): Ditto.
7309         (psapi_loaded): Delete.
7310         (get_module_name): Don't check psapi_loaded, just rely on the fact that
7311         dynamically loaded functions will return failure if they weren't
7312         previously found.
7313         (has_detach_ability): Delete.
7314         (windows_attach): Remove call to has_detach_ability ().  Just rely on
7315         functions being callable.
7316         (bad_DebugActiveProcessStop): Define.
7317         (bad_DebugBreakProcess): Ditto.
7318         (bad_DebugSetProcessKillOnExit): Ditto.
7319         (bad_EnumProcessModules): Ditto.
7320         (bad_GetModuleFileNameExA): Ditto.
7321         (bad_GetModuleInformation): Ditto.
7322         (_initialize_loadable): Rename from _initialize_psapi.  Initialize all
7323         dynamic storage here, setting nonexistent functions to dummy static
7324         functions which always return error.
7325
7326 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7327
7328         * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
7329         to the about_to_proceed observer notification.
7330         (mi_about_to_proceed): New.
7331         (mi_on_resume): Only output ^running and the prompt here if the
7332         target was proceeded.
7333         * breakpoint.c (breakpoint_proceeded): New static.
7334         (breakpoint_about_to_proceed): New.
7335         (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
7336         the about_to_proceed observer notification.
7337         * inferior.h (breakpoint_proceeded): Delete declaration.
7338         * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
7339         Notify the about_to_proceed observers.
7340         (struct inferior_status): Delete breakpoint_proceeded member.
7341         (save_inferior_status): Don't save it.
7342         (restore_inferior_status): Don't restore it.
7343         * mi-main.h (mi_proceeded): Declare.
7344         * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
7345         a command.
7346
7347 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7348
7349         * gdbthread.h (struct thread_info): Add in_infcall member.
7350         * infcall.c (run_inferior_call): Save, set and restore in_infcall.
7351         Remove reverences to suppress_resume_observer.  Refresh
7352         `call_thread' after returning from `proceed'.
7353         * infcmd.c (suppress_resume_observer): Delete.
7354         * inferior.h (suppress_resume_observer): Delete declaration.
7355         * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
7356         inferior function.
7357         * thread.c (set_running): Remove references to
7358         suppress_resume_observer.
7359         * infrun.c (struct inferior_status): Add in_infcall member.
7360         (save_inferior_status): Save it.
7361         (restore_inferior_status): Restore it.
7362
7363 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7364
7365         * infcall.c (run_inferior_call): Remove references to
7366         suppress_stop_observer.
7367         * infcmd.c (suppress_stop_observer): Delete.
7368         (finish_command_continuation): Remove NOTE.  Don't clear
7369         suppress_stop_observer anymore.
7370         (finish_command_continuation_free_arg): Likewise.
7371         (finish_forward): Remove references to suppress_stop_observer.
7372         Call normal_stop observer if we haven't already.
7373         * inferior.h (suppress_stop_observer): Delete.
7374         * infrun.c (normal_stop): When deciding to suppress the
7375         normal_stop observer, check for proceed_to_finish instead of
7376         suppress_stop_observer.
7377
7378 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7379
7380         * symfile.c (symfile_relocate_debug_section): Remove check for
7381         SEC_DEBUGGING.
7382
7383 2009-03-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7384             Jim Blandy  <jimb@red-bean.com>
7385             Thiago Jung Bauermann  <bauerman@br.ibm.com>
7386             Tom Tromey  <tromey@redhat.com>
7387
7388         Miscellaneous fixes to the Python code.
7389         * python/python-cmd.c (cmdpy_init): Accept keyword
7390         arguments.
7391         * python/python-value.c (valpy_string): Accept keyword
7392         arguments.
7393         (valpy_binop): Use `break' to exit from the TRY_CATCH block.
7394         Do not call value_to_value_object on NULL RES_VAL.
7395         (value_object_methods): Change `string' entry to also accept
7396         keyword arguments.
7397         (convert_value_from_python): Return a copy of the value if obj is
7398         a gdb.Value object.
7399         (value_object_methods): Mark the `string' method as accepting
7400         keywords, and show method "prototype" in the doc string.
7401         * python/python.c (get_parameter): Don't return inside a
7402         TRY_CATCH.
7403
7404 2009-03-20  Tom Tromey  <tromey@redhat.com>
7405
7406         Add support for convenience functions in Python.
7407         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
7408         (SUBDIR_PYTHON_SRCS): Add python-function.c.
7409         (python-function.o): New target.
7410         * eval.c: Include "python/python.h" and <ctype.h>.
7411         (evaluate_subexp_standard): Handle values of type
7412         TYPE_CODE_INTERNAL_FUNCTION.
7413         * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
7414         * parse.c (write_exp_string): Remove duplicate word in comment.
7415         * python/python-function.c: New file.
7416         * python/python-internal.h (gdbpy_initialize_functions): Add
7417         prototype.
7418         * python/python.c (_initialize_python): Call
7419         gdbpy_initialize_functions.
7420         * valprint.c (value_check_printable): Handle values of type
7421         TYPE_CODE_INTERNAL_FUNCTION.
7422         * value.c: Include "cli/cli-decode.h".
7423         (internal_function): New struct.
7424         (functionlist, internal_fn_type): New static variables.
7425         (lookup_only_internalvar,
7426         lookup_internalvar): Add const qualifier to name argument.
7427         (create_internalvar): Likewise.  Initialize new field.
7428         (set_internal_var): Fix typo in comment.  Don't allow assignment
7429         to canonical variable.
7430         (value_create_internal_function, value_internal_function_name,
7431         call_internal_function, function_command, function_destroyer,
7432         add_internal_function): New functions.
7433         (_initialize_values): Create `function' placeholder command.
7434         Initialize internal_fn_type.
7435         * value.h (lookup_only_internalvar, create_internalvar,
7436         lookup_internalvar): Add const qualifier to name argument.
7437         (internal_function_fn, add_internal_function, call_internal_function,
7438         value_internal_function_name): Add prototypes.
7439         (struct internalvar) <canonical>: New field.
7440
7441 2009-03-20  Tom Tromey  <tromey@redhat.com>
7442
7443         * c-lang.c (evaluate_subexp_c): Call check_typedef.
7444
7445 2009-03-20  Tom Tromey  <tromey@redhat.com>
7446             Julian Brown  <julian@codesourcery.com>
7447
7448         PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
7449         PR i18n/9401, PR exp/9613:
7450         * NEWS: Update
7451         * value.h (value_typed_string): Declare.
7452         (val_print_string): Update.
7453         * valprint.h (print_char_chars): Update.
7454         * valprint.c (print_char_chars): Add type argument.  Update.
7455         (val_print_string): Likewise.
7456         * valops.c (value_typed_string): New function.
7457         * utils.c (host_char_to_target): New function.
7458         (parse_escape): Use host_char_to_target, host_hex_value.  Update.
7459         Remove '^' case.
7460         (no_control_char_error): Remove.
7461         * typeprint.c (print_type_scalar): Update.
7462         * scm-valprint.c (scm_scmval_print): Update.
7463         * scm-lang.h (scm_printchar, scm_printstr): Update.
7464         * scm-lang.c (scm_printchar): Add type argument.
7465         (scm_printstr): Likewise.
7466         * printcmd.c (print_formatted): Update.
7467         (print_scalar_formatted): Update.
7468         (printf_command) <wide_string_arg, wide_char_arg>: New constants.
7469         Handle '%lc' and '%ls'.
7470         * parser-defs.h (struct typed_stoken): New type.
7471         (struct stoken_vector): Likewise.
7472         (write_exp_string_vector): Declare.
7473         * parse.c (write_exp_string_vector): New function.
7474         * p-valprint.c (pascal_val_print): Update.
7475         * p-lang.h (is_pascal_string_type, pascal_printchar,
7476         pascal_printstr): Update.
7477         * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
7478         Add 'char_type' argument.
7479         (pascal_emit_char): Add type argument.
7480         (pascal_printchar): Likewise.
7481         (pascal_printstr): Likewise.
7482         * objc-lang.c (objc_emit_char): Add type argument.
7483         (objc_printchar): Likewise.
7484         (objc_printstr): Likewise.
7485         * macroexp.c (get_character_constant): Handle unicode characters.
7486         Use c_parse_escape.
7487         (get_string_literal): Handle unicode strings.  Use
7488         c_parse_escape.
7489         * m2-valprint.c (print_unpacked_pointer): Update.
7490         (m2_print_array_contents): Update.
7491         (m2_val_print): Update.
7492         * m2-lang.c (m2_emit_char): Add type argument.
7493         (m2_printchar): Likewise.
7494         (m2_printstr): Likewise.
7495         * language.h (struct language_defn) <la_printchar>: Add type
7496         argument.
7497         <la_printstr, la_emitchar>: Likewise.
7498         (LA_PRINT_CHAR): Likewise.
7499         (LA_PRINT_STRING): Likewise.
7500         (LA_EMIT_CHAR): Likewise.
7501         * language.c (unk_lang_emit_char): Add type argument.
7502         (unk_lang_printchar): Likewise.
7503         (unk_lang_printstr): Likewise.
7504         * jv-valprint.c (java_val_print): Update.
7505         * jv-lang.c (java_emit_char): Add type argument.
7506         * f-valprint.c (f_val_print): Update.
7507         * f-lang.c (f_emit_char): Add type argument.
7508         (f_printchar): Likewise.
7509         (f_printstr): Likewise.
7510         * expprint.c (print_subexp_standard): Update.
7511         * charset.h (target_wide_charset): Declare.
7512         (c_target_char_has_backslash_escape, c_parse_backslash,
7513         host_char_print_literally, host_char_to_target,
7514         target_char_to_host, target_char_to_control_char): Remove.
7515         (enum transliterations): New type.
7516         (convert_between_encodings): Declare.
7517         (HOST_ESCAPE_CHAR): New define.
7518         (host_letter_to_control_character, host_hex_value): Declare.
7519         (enum wchar_iterate_result): New enum.
7520         (struct wchar_iterator): Declare.
7521         (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
7522         wchar_push_back): Declare.
7523         * charset-list.h: New file.
7524         * c-valprint.c (textual_name): New function.
7525         (textual_element_type): Handle wide character types.
7526         (c_val_print): Pass original type to textual_element_type.  Handle
7527         wide character types.
7528         (c_value_print): Use textual_element_type.  Pass original type of
7529         value to val_print.
7530         * c-lang.h (enum c_string_type): New type.
7531         (c_printchar, c_printstr): Update.
7532         * c-lang.c (classify_type): New function.
7533         (print_wchar): Likewise.
7534         (c_emit_char): Add type argument.  Handle wide characters.
7535         (c_printchar): Likewise.
7536         (c_printstr): Add type argument.  Handle wide and multibyte
7537         character sets.
7538         (convert_ucn): New function.
7539         (emit_numeric_character): Likewise.
7540         (convert_octal): Likewise.
7541         (convert_hex): Likewise.
7542         (ADVANCE): New macro.
7543         (convert_escape): New function.
7544         (parse_one_string): Likewise.
7545         (evaluate_subexp_c): Likewise.
7546         (exp_descriptor_c): New global.
7547         (c_language_defn): Use exp_descriptor_c.
7548         (cplus_language_defn): Likewise.
7549         (asm_language_defn): Likewise.
7550         (minimal_language_defn): Likewise.
7551         (charset_for_string_type): New function.
7552         * c-exp.y (%union): Add 'svec' and 'tsval'.
7553         (CHAR): New token.
7554         (exp): Add CHAR production.
7555         (string_exp): Rewrite.
7556         (exp) <string_exp>: Rewrite.
7557         (tempbuf): Now global.
7558         (tempbuf_init): New global.
7559         (parse_string_or_char): New function.
7560         (yylex) <tempbuf>: Now global.
7561         <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
7562         Remove.
7563         Handle 'u', 'U', and 'L' prefixes.  Call parse_string_or_char.
7564         (c_parse_escape): New function.
7565         * auxv.c (fprint_target_auxv): Update.
7566         * ada-valprint.c (ada_emit_char): Add type argument.
7567         (ada_printchar): Likewise.
7568         (ada_print_scalar): Update.
7569         (printstr): Add type argument.  Update calls to ada_emit_char.
7570         (ada_printstr): Add type argument.
7571         (ada_val_print_array): Update.
7572         (ada_val_print_1): Likewise.
7573         * ada-lang.c (emit_char): Add type argument.
7574         * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
7575         type arguments.
7576         * gdb_locale.h: Include langinfo.h.
7577         * charset.c (_initialize_charset): Set default host charset from
7578         the locale.  Don't register charsets.  Add target-wide-charset
7579         commands.  Call find_charset_names.
7580         (struct charset, struct translation): Remove.
7581         (GDB_DEFAULT_HOST_CHARSET): Remove.
7582         (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
7583         (target_wide_charset_name): New global.
7584         (show_host_charset_name): Handle "auto".
7585         (show_target_wide_charset_name): New function.
7586         (host_charset_enum, target_charset_enum): Remove.
7587         (charset_enum): New global.
7588         (all_charsets, register_charset, lookup_charset, all_translations,
7589         register_translation, lookup_translation): Remove.
7590         (simple_charset, ascii_print_literally, ascii_to_control): Remove.
7591         (iso_8859_print_literally, iso_8859_to_control,
7592         iso_8859_family_charset): Remove.
7593         (ebcdic_print_literally, ebcdic_to_control,
7594         ebcdic_family_charset): Remove.
7595         (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
7596         register_iconv_charsets): Remove.
7597         (target_wide_charset_be_name, target_wide_charset_le_name): New
7598         globals.
7599         (identity_either_char_to_other): Remove.
7600         (set_be_le_names, validate): New functions.
7601         (backslashable, backslashed, represented): Remove.
7602         (default_c_target_char_has_backslash_escape): Remove.
7603         (default_c_parse_backslash, iconv_convert): Remove.
7604         (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
7605         ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
7606         iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
7607         ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
7608         ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
7609         ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
7610         (table_convert_char, table_translation, simple_table_translation):
7611         Remove.
7612         (current_host_charset, current_target_charset,
7613         c_target_char_has_backslash_escape_func,
7614         c_target_char_has_backslash_escape_baton): Remove.
7615         (c_parse_backslash_func, c_parse_backslash_baton): Remove.
7616         (host_char_to_target_func, host_char_to_target_baton): Remove.
7617         (target_char_to_host_func, target_char_to_host_baton): Remove.
7618         (cached_iconv_host_to_target, cached_iconv_target_to_host):
7619         Remove.
7620         (lookup_charset_or_error, check_valid_host_charset): Remove.
7621         (set_host_and_target_charsets): Remove.
7622         (set_host_charset, set_target_charset): Remove.
7623         (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
7624         (set_target_wide_charset_sfunc): New function.
7625         (show_charset): Print target wide character set.
7626         (host_charset, target_charset): Rewrite.
7627         (target_wide_charset): New function.
7628         (c_target_char_has_backslash_escape): Remove.
7629         (c_parse_backslash): Remove.
7630         (host_letter_to_control_character): New function.
7631         (host_char_print_literally): Remove.
7632         (host_hex_value): New function.
7633         (target_char_to_control_char): Remove.
7634         (cleanup_iconv): New function.
7635         (convert_between_encodings): New function.
7636         (target_char_to_host): Remove.
7637         (struct wchar_iterator): Define.
7638         (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
7639         wchar_push_back): New functions.
7640         (do_cleanup_iterator): New function.
7641         (char_ptr): New typedef.
7642         (charsets): New global.
7643         (add_one, find_charset_names): New functions.
7644         (default_charset_names): New global.
7645         (auto_host_charset_name): Likewise.
7646         * aclocal.m4, config.in, configure: Rebuild.
7647         * configure.ac: Call AM_LANGINFO_CODESET.
7648         (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
7649         (AM_ICONV): Invoke earlier.
7650         * acinclude.m4: Include codeset.m4.  Subst LIBICONV_INCLUDE and
7651         LIBICONV_LIBDIR.  Check for libiconv in build tree.
7652         * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
7653         (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
7654         (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
7655         * gdb_obstack.h (obstack_grow_wstr): New define.
7656         * gdb_wchar.h: New file.
7657         * defs.h: Include it.
7658
7659 2009-03-20  Tom Tromey  <tromey@redhat.com>
7660             Jan Kratochvil  <jan.kratochvil@redhat.com>
7661
7662         * dwarf2read.c (process_die): Handle DW_TAG_typedef.
7663         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
7664         typedef.
7665         * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
7666         SYMBOL_TYPE result.
7667         * ada-typeprint.c (print_array_type): Do the NULL check
7668         unconditionally.
7669
7670 2009-03-19  Tom Tromey  <tromey@redhat.com>
7671
7672         * utils.c (do_obstack_free): New function.
7673         (make_cleanup_obstack_free): Likewise.
7674         * defs.h (make_cleanup_obstack_free): Declare.
7675
7676 2009-03-18  Doug Evans  <dje@google.com>
7677
7678         * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
7679         int, not a long long.
7680         (linux_nat_info_proc_cmd): Store pid in long instead of long long.
7681
7682         * expprint.c (dump_raw_expression): Print note if non-NULL.
7683
7684         * printcmd.c (display_uses_solib_p): Redo loop, scan element list
7685         backwards.
7686
7687 2009-03-18  Nathan Sidwell  <nathan@codesourcery.com>
7688
7689         * Makefile.in: Update license to GPLv3.
7690         * ada-exp.y: Update license to GPLv3.
7691         * ada-lex.l: Update license to GPLv3.
7692         * c-exp.y: Update license to GPLv3.
7693         * cp-name-parser.y: Update license to GPLv3.
7694         * darwin-nat-info.c: Update license to GPLv3.
7695         * f-exp.y: Update license to GPLv3.
7696         * gdb_thread_db.h: Update license to GPLv3.
7697         * hppanbsd-nat.c: Update license to GPLv3.
7698         * hppanbsd-tdep.c: Update license to GPLv3.
7699         * hppaobsd-tdep.c: Update license to GPLv3.
7700         * jv-exp.y: Update license to GPLv3.
7701         * m2-exp.y: Update license to GPLv3.
7702         * objc-exp.y: Update license to GPLv3.
7703         * p-exp.y: Update license to GPLv3.
7704         * reply_mig_hack.awk: Update license to GPLv3.
7705         * reverse.c: Update license to GPLv3.
7706         * xtensa-xtregs.c: Update license to GPLv3.
7707
7708 2009-03-18  Pedro Alves  <pedro@codesourcery.com>
7709
7710         * remote.c (remote_close): Don't call generic_mourn_inferior.
7711         (remote_mourn_1): Call generic_mourn_inferior after closing the
7712         target.
7713
7714 2009-03-18  Pedro Alves  <pedro@codesourcery.com>
7715
7716         * remote.c (remote_start_remote): Add missing call to
7717         init_wait_for_inferior in non-stop mode.
7718
7719 2009-03-18  Pedro Alves  <pedro@codesourcery.com>
7720
7721         * breakpoint.c (bpstat_should_step): Only consider software
7722         watchpoints that have a location.
7723
7724 2009-03-17  Joel Brobecker  <brobecker@adacore.com>
7725
7726         Add a target_ops parameter to the to_kill method in struct target_ops.
7727
7728         * target.h (struct target_ops): Add a "target_ops *" parameter to
7729         method to_kill.
7730         (target_kill): Remove macro. Add declaration.
7731         * target.c (debug_to_kill): Delete, no longer necessary.
7732         (target_kill): New function.
7733         (update_current_target):  Stop inheriting the to_kill method.
7734         Do not de_fault it to no_process either.
7735         (setup_target_debug): Do not set current_target.to_kill.
7736         * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
7737         linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
7738         remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
7739         accordingly.
7740
7741 2009-03-17  Doug Evans  <dje@google.com>
7742
7743         * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
7744         glibc 2.3.2 and earlier.
7745
7746 2009-03-17  Joel Brobecker  <brobecker@adacore.com>
7747
7748         * frame.c (get_prev_frame_1): Do not perform the inner_frame
7749         sanity check if this_frame is not NORMAL.
7750         (frame_id_inner): Update the description of this function.
7751
7752 2009-03-17  Hui Zhu  <teawater@gmail.com>
7753
7754         * stack.c: Change the introduce of "disassemble-next-line".
7755
7756 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
7757
7758         * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
7759         declare as extern.
7760
7761 2009-03-17  Hui Zhu  <teawater@gmail.com>
7762
7763         * stack.c: Include valprint.h.
7764         (disassemble_next_line): New enum.
7765         (show_disassemble_next_line): New function.  Show the current
7766         value of disassemble-next-line.
7767         (gdb_disassembly_stub_args): New struct for argument passing
7768         between function do_gdb_disassembly and function
7769         gdb_disassembly_stub.
7770         (gdb_disassembly_stub): New function.  Helper for
7771         gdb_disassembly.
7772         (do_gdb_disassembly): New function.  Use TRY_CATCH to catch
7773         the exception from the gdb_disassembly because it will be
7774         broken by filter sometime.
7775         (print_frame_info): If disassemble-next-line is set to auto
7776         or on and doesn't have the line debug messages for $pc,
7777         output the next instruction.
7778         If disassemble-next-line is set to on and there is line debug
7779         messages, output assembly codes for next line.
7780         (_initialize_stack): Make the "set disassemble-next-line"
7781         command an auto-boolean command.  Change its class to
7782         class_stack.  Place it in the top level set list.  Extend help
7783         to describe the auto mode.
7784
7785 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
7786
7787         * infrun.c (normal_stop): Don't overwrite old_chain.
7788
7789 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
7790
7791         * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
7792         which is undefined, by call to regcache_invalidate, which should
7793         do what the original author wanted to do.
7794
7795 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
7796
7797         * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
7798         (mips_create_inferior): Likewise.
7799
7800 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
7801
7802         * go32-nat.c (go32_create_inferior): Add missing ops parameter.
7803
7804 2009-03-16  Joel Brobecker  <brobecker@adacore.com>
7805
7806         * darwin-nat.c (darwin_resume): Fix a compiler warning when
7807         building on x86_64-darwin.
7808
7809 2009-03-16  Tristan Gingold  <gingold@adacore.com>
7810
7811         * configure.tgt: Add handling for x86_64-darwin.
7812
7813 2009-03-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
7814
7815         * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
7816
7817 2009-03-15  Joel Brobecker  <brobecker@adacore.com>
7818
7819         * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
7820         Use the ops parameter to get to the target beneath, rather than
7821         using the current_target global.  Using the current_target global
7822         was an unintended accident.
7823
7824 2009-03-15  Joel Brobecker  <brobecker@adacore.com>
7825
7826         Fix an error happening while loading symbols from a core file
7827         (on AIX).
7828
7829         * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
7830         to detect whether we're debugging a core file or not.
7831
7832 2009-03-15  Joel Brobecker  <brobecker@adacore.com>
7833
7834         Modernize the aix-thread later by getting rid of the base_target
7835         global.  This brings back to life the AIX port which was otherwise
7836         crashing all the time.
7837
7838         * aix-thread.c (base_target): Delete.
7839         (pd_enable): Do not set base_target.
7840         (aix_thread_attach): Use find_target_beneath instead of base_target.
7841         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7842         (aix_thread_fetch_registers, aix_thread_store_registers),
7843         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7844         (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
7845         (aix_thread_kill): Delete. Does not seem necessary.
7846         (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
7847
7848 2009-03-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7849
7850         * stack.c (return_command <retval_exp>): New variables retval_expr
7851         and old_chain.  Inline parse_and_eval to initialize retval_expr.  Check
7852         RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
7853         if RETURN_TYPE is NULL.
7854
7855 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
7856
7857         * remote.c (PACKET_qAttached): New.
7858         (remote_query_attached): New.
7859         (remote_add_inferior): Add new `attached' argument.  Handle it.
7860         (remote_notice_new_inferior, remote_start_remote): Adjust to pass
7861         -1 to remote_add_inferior in new parameter.
7862         (extended_remote_attach_1): Adjust to pass 1 to
7863         remote_add_inferior in the new parameter.
7864         (extended_remote_create_inferior_1): Adjust to pass 0 to
7865         remote_add_inferior in the new parameter.
7866         (_initialize_remote): Add "set/show remote query-attached-packet"
7867         commands.
7868
7869 2009-03-13  Tom Tromey  <tromey@redhat.com>
7870
7871         * symtab.c (lookup_symbol_in_language): Use a cleanup.
7872
7873 2009-03-13  Doug Evans  <dje@google.com>
7874
7875         * exceptions.h: Clean up some comments on catch_exceptions usage.
7876         * exceptions.c: Ditto.  Plus mark catch_errors as superseded by
7877         catch_exceptions.
7878
7879 2009-02-17  Joel Brobecker  <brobecker@adacore.com>
7880
7881         The following patch helps getting rid of a warning inside solib-som.c.
7882
7883         * source.c (source_full_path_of): Constify parameter filename.
7884         * defs.h (source_full_path_of): Update declaration accordingly.
7885
7886 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7887
7888         * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
7889         BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
7890         Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
7891
7892 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7893
7894         * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
7895         promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
7896
7897 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7898
7899         * ada-tasks.c (ada_task_is_alive): Move up and make static.
7900         * ada-lang.h (ada_task_is_alive): Remove declaration.
7901
7902 2009-03-12  Jerome Guitton  <guitton@adacore.com>
7903
7904         * ada-lang.c (ada_delta): Change the type of numerators and
7905         denominators to DOUBLEST, as they may not fit into a long.
7906         (scaling_factor): Ditto.
7907
7908 2009-03-12  Jerome Guitton  <guitton@adacore.com>
7909
7910         * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
7911
7912 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7913
7914         * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
7915         types, if we are unable to determine the actual symbol type
7916         from its tag, then use the static approximation instead.
7917
7918 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7919
7920         Fix crash printing packed record with packed array.
7921
7922         * ada-lang.c (ada_modulus_from_name): New function.
7923         (ada_modulus): In the case where the type length is bigger than
7924         the size of the type used to hold the bounds, try determining
7925         the modulus from the type name.
7926         (ada_value_primitive_packed_val): Fix bug in the computation of
7927         ntarg causing an out-of-buffer invalid access.
7928
7929 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7930
7931         Fix segfault when printing short_integer'last.
7932
7933         * ada-lang.c (ada_find_any_type): Search in the primitive types
7934         if a symbol could not be found.
7935
7936 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7937
7938         * ada-tasks.c (task_states,long_task_states): Add new states
7939         Activating and Acceptor_Delay_Sleep.  Update the description
7940         of state Acceptor_Sleep.
7941
7942 2009-03-12  Jonas Maebe <jonas.maebe@elis.ugent.be>  (obvious change)
7943
7944         Fix a build failure on Darwin following some changes in
7945         the profile of some target_ops methods.
7946
7947         * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
7948         where missing.
7949         (darwin_stop_inferior, darwin_detach): Likewise.
7950
7951 2009-03-12  Vladimir Prus  <vladimir@codesourcery.com>
7952
7953         Include token in ^running notification for CLI commands.
7954
7955         * mi/mi-main.c (mi_execute_command): Set current_token here.
7956         (mi_cmd_execute): Do not set current_token here.
7957
7958 2009-03-12  Vladimir Prus  <vladimir@codesourcery.com>
7959
7960         Fix MI timings.
7961
7962         * mi/mi-main.c (mi_print_timing_maybe): New.
7963         (captured_mi_execute_command): Simplify. Output timings to
7964         CLI commands, too.
7965         (mi_execute_async_cli_command): Do not print timings.
7966         * mi/mi-main.h (mi_print_timing_maybe): Declare.
7967         * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
7968
7969 2009-03-12  Jerome Guitton  <guitton@adacore.com>
7970
7971         * xcoffread.c (process_linenos): Check if the line in the
7972         include table refers to the main source file and, if so,
7973         add them to the main subfile.
7974
7975 2009-03-12  Joel Brobecker  <brobecker@adacore.com>
7976
7977         Fix a build failure on AIX introduced after a change in the profile
7978         of some of the "methods" in the target_ops structure.
7979         * aix-thread.c: Add missing target_ops parameter throughout.
7980
7981         Implement Ada task switching on AIX.
7982         * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
7983         (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
7984
7985 2009-03-11  Daniel Jacobowitz  <dan@codesourcery.com>
7986
7987         * breakpoint.c (bpstat_check_breakpoint_conditions): Use
7988         value_mark and value_free_to_mark.
7989         * objfiles.c (free_objfile): Call objfile_free_data before
7990         freeing the BFD.
7991
7992 2009-03-10  Hui Zhu  <teawater@gmail.com>
7993
7994         * disasm.c (gdb_disassembly): Remove unused argument
7995         "line_num".
7996         * disasm.h (gdb_disassembly): Ditto.
7997         * cli/cli-cmds.c (print_disassembly): Ditto.
7998         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
7999
8000 2009-03-09  Paul Pluzhnikov  <ppluzhnikov@google.com>
8001
8002         * solib.c (solib_contains_address_p): New function.
8003         (solib_name_from_address): Use it.
8004         * printcmd.c (display_uses_solib_p): Use it.
8005         * solib.h (solib_contains_address_p): Declare it.
8006
8007 2009-03-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
8008
8009         * varobj.c (free_variable): Call value_free.
8010
8011 2009-03-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
8012
8013         PR gdb/9873:
8014         * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
8015         Move the variable `macinfo_type' out of the loop.  Create a new
8016         processing pass before the current one to pre-create `current_file'.
8017         New complaint on misplaced zero/non-zero definitions/includes.
8018         Skip first DW_MACINFO_start_file with `at_commandline' set.
8019
8020 2008-03-09  Vladimir Prus  <vladimir@codesourcery.com>
8021
8022        * solib.c (reload_shared_libraries): Give
8023        inferior a chance to reset solib breakpoint.
8024        Reinit frame cache.
8025
8026 2009-03-08  Christopher Faylor  <me+cygwin@cgf.cx>
8027
8028         * windows-nat.c (dr): Redefine to use largest possible integer which
8029         holds a pointer.
8030         (cygwin_set_dr): Avoid coercion.
8031
8032 2009-03-08  Oswald Buddenhagen  <oswald.buddenhagen@trolltech.de>
8033
8034         * windows-nat.c (windows_create_inferior): Implement --tty handling on
8035         non-cygwin.
8036
8037 2009-03-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
8038
8039         Rename solib_address to solib_name_from_address.
8040         * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
8041         (disable_breakpoints_in_unloaded_shlib): Update.
8042         * printcmd.c (display_uses_solib_p): Likewise.
8043         * stack.c (print_frame): Likewise.
8044         * solib.c: Rename.
8045         * solib.h: Rename.
8046
8047 2009-03-05  Paul Pluzhnikov  <ppluzhnikov@google.com>
8048
8049         * printcmd.c (do_one_display): Reparse exp_string.
8050         (display_uses_solib_p): New function.
8051         (clear_dangling_display_expressions): New function.
8052         (_initialize_printcmd): Add observer.
8053         * solib.c (no_shared_libraries): Swap order of calls to
8054         clear_solib and objfile_purge_solibs.
8055
8056 2009-03-05  Joel Brobecker  <brobecker@adacore.com>
8057
8058         Implement the target-specific part of Ada tasking support
8059         on Tru64.
8060
8061         * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
8062         (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
8063
8064 2009-03-05  Joel Brobecker  <brobecker@adacore.com>
8065
8066         Get rid of the global "base_target" and use "find_target_beneath"
8067         to find the underlying target.
8068         * dec-thread.c (base_target): Delete.
8069         (enable_dec_thread): Remove assignement to base_target.
8070         (dec_thread_detach, dec_thread_wait, dec_thread_wait)
8071         (dec_thread_fetch_registers, dec_thread_store_registers)
8072         (dec_thread_mourn_inferior, dec_thread_pid_to_str):
8073         Update the function profile if necessary.
8074         Use find_target_beneath to call the same method but from
8075         the underlying target, removing the need for "base_target".
8076
8077         * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
8078         Fix a copy/paste error in a few debug traces...
8079
8080         * solib-osf.c (init_so): Use a simpler method for computing
8081         the size of lm_info structure. This also gets rid of warning
8082         emitted by the compiler.
8083
8084 2009-03-05  Pedro Alves  <pedro@codesourcery.com>
8085
8086         * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
8087         duplicates of permanent breakpoints.
8088
8089 2009-03-04  Pedro Alves  <pedro@codesourcery.com>
8090
8091         * inferior.h (notice_new_inferior): Declare.
8092         * infcmd.c (notice_new_inferior): New.
8093         * remote.c (remote_add_inferior, remote_add_thread): New.
8094         (notice_new_inferiors): Rename to...
8095         (remote_notice_new_inferior): ... this.  Add RUNNING argument.
8096         Use remote_add_thread instead of add_thread, passing it the
8097         RUNNING argument.  Add an inferior with remote_add_inferior.  If
8098         we just learned about an inferior, call notice_new_inferior.
8099         (record_currthread): Adjust.
8100         (remote_threads_info): Adjust to use remote_notice_new_inferior.
8101         (remote_start_remote, extended_remote_attach_1): Use
8102         remote_add_inferior.
8103         (process_stop_reply): Adjust.  Call remote_notice_new_inferior
8104         after handling expedited registers and watchpoint state.
8105         (extended_remote_create_inferior_1): Use remote_add_inferior.
8106
8107 2009-03-04  Aleksandar Ristovski  <aristovski@qnx.com>
8108
8109         * infcmd.c (registers_info): Remove register number case.
8110
8111 2009-03-03  Pedro Alves  <pedro@codesourcery.com>
8112
8113         * top.c (quit_target): Check for target_has_execution before
8114         killing or detaching from inferiors.
8115
8116 2009-03-02  Joel Brobecker  <brobecker@adacore.com>
8117
8118         Remove some unused routines.
8119
8120         * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
8121         Delete.
8122         * ada-lang.c (ada_task_list_iterator_ftype)
8123         (iterate_over_live_ada_tasks): Delete.
8124         * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
8125         Delete.
8126
8127 2009-03-01  Doug Evans  <dje@google.com>
8128
8129         * symtab.c: Remove trailing whitespace throughout the file.
8130         (expand_line_sal): Fix some typos and whitespace.
8131
8132         * Makefile.in (clean): rm -f $(DEPDIR)/*.
8133
8134         * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
8135         (init.c): signals/ -> common/.
8136         (signals.o): Update.
8137         * target.h (target_signal_to_string,target_signal_to_string)
8138         (target_signal_from_name,target_signal_to_host_p)
8139         (target_signal_from_host,target_signal_to_host): Move to ...
8140         * common/gdb_signals.h: ... here.  New file.
8141         * common/signals.c: Moved here from signals/signals.c.
8142         #include gdb_signals.h, remove #include of target.h in gdb case.
8143         (target_signal_from_command,default_target_signal_to_host)
8144         (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
8145
8146         Include thread ID in target_wait debugging output.
8147         * infrun.c (print_target_wait_results): New function.
8148         (wait_for_inferior,fetch_inferior_event): Call it.
8149
8150 2009-02-27  Pedro Alves  <pedro@codesourcery.com>
8151
8152         * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
8153         with a ptid_t field.
8154         * linux-thread-db.c (thread_get_info_callback): Build the ptid
8155         using the pid stored in proc_handle.ptid.
8156         (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
8157         (check_for_thread_db, thread_db_detach, check_event)
8158         (thread_db_mourn_inferior, find_new_threads_callback)
8159         (thread_db_find_new_threads_1): Adjust.
8160         * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
8161         (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
8162
8163 2009-02-27  Phil Muldoon  <pmuldoon@redhat.com>
8164
8165         * valprint.c (read_string): Rework clean-up logic. Use
8166         free_current_contents to clean-up buffer.
8167
8168 2009-02-27  Andreas Schwab  <schwab@linux-m68k.org>
8169
8170         * MAINTAINERS: Update e-mail address.
8171
8172 2009-02-26  Phil Muldoon  <pmuldoon@redhat.com>
8173
8174         * python/python-utils.c (python_string_to_unicode): Always return
8175         a new reference.
8176         (python_string_to_target_string): Decrement transient python
8177         instance.
8178         (python_string_to_host_string): Likewise.
8179
8180 2007-02-26  Pedro Alves  <pedro@codesourcery.com>
8181
8182         * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
8183         call to super_fetch_registers.
8184         (mips64_linux_store_registers): Pass `ops' to call to
8185         super_store_registers.
8186
8187 2009-02-25  Doug Evans  <dje@google.com>
8188
8189         * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
8190         error message.
8191
8192         * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
8193         disabled_shlib_breaks, unused.
8194
8195         * printcmd.c (build_address_symbolic): Fix comment.
8196
8197 2009-02-25  Hui Zhu  <teawater@gmail.com>
8198
8199         * cli/cli-script.c (define_command): Add _() to query.
8200         * gnu-nat.c (inf_validate_task_sc): Ditto.
8201         * infcmd.c (kill_if_already_running): Ditto.
8202         (jump_command): Ditto.
8203         (attach_command): Ditto.
8204         * inflow.c (kill_command): Ditto.
8205         * infrun.c (handle_command): Ditto.
8206         * maint.c (maintenance_dump_me): Ditto.
8207         * memattr.c (mem_delete_command): Ditto.
8208         * monitor.c (monitor_interrupt_query): Ditto.
8209         * nto-procfs.c (interrupt_query): Ditto.
8210         * printcmd.c (undisplay_command): Ditto.
8211         * remote-mips.c (mips_kill): Ditto.
8212         * remote.c (interrupt_query): Ditto.
8213         * solib-irix.c (irix_open_symbol_file_object): Ditto.
8214         * solib-osf.c (osf_open_symbol_file_object): Ditto.
8215         * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
8216         * solib-som.c (som_open_symbol_file_object): Ditto.
8217         * solib-svr4.c (open_symbol_file_object): Ditto.
8218         * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
8219         * target.c (kill_or_be_killed): Ditto.
8220         * tracepoint.c (delete_trace_command): Ditto.
8221         * top.c (quit_confirm): Add _() to s that will be used
8222         in query.
8223
8224 2009-02-24  Pierre Muller  <muller@ics.u-strasbg.fr>
8225
8226         Fix windows-nat.c compilation failure.
8227
8228         * windows-nat.c (windows_thread_alive): Fix forward declaration.
8229         (get_windows_debug_event): Add ops parameter to call to windows_resume.
8230
8231 2009-02-23  Pedro Alves  <pedro@codesourcery.com>
8232
8233         * remote-sim.c (gdbsim_resume): Add target_ops* argument.
8234
8235 2009-02-23  Jay Krell  <jay.krell@cornell.edu>  (tiny change)
8236
8237         * symtab.c (find_line_symtab): Initialize exact to avoid
8238         a compiler warning.
8239
8240 2009-02-23  Pedro Alves  <pedro@codesourcery.com>
8241
8242         * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
8243         `ops' to recursive call.
8244
8245 2009-02-23  Pedro Alves  <pedro@codesourcery.com>
8246
8247         * corelow.c (get_core_registers): Adjust.
8248         (core_file_thread_alive): Rename to...
8249         (core_thread_alive): ... this.
8250         (core_pid_to_str): Try gdbarch_core_pid_to_str first.
8251         (init_core_ops): Adjust.
8252         (coreops_suppress_target): Delete.
8253         (_initialize_corelow): Unconditionally add core_ops.
8254         * procfs.c: Include "inf-child.h".
8255         (procfs_ops): Delete.
8256         (init_procfs_ops): Delete.  Reimplement as...
8257         (procfs_target): ... this, inheriting from inf-child.
8258         (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
8259         (procfs_prepare_to_store): Delete.
8260         (procfs_store_registers, procfs_resume): Adjust.
8261         (procfs_open): Delete.
8262         (procfs_suppress_run): Delete.
8263         (procfs_can_run): Delete.
8264         (procfs_mourn_inferior): Adjust.
8265         (procfs_init_inferior): Add target_ops parameter.  Adjust.
8266         (procfs_create_inferior): Don't pass procfs_init_inferior to
8267         fork_inferior.  Instead call it after fork_inferior returns.
8268         (procfs_find_new_threads): Adjust.
8269         (_initialize_procfs): Adjust to use procfs_target instead of
8270         init_procfs_ops.
8271         * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
8272         (lwp_to_thread): Use target_thread_alive.
8273         (sol_thread_open): Delete.
8274         (sol_thread_attach): Delete.
8275         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8276         (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
8277         to use find_target_beneath.
8278         (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
8279         (sol_thread_xfer_partial): Adjust to use find_target_beneath.
8280         (sol_thread_files_info, sol_thread_kill_inferior): Delete.
8281         (check_for_thread_db): New.
8282         (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
8283         (sol_thread_new_objfile): Call check_for_thread_db.
8284         (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
8285         (sol_thread_can_run): Delete.
8286         (sol_thread_alive): Adjust to use find_target_beneath.
8287         (sol_thread_stop): Delete.
8288         (rw_common): Use target_write_memory or target_read_memory.
8289         (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
8290         (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
8291         (solaris_pid_to_str): Remove check for libthread_db initialization
8292         failing.
8293         (sol_find_new_threads): Remove check for libthread_db
8294         initialization failing, or for an invalid inferior_ptid.  Adjust
8295         to use find_target_beneath.
8296         (sol_core_open, sol_core_close, sol_core_detach,
8297         sol_core_files_info, sol_find_memory_regions,
8298         sol_make_note_section, ignore): Delete.
8299         (init_sol_thread_ops): Make it a thread_stratum target.  Remove
8300         unneeded callback settings.
8301         (init_sol_core_ops): Delete.
8302         (_initialize_sol_thread): No longer call init_sol_core_ops, set
8303         procfs_suppress_run, or hack with core_ops.
8304
8305         * target.h (struct target_ops): Add a target_ops * parameter to
8306         to_resume, to_fetch_registers, to_store_registers, to_thread_alive
8307         and to_find_new_threads.
8308         (target_fetch_registers, target_store_registers)
8309         (target_thread_alive, target_find_new_threads): Redeclare as
8310         function.
8311
8312         * target.c (update_current_target): Do not inherit or de_fault
8313         to_resume, to_fetch_registers, to_store_registers,
8314         to_thread_alive, to_find_new_threads.
8315         (target_resume): Adjust.
8316         (target_thread_alive, target_find_new_threads): New.
8317         (debug_to_resume, debug_to_fetch_registers): Delete.
8318         (target_fetch_registers): New.
8319         (debug_to_store_registers): Delete.
8320         (target_store_registers): New.
8321         (debug_to_thread_alive, debug_to_find_new_threads): Delete.
8322         (setup_target_debug): Adjust.
8323
8324         * gdbcore.h (core_ops): Delete declaration.
8325
8326         * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
8327         inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
8328         i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
8329         hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
8330         nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
8331         alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
8332         bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
8333         hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
8334         ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
8335         m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
8336         mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
8337         ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
8338         shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
8339         vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
8340
8341         * gdbarch.sh (core_pid_to_str): New gdbarch callback.
8342         * gdbarch.h, gdbarch.c: Regenerate.
8343
8344         * sol2-tdep.c: Include "inferior.h".
8345         (sol2_core_pid_to_str): New.
8346         * sol2-tdep.h (sol2_core_pid_to_str): Declare.
8347
8348         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
8349         * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
8350         * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
8351         * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
8352
8353 2009-02-22  Doug Evans  <dje@google.com>
8354
8355         * exec.c (exec_file_attach): Fix comment.
8356
8357 2009-02-22  Pedro Alves  <pedro@codesourcery.com>
8358
8359         Silence a few -Wmissing-prototypes warnings.
8360
8361         PR build/9877:
8362         * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
8363         it static.
8364         * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
8365         * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
8366         * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
8367         (_initialize_amd64nbsd_tdep): ... this.
8368         * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
8369         (_initialize_arm_linux_tdep): Declare.
8370         * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
8371         * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
8372         * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
8373         * avr-tdep.c (avr_return_value): Make it static.
8374         (avr_frame_unwind_cache): Ditto.
8375         * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
8376         (bsd_uthread_solib_loaded): Ditto.
8377         (bsd_uthread_solib_unloaded): Ditto.
8378         (bsd_uthread_target): Ditto.
8379         (_initialize_bsd_uthread): Declare.
8380         * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
8381         (cris_frame_unwind_cache): Ditto.
8382         * frv-tdep.c (frv_return_value): Ditto.
8383         * h8300-tdep.c (h8300_use_struct_convention): Ditto.
8384         (h8300h_use_struct_convention): Ditto.
8385         * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
8386         Ditto.
8387         * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
8388         declarations.
8389         * hppabsd-tdep.c: Include hppabsd-tdep.h.
8390         (hppabsd_find_global_pointer): Make it static.
8391         * hppabsd-tdep.h: New.
8392         * hppanbsd-tdep.c: Include hppabsd-tdep.h.
8393         (hppabsd_init_abi): Remove declaration.
8394         (_initialize_hppabsd_tdep): Remove declaration.
8395         (_initialize_hppanbsd_tdep): Declare.
8396         * hppaobsd-tdep.c: Include hppabsd-tdep.h.
8397         (hppabsd_init_abi): Delete declaration.
8398         (hppaobsd_init_abi): Make it static.
8399         * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
8400         * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
8401         * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
8402         * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
8403         * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
8404         * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
8405         (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
8406         (_initialize_m32c_tdep): Declare.
8407         * m32r-rom.c (_initialize_m32r_rom): Declare.
8408         * m32r-tdep.c (m32r_skip_prologue): Make it static.
8409         (m32r_return_value): Ditto.
8410         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
8411         (m68hc11_return_value): Ditto.
8412         * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
8413         * m88k-tdep.c (m88k_frame_cache): Make it static.
8414         * mep-tdep.c (mep_gdb_print_insn): Ditto.
8415         (mep_return_value): Ditto.
8416         (_initialize_mep_tdep): Declare.
8417         * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
8418         * mips-linux-tdep.c (supply_64bit_reg): Make it static.
8419         (mips_linux_syscall_next_pc): Ditto.
8420         (_initialize_mips_linux_tdep): Declare.
8421         * mips-tdep.c (mips_single_step_through_delay): Make it static.
8422         * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
8423         * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
8424         * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
8425         * mt-tdep.c (_initialize_mt_tdep): Declare.
8426         * nbsd-tdep.c: Include nbsd-tdep.h.
8427         * nto-tdep.c (find_load_phdr): Make it static.
8428         (_initialize_nto_tdep): Declare.
8429         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
8430         static.
8431         (_initialize_ppc_linux_tdep): Declare.
8432         * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
8433         (m32r_insert_watchpoint, m32r_remove_watchpoint)
8434         (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
8435         static.
8436         * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
8437         * rs6000-nat.c: Include xcoffread.h.
8438         (find_toc_address): Don't extern declare get_toc_offset.  Adjust
8439         to call xcoff_get_to_offset.
8440         * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
8441         (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
8442         (rs6000_skip_trampoline_code): Make static.
8443         * s390-tdep.c (s390_regset_from_core_section): Ditto.
8444         * sh-tdep.c (sh_register_reggroup_p): Ditto.
8445         * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
8446         (_initialize_shnbsd_tdep): Declare.
8447         * solib-frv.c (displacement_from_map): Make static.
8448         (_initialize_frv_solib): Declare.
8449         * solib-irix.c (fetch_lm_info): Make static.
8450         (_initialize_irix_solib): Declare.
8451         * solib-som.c: Include solib-som.h.
8452         (som_solib_select): Line break.
8453         * sparc-tdep.c (sparc_regset_from_core_section): Make static.
8454         * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
8455         (_initialize_sparcnbsd_tdep): ... this.
8456         * spu-tdep.c (spu_software_single_step): Make it static.
8457         (_initialize_spu_tdep): Declare.
8458         * vax-tdep.c (vax_frame_cache): Make it static.
8459         * xcoffread.c: Include xcoffread.h.
8460         (get_toc_offset): Rename to ...
8461         (xcoff_get_toc_offset): ... this.
8462         (_initialize_xcoffread): Declare.
8463         * xcoffread.h: New.
8464         * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
8465         * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
8466         static.
8467         (_initialize_xtensa_tdep): Declare.
8468
8469 2008-02-21  Pedro Alves  <pedro@codesorcery.com>
8470
8471         Silence a few -Wmissing-prototypes warnings.
8472
8473         PR build/9877:
8474         * amd64-nat.c: Include "amd64-nat.h".
8475         * fork-child.c (_initialize_fork_child): Ditto.
8476         * gcore.c (_initialize_gcore): Ditto.
8477         * inf-ptrace.c: Include "inf-ptrace.h".
8478         (inf_ptrace_store_registers): Make it static.
8479         * linux-nat.c (linux_nat_terminal_ours): Make it static.
8480         (_initialize_linux_nat): Declare before definition.
8481         * linux-tdep.c: Include "linux-tdep.h".
8482         * linux-thread-db.c (_initialize_thread_db): Declare before
8483         definition.
8484         * proc-service.c (_initialize_proc_service): Ditto.
8485         * remote.c (remote_send_printf): Make it static.
8486         * solib.c: Include "solib.h".
8487         * symfile-mem.c (_initialize_symfile_mem): Declare before
8488         definition.
8489         * ada-lang.c (ada_la_decode, ada_match_name)
8490         (ada_suppress_symbol_printing, ada_is_array_type)
8491         (ada_value_ptr_subscript, ada_array_length)
8492         (ada_to_static_fixed_value): Make them static.
8493         (_initialize_ada_language): Declare before definition.
8494         * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
8495         (ada_task_list_changed, ada_new_objfile_observer): Make them
8496         static.
8497         (_initialize_tasks): Declare before definition.
8498         * addrmap.c (_initialize_addrmap): Declare before definition.
8499         * auxv.c (default_auxv_parse): Make it static.
8500         * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
8501         them static.
8502         * breakpoint.c (remove_sal): Add line break.
8503         (expand_line_sal_maybe): Make it static.
8504         * cp-name-parser.y: Include "cp-support.h".
8505         * cp-valprint.c (cp_find_class_member): Make it static.
8506         * eval.c (value_f90_subarray): Ditto.
8507         * exceptions.c (print_any_exception): Ditto.
8508         * findcmd.c (_initialize_mem_search): Declare before definition.
8509         * frame.c (frame_observer_target_changed): Make it static.
8510         * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
8511         * inf-child.c: Include "inf-child.h".
8512         * inferior.h (valid_inferior_id): Rename to ...
8513         (valid_gdb_inferior_id): ... this.
8514         * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
8515         Make them static.
8516         * jv-lang.c (java_language_arch_info): Make it static.
8517         * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
8518         * osdata.c (info_osdata_command): Make it static.
8519         * regcache.c (regcache_observer_target_changed): Make it static.
8520         * reverse.c (_initialize_reverse): Declare before definition.
8521         * stabsread.c (cleanup_undefined_types_noname)
8522         (cleanup_undefined_types_1): Make them static.
8523         * symfile.c (place_section): Make it static.
8524         * symtab.c (find_pc_sect_psymtab_closer): Make it static.
8525         * target-descriptions.c (_initialize_target_descriptions): Declare
8526         before definition.
8527         * target.c (default_get_ada_task_ptid, find_default_can_async_p)
8528         (find_default_is_async_p, find_default_supports_non_stop): Make
8529         them static.
8530         (target_supports_non_stop): Add prototype.
8531         (dummy_pid_to_str): Make it static.
8532         * utils.c (_initialize_utils): Declare before definition.
8533         * ada-exp.y (_initialize_ada_exp): Declare before definition.
8534         * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
8535         * target.h (struct target_ops): Add a prototype to the
8536         to_can_execute_reverse callback.
8537         * macroscope.c (_initialize_macroscope): Declare before definition.
8538         * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
8539         * python/python.c (_initialize_python): Declare before definition.
8540         * tui/tui-command.c: Include "tui/tui-command.h".
8541         * tui/tui-data.c (init_content_element, init_win_info): Make them
8542         static.
8543         * tui/tui-disasm.c: Include "tui/tui-disasm.h".
8544         * tui/tui-interp.c (_initialize_tui_interp): Declare before
8545         definition.
8546         * tui/tui-layout.c: Include "tui/tui-layout.h".
8547         (_initialize_tui_layout): Declare before definition.
8548         * tui/tui-regs.c: Include "tui/tui-regs.h".
8549         (tui_display_reg_element_at_line): Make it static.
8550         (_initialize_tui_regs): Declare before definition.
8551         * tui/tui-stack.c (_initialize_tui_stack): Declare before
8552         definition.
8553         * tui/tui-win.c: Include "tui/tui-win.h".
8554         (_initialize_tui_win): Declare before definition.
8555         (tui_sigwinch_handler): Make it static.  Wrap in ifdef SIGWINCH.
8556         * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
8557         (tui_get_cmd_list): Add a prototype.
8558         * tui/tui-windata.c: Include tui-windata.h.
8559         * tui/tui-wingeneral.c (box_win): Make it static.
8560         * cli/cli-logging.c (show_logging_command): Make it static.
8561         (_initialize_cli_logging): Declare before definition.
8562         * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
8563         definition.
8564
8565 2009-02-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8566
8567         Extend use of i386_use_watchpoints to all i386 native files
8568         using hardware watchpoints.
8569         * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
8570         * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
8571         * windows-nat.c (init_windows_ops): Ditto.
8572         * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
8573         * config/i386/nm-cygwin64.h: Ditto.
8574         * config/i386/nm-fbsd.h: Ditto.
8575         * config/i386/nm-go32.h: Ditto.
8576
8577 2009-02-19  Joel Brobecker  <brobecker@adacore.com>
8578
8579         * ada-typeprint.c (ada_typedef_print): Remove.  Unused.
8580
8581 2009-02-18  Vladimir Prus  <vladimir@codesourcery.com>
8582
8583         * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
8584         (mi_interpreter_init): Register the above.
8585         * solib.c (clear_solib): Notify solib unload.
8586         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
8587         disable breakpoints on a.out targets.
8588
8589 2009-02-17  Vladimir Prus  <vladimir@codesourcery.com>
8590
8591         * observer.c (observer_test_first_notification_function)
8592         (observer_test_second_notification_function)
8593         (observer_test_third_notification_function): Adjust prototype.
8594
8595 2009-02-17  Pedro Alves  <pedro@codesourcery.com>
8596
8597         * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
8598         (ALL_TARGET_OBS): Add dicos-tdep.o.
8599         (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
8600         * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
8601         gdb_target_obs.
8602         (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
8603         gdb_target_obs.
8604         * dicos-tdep.h, dicos-tdep.c: New.
8605         * amd64-dicos-tdep.c: New.
8606         * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
8607         inferior.h.  Include dicos-tdep.h.
8608         (i386_dicos_init_abi): Call dicos_init_abi.
8609         (i386_dicos_bfd_has_symbol_p): Delete.
8610         (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
8611
8612         * NEWS: Mention x86-64 DICOS target support.
8613
8614 2009-02-16  Doug Evans  <dje@google.com>
8615
8616         * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
8617         All callers updated.
8618         (amd64_get_insn_details): Handle more 3-byte opcode insns.
8619         (amd64_breakpoint_p): Delete.
8620         (amd64_displaced_step_fixup): When fixing up after stepping an int3,
8621         don't back up pc to the start of the int3.
8622         * i386-tdep.c: #include opcode/i386.h.
8623         (i386_skip_prefixes): New function.
8624         (i386_absolute_jmp_p): Constify argument.
8625         (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
8626         (i386_breakpoint_p): Delete.
8627         (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
8628         When fixing up after stepping an int3, don't back up pc to the start
8629         of the int3.
8630
8631 2009-02-16  Pedro Alves  <pedro@codesourcery.com>
8632
8633         * corelow.c (core_close): Don't hardcode the core's pid.
8634         (core_open): Find core threads before calling
8635         post_create_inferior.
8636         (add_to_thread_list, get_core_register_section): Take into account
8637         systems where the regset section names encode the pid of the
8638         inferior.
8639
8640         * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
8641         * gdbarch.h, gdbarch.c: Regenerate.
8642
8643         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
8644         * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
8645         * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
8646         * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
8647
8648 2009-02-14  Vladimir Prus  <vladimir@codesourcery.com>
8649
8650         Include frame information for *stopped due to CLI commands.
8651
8652         * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
8653         * infcmd.c (finish_command_continuation): Pass '1' for
8654         'print_frame' parameter to the observer.
8655         * infrun.c (normal_stop): Don't print mi-specific information
8656         here. Pass 'stop_print_frame' to the 'print_frame' parameter
8657         of the observer.
8658         * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
8659         If we need to print frame, and current uiout is not the MI one,
8660         print frame again.
8661
8662 2009-02-13  Pierre Muller  <muller@ics.u-strasbg.fr>
8663
8664         * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
8665         Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
8666
8667 2009-02-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8668
8669         PR fortran/9806
8670         * dwarf2read.c (process_die <DW_TAG_module>, read_module)
8671         (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
8672
8673 2009-02-11  Pierre Muller  <muller@ics.u-strasbg.fr>
8674
8675         * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
8676         for DW_ATE_signed_char and DW_ATE_unsigned_char
8677         for pascal language.
8678
8679 2009-02-11  Jim Meyering  <meyering@redhat.com>
8680             Jan Kratochvil  <jan.kratochvil@redhat.com>
8681
8682         Avoid NULL dereference.
8683         * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
8684         New variable func_type.
8685
8686 2009-02-11  Pedro Alves  <pedro@codesourcery.com>
8687
8688         * gdbarch.c: Regenerate.
8689
8690 2009-02-10  Pierre Muller  <muller@ics.u-strasbg.fr>
8691
8692         * p-lang.c (is_pascal_string_type): Fix comment.
8693         Determine exact size of char elements for GPC
8694         strings.
8695         (pascal_printstr): Handle char width of 2 or 4.
8696         * p-valprint.c (pascal_val_print): Handle char
8697         of width 2 or 4.
8698
8699 2009-02-07  Daniel Jacobowitz  <dan@codesourcery.com>
8700
8701         * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
8702         inside the loop.  Only call addrmap_set_empty if the compilation unit
8703         had DW_AT_high_pc and DW_AT_low_pc.  Update call to
8704         scan_partial_symbols.
8705         (scan_partial_symbols): Take NEED_PC argument and pass it along with
8706         LOWPC and HIGHPC.
8707         (add_partial_namespace): Take NEED_PC argument and pass it through.
8708         (add_partial_subprogram): Take NEED_PC argument.  Update the addrmap
8709         if necessary.
8710
8711 2009-02-07  Pedro Alves  <pedro@codesourcery.com>
8712
8713         * NEWS: Mention inspecting extra signal information, $_siginfo,
8714         and the qXfer:siginfo:read and qXfer:siginfo:write packets.
8715
8716 2009-02-07  Pedro Alves  <pedro@codesourcery.com>
8717
8718         * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
8719         isn't defined.
8720
8721 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8722
8723         * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
8724         (compat_timer_t, compat_clock_t, struct compat_timeval)
8725         (compat_sigval_t, compat_siginfo_t): New types.
8726         (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
8727         (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
8728         (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
8729         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8730         (amd64_linux_siginfo_fixup): New.
8731         * linux-nat.c (linux_nat_siginfo_fixup): New.
8732         (siginfo_fixup): New.
8733         (linux_xfer_siginfo): Use siginfo_fixup to convert between the
8734         siginfo layout expected by ptrace and the siginfo layout of the
8735         inferior.
8736         (linux_nat_set_siginfo_fixup): New.
8737         * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
8738
8739 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8740
8741         * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
8742         * infrun.c (siginfo_value_read, siginfo_value_write): New.
8743         (siginfo_value_funcs): New.
8744         (siginfo_make_value): New.
8745         (_initialize_infrun): Create the $_siginfo convenience variable.
8746         * gdbtypes.h (append_composite_type_field_aligned): Declare.
8747         * gdbtypes.c (append_composite_type_field): Rename to...
8748         (append_composite_type_field_aligned): ... this.  Add ALIGNMENT
8749         argument.  Handle it.
8750         (append_composite_type_field): Rewrite on top of
8751         append_composite_type_field_aligned.
8752         * value.h (internalvar_make_value): New typedef.
8753         (struct internalvar) <make_value>: New field.
8754         (create_internalvar_type_lazy): Declare.
8755         * value.c (create_internalvar): Clear make_value.
8756         (create_internalvar_type_lazy): New.
8757         (value_of_internalvar): If make_value is set use it.
8758         (preserve_values): Skip internal variables that don't have a
8759         value.
8760         * gdbarch.sh (get_siginfo_type): New.
8761         * gdbarch.h, gdbarch.c: Regenerate.
8762
8763         * linux-tdep.h, linux-tdep.c: New.
8764         * amd64-linux-tdep.c: Include "linux-tdep.h".
8765         (amd64_linux_init_abi): Register linux_get_siginfo_type and
8766         linux_get_siginfo_mapper.
8767         * i386-linux-tdep.c: Include "linux-tdep.h".
8768         (i386_linux_init_abi): Register linux_get_siginfo_type and
8769         linux_get_siginfo_mapper.
8770         * arm-linux-tdep.c: Include "linux-tdep.h".
8771         (i386_linux_init_abi): Register linux_get_siginfo_type and
8772         linux_get_siginfo_mapper.
8773
8774         * linux-nat.c (linux_xfer_siginfo): New.
8775         (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8776         * remote.c (PACKET_qXfer_siginfo_read)
8777         (PACKET_qXfer_siginfo_write): New.
8778         (feature remote_protocol_features): Add "qXfer:siginfo:read" and
8779         "qXfer:siginfo:write" features.
8780         (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
8781         (_initialize_remote): Add "set/show remote read-siginfo-object"
8782         and "set/show remote write-siginfo-object" commands.
8783
8784         * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
8785         (HFILES_NO_SRCDIR): Add linux-tdep.h.
8786         (ALLDEPFILES): Add linux-tdep.c.
8787
8788         * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
8789         (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
8790         gdb_target_obs.
8791
8792 2009-02-06  Jim Blandy  <jimb@codesourcery.com>
8793             Daniel Jacobowitz  <dan@codesourcery.com>
8794             Vladimir Prus  <vladimir@codesourcery.com>
8795             Pedro Alves  <pedro@codesourcery.com>
8796
8797         * defs.h (enum lval_type): New value: lval_computed.
8798         * value.h (struct lval_funcs): New type.
8799         (allocate_computed_value, value_computed_funcs)
8800         (value_computed_closure): New declarations.
8801         * value.c (struct value): Add a structure to the location union
8802         for computed lvalues, containing 'funcs' and 'closure' members.
8803         (allocate_computed_value, value_computed_funcs)
8804         (value_computed_closure): New functions.
8805         (value_free): For computed lvalues, call the closure's
8806         'free_closure' function before freeing the value itself.
8807         (value_copy): If we're copying an lval_computed value, call the
8808         closure's 'copy_closure' function.
8809         (set_value_component_location): If the original value is a
8810         computed lvalue, then call the closure's 'copy_closure' function.
8811         (value_of_internalvar): If an internal variable's value is a
8812         computed lvalue, make retrieving its value produce an equivalent
8813         computed lvalue.
8814         * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
8815         their read function.
8816         (value_assign): Assign to computed lvalues by calling their write
8817         function.
8818
8819 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8820
8821         * linux-nat.c (linux_nat_wait): Adjust.
8822         (linux_nat_pid_to_str): Adjust.  Remove call to thread_db_init.
8823         * linux-nat.h (thread_db_init): Delete declaration.
8824         * linux-thread-db.c (target_beneath): Delete.
8825         (thread_db_init): Delete.
8826         (thread_db_detach): Use find_target_beneath.
8827         (thread_db_wait): Adjust interface.  Use find_target_beneath.
8828         (thread_db_mourn_inferior): Use find_target_beneath.
8829         (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
8830         (thread_db_async_mask): Delete.
8831         (thread_db_pid_to_str): Adjust interface.  Use
8832         find_target_beneath.
8833         (thread_db_get_thread_local_address): Adjust interface.  Use
8834         find_target_beneath.
8835         (init_thread_db_ops): Delete references to delete functions.
8836         * target.c (update_current_target): Don't inherit or default
8837         to_wait.  Don't inherit to_pid_to_str and
8838         to_get_thread_local_address.
8839         (target_translate_tls_address): Look for a pushed target that
8840         implements to_get_thread_local_address, and use it instead of
8841         checking for target_get_thread_local_address_p.
8842         (target_wait, target_pid_to_str): Reimplement as functions.
8843         (dummy_pid_to_str): New.
8844         (init_dummy_target): Register it.
8845         (debug_to_wait): Delete.
8846         * target.h (struct target_ops): Make to_wait, to_pid_to_str and
8847         to_get_thread_local_address accept a pointer to struct target_ops.
8848         (target_wait): Delete macro, and declare as function.
8849         (target_pid_to_str): Likewise.
8850         (target_get_thread_local_address)
8851         (target_get_thread_local_address_p): Delete.
8852         (noprocess): Add NORETURN and ATTR_NORETURN tags.
8853         * inf-ptrace.c (inf_ptrace_wait): Adjust.
8854         (inf_ptrace_pid_to_str): New.
8855         (inf_ptrace_target): Use inf_ptrace_pid_to_str.
8856         * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
8857         * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
8858         * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
8859         Adjust.
8860         * corelow.c (core_pid_to_str): Adjust.
8861         * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
8862         * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
8863         * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
8864         * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
8865         * hpux-thread.c (hpux_thread_wait): Adjust.
8866         * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
8867         * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
8868         * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
8869         * procfs.c (procfs_pid_to_str): Adjust.
8870         * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
8871         * remote-mips.c (mips_wait): Adjust.
8872         * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
8873         * remote.c (remote_wait, remote_pid_to_str)
8874         (remote_get_thread_local_address): Adjust.
8875         * rs6000-nat.c (rs6000_wait): Adjust.
8876         * sol-thread.c (procfs_pid_to_str): Adjust declaration.
8877         (sol_thread_wait, solaris_pid_to_str): Adjust.
8878         * spu-linux-nat.c (spu_child_wait): Adjust.
8879         * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
8880
8881 2009-02-06  Tom Tromey  <tromey@redhat.com>
8882
8883         * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
8884         (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
8885         (python-cmd.o): New target.
8886         * cli/cli-decode.c (set_cmd_completer): Add self parameter to
8887         completer prototype.
8888         (add_cmd): Initialize destroyer member of cmd_list_element. Use
8889         make_symbol_completion_list_fn as completer.
8890         (delete_cmd): Call destroyer if one is set.
8891         * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
8892         completer member.  Add destroyer member.
8893         (set_cmd_completer): Add self parameter to
8894         completer prototype.
8895         * command.h (set_cmd_completer): Add cmd parameter to
8896         completer prototype.
8897         * completer.c (noop_completer, filename_completer,
8898         location_completer, expression_completer, command_completer): Adapt
8899         to new completer prototype.
8900         (complete_line_internal): Pass new parameter to completer function.
8901         * completer.h (noop_completer, filename_completer,
8902         location_completer, expression_completer, command_completer): Adapt
8903         prototypes to new completer prototype.
8904         * interps.c (interpreter_completer): Adapt to new completer
8905         prototype.
8906         * python/python-cmd.c: New file.
8907         * python/python-internal.h (gdbpy_initialize_commands): Add
8908         prototype.
8909         (gdbpy_doc_cst): Add forward declaration.
8910         * python/python.c (gdbpy_doc_cst): Declare.
8911         (_initialize_python): Call gdbpy_initialize_commands.  Initialize
8912         gdbpy_doc_cst.
8913         * symtab.c (make_symbol_completion_list_fn): New function.
8914         * symtab.h (make_symbol_completion_list_fn): Add prototype.
8915
8916 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8917
8918         * target.c (target_get_osdata): Check for equal or higher than
8919         process_stratum, not dummy_stratum.
8920
8921 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8922
8923         * remote.c (extended_remote_can_run): Delete.
8924         (init_remote_ops): Don't register it.
8925         * target.c (target_get_osdata): Don't check for target_can_run.
8926         Instead any target that has already been pushed, otherwise
8927         fallback to the default run target.
8928
8929 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8930
8931         * target.c (target_create_inferior, target_detach)
8932         (target_mourn_inferior, target_attach, target_close): Do target
8933         debug output.
8934         (debug_to_attach, debug_to_detach, debug_to_create_inferior)
8935         (debug_to_mourn_inferior, debug_to_close): Delete.
8936         (setup_target_debug): Adjust.
8937
8938 2009-02-05  Pedro Alves  <pedro@codesourcery.com>
8939
8940         * target.h (target_stopped_data_address_p): Delete declaration,
8941         and don't define as macro.
8942         * target.c (target_stopped_data_address_p): Delete.
8943
8944 2009-02-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>
8945             Tom Tromey  <tromey@redhat.com>
8946
8947         * python/python-utils.c (target_string_to_unicode): New function.
8948         * python/python-internal.h (target_string_to_unicode): New prototype.
8949         * python/python-value.c (valpy_string): New function.
8950         (value_object_methods): Add `string' entry.
8951
8952 2009-02-05  Pedro Alves  <pedro@codesourcery.com>
8953
8954         * target.h (target_tid_to_str): Delete.
8955         * thread.c (print_thread_info, thread_apply_all_command)
8956         (thread_apply_command, thread_command, do_captured_thread_select):
8957         Use target_pid_to_str instead of target_tid_to_str.
8958         * linux-fork.c (delete_fork_command): Likewise.
8959
8960 2009-02-05  Pedro Alves  <pedro@codesourcery.com>
8961
8962         * frame.c (has_stack_frames): Make public.
8963         (get_prev_frame): Don't allow a NULL this_frame anymore.
8964         * frame.h (has_stack_frames): Declare.
8965         * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
8966         to get_prev_frame, instead start at get_current_frame.
8967         (varobj_create): Check has_stack_frames before getting any frame;
8968         eliminate one usage of deprecated_safe_get_selected_frame.
8969
8970 2009-02-05  Tom Tromey  <tromey@redhat.com>
8971             Thiago Jung Bauermann  <bauerman@br.ibm.com>
8972
8973         * python/python.c (GdbMethods): Move to bottom of file.
8974         (get_parameter, execute_gdb_command, gdbpy_write,
8975         gdbpy_flush): Remove forward declarations.
8976         (eval_python_from_control_command): Fix error checking of function
8977         PyRun_SimpleString.  Fix error string.
8978         (python_command): Likewise.
8979         (execute_gdb_command): Added from_tty argument.
8980
8981 2009-02-05  Thiago Jung Bauermann  <bauerman@br.ibm.com>
8982
8983         * language.h (language_dfn): Add la_get_string member.
8984         (LA_GET_STRING): New macro.
8985         (default_get_string): New prototype.
8986         * language.c (default_get_string): New function.
8987         (unknown_language_defn, auto_language_defn, local_language_defn): Use
8988         default_get_string for la_get_string.
8989         * c-lang.c (c_get_string): New function.
8990         (c_language_defn, cplus_language_defn, asm_language_defn): Use
8991         c_get_string for la_get_string.
8992         (minimal_language_defn): Likewise
8993         * ada-lang.c (ada_language_defn): Likewise.
8994         * f-lang.c (f_language_defn): Use default_get_string for
8995         la_get_string.
8996         * jv-lang.c (java_language_defn): Likewise.
8997         * m2-lang.c (m2_language_defn): Likewise.
8998         * objc-lang.c (objc_language_defn): Likewise.
8999         * p-lang.c (p_language_defn): Likewise.
9000         * scm-lang.c (scm_language_defn): Likewise.
9001         * typeprint.c (type_to_string): New function.
9002         * value.h (type_to_string): New prototype.
9003         * valprint.c (val_print_string): Factor out code for reading string
9004         from the inferior into its own function.  Put 2 spaces after period
9005         in comments.
9006         (read_string): New function.
9007         * valprint.h (read_string): New prototype.
9008
9009 2009-01-07  Pierre Muller  <muller@ics.u-strasbg.fr>
9010             Tom Tromey  <tromey@redhat.com>
9011
9012         PR breakpoints/8079:
9013         * breakpoint.c (print_one_breakpoint): Use exp_string field
9014         to display expression of watchpoints.
9015         (mention): Likewise.
9016         (watch_command_1): Remove trailing whitespace from expression.
9017         * printcmd.c (struct display) <exp_string>: New field.
9018         (display_command): Set exp_string.
9019         (free_display): Free exp_string.
9020         (clear_displays): Use free_display.
9021         (do_one_display): Print exp_string.
9022         (display_info): Likewise.
9023
9024 2009-02-04  Tom Tromey  <tromey@redhat.com>
9025             Thiago Jung Bauermann  <bauerman@br.ibm.com>
9026             Phil Muldoon  <pmuldoon@redhat.com>
9027
9028         * python/python-internal.h (gdbpy_get_value_from_history): Rename
9029         prototype to gdbpy_history.
9030         (gdbpy_is_string): Declare.
9031         (python_string_to_host_string): Declare.
9032         * python/python-utils.c (gdbpy_is_string): New function.
9033         (unicode_to_encoded_string): New function.
9034         (unicode_to_target_string): Use it.
9035         (python_string_to_host_string): New function.
9036         * python/python-value.c (valpy_address): New function.
9037         (convert_value_from_python): Use gdbpy_is_string.  Change to throw
9038         Python exception instead of a GDB exception on error.  Properly check
9039         Python booleans.
9040         (valpy_getitem): Convert field name to host string.  Handle array
9041         accesses.  Adapt to new behaviour of convert_value_from_python.
9042         (valpy_new): Adapt to new behaviour of convert_value_from_python.
9043         (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
9044         VALPY_BITXOR, VALPY_BITOR>: New constants.
9045         (valpy_binop): Update.  Adapt to new behaviour of
9046         convert_value_from_python.
9047         (valpy_invert): New function.
9048         (valpy_lsh): Likewise.
9049         (valpy_rsh): Likewise.
9050         (valpy_and): Likewise.
9051         (valpy_or): Likewise.
9052         (valpy_xor): Likewise.
9053         (valpy_richcompare): Call convert_value_from_python instead of doing
9054         conversions itself.
9055         (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
9056         (gdbpy_get_value_from_history): Rename
9057         function to gdbpy_history.
9058         (gdbpy_initialize_values): Don't set tp_new.
9059         (value_object_type): Add valpy_new.
9060         (value_object_methods): Add `address' entry.
9061         (value_object_as_number): Update for new methods.
9062         * python/python.c (GdbMethods): Rename entry from
9063         `get_value_from_history' to `history'.
9064
9065 2009-02-04  Jerome Guitton  <guitton@adacore.com>
9066
9067         * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
9068         of type to guard against a crash.
9069
9070 2009-02-04  Jerome Guitton  <guitton@adacore.com>
9071
9072         * value.c (value_from_contents_and_address): Always return
9073         a lval_memory value, even if address is null.
9074
9075 2009-02-04  Tristan Gingold  <gingold@adacore.com>
9076
9077         * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
9078         (amd64_darwin_sigcontext_addr): Ditto.
9079         (darwin_dwarf_signal_frame_p): Ditto.
9080         (i386_darwin_init_abi): Handle signal frames, use the const for
9081         sc_num_regs.
9082         (x86_darwin_init_abi_64): Ditto.
9083
9084 2009-02-04  Tristan Gingold  <gingold@adacore.com>
9085
9086         * i386-tdep.c (i386_sigtramp_p): Make it public.
9087         * i386-tdep.h (i386_sigtramp_p): Declare.
9088
9089 2009-02-04  Tristan Gingold  <gingold@adacore.com>
9090
9091         * machoread.c (macho_symfile_read): Read minsymtab also from
9092         shared libraries.
9093         (macho_symfile_read): Try to read dwarf2 frame info from main
9094         object file, but not from OSO files.
9095         (macho_symfile_offsets): Update section names for latest BFD
9096         changes.
9097         * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
9098         (x86_darwin_init_abi_64): Ditto.
9099         * solib-darwin.c: New file.
9100         * solib-darwin.h: New file.
9101         * configure.tgt: Add solib.o solib-darwin.o for Darwin.
9102
9103 2009-02-04  Tristan Gingold  <gingold@adacore.com>
9104
9105         * solist.h (struct target_so_ops): Comment fallback behavior for
9106         operation same.
9107
9108 2009-02-03  Tom Tromey  <tromey@redhat.com>
9109
9110         * completer.c (add_struct_fields): Check type_name against NULL
9111         before use.
9112
9113 2009-02-03  Joel Brobecker  <brobecker@adacore.com>
9114
9115         * MAINTAINERS: Update Elena's email address.
9116
9117 2009-02-02  Joel Brobecker  <brobecker@adacore.com>
9118
9119         * breakpoint (update_watchpoint): Minor comment adjustment.
9120
9121 2009-02-02  Tom Tromey  <tromey@redhat.com>
9122
9123         PR gdb/9594:
9124         * completer.c (count_struct_fields): Count method names.
9125         (add_struct_fields): Add matching method names.
9126
9127 2009-02-02  Doug Evans  <dje@google.com>
9128
9129         * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
9130         doing any further tcl/tk configury.  Don't configure gdbtk if
9131         tcl or tk check fails.
9132         * aclocal.m4: Regenerate.
9133         * configure: Regenerate.
9134
9135 2009-02-02  Tom Tromey  <tromey@redhat.com>
9136
9137         PR exp/9059:
9138         * valops.c (find_overload_match): Follow typedefs before taking
9139         address of object argument.
9140
9141 2009-02-01  Doug Evans  <dje@google.com>
9142
9143         * target.h (target_waitstatus_to_string): Declare.
9144         * target.c (target_waitstatus_to_string): New function.  Copied from
9145         debug_to_wait.  Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
9146         TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
9147         TARGET_WAITKIND_NO_HISTORY.
9148         (debug_to_wait): Call it.
9149         * infrun.c (wait_for_inferior): If debug_infrun, print result of
9150         target_wait.
9151         (fetch_inferior_event): Ditto.
9152
9153 2009-01-30  Tom Tromey  <tromey@redhat.com>
9154
9155         * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
9156
9157 2009-01-30  Vladimir Prus  <vladimir@codesourcery.com>
9158
9159         PR 8145.
9160         * thread.c (do_captured_list_thread_ids): Report the current
9161         thread id.
9162
9163 2009-01-30  Vladimir Prus  <vladimir@codesourcery.com>
9164
9165         * breakpoint.c (create_breakpoint, create_breakpoints)
9166         (break_command_really, set_breakpoint): New parameter enabled.
9167         (create_breakpoint, break_command_really): Make breakpoint
9168         disabled if so requested.
9169         * breakpoint.h (set_breakpoint): New parameter enabled.
9170         * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
9171
9172 2009-01-28  Doug Evans  <dje@google.com>
9173
9174         * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
9175         (amd64_displaced_step_fixup): Declare.
9176         * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
9177         (amd64_arch_regmap): Move out of amd64_analyze_stack_align
9178         and make static global.
9179         (amd64_arch_regmap_len): New static global.
9180         (amd64_arch_reg_to_regnum): New function.
9181         (struct amd64_insn): New struct.
9182         (struct displaced_step_closure): New struct.
9183         (onebyte_has_modrm,twobyte_has_modrm): New static globals.
9184         (rex_prefix_p,skip_prefixes)
9185         (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
9186         (amd64_insn_length,amd64_get_unused_input_int_reg)
9187         (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
9188         (amd64_displaced_step_copy_insn)
9189         (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
9190         (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
9191         (amd64_displaced_step_fixup): New functions.
9192         * amd64-linux-tdep.c: #include arch-utils.h.
9193         (amd64_linux_init_abi): Install displaced stepping support.
9194
9195 2009-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
9196             Jerome Guitton  <guitton@adacore.com>
9197
9198         * configure, config.in: Regenerated.
9199         * configure.ac: Add --with-system-gdbinit.
9200         * main.c (get_init_files): New.
9201         (captured_main): Use get_init_files.  Load system gdbinit before
9202         $HOME/.gdbinit.
9203         (print_gdb_help): Print location of init files.
9204
9205 2009-01-28  Pedro Alves  <pedro@codesourcery.com>
9206
9207         * corefile.c (generic_search): Delete disabled code.
9208         * gdbcore.h (generic_search): Delete declaration.
9209
9210 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
9211
9212         * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
9213         parent to the child.
9214         * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
9215         * inf-ptrace.c (inf_ptrace_follow_fork): Likewise.  Use
9216         remove_breakpoints to remove breakpoints from the parent.
9217
9218 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
9219
9220         PR backtrace/9458, PR backtrace/8864:
9221         * frame.c (create_new_frame): Update the frame's cached PC before
9222         finding its unwinder.  Use frame_id_build to build the new frame's
9223         id.
9224         * stack.c (parse_frame_specification_1): Correct setting ``addrs''
9225         array values from the ``args'' array values.
9226
9227 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
9228
9229         * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
9230         (create_array_type, create_set_type, init_flags_type)
9231         (copy_type_recursive): Replace pairs of calls to XALLOC and memset
9232         with a call to XZALLOC or XCALLOC, and pairs of calls to
9233         obstack_alloc and memset with a call to OBSTACK_ZALLOC.
9234
9235 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
9236
9237         Add "maint set|show internal-error|internal-warning quit|corefile
9238         ask|yes|no" commands.
9239
9240         PR gdb/7580:
9241         * utils.c (internal_problem_ask, internal_problem_yes)
9242         (internal_problem_no, internal_problem_modes): New.
9243         (struct internal_problem): Remove FIXME.  Make should_quit and
9244         should_dump_core types to char *.
9245         (internal_vproblem, internal_error_problem)
9246         (internal_warning_problem): Adjust.
9247         (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
9248         functions.
9249         (add_internal_problem_command): New.
9250         (_initialize_utils): New.
9251
9252 2009-01-25  Pedro Alves  <pedro@codesourcery.com>
9253
9254         * infcmd.c (program_info): Use paddress instead of casting stop_pc
9255         to unsigned long.
9256
9257 2009-01-24  Pedro Alves  <pedro@codesourcery.com>
9258
9259         * infrun.c (normal_stop): Don't call
9260         deprecated_update_frame_pc_hack.
9261         * frame.c (deprecated_update_frame_pc_hack)
9262         (deprecated_update_frame_base_hack): Delete, and ...
9263         (create_new_frame): ... inline here.
9264         * frame.h (deprecated_update_frame_pc_hack)
9265         (deprecated_update_frame_base_hack): Delete declarations.
9266
9267 2009-01-23  Pedro Alves  <pedro@codesourcery.com>
9268
9269         * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
9270         * cli/cli-setshow.c (do_setshow_command): Handle it.
9271         * command.h (enum var_types): Add var_zuinteger.
9272         (add_setshow_zuinteger_cmd): Declare.
9273
9274         * valprint.c (_initialize_valprint): Change the set input-radix
9275         and set output-radix commands to zuinteger type.
9276
9277 2009-01-23  Pedro Alves  <pedro@codesourcery.com>
9278
9279         PR gdb/9664:
9280         * infrun.c (normal_stop): Tag threads as stopped, and run the
9281         hook-stop before printing the stack frame.
9282
9283 2009-01-22  Pedro Alves  <pedro@codesourcery.com>
9284
9285         PR c++/9631:
9286         * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
9287         vbasetype.
9288
9289 2009-01-20  Kazu Hirata  <kazu@codesourcery.com>
9290
9291         * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
9292         unsigned long.
9293
9294 2009-01-20  Daniel Jacobowitz  <dan@codesourcery.com>
9295
9296         PR gdb/9346
9297         * infcmd.c (signal_command): Do not specify a resume PC.
9298
9299 2009-01-19  Doug Evans  <dje@google.com>
9300
9301         * dummy-frame.c (dummy_frame): Replace regcache member with
9302         caller_state.
9303         (dummy_frame_push): Replace caller_regcache arg with caller_state.
9304         All callers updated.
9305         (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
9306         (dummy_frame_pop): Rewrite.  Verify requested frame is in the
9307         dummy frame stack.  Restore program state.
9308         (cleanup_dummy_frames): Rewrite.
9309         (dummy_frame_sniffer): Update.  Make static.
9310         * dummy-frame.h (regcache,frame_info): Delete forward decls.
9311         (inferior_thread_state): New forward decl.
9312         (dummy_frame_push): Update prototype.
9313         * frame.c (frame_pop): dummy_frame_pop now does all the work for
9314         DUMMY_FRAMEs.
9315         * infcall.c (breakpoint_auto_delete_contents): Delete.
9316         (get_function_name,run_inferior_call): New fns.
9317         (call_function_by_hand): Simplify by moving some code to
9318         get_function_name, run_inferior_call.  Inferior function call wrapped
9319         in TRY_CATCH so there's less need for cleanups and all exits from
9320         proceed are handled similarily.  Detect program exit.
9321         Detect program stopping in a different thread.
9322         Make error messages more consistent.
9323         * inferior.h (inferior_thread_state): Declare (opaque type).
9324         (save_inferior_thread_state,restore_inferior_thread_state,
9325         make_cleanup_restore_inferior_thread_state,
9326         discard_inferior_thread_state, get_inferior_thread_state_regcache):
9327         Declare.
9328         (save_inferior_status): Update prototype.
9329         * infrun.c: (normal_stop): When stopped for the completion of an
9330         inferior function call, verify the expected stack frame kind.
9331         (inferior_thread_state): New struct.
9332         (save_inferior_thread_state,restore_inferior_thread_state,
9333         do_restore_inferior_thread_state_cleanup,
9334         make_cleanup_restore_inferior_thread_state,
9335         discard_inferior_thread_state,
9336         get_inferior_thread_state_regcache): New functions.
9337         (inferior_status): Move stop_signal, stop_pc, registers to
9338         inferior_thread_state.  Remove restore_stack_info.
9339         (save_inferior_status): Remove arg restore_stack_info.
9340         All callers updated.  Remove saving of state now saved by
9341         save_inferior_thread_state.
9342         (restore_inferior_status): Remove restoration of state now done by
9343         restore_inferior_thread_state.
9344         (discard_inferior_status): Remove freeing of registers, now done by
9345         discard_inferior_thread_state.
9346
9347 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
9348
9349         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
9350         at a time, times NUM_TO_SCROLL.
9351         * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
9352         fetch the selected frame if there is no stack.
9353
9354 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
9355
9356         PR gdb/9747:
9357         * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
9358         Declare.
9359         * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
9360         * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
9361         is thrown while handling an event, finish the thread state.
9362         (normal_stop): Use finish_thread_state cleanup.
9363         * infcmd.c (run_command_1): If an error is thrown while starting
9364         the inferior, finish the thread state.
9365
9366 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
9367
9368         * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
9369         skip breakpoints without a location (pending breakpoints).
9370
9371 2009-01-18  Pedro Alves  <pedro@codesourcery.com>
9372
9373         PR build/9186:
9374         * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
9375
9376 2009-01-18  Nick Roberts  <nickrob@snap.net.nz>
9377
9378         * thread.c (thread_command): Move call to annotate_thread_changed
9379         to...
9380         (do_captured_thread_select): ... here, to avoid printing an
9381         annotation if the thread change generates an exception.
9382
9383 2009-01-16  Joel Brobecker  <brobecker@adacore.com>
9384
9385         * NEWS: Document x86_64/MinGW as a new native configuration.
9386
9387 2009-01-16  Joel Brobecker  <brobecker@adacore.com>
9388
9389         * NEWS: Move the documentation of "info os processes" to
9390         the appropriate section (documenting the new commands).
9391
9392 2009-01-15  Doug Evans  <dje@google.com>
9393
9394         * target.h (target_signal_to_string): Make return type const char *.
9395         (target_signal_to_name): Ditto.
9396         (target_signal_from_name): Make arg const char *.
9397         * infrun.c (sig_print_info): Update.
9398         * signals/signals.c (signals): Make array and struct members const.
9399         (target_signal_to_string): Make return type const char *.
9400         (target_signal_to_name): Ditto.
9401         (target_signal_from_name): Make arg const char *.
9402
9403 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
9404             Tristan Gingold  <gingold@adacore.com>
9405
9406         * solist.h (struct target_so_ops): New member bfd_open.
9407         (solib_find): Add prototype.
9408         (solib_bfd_fopen): Add prototype.
9409         * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
9410         from solib_bfd_open.
9411         (solib_bfd_open): Use ops->bfd_open override if present.  Call
9412         solib_find and solib_bfd_open otherwise.
9413
9414         * objfiles.h (OBJF_KEEPBFD): New define.
9415         * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
9416         objfile flag is set.
9417         * solib.c (symbol_add_stub): Do not allocate second BFD for
9418         shared library; use OBJF_KEEPBFD flag on solib objfile.
9419
9420 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
9421
9422         * frame.c (get_frame_arch): Abort if called with NULL this_frame.
9423
9424 2009-01-15  Ulrich Weigand  <uweigand@de.ibm.com>
9425
9426         * value.h (address_of_variable): Add prototype.
9427         (locate_var_value): Remove prototype.
9428
9429         * findvar.c (read_var_value): Do not attempt to default frame
9430         to selected frame.
9431         (locate_var_value): Remove function.
9432         * valops.c (value_of_variable): Retrieve selected frame for
9433         symbols that require a frame when called with NULL block.
9434         * valops.c (address_of_variable): New function.
9435
9436         * eval.c (evaluate_subexp_for_address): Call address_of_variable
9437         instead of calling locate_var_value.
9438         (evaluate_subexp_with_coercion): Likewise.
9439
9440 2009-01-14  Daniel Jacobowitz  <dan@codesourcery.com>
9441
9442         * NEWS: Document "define" for prefixed commands.
9443         * cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
9444         show_user_1 for prefix commands.
9445         * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
9446         * cli/cli-script.c (validate_comname): Rewrite to handle prefix
9447         commands.  Return the containing command list.
9448         (define_command, document_command): Update to handle prefix commands.
9449         (show_user_1): Add prefix and name arguments.  Handle prefix
9450         commands.
9451         * cli/cli-script.h (show_user_1): Update prototype.
9452
9453 2009-01-14  Kai Tietz  <kai.tietz@onevision.com>
9454
9455         * ser-mingw.c (console_select_thread): Add return to make
9456         compiler happy.
9457         (pipe_select_thread): Likewise.
9458         (file_select_thread): Likewise.
9459
9460 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
9461
9462         * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
9463         previous change.
9464
9465 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
9466
9467         * remote.c (extended_remote_mourn_1): Invalidate our notion of
9468         current general thread.
9469
9470 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
9471
9472         * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
9473         without a live selected thread.
9474
9475 2009-01-14  Joel Brobecker  <brobecker@adacore.com>
9476
9477         Update the copyright notice of some of the files I missed
9478         in the previous copyright update.
9479
9480 2009-01-14  Joel Brobecker  <brobecker@adacore.com>
9481
9482         * windows-nat.c (handle_unload_dll): Use %p to print the DLL
9483         base address instead of casting it to DWORD.
9484
9485 2009-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
9486
9487         * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
9488         for NULL frame pointers.
9489
9490 2009-01-13  Mark Kettenis  <kettenis@gnu.org>
9491
9492         * utils.c (host_address_to_string): Reimplement in a way that
9493         avoids the cast of the address to long.
9494
9495 2009-01-13  Joel Brobecker  <brobecker@adacore.com>
9496
9497         * mdebugread.c (parse_symbol): Save the symbol private data
9498         using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
9499         (psymtab_to_symtab_1): Likewise.
9500         (parse_procedure): Declare variable "e" only in the scope
9501         where it is used. Extract the symbol private data using
9502         SYMBOL_VALUE_BYTES.
9503
9504 2009-01-13  Jim Blandy  <jimb@codesourcery.com>
9505
9506         Abstract out common code for copying value locations.
9507
9508         * value.h (set_value_component_location): New declaration.
9509         * value.c (set_value_component_location): New function.
9510         (value_primitive_field): Use it.
9511         * valarith.c (value_subscript, value_subscripted_rvalue): Same.
9512         * valops.c (search_struct_field, value_slice): Same.
9513         * ada-lang.c (coerce_unspec_val_to_type)
9514         (ada_value_primitive_packed_val): Same.
9515
9516 2009-01-13  Joel Brobecker  <brobecker@adacore.com>
9517
9518         * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
9519
9520 2009-01-12  Christopher Faylor  <me+cygwin@cgf.cx>
9521
9522         * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
9523         throughout.
9524         * i386-cygwin-tdep.c: Ditto.
9525         * i386-windows-nat.c: Ditto.
9526         * windows-nat.h: Ditto.
9527         * windows-tdep.c: Ditto.
9528         * windows-tdep.h: Ditto.
9529         * windows-nat.c: Ditto.
9530         (cygwin_load_start): Redefine as CORE_ADDR.
9531         (cygwin_load_end): Ditto.
9532         (windows_make_so): Coerce result of address arithmetic to uintptr_t
9533         before coercing to CORE_ADDR to avoid a compiler warning.
9534         (handle_exception): Define addr as CORE_ADDR and coerce
9535         ExceptionAddress to uintptr_t before assigining to avoid a compiler
9536         warning.
9537         * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
9538         files.
9539
9540 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
9541
9542         Fix linking with --enable-targets=all:
9543         * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
9544         (HFILES_NO_SRCDIR): Add windows-tdep.h.
9545         (ALLDEPFILES): Add windows-tdep.c.
9546
9547 2009-01-11  Chris Faylor  <me.gdb@cgf.cx>
9548
9549         * win32-nat.h: Delete.
9550         * windows-nat.h: Rename from win32-nat.h.
9551         * win32-nat.c: Delete.
9552         * windows-nat.c: Rename from win32-nat.c.
9553         * win32-termcap.c: Delete.
9554         * windows-termcap.c: Rename from win32-termcap.c.
9555         * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
9556         * configure.ac: Handle rename from win32-termcap.c ->
9557         windows-termcap.c.
9558         * configure: Regenerate.
9559         * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
9560         -> windows-termcap.c.
9561         * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
9562         windows-tdep.h.
9563         * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
9564         * windows-nat.c: Ditto.  Also reflect rename from from win32-tdep.h ->
9565         windows-tdep.h.
9566         (win32_make_so): Handle cygwin compiler warning due to change of
9567         load_addr from DWORD to LPVOID.
9568         (handle_load_dll): Use %p in format string to properly print address
9569         and avoid a compiler warning.
9570         (DEBUG_EXCEPTION_SIMPLE): Ditto.
9571         (handle_exception): Ditto.
9572         * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
9573         * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
9574         windows-nat.o.
9575         * config/i386/mingw.mh: Ditto.
9576         * config/i386/mingw64.mh: Ditto.
9577
9578 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
9579
9580         * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
9581         arrayprint_recurse_level to a parameter.  Update all the callers.  New
9582         comment at autovariables.
9583
9584 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
9585
9586         * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
9587         coding style.
9588
9589 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
9590
9591         * target.c (target_xfer_partial): Use host_address_to_string to
9592         print the address of readbuf and writebuf. Cast the address of
9593         elements inside the myaddr buffer into intptr_t.
9594         (deprecated_debug_xfer_memory): Use paddress to print memaddr.
9595         Cast the address of elements inside the myaddr buffer into
9596         intptr_t.
9597
9598 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
9599
9600         * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
9601         * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
9602         * configure.host, configure.tgt: Add handling for x86_64/windows.
9603         * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
9604         and amd64-windows-tdep.c.
9605
9606 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
9607
9608         * win32-tdep.h, win32-tdep.c: New files.
9609         * i386-cygwin-tdep.h: Delete.
9610         * i386-cygwin-tdep.c: Include win32-tdep.h instead of
9611         i386-cygwin-tdep.h.
9612         (win32_xfer_shared_library): Delete.  Moved to win32-tdep.c.
9613         * win32-nat.c: Likewise.
9614         * configure.tgt: Add win32-tdep.o to the list of target object
9615         files for i386-cygwin and i386-mingw targets.
9616
9617 2009-01-11  Joel Brobecker  <brobecker@adacore.com>
9618
9619         * win32-nat.h: New file.
9620         * win32-nat.c (mappings): Initialize to NULL.
9621         (win32_set_context_register_offsets): New function.
9622         * i386-windows-nat.c: New file.
9623         (mappings): Moved here from win32-nat.c.
9624         (_initialize_i386_windows_nat): New function.
9625         * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
9626         * config/i386/cygwin.mh (NATDEPFILES): Likewise.
9627
9628 2009-01-09  Andreas Schwab  <schwab@suse.de>
9629
9630         * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
9631
9632 2009-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
9633
9634         * gdbtypes.c (append_composite_type_field): Correct the location of
9635         appended fields.
9636
9637 2009-01-09  Pedro Alves  <pedro@codesourcery.com>
9638
9639         * defs.h (deprecated_error_hook): Delete declaration.
9640         * interps.c (clear_interpreter_hooks): Adjust.
9641         * remote-sim.c (gdb_os_error): Don't try to call
9642         deprecated_error_hook.  No need to call exit anymore.
9643         * top.c (deprecated_error_hook): Delete.
9644
9645 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9646
9647         * arch-utils.c (gdbarch_update_p): Use host_address_to_string
9648         to print the address of the gdbarch pointer.
9649
9650 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9651
9652         * gdbarch.sh: Fix all the compilation errors on amd64-windows
9653         due to casting a pointer to a long when printing a function
9654         address. Instead, use host_address_to_string to convert our
9655         address to a string.
9656         * gdbarch.c: Regenerate.
9657
9658 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9659
9660         * event-top.c (async_disconnect, async_stop_sig): use "raise"
9661         instead of "kill" to raise a signal.
9662
9663 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9664
9665         * win32-nat.c (get_module_name): Change the type of parameter
9666         "base_address" to LPVOID.  Remove unnecessary cast.
9667         (struct lm_info): Change type of load_addr to LPVOID.
9668         (win32_make_so): Change the type of parameter "load_addr"
9669         to LPVOID.  Remove some unnecessary casts.
9670         (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
9671         (win32_xfer_shared_libraries): Add missing cast.
9672
9673 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9674
9675         * win32-nat.c (has_detach_ability, set_process_privilege):
9676         Cast the result of GetProcAddress to (void *) to avoid
9677         a compilation warning.
9678
9679 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9680
9681         * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
9682         already defined.
9683
9684 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9685
9686         * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
9687         definition of local variable "done".
9688         (info_w32_command, handle_exception): Remove unnecessary cast.
9689
9690 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9691
9692         * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
9693         DebugSetProcessKillOnExit.  Update all uses in this file.
9694         (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
9695         Update all uses in this file.
9696
9697 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9698
9699         * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
9700         and use it when pushing the target.
9701         (win32_attach, win32_create_inferior): Update call to
9702         do_initial_win32_stuff.
9703         (win32_detach, win32_mourn_inferior): Use our ops parameter
9704         instead of the global win32_ops to unpush the target.
9705
9706 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9707
9708         * ser-mingw.c (ser_windows_open): Use proper type when casting
9709         in call to _open_osfhandle.
9710
9711 2009-01-09  Kai Tietz  <kai.tietz@onevision.com>
9712
9713         * coff-pe-read.c (read_pe_exported_syms): Fix typo.
9714
9715 2009-01-09  Joel Brobecker  <brobecker@adacore.com>
9716
9717         * CONTRIBUTE: Minor reformatting.
9718
9719 2009-01-08  Kai Tietz  <kai.tietz@onevision.com>
9720
9721         * MAINTAINERS: Add myself to Write After Approval.
9722         * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
9723         export directory.
9724
9725 2009-01-08  Nathan Froyd  <froydnj@codesourcery.com>
9726
9727         * remote-sim.c (gdb_os_error): Mark as a noreturn function.
9728         Call exit to make it obvious to GCC.
9729
9730 2009-01-08  Tom Tromey  <tromey@redhat.com>
9731
9732         PR breakpoints/9350:
9733         * varobj.c (varobj_invalidate): Unconditionally free
9734         all_rootvarobj.
9735         * symfile.c (syms_from_objfile): Free local_addr when returning
9736         normally.
9737         * exec.c (exec_file_attach): Do cleanups before returning.
9738         (exec_file_command): Likewise.
9739         * corefile.c (reopen_exec_file): Do cleanups before returning.
9740         * breakpoint.c (insert_breakpoint_locations): Do cleanups before
9741         returning.
9742         (do_vec_free): New function.
9743         (update_global_location_list): Make a cleanup for old_locations.
9744         Do cleanups before returning.  Remove unused variable 'e'.
9745         (find_condition_and_thread): Free result of parsing the
9746         expression.
9747         (print_it_typical): Do cleanups before returning.
9748         (breakpoint_re_set_one): Always free sals.sals.
9749
9750 2009-01-08  Joel Brobecker  <brobecker@adacore.com>
9751             Emi Suzuki  <emi-suzuki@tjsys.co.jp>
9752
9753         * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
9754         watchpoints.
9755
9756 2009-01-07  Doug Evans  <dje@google.com>
9757
9758         * top.c (gdb_prompt_string): Delete, unused.
9759
9760 2009-01-07  Pedro Alves  <pedro@codesourcery.com>
9761
9762         Delete ONE_PROCESS_WRITETEXT leftovers.
9763
9764         * breakpoint.c (insert_bp_location): Delete process_warning
9765         argument.  Adjust.
9766         (insert_breakpoint_locations): Adjust.
9767         (reattach_breakpoints): Adjust.
9768         * infrun.c (normal_stop): Drop "It might be running in another
9769         process" notice.
9770
9771 2009-01-07  Stan Shebs  <stan@codesourcery.com>
9772
9773         * config/pa/linux.mh (XDEPFILES): Remove.
9774
9775 2009-01-07  Doug Evans  <dje@google.com>
9776
9777         * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
9778
9779 2009-01-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9780
9781         * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
9782         spacing, a regression from 2008-04-22.
9783
9784 2009-01-07  Joel Brobecker  <brobecker@adacore.com>
9785
9786         * utils.c (gdb_print_host_address): Adjust implementation to
9787         reuse host_address_to_string. Move comment explaining the conversion
9788         from host address to string from here...
9789         (host_address_to_string): ... to there.
9790
9791 2009-01-07  Emi Suzuki  <emi-suzuki@tjsys.co.jp>
9792
9793         * MAINTAINERS: Add myself for write after approval privileges.
9794
9795 2009-01-06  Tom Tromey  <tromey@redhat.com>
9796
9797         * value.c (set_internalvar): Use value_free, not xfree.
9798
9799 2009-01-06  Jim Blandy  <jimb@red-bean.com>
9800
9801         Check return values of functions declared with warn_unused_result
9802         attribute in GLIBC 2.8.
9803         * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
9804         * inflow.c (check_syscall): New function.
9805         (new_tty): Use check_syscall to check return values from open and dup.
9806         * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
9807         * main.c (captured_main): Call cwd after setting up gdb_stderr;
9808         check for errors from getcwd.
9809         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
9810         * ui-file.c (stdio_file_write): Ignore return value from fwrite.
9811         (stdio_file_fputs): Same.
9812         * utils.c (internal_vproblem): abort if last-ditch error message
9813         write fails.
9814
9815         * top.c (gdb_init): Don't set the current directory here; that's
9816         already been done in captured_main.
9817
9818 2009-01-06  Sandra Loosemore  <sandra@codesourcery.com>
9819
9820         * ser-tcp.c: Adjust includes.
9821         (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
9822         (tcp_auto_retry, tcp_retry_limit): Declare.
9823         (TIMEOUT): Remove, in favor of tcp_retry_limit.
9824         (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
9825         (wait_for_connect): New function.
9826         (net_open): Use it.  Add auto-retry logic.
9827         (set_tcp_cmd, show_tcp_cmd): New functions.
9828         (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
9829         and "set/show tcp connect-timeout" commands.
9830         * NEWS: Document new commands.
9831
9832 2009-01-05  Tom Tromey  <tromey@redhat.com>
9833
9834         * python/python-internal.h (Py_ssize_t): Define as int.
9835
9836 2009-01-05  Jim Blandy  <jimb@red-bean.com>
9837
9838         * MAINTAINERS: Fix my e-mail address as steering committee member.
9839
9840 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
9841
9842         Updated copyright notices for most files.
9843
9844 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
9845
9846         * top.c (print_gdb_version): Update copyright year.
9847
9848 2009-01-03  Joel Brobecker  <brobecker@adacore.com>
9849
9850         * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
9851
9852 2009-01-01  Pedro Alves  <pedro@codesourcery.com>
9853
9854         PR breakpoints/9681:
9855         * exceptions.h (enum errors): New error type, MEMORY_ERROR.
9856         * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
9857         * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
9858         retrow all other exceptions.
9859
9860 For older changes see ChangeLog-2008.
9861 \f
9862 Local Variables:
9863 mode: change-log
9864 left-margin: 8
9865 fill-column: 74
9866 version-control: never
9867 coding: utf-8
9868 End: