procfs.c: Move solib_mappings_callback up to avoid compiler warning.
[external/binutils.git] / gdb / ChangeLog
1 2010-04-20  Joel Brobecker  <brobecker@adacore.com>
2
3         * procfs.c (solib_mappings_callback): Move function up to avoid
4         a compiler warning.
5
6 2010-04-20  Joel Brobecker  <brobecker@adacore.com>
7
8         * procfs.c (find_signalled_thread, find_stop_signal): Move
9         these functions down to define them only when used.
10
11 2010-04-20  Joel Brobecker  <brobecker@adacore.com>
12
13         * valprint.c (common_val_print): Fix the value before extracting
14         its contents.
15         * ada-lang.c (ada_to_fixed_value): Make this function extern.
16         * ada-lang.h (ada_to_fixed_value): New function declaration.
17         * ada-valprint.c (ada_value_print): Use ada_to_fixed_value
18         to avoid code duplication and fix a bug in the handling of
19         fixed types contents.
20
21 2010-04-20  Tom Tromey  <tromey@redhat.com>
22
23         * dwarf2read.c (dwarf2_compute_name): Handle DW_AT_linkage_name.
24         (read_partial_die): Likewise.
25         (dwarf_attr_name): Likewise.
26
27 2010-04-20  Chris Moller  <cmoller@redhat.com>
28         
29         PR 10867
30
31         * cp-valprint.c (global): Adding new static array recursion
32         detection obstack.
33         (cp_print_value_fields, cp_print_static_field): Added new static
34         array recursion detection code.
35
36 2010-04-20  Mark Kettenis  <kettenis@gnu.org>
37
38         * i386-linux-tdep.c (i386_linux_regset_sections): Size of the
39         general-purpose register set should be 68 instead of 144.
40         (i386_linux_sse_regset_sections): Likewise.
41         (i386_linux_avx_regset_sections): Likewise.
42
43 2010-04-20  Stan Shebs  <stan@codesourcery.com>
44             Nathan Sidwell  <nathan@codesourcery.com>
45
46         * dwarf2loc.c (struct axs_var_loc): New struct.
47         (dwarf2_tracepoint_var_loc): New function.
48         (dwarf2_tracepoint_var_access): New function.
49         (dwarf2_tracepoint_var_ref): Use dwarf2_tracepoint_var_loc, deal
50         with DW_OP_piece.
51         (locexpr_describe_location_piece): New function.
52         (locexpr_describe_location_1): New function.
53         (locexpr_describe_location): Call it, update signature.
54         (loclist_describe_location): Rewrite to loop over locations,
55         update signature.
56         * symtab.h (struct symbol_computed_ops): Add address to
57         describe_location arguments, return void.
58         * printcmd.c (address_info): Get context PC, pass to computed
59         location description.
60         * tracepoint.c (scope_info): Ditto.
61         * ax-gdb.c (trace_kludge): Export.
62
63 2010-04-20  Tom Tromey  <tromey@redhat.com>
64
65         * dwarf2-frame.c (decode_frame_entry_1): Handle CIE version 4.
66         (struct dwarf2_cie) <segment_size>: New field.
67         * dwarf2read.c (partial_read_comp_unit_head): Accept DWARF 4.
68         (skip_one_die): Handle DW_FORM_flag_present, DW_FORM_sec_offset,
69         DW_FORM_exprloc.
70         (read_attribute_value): Handle DW_FORM_flag_present,
71         DW_FORM_sec_offset, DW_FORM_exprloc.
72         (dump_die_shallow): Likewise.
73         (attr_form_is_section_offset): Handle DW_FORM_sec_offset.
74         (dwarf2_const_value): Handle DW_FORM_exprloc.
75         (attr_form_is_block): Likewise.
76         (struct line_header) <maximum_ops_per_instruction>: New field.
77         (dwarf_decode_line_header): Set new field.
78         (dwarf_decode_lines): Handle new field.
79
80 2010-04-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
81
82         * f-exp.y: Add new production to recognize the `logical*8' type.
83         (LOGICAL_S8_KEYWORD): New token.
84         * f-lang.c (enum f_primitive_types)
85         <f_primitive_type_logical_s8>: New field.
86         (f_language_arch_info): Handling `logical*8' type.
87         (build_fortran_types): Building `logical*8' type.
88         * f-lang.h (struct builtin_f_type) <builtin_logical_s8>: New field.
89
90 2010-04-19  Doug Evans  <dje@google.com>
91
92         * ser-base.c (generic_readchar): Watch for EOF in read of error_fd.
93         * ser-pipe.c (pipe_open): Fix file descriptor leaks.
94         (pipe_close): Ditto.
95
96 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
97
98         * configure.tgt (x86_64-*-mingw*): Set BUILD_GDBSERVER to yes.
99
100 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
101
102         * windows-tdep.c (windows_get_tlb_type): Change current_seh.handle
103         type to void function.
104
105 2010-04-19  Stan Shebs  <stan@codesourcery.com>
106             Vladimir Prus  <vladimir@codesourcery.com>
107
108         * tracepoint.c (tfind_1): Add missing newline, report exit from
109         tfind mode as such.
110         * target.c (update_current_target): Make default
111         to_trace_find return -1.
112
113 2010-04-19  Mike Frysinger  <vapier@gentoo.org>
114
115         * objc-lang.c (find_methods): Move symname check up.
116
117 2010-04-19  Pedro Alves  <pedro@codesourcery.com>
118
119         * ada-lang.c (print_recreate_exception)
120         <ex_catch_exception_unhandled>: It's "catch exception unhandled",
121         not "catch unhandled".
122
123 2010-04-19  Pedro Alves  <pedro@codesourcery.com>
124
125         PR breakpoints/8554.
126
127         Implement `save-breakpoints'.
128
129         * breakpoint.c (save_cmdlist): New.
130         (breakpoint_set_cmdlist, breakpoint_show_cmdlist): Moved up close
131         to save_cmdlist.
132         (print_recreate_catch_fork): New.
133         (catch_fork_breakpoint_ops): Install it.
134         (print_recreate_catch_vfork): New.
135         (catch_vfork_breakpoint_ops): Install it.
136         (print_recreate_catch_syscall): New.
137         (catch_syscall_breakpoint_ops): Install it.
138         (print_recreate_catch_exec): New.
139         (catch_exec_breakpoint_ops): Install it.
140         (print_recreate_exception_catchpoint): New.
141         (gnu_v3_exception_catchpoint_ops): Install it.
142         (save_breakpoints): New, based on tracepoint_save_command, but
143         handle all breakpoint types.
144         (save_breakpoints_command): New.
145         (tracepoint_save_command): Rename to...
146         (save_tracepoints_command): ... this, and reimplement using
147         save_breakpoints.
148         (save_command): New.
149         (_initialize_breakpoints): Install the "save" command prefix.
150         Install the "save breakpoints" command.  Make "save-tracepoints" a
151         deprecated alias for "save tracepoints".
152         * breakpoint.h (struct breakpoint_ops): New field `print_recreate'.
153         * ada-lang.c (print_recreate_exception): New.
154         (print_recreate_catch_exception): New.
155         (catch_exception_breakpoint_ops): Install it.
156         (print_recreate_catch_exception_unhandled): New.
157         (catch_exception_unhandled_breakpoint_ops): Install it.
158         (print_recreate_catch_assert): New.
159         (catch_assert_breakpoint_ops): Install it.
160
161         * NEWS: Mention the new `save breakpoints' command.  Mention the
162         new `save tracepoints' alias and that `save-tracepoints' is now
163         deprecated.
164
165 2010-04-18  Pedro Alves  <pedro@codesourcery.com>
166
167         PR tui/9217
168
169         * tui/tui-out.c: Include cli-out.h.
170         (tui_table_begin, tui_table_body, tui_table_end, tui_table_header)
171         (tui_begin, tui_end, tui_field_int, tui_field_skip)
172         (tui_field_string, tui_field_fmt, tui_spaces, tui_text)
173         (tui_message, tui_wrap_hint, tui_flush): Delete forward
174         declarations.
175         (struct ui_out_data): Rename to...
176         (struct tui_ui_out_data): ... this.  Remove `stream' and
177         `suppress_output' fields, and inherit cli_ui_out_data.
178         (tui_out_data): New typedef.
179         (tui_ui_out_impl): Don't initialize fields staticaly.
180         (tui_table_begin, tui_table_body, tui_table_end, tui_table_header)
181         (tui_begin, tui_end): Delete.
182         (tui_field_int): Adjust to delegate most work to the base type.
183         (tui_field_skip): Delete.
184         (tui_field_string, tui_field_fmt): Adjust comment.  Adjust to
185         delegate most work to the base type.
186         (tui_spaces): Delete.
187         (tui_text): Adjust to delegate most work to the base type.
188         (tui_message): Delete.
189         (tui_wrap_hint): Delete.
190         (tui_flush): Delete.
191         (out_field_fmt): Delete.
192         (field_separator): Delete.
193         (tui_out_new): Adjust to initialize the base type.
194         (_initialize_tui_out): Initialize tui_ui_out_impl.
195         * cli-out.c (struct ui_out_data): Moved out to cli-out.h, renamed
196         cli_ui_out_data.
197         (cli_out_data): Adjust.
198         (cli_ui_out_impl): Make extern.
199         (cli_table_header, cli_field_int, cli_field_skip): Use
200         uo_field_string instead of cli_field_string.
201         (cli_redirect): Adjust to use cli_out_data.
202         (cli_out_data_ctor): New.
203         (cli_out_new): Use it.
204         * cli-out.h (struct ui_file): Remove forward declaration.
205         (struct cli_ui_out_data): New, moved from cli-out.c, and renamed.
206         (cli_ui_out_impl): Declare.
207         (cli_out_data_ctor): Declare.
208         * ui-out.c (struct ui_out) <data>: Change type to void pointer.
209         (uo_field_string): No longer static.
210         (ui_out_data): Change return type to void pointer.
211         (ui_out_new): Change `data' parameter type to void pointer.
212         * ui-out.h (struct ui_out_data): Don't forward declare.
213         (ui_out_data): Change return type to void pointer.
214         (ui_out_new): Change `data' parameter type to void pointer.
215         (uo_field_string): Declare.
216
217 2010-04-17  Pedro Alves  <pedro@codesourcery.com>
218
219         * ui-file.c (tee_file_isatty): Return whether `tee->one' is a tty,
220         instead of always false.
221
222 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
223
224         PR corefiles/11511
225         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Support
226         orig_rax.
227
228 2010-04-17  Pedro Alves  <pedro@codesourcery.com>
229
230         * breakpoint.c (watchpoints_triggered): Use
231         is_hardware_watchpoint.
232         (watchpoints_triggered): Ditto.
233         (bpstat_check_location): Use is_watchpoint and
234         is_hardware_watchpoint.
235         (bpstat_check_watchpoint): Use is_watchpoint and
236         is_hardware_watchpoint.
237         (bpstat_stop_status): Fix comment.
238         (user_settable_breakpoint): Use is_watchpoint.
239         (hw_watchpoint_used_count): Use is_hardware_watchpoint.
240         (disable_watchpoints_before_interactive_call_start): Use
241         is_watchpoint.
242         (enable_watchpoints_after_interactive_call_stop): Use
243         is_watchpoint.
244         (clear_command): Use is_watchpoint.
245         (do_enable_breakpoint): Use is_watchpoint.
246
247 2010-04-16  Mike Frysinger  <vapier@gentoo.org>
248
249         * solib-frv.c (enable_break1_done): Delete.
250         (enable_break2): Do not check enable_break1_done.  Move the
251         enable_break2_done setting and call to
252         remove_solib_event_breakpoints() to the end.  Return without
253         warning when the contents of _dl_debug_addr are 0.
254         (enable_break): Do not set enable_break1_done.
255         (frv_clear_solib): Likewise.
256
257 2010-04-16  Kevin Buettner  <kevinb@redhat.com>
258
259         * m32c-tdep.c (m32c_m16c_address_to_pointer): Print warning
260         instead of an error if no PLT entry is found.  Return a
261         potentially useful result.
262         (m32c_m16c_pointer_to_address): Add code to search for function
263         address when no .plt entry is found.
264
265 2010-04-16  Stan Shebs  <stan@codesourcery.com>
266
267         * tracepoint.c (trace_variable_command): Run a cleanup.
268
269 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
270
271         * p-lang.c (pascal_one_char): Do not restrict C to 0..255 range.
272
273 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
274
275         Support for Windows OS Thread Information Block.
276         * NEWS: Document new feature.
277         * remote.c (PACKET_qGetTIBAddr): New enum element.
278         (remote_get_tib_address): New function.
279         (init_remote_ops): Set to_get_tib_address field
280         to remote_get_tib_address.
281         (_initialize_remote): Add add_packet_config_cmd
282         for PACKET_qGetTIBAddr.
283         * target.c (update_current_target): Set default value for
284         new to_get_tib_address field.
285         * target.h (target_ops): New field to_get_tib_address.
286         (target_get_tib_address): New macro.
287         * windows-nat.c (thread_info): Add thread_local_base field.
288         (windows_add_thread): Add tlb argument of type 'void *'.
289         (fake_create_process): Adapt windows_add_thread call.
290         (get_windows_debug_event): Idem.
291         (windows_get_tib_address): New function.
292         (init_windows_ops): Set to_get_tib_address field
293         to remote_get_tib_address.
294         (_initialize_windows_nat): Replace info_w32_cmdlist
295         initialization by a call to init_w32_command_list.
296         (info_w32_command, info_w32_cmdlist): Removed from here...
297         to windows-tdep.c file.
298         * windows-tdep.h (info_w32_cmdlist): Declare.
299         (init_w32_command_list): New external function 
300         declaration.
301         * windows-tdep.c: Add several headers.
302         (info_w32_cmdlist): to here, made global.
303         (thread_information_32): New struct.
304         (thread_information_64): New struct.
305         (TIB_NAME): New char array.
306         (MAX_TIB32, MAX_TIB64, FULL_TIB_SIZE): New constants.
307         (maint_display_all_tib): New static variable.
308         (windows_get_tlb_type): New function.
309         (tlb_value_read, tlb_value_write): New functions.
310         (tlb_value_funcs): New static struct.
311         (tlb_make_value): New function.
312         (display_one_tib): New function.
313         (display_tib): New function.
314         (show_maint_show_all_tib):New function.
315         (info_w32_command): Moved from windows-nat.c.
316         (init_w32_command_list): New function.
317         (_initialize_windows_tdep): New function.
318         New "maint set/show show-all-tib" command
319         New "$_tlb" internal variable.
320
321 2010-04-16  Joel Brobecker  <brobecker@adacore.com>
322
323         * tui/tui-regs.c (tui_display_register): Add comment about
324         a couple of casts.
325         * tui/tui-stack.c (tui_show_locator_content): Ditto.
326
327 2010-04-15  Stan Shebs  <stan@codesourcery.com>
328
329         * frame.c: Include tracepoint.h.
330         (get_current_frame): Allow a trace frame to be an alternate source
331         of stack frame data.
332         * tracepoint.c (tfind_1): Don't try to get current stack frame if
333         it won't succeed.
334
335 2010-04-15  Pedro Alves  <pedro@codesourcery.com>
336
337         * ppc-linux-tdep.c (bsd_uthread_solib_loaded): Always pass 0 for
338         flags.
339         * solib-spu.c (spu_solib_loaded): Always pass 0 for flags.
340
341 2010-04-15  Doug Evans  <dje@google.com>
342
343         * NEWS: Add entry for python program space support.
344         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-progspace.o.
345         (SUBDIR_PYTHON_SRCS): Add py-progspace.c.
346         (py-progspace.o): New rule.
347         * python/py-prettyprint.c (find_pretty_printer_from_objfiles): New
348         function.
349         (find_pretty_printer_from_progspace): New function.
350         (find_pretty_printer_from_gdb): New function.
351         (find_pretty_printer): Rewrite.
352         * python/py-progspace.c: New file.
353         * python/python-internal.h (program_space): Add forward decl.
354         (pspace_to_pspace_object, pspy_get_printers): Declare.
355         (gdbpy_initialize_pspace): Declare.
356         * python/python.c: #include "progspace.h".
357         (gdbpy_get_current_progspace, gdbpy_progspaces): New functions.
358         (_initialize_python): Call gdbpy_initialize_pspace.
359         (GdbMethods): Add current_progspace, progspaces.
360
361         Add -s option to source command.
362         * NEWS: Document new option.
363         * cli/cli-cmds.c (find_and_open_script): Add function comment.
364         Delete from_tty and cleanupp args.  Split filep arg into file and
365         full_pathp.  New arg search_path.
366         (source_script_from_stream): New function.
367         (source_script_with_search): New function.
368         (source_script): Rewrite.
369         (source_command): Parse "-s" option.
370         (init_cli_cmds): Add "-s" docs to source command help, and reformat.
371         * python/python.c (source_python_script): Make file arg a const char *.
372         Don't call fclose, leave for caller.
373         * python/python.h (source_python_script): Update.
374
375 2010-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
376             Pedro Alves  <pedro@codesourcery.com>
377
378         Avoid rereading shared libraries that haven't changed.
379
380         * solib.c (free_so_symbols): New function, from ...
381         (free_so): ... here.  Call it.
382         (solib_read_symbols): Don't warn here if symbols have already been
383         loaded.
384         (solib_add): Warn here instead, if a pattern was specified.
385         (reload_shared_libraries_1): New.
386         (reload_shared_libraries): Rewrite to not fetch the library list.
387
388 2010-04-14  Doug Evans  <dje@google.com>
389
390         * source.c (openp): Strip DOS drive letter if present before
391         concatenating string to search path.
392
393 2010-04-14  Pedro Alves  <pedro@codesourcery.com>
394
395         * objfiles.h (gdb_bfd_close_or_warn): Declare.
396         * objfiles.c (gdb_bfd_close_or_warn): New.
397         * corelow.c: Include objfiles.h
398         (core_close): Use gdb_bfd_close_or_warn.
399         * elfread.c (build_id_verify): Ditto.
400         * exec.c (exec_close, exec_close_1): Ditto.
401
402 2010-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
403             Pedro Alves  <pedro@codesourcery.com>
404
405         Group errors for many missing shared libraries.
406
407         * solist.h (struct so_list): Remove from_tty.
408         * solib.c (solib_bfd_open): Return NULL if we failed to open a BFD.
409         (solib_map_sections): Take so_list argument.  Return 0 if we
410         failed to open a BFD.  Add target sections here.
411         (symbol_add_stub): Delete.
412         (solib_read_symbols): Inline symbol_add_stub.  Use current flags,
413         not from_tty copied from the so_list.  Don't warn a second time
414         for a missing library.
415         (update_solib_list): Don't save from_tty.  Use TRY_CATCH.  Do not
416         add to the section table here.  Print out a single warning for all
417         missing libraries.
418         * bsd-uthread.c (bsd_uthread_solib_loaded): Always pass 0 for
419         flags.
420
421 2010-04-14  Phil Muldoon  <pmuldoon@redhat.com>
422
423         * python/py-block.c (gdbpy_block_for_pc): Use i8n to encompass
424         error/warning messages.  Capitalize and use complete sentences.
425         (blpy_block_syms_iternext): Likewise.
426         * python/py-cmd.c (parse_command_name, cmdpy_init): Likewise.
427         * python/py-frame.c (FRAPY_REQUIRE_VALID, frapy_block)
428         (frame_info_to_frame_object, frapy_read_var)
429         (gdbpy_frame_stop_reason_string): Likewise.
430         * python/py-lazy-string.c (stpy_convert_to_value)
431         (gdbpy_create_lazy_string_object): Likewise.
432         * python/py-objfile.c (objfpy_set_printers): Likewise.
433         * python/py-prettyprint.c (gdbpy_default_visualizer): Likewise.
434         * python/python.c (parameter_to_python): Likewise.
435         * python/py-type.c (typy_range, typy_target): Likewise.
436         * python/py-value.c (valpy_cast, valpy_length, valpy_getitem)
437         (valpy_richcompare, valpy_int, valpy_long, valpy_float): Likewise.
438
439
440 2010-04-14  Phil Muldoon  <pmuldoon@redhat.com>
441
442         PR python/11381
443
444         * python/py-prettyprint.c (pretty_print_one_value): Test for
445         Py_None.
446         (print_string_repr): Test for Py_None.  Set flags accordingly.
447         Return value depending on return type.
448         (print_children): Take a value indicating whether data was printed
449         before this function was called.  Alter output accordingly.
450         (apply_val_pretty_printer): Capture return value from
451         print_string_repr and pass to print_children.
452
453 2010-04-13  Mark Kettenis  <kettenis@gnu.org>
454
455         PR corefiles/11481
456         * i386-linux-tdep.c (i386_linux_regset_sections): Remove extended
457         register note sections.
458         (i386_linux_sse_regset_sections, i386_linux_avx_regset_sections):
459         New variables.
460         (i386_linux_init_abi): Install list of supported register note
461         sections that matches the target description.
462
463 2010-04-13  Pedro Alves  <pedro@codesourcery.com>
464
465         * remote.c (remote_get_noisy_reply): Don't error out on empty
466         replies.
467         (remote_start_remote): Update and merge tracepoints and trace
468         state variables as long as the target supports tracepoints.
469         (remote_trace_init): Fix prototype.
470         (remote_download_trace_state_variable): Validate reply.
471         (remote_trace_set_readonly_regions): Fix prototype.
472         (remote_trace_start): Fix prototype.  Check for empty reply.
473         (remote_get_trace_status): Small cleanup.
474         (remote_trace_stop): Fix prototype.  Check for empty reply.
475         (remote_trace_find): Check for empty reply.
476         (remote_save_trace_data): Validate reply.
477         (remote_set_disconnected_tracing): Check for empty reply, and
478         validate reply.
479         (remote_set_circular_trace_buffer): Ditto.
480
481 2010-04-13  Pierre Muller  <muller@ics.u-strasbg.fr>
482
483         Suppress unused value warning during compilation.
484         * tui/tui-regs.c (tui_display_register): Cast wstandout and wstandend
485         calls to void.
486         * tui/tui-stack.c (tui_show_locator_content): Likewise.
487
488 2010-04-12  Stan Shebs  <stan@codesourcery.com>
489
490         * tracepoint.c (tfile_xfer_partial): Check read result.
491
492 2010-04-12  Mike Frysinger  <vapier@gentoo.org>
493
494         * remote-m32r-sdi.c (m32r_files_info): Add const to local "file" var.
495         * remote-sim.c (gdbsim_files_info): Likewise.
496
497 2010-04-12  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
498
499         * arm-tdep.h (gdb_regnum): Add ARM_FPSCR_REGNUM
500         * arm-linux-nat.c (arm_linux_vfp_register_count): New
501         variable.
502         (fetch_vfp_registers): New function to fetch VFP registers.
503         (store_vfp_registers): New function to store VFP registers.
504         (arm_linux_fetch_inferior_registers): Add support for VFP
505         registers.
506         (arm_linux_store_inferior_registers): Likewise.
507         (arm_linux_read_description): Likewise.
508         (_initialize_arm_linux_nat): Delay initialising iWMMX tdesc
509         until we need it.
510
511 2010-04-11  H.J. Lu  <hongjiu.lu@intel.com>
512
513         * amd64-tdep.c (amd64_supply_xstateregset): Remove the unused
514         tdep.
515         (amd64_collect_xstateregset): Likewise.
516
517 2010-04-09  Stan Shebs  <stan@codesourcery.com>
518
519         * tracepoint.c (trace_status_mi): Report frames created.
520
521         * tracepoint.c (trace_dump_command): Include default-collect
522         expressions.
523
524 2010-04-09  Ulrich Weigand  <uweigand@de.ibm.com>
525
526         * symtab.c (find_function_start_sal): Never return SAL pointing
527         before function start address, even if line info is missing.
528
529 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
530
531         * NEWS: Mention tracepoints support.
532
533 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
534
535         * tracepoint.c (trace_status_mi): Report disconnected tracing and
536         circular trace buffer statuses.
537
538 2010-04-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
539
540         * config/djgpp/fnchange.lst: Fix typo in translations for
541         symbol-without-target_section.exp and symbol-without-target_section.c.
542
543 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
544
545         * breakpoint.c (condition_command): Pass condition expression to
546         set_breakpoint_condition stripped from breakpoint number.
547
548 2010-04-09  Phil Muldoon  <pmuldoon@redhat.com>
549             Thiago Jung Bauermann  <bauerman@br.ibm.com>
550             Tom Tromey  <tromey@redhat.com>
551
552         * breakpoint.c (condition_command): Simplify.  Move condition
553         setting code to ...
554         (set_breakpoint_condition): ... here.  New function.
555         * breakpoint.h  (set_breakpoint_condition): Declare.
556         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpoint.
557         (SUBDIR_PYTHON_SRCS): Likewise.
558         (py-breakpoint.o): New rule.
559         * python/py-breakpoint.c: New file.
560         * python/python-internal.h (gdbpy_breakpoints)
561         (gdbpy_initialize_breakpoints): Declare.
562         (GDB_PY_SET_HANDLE_EXCEPTION) Define.
563
564 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
565
566         * regformats/regdat.sh: Include server.h.  Don't include
567         regcache.h.
568
569 2010-04-08  Stan Shebs  <stan@codesourcery.com>
570             Pedro Alves  <pedro@codesourcery.com>
571
572         * tracepoint.h (struct trace_status): New fields disconnected_tracing
573         and circular_buffer.
574         (disconnect_tracing): Rename from disconnect_or_stop_tracing.
575         * tracepoint.c (trace_status_command): Display target's status for
576         disconnected tracing and circular buffer.
577         (disconnect_tracing): Rename from disconnect_or_stop_tracing, add
578         query for non-disconnected-tracing case, remove the stop_tracing
579         call.
580         (tfile_open): Clear disconnected and circular buffer status.
581         (trace_save): Save disconnected and circular buffer status.
582         (parse_trace_status): Parse disconnected and circular buffer status,
583         also recognize disconnected as a stop reason.
584         * remote.c (remote_set_disconnected_tracing): Only set
585         QTDisconnected if the remote end supports disconnected tracing.
586         Warn otherwise, if trying to enable disconnected tracing.
587         * infcmd.c (detach_command): Update disconnect_tracing call.
588         * cli/cli-cmds.c (quit_command): Ditto.
589
590 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
591
592         * i387-tdep.c (i387_collect_xsave): Replace abort with
593         internal_error.
594
595 2010-04-08  Stan Shebs  <stan@codesourcery.com>
596
597         * breakpoint.c (default_collect_info): New function.
598         (breakpoints_info): Call it.
599         (maintenance_info_breakpoints): Ditto.
600         (tracepoints_info): Ditto.
601
602 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
603
604         * i387-tdep.c (i387_collect_xsave): Re-indent.
605
606 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
607
608         * i386-linux-nat.c (have_ptrace_getfpxregs): Initialize to -1
609         if HAVE_PTRACE_GETFPXREGS is defined.
610         (i386_linux_read_description): Set have_ptrace_getfpxregs and
611         have_ptrace_getregset to 0 if ptrace PTRACE_GETFPXREGS failed.
612
613         * i386-linux-tdep.c: Include "features/i386/i386-mmx-linux.c"
614         (i386_linux_core_read_description): Return tdesc_i386_mmx_linux
615         if .reg-xfp section doesn't exist.
616         (_initialize_i386_linux_tdep): Call initialize_tdesc_i386_mmx_linux.
617
618         * i386-linux-tdep.h (tdesc_i386_mmx_linux): New.
619
620         * i386-tdep.c: Include "features/i386/i386-mmx.c".
621         (i386_go32_init_abi): Set tdesc to tdesc_i386_mmx.
622         (i386_validate_tdesc_p): Make org.gnu.gdb.i386.sse optional.  Set
623         xcr0 to I386_XSTATE_X87_MASK if SSE isn't available.
624         (i386_gdbarch_init): Update comments.
625         (_initialize_i386_tdep): Call initialize_tdesc_i386_mmx.
626
627         * common/i386-xstate.h (I386_XSTATE_X87_MASK): New.
628
629         * config/djgpp/fnchange.lst: Add i386 MMX XML files.
630
631         * features/Makefile (i386/i386-mmx-expedite): New.
632         (i386/i386-mmx-linux-expedite): Likewise.
633         ($(outdir)/i386/i386-mmx.dat): Likewise.
634         ($(outdir)/i386/i386-mmx-linux.dat): Likewise.
635
636         * features/i386/i386-mmx-linux.c: New.
637         * features/i386/i386-mmx-linux.xml: Likewise.
638         * features/i386/i386-mmx.c: Likewise.
639         * features/i386/i386-mmx.xml: Likewise.
640         * regformats/i386/i386-mmx-linux.dat: Likewise.
641         * regformats/i386/i386-mmx.dat: Likewise.
642
643         * features/Makefile (WHICH): Add i386/i386-mmx and
644         i386/i386-mmx-linux.
645
646 2010-04-08  Doug Evans  <dje@google.com>
647
648         * source.c (openp): Skip $cdir in PATH.
649
650 2010-04-08  Phil Muldoon  <pmuldoon@redhat.com>
651
652         PR python/11417
653         * python/py-lazy-string.c (stpy_convert_to_value): Check for
654         a NULL address.
655         (gdbpy_create_lazy_string_object): Allow strings with a NULL
656         address and a zero length.
657
658 2010-04-08  Hui Zhu  <teawater@gmail.com>
659
660         * i386-tdep.c (i386_process_record): Add support for insn
661         rdtsc.
662
663 2010-04-07  Doug Evans  <dje@google.com>
664
665         * python/python.c (source_python_script): Use ensure_python_env
666         to prepare environment for script.
667
668 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
669
670         * amd64-linux-nat.c: Include "regset.h", "elf/common.h",
671         <sys/uio.h> and "i386-xstate.h".
672         (PTRACE_GETREGSET): New.
673         (PTRACE_SETREGSET): Likewise.
674         (have_ptrace_getregset): Likewise.
675         (amd64_linux_gregset64_reg_offset): Include 16 upper YMM
676         registers.
677         (amd64_linux_gregset32_reg_offset): Include 8 upper YMM
678         registers.
679         (amd64_linux_fetch_inferior_registers): Support PTRACE_GETFPREGS.
680         (amd64_linux_store_inferior_registers): Likewise.
681         (amd64_linux_read_description): Check and enable AVX target
682         descriptions.
683
684         * amd64-linux-tdep.c: Include "regset.h", "i386-linux-tdep.h"
685         and "features/i386/amd64-avx-linux.c".
686         (amd64_linux_regset_sections): New.
687         (amd64_linux_core_read_description): Check and enable AVX
688         target description.
689         (amd64_linux_init_abi): Set xsave_xcr0_offset.  Call
690         set_gdbarch_core_regset_sections.
691         (_initialize_amd64_linux_tdep): Call
692         initialize_tdesc_amd64_avx_linux.
693
694         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM): Replace
695         AMD64_MXCSR_REGNUM with AMD64_YMM15H_REGNUM.
696         (tdesc_amd64_avx_linux): New.
697         (amd64_linux_update_xstateregset): Likewise.
698
699         * amd64-tdep.c: Include "features/i386/amd64-avx.c".
700         (amd64_ymm_names): New.
701         (amd64_ymmh_names): Likewise.
702         (amd64_register_name): Likewise.
703         (amd64_supply_xstateregset): Likewise.
704         (amd64_collect_xstateregset): Likewise.
705         (amd64_supply_xsave): Likewise.
706         (amd64_collect_xsave): Likewise.
707         (AMD64_NUM_REGS): Removed.
708         (amd64_dwarf_reg_to_regnum): Return %ymmN register number for
709         %xmmN if AVX is available.
710         (amd64_pseudo_register_name): Support pseudo YMM registers.
711         (amd64_regset_from_core_section): Support .reg-xstate section.
712         (amd64_init_abi): Set ymmh_register_names, num_ymm_regs
713         and ymm0h_regnum.  Call set_gdbarch_register_name.
714         (amd64_init_abi): Call initialize_tdesc_amd64_avx.
715
716         * amd64-tdep.h (amd64_regnum): Add AMD64_YMM0H_REGNUM and
717         AMD64_YMM15H_REGNUM.
718         (AMD64_NUM_REGS): New.
719         (amd64_supply_xsave): Likewise.
720         (amd64_collect_xsave): Likewise.
721         (amd64_register_name): Removed.
722         (amd64_register_type): Likewise.
723
724 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
725
726         * i387-tdep.c: Include "i386-xstate.h".
727         (XSAVE_XSTATE_BV_ADDR): New.
728         (xsave_avxh_offset): Likewise.
729         (XSAVE_AVXH_ADDR): Likewise.
730         (i387_supply_xsave): Likewise.
731         (i387_collect_xsave): Likewise.
732
733         * i387-tdep.h (I387_NUM_YMM_REGS): New.
734         (I387_YMM0H_REGNUM): Likewise.
735         (I387_YMMENDH_REGNUM): Likewise.
736         (i387_supply_xsave): Likewise.
737         (i387_collect_xsave): Likewise.
738
739 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
740
741         * i386-linux-nat.c: Include "regset.h", "elf/common.h",
742         <sys/uio.h> and "i386-xstate.h".
743         (PTRACE_GETREGSET): New.
744         (PTRACE_SETREGSET): Likewise.
745         (fetch_xstateregs): Likewise.
746         (store_xstateregs): Likewise.
747         (GETXSTATEREGS_SUPPLIES): Likewise.
748         (regmap): Include 8 upper YMM registers.
749         (i386_linux_fetch_inferior_registers): Support XSAVE extended
750         state.
751         (i386_linux_store_inferior_registers): Likewise.
752         (i386_linux_read_description): Check and enable AVX target
753         descriptions.
754
755         * i386-linux-tdep.c: Include "regset.h", "i387-tdep.h",
756         "i386-xstate.h" and "features/i386/i386-avx-linux.c".
757         (i386_linux_regset_sections): Add ".reg-xstate".
758         (i386_linux_gregset_reg_offset): Include 8 upper YMM registers.
759         (i386_linux_core_read_xcr0): New.
760         (i386_linux_core_read_description): Check and enable AVX target
761         description.
762         (i386_linux_init_abi): Set xsave_xcr0_offset.
763         (_initialize_i386_linux_tdep): Call
764         initialize_tdesc_i386_avx_linux.
765
766         * i386-linux-tdep.h (I386_LINUX_ORIG_EAX_REGNUM): Replace
767         I386_SSE_NUM_REGS with I386_AVX_NUM_REGS.
768         (i386_linux_core_read_xcr0): New.
769         (tdesc_i386_avx_linux): Likewise.
770         (I386_LINUX_XSAVE_XCR0_OFFSET): Likewise.
771
772         * i386-tdep.c: Include "i386-xstate.h" and
773         "features/i386/i386-avx.c".
774         (i386_ymm_names): New.
775         (i386_ymmh_names): Likewise.
776         (i386_ymmh_regnum_p): Likewise.
777         (i386_ymm_regnum_p): Likewise.
778         (i386_xmm_regnum_p): Likewise.
779         (i386_register_name): Likewise.
780         (i386_ymm_type): Likewise.
781         (i386_supply_xstateregset): Likewise.
782         (i386_collect_xstateregset): Likewise.
783         (i386_sse_regnum_p): Removed.
784         (i386_pseudo_register_name): Support pseudo YMM registers.
785         (i386_pseudo_register_type): Likewise.
786         (i386_pseudo_register_read): Likewise.
787         (i386_pseudo_register_write): Likewise.
788         (i386_dbx_reg_to_regnum): Return %ymmN register number for
789         %xmmN if AVX is available.
790         (i386_regset_from_core_section): Support .reg-xstate section.
791         (i386_register_reggroup_p): Supper upper YMM and YMM registers.
792         (i386_process_record): Replace i386_sse_regnum_p with
793         i386_xmm_regnum_p.
794         (i386_validate_tdesc_p): Support org.gnu.gdb.i386.avx feature.
795         Set ymmh_register_names, num_ymm_regs, ymm0h_regnum and xcr0.
796         (i386_gdbarch_init): Set xstateregset.  Set xsave_xcr0_offset.
797         Call set_gdbarch_register_name.  Replace I386_SSE_NUM_REGS with
798         I386_AVX_NUM_REGS.  Set ymmh_register_names, ymm0h_regnum and
799         num_ymm_regs.  Add num_ymm_regs to set_gdbarch_num_pseudo_regs.
800         Set ymm0_regnum.
801         (_initialize_i386_tdep): Call initialize_tdesc_i386_avx.
802
803         * i386-tdep.h (gdbarch_tdep): Add xstateregset, ymm0_regnum,
804         xcr0, xsave_xcr0_offset, ymm0h_regnum, ymmh_register_names and
805         i386_ymm_type.
806         (i386_regnum): Add I386_YMM0H_REGNUM, and I386_YMM7H_REGNUM.
807         (I386_AVX_NUM_REGS): New.
808         (i386_xmm_regnum_p): Likewise.
809         (i386_ymm_regnum_p): Likewise.
810         (i386_ymmh_regnum_p): Likewise.
811
812         * common/i386-xstate.h: New.
813
814 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
815
816         * config/djgpp/fnchange.lst: Add x86 AVX XML files.
817
818         * features/Makefile (WHICH): Add i386/i386-avx,
819         i386/i386-avx-linux, i386/x86-64-avx and i386/x86-64-avx-linux.
820         (i386/i386-avx-expedite): New.
821         (i386/i386-avx-linux-expedite): Likewise.
822         (i386/x86-64-avx-expedite):Likewise.
823         (i386/x86-64-avx-linux-expedite): Likewise.
824         ($(outdir)/i386/i386-avx.dat): New dependency.
825         ($(outdir)/i386/i386-avx-linux.dat): Likewise.
826         ($(outdir)/i386/x86-avx-64.dat): Likewise.
827         ($(outdir)/i386/x86-64-avx-linux.dat): Likewise.
828
829         * features/i386/32bit-avx.xml: New.
830         * features/i386/64bit-avx.xml: Likewise.
831         * features/i386/i386-avx-linux.c: Likewise.
832         * features/i386/i386-avx-linux.xml: Likewise.
833         * features/i386/i386-avx.c: Likewise.
834         * features/i386/i386-avx.xml: Likewise.
835         * features/i386/x86-64-avx-linux.c: Likewise.
836         * features/i386/x86-64-avx-linux.xml: Likewise.
837         * features/i386/x86-64-avx.c: Likewise.
838         * features/i386/x86-64-avx.xml: Likewise.
839         * regformats/i386/i386-avx-linux.dat: Likewise.
840         * regformats/i386/i386-avx.dat: Likewise.
841         * regformats/i386/x86-64-avx-linux.dat: Likewise.
842         * regformats/i386/x86-64-avx.dat: Likewise.
843
844 2010-04-07  Doug Evans  <dje@google.com>
845
846         * top.c (source_file_name): Make const char *.
847         * top.h (source_file_name): Update.
848         * cli/cli-script.c (source_cleanup_lines_args): Make old_file
849         const char *.
850         (script_from_file): Change `file' arg to const char *.
851         * cli/cli-script.h (script_from_file): Update.
852
853 2010-04-06  Doug Evans  <dje@google.com>
854
855         * cli/cli-cmds.c (source_command): Run cleanups.
856
857 2010-04-06  Stan Shebs  <stan@codesourcery.com>
858
859         * defs.h (char_ptr): Move typedef here from...
860         * ada-lang.c (char_ptr): Remove.
861         * charset.c (char_ptr): Remove.
862         * tracepoint.h (struct uploaded_string): Remove.
863         (struct uploaded_tp): Use vectors for string arrays.
864         * tracepoint.c (trace_save): Use vectors of actions.
865         (parse_tracepoint_definition): Ditto.
866         (get_uploaded_tp): Clear vectors.
867         * breakpoint.c (create_tracepoint_from_upload): Use vectors.
868         (next_cmd): Change to an int.
869         (read_next_cmd): Use vector of command strings.
870
871 2010-04-06  Doug Evans  <dje@google.com>
872
873         * top.h (source_script, cd_command): Delete.
874         * main.c: #include "cli/cli-cmds.h"
875
876 2010-04-06  Kevin Buettner  <kevinb@redhat.com>
877
878         * m32c-tdep.c (make_types): When calling `arch_type', pass size of
879         type in bytes, not bits.
880
881 2010-04-06  Pierre Muller  <muller@ics.u-strasbg.fr>
882
883         * stabsread.c (define_symbol): Add support for char
884         and string constants.
885
886 2010-04-06  Pierre Muller  <muller@ics.u-strasbg.fr>
887
888         Remove remaining "%ll" uses.
889         * go32-nat.c (go32_pte_for_address): Replace "0x%llx" using
890         hex_string call.
891         * rs6000-nat.c (rs6000_ptrace64): Idem.
892         * solib-pa64.c (pa64_current_sos): Idem.
893         * solib-spu.c (spu_current_sos): Idem.
894         * linux-nat.c (linux_nat_find_memory_regions): Replace "%lld" using
895         plongest call.
896         * nto-procfs.c (procfs_meminfo): Replace "0x%016llx" using
897         phex (VAR, 8) call.
898         * sh64-tdep.c (sh64_show_media_regs): Idem.
899
900 2010-04-05  Stan Shebs  <stan@codesourcery.com>
901
902         * tracepoint.c: Include gdbcore.h.
903         (tfile_xfer_partial): Return partial results, also try reading
904         from executable.
905         (tfile_has_all_memory): New function.
906         (init_tfile_ops): Use it.
907
908 2010-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
909
910         PR gdb/10736:
911         * xml-syscall.c (my_gdb_datadir): New variable to keep track of
912         the changes in data-directory.
913         (init_sysinfo): Reload the syscall XML file if the data-directory
914         has changed.
915
916 2010-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
917
918         Code cleanup.
919         * breakpoint.c (bpstat_stop_status): Use bpstat_causes_stop.
920
921 2010-04-04  Stan Shebs  <stan@codesourcery.com>
922             Nathan Sidwell  <nathan@codesourcery.com>
923
924         * breakpoint.c (breakpoint_1): Add filter argument, return number of
925         breakpoints printed.
926         (is_hardware_watchpoint): Make argument const.
927         (is_watchpoint): Ditto.
928         (is_tracepoint): Merge of tracepoint_type and breakpoint_is_tracepoint,
929         use it everywhere.
930         (breakpoints_info): Pass NULL to breakpoint_1.
931         (maintenance_info_breakpoints): Ditto.
932         (watchpoints_info): New function.
933         (tracepoints_info): Use breakpoint_1 filter.
934         (set_ignore_count): Warn that tracepoint ignore count will be ignored.
935         (_initialize_breakpoint): Make "info watchpoints" its own command.
936         * breakpoint.h (is_tracepoint): Rename from breakpoint_is_tracepoint.
937         * mi/mi-cmd-break.c (mi_cmd_break_commands): Use is_tracepoint.
938
939 2010-04-04  Stan Shebs  <stan@codesourcery.com>
940
941         * tracepoint.c (tfile_fetch_registers): Add fallback case.
942
943 2010-04-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
944
945         * infcmd.c (run_command_1): Call proceed with regcache_read_pc address.
946         * config/djgpp/fnchange.lst: Add translation for break-entry.exp.
947
948 2010-04-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
949
950         * breakpoint.c (bpstat_find_step_resume_breakpoint): Remove.
951         * breakpoint.h (bpstat_find_step_resume_breakpoint): Remove.
952
953 2010-04-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
954
955         * dwarf2read.c (read_namespace_type): Use common "return set_die_type"
956         code form.
957
958 2010-04-02  Hui Zhu  <teawater@gmail.com>
959
960         * i386-tdep.c (OT_DQUAD): New enum.
961         (i386_process_record): Add code for MMX, 3DNow!, SSE, SSE2,
962         SSE3, SSSE3 and SSE4.
963
964 2010-04-02  Hui Zhu  <teawater@gmail.com>
965
966         * i386-tdep.c (i386_record_lea_modrm_addr): Remove useless
967         "*addr = 0".
968
969 2010-04-02  Pedro Alves  <pedro@codesourcery.com>
970
971         * tracepoint.c (trace_dump_actions): New, factored out from
972         trace_dump_command, and adjusted to recurse into while-stepping's
973         action list.
974         (trace_dump_command): Use it.
975
976 2010-04-02  Pedro Alves  <pedro@codesourcery.com>
977
978         * breakpoint.h (struct counted_command_line): Moved definition to
979         breakpoint.c, and forward declare.
980         (breakpoint_commands): Declare.
981         * breakpoint.c (struct counted_command_line): Moved here.
982         (breakpoint_commands): New.
983         * tracepoint.c (encode_actions): Use breakpoint_commands.
984         * remote.c (remote_download_tracepoint): Ditto.
985
986 2010-04-01  H.J. Lu  <hongjiu.lu@intel.com>
987
988         * remote.c (remote_parse_stop_reply): Use hex_string instead
989         of phex_nz for error.
990
991 2010-04-01  Stan Shebs  <stan@codesourcery.com>
992             Nathan Sidwell  <nathan@codesourcery.com>
993
994         * tracepoint.h (enum actionline_type): Remove.
995         (validate_actionline): Change return to void.
996         * tracepoint.c (report_agent_reqs_errors): New function.
997         (validate_actionline): Call it, change return to void, report errors
998         more consistently.
999         (collect_symbol): Call report_agent_reqs_errors.
1000         (encode_actions_1): Ditto.
1001         (encode_actions): Don't expect a result from validate_actionline.
1002
1003 2010-04-01  Stan Shebs  <stan@codesourcery.com>
1004
1005         * tracepoint.c (trace_start_command): Confirm if trace is running.
1006         (trace_stop_command): Error if trace not running.
1007
1008 2010-04-01  H.J. Lu  <hongjiu.lu@intel.com>
1009
1010         * amd64-tdep.c (amd64_byte_names): Add "ah", "bh", "ch", "dh".
1011         (AMD64_NUM_LOWER_BYTE_REGS): New.
1012         (amd64_pseudo_register_read): Handle "ah", "bh", "ch", "dh".
1013         (amd64_pseudo_register_write): Likewise.
1014         (amd64_init_abi): Set num_byte_regs to 20.
1015
1016 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
1017
1018         * breakpoint.c (multi_start, multi_end, last_was_multi): Delete.
1019         (prev_breakpoint_count): New.
1020         (set_breakpoint_count): Adjust.
1021         (rbreak_start_breakpoint_count): New.
1022         (start_rbreak_breakpoints): Adjust.
1023         (end_rbreak_breakpoints): Adjust.
1024         (struct commands_info) <arg>: New field.
1025         (do_map_commands_command): Tweak output to include breakpoint spec
1026         range.
1027         (commands_command_1): Adjust.  Avoid setting an xfree cleanup if
1028         ARG was empty on entry.  Set INFO's arg.
1029         (create_breakpoint): Adjust.
1030
1031         * NEWS: Clarify `commands' changes.
1032
1033 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
1034
1035         * tracepoint.c: Include stack.h.
1036         (struct add_local_symbols_data): New.
1037         (do_collect_symbol): New.
1038         (add_local_symbols): Rewrite using iterate_over_block_arg_vars and
1039         iterate_over_block_local_vars.
1040         * stack.c (print_block_frame_locals): Rewrite as ...
1041         (iterate_over_block_locals): ... this.  Take a callback function
1042         pointer and generic data pointer, and call that instead of
1043         print_variable_and_value.
1044         (struct print_variable_and_value_data): New.
1045         (do_print_variable_and_value): New.
1046         (iterate_over_block_local_vars): New, abstracted out from
1047         print_frame_local_vars.
1048         (print_frame_local_vars): Rewrite using
1049         iterate_over_block_local_vars.
1050         (iterate_over_block_arg_vars): New, abstracted out from
1051         print_frame_arg_vars.
1052         (print_frame_arg_vars): Rewrite using iterate_over_block_arg_vars.
1053         * stack.h (iterate_over_block_arg_local_vars_cb): New typedef.
1054         (iterate_over_block_arg_vars, iterate_over_block_local_vars): Declare.
1055
1056 2010-03-31  Richard Earnshaw  <rearnsha@arm.com>
1057
1058         * arm-tdep.c (thumb_get_next_pc_raw): Correctly detect TBH
1059         instructions.  Use the PC+4 if the base of the TBB or TBH is the
1060         PC register.
1061
1062 2010-03-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
1063
1064         Fix crash on reading wrong function declaration DWARF.
1065         * dwarf2read.c (read_subroutine_type): New variable void_type.
1066         Pre-fill all TYPE_FIELD_TYPEs.  Move nparams and iparams initialization
1067         more close to their use.
1068
1069 2010-03-31  Stan Shebs  <stan@codesourcery.com>
1070
1071         * breakpoint.c (tracepoint_save_command): Include variables,
1072         conditionals, tracepoint types, and default-collect.
1073         * tracepoint.c (save_trace_state_variables): New function.
1074         * tracepoint.h (save_trace_state_variables): Declare it.
1075
1076 2010-03-31  Pierre Muller  <muller@ics.u-strasbg.fr>
1077
1078         * remote.c (end_thread): ARI fix: Use xstrdup instead of strdup.
1079
1080 2010-03-30  Keith Seitz  <keiths@redhat.com>
1081
1082         * c-typeprint.c (c_type_print_args): Don't print "void"
1083         for java, regardless of whether it is TYPE_PROTOTYPED.
1084         Use the passed-in language instead of current_language.
1085         (c_type_print_varspec_suffix): Use current_language instead
1086         of assuming language_c.
1087         * jv-typeprint.c (java_type_print_base): (bz 9320) Strip off
1088         any return type specifier from the physname.
1089
1090 2010-03-30  Pedro Alves  <pedro@codesourcery.com>
1091
1092         * tui/tui-interp.c (tui_is_toplevel): New.
1093         (tui_init): Set it.
1094         (tui_allowed_p): New.
1095         * tui/tui.c (tui_enable): Check if the TUI is allowed before
1096         enabling it.
1097         * tui/tui.h (tui_allowed_p): Declare.
1098
1099 2010-03-30  Ozkan Sezer  <sezeroz@gmail.com>
1100
1101         * serial.h: Include winsock2.h before windows.h.
1102
1103 2010-03-30  H.J. Lu  <hongjiu.lu@intel.com>
1104
1105         * NEWS: Mention xmlRegisters= in qSupported packet.
1106
1107         * i386-tdep.c: Include "remote.h".
1108         (_initialize_i386_tdep): Call register_remote_support_xml.
1109
1110         * remote.c (remote_support_xml): New.
1111         (register_remote_support_xml): Likewise.
1112         (remote_query_supported_append): Likewise.
1113         (remote_query_supported): Support remote_support_xml.
1114
1115         * remote.h (register_remote_support_xml): New.
1116
1117 2010-03-29  Stan Shebs  <stan@codesourcery.com>
1118
1119         * tracepoint.c (trace_find_line_command): Remove dead code.
1120
1121         * tracepoint.h (struct uploaded_string): New struct.
1122         (struct uploaded_tp): New fields for source strings.
1123         * breakpoint.c (this_utp, next_cmd): New globals.
1124         (read_uploaded_action): New function.
1125         (create_tracepoint_from_upload): Fill in more parts
1126         of a tracepoint.
1127         * tracepoint.c (encode_source_string): New function.
1128         (trace_save): Write out source strings, fix error checks.
1129         (parse_tracepoint_definition): Add source string parsing.
1130         * remote.c (PACKET_TracepointSource): New packet type.
1131         (remote_download_command_source): New function.
1132         (remote_download_tracepoint): Download source pieces also.
1133         (_initialize_remote): Add packet config command.
1134
1135         * tracepoint.c (collect_symbol): Send LOC_UNRESOLVED symbols to
1136         expression handler.
1137
1138         * tracepoint.c (start_tracing): Check tracepoints before sending
1139         commands to target, don't start if all tracepoints disabled.
1140
1141 2010-03-28  Pedro Alves  <pedro@codesourcery.com>
1142
1143         * cli/cli-script.c (process_next_line): Handle 'stepping'.
1144
1145 2010-03-26  Stan Shebs  <stan@codesourcery.com>
1146
1147         * tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.
1148
1149 2010-03-26  Tom Tromey  <tromey@redhat.com>
1150
1151         * breakpoint.c (commands_command_1): Duplicate 'arg'.
1152
1153 2010-03-26  Ulrich Weigand  <uweigand@de.ibm.com>
1154
1155         * breakpoint.c (expand_line_sal_maybe): Always call skip_prologue_sal.
1156         (skip_prologue_sal): Remove local definition.
1157         (resolve_sal_pc): Remove now unnecessary code.
1158         * linespec.c (minsym_found): Call skip_prologue_sal.
1159         * symtab.c (find_function_start_pc): Remove.
1160         (find_function_start_sal): Extract prologue skipping into ...
1161         (skip_prologue_sal): ... this new function.  Handle code both
1162         with and without debug info.  Respect SAL's explicit_pc and
1163         explicit_line flags.  Inline old find_function_start_pc.
1164         * symtab.h (find_function_start_pc): Remove.
1165         (skip_prologue_sal): Add prototype.
1166
1167 2010-03-26  Ulrich Weigand  <uweigand@de.ibm.com>
1168
1169         * dwarf2read.c (read_func_scope): Also scan specification DIEs
1170         for DW_TAG_imported_module children.
1171
1172 2010-03-26  Ulrich Weigand  <uweigand@de.ibm.com>
1173
1174         * dwarf2read.c (dwarf2_name): Work around GCC bugzilla debug/41828 by
1175         ignoring spurious DW_AT_name attributes for unnamed structs or unions.
1176         * completer.c (add_struct_fields): Fix inverted logic.
1177
1178 2010-03-26  Ulrich Weigand  <uweigand@de.ibm.com>
1179
1180         * breakpoint.c (bpstat_clear_actions): Reset bs->commands_left.
1181
1182 2010-03-26  Pedro Alves  <pedro@codesourcery.com>
1183
1184         * tracepoint.c (current_trace_status): Don't make sure error_desc
1185         is non-NULL here.
1186         (parse_trace_status): Release a previous error_desc string, and
1187         set it to NULL by default.  If stop reason is tracepoint_error,
1188         make sure error_desc is not left NULL.
1189
1190 2010-03-26  Pedro Alves  <pedro@codesourcery.com>
1191
1192         * tracepoint.c (trace_save): Remove X from tracepoint error
1193         description.
1194
1195 2010-03-26  Pedro Alves  <pedro@codesourcery.com>
1196
1197         * tracepoint.c (parse_trace_status): Don't allow plain strings in
1198         the terror description.  Don't expect an X prefix.
1199
1200 2010-03-25  Stan Shebs  <stan@codesourcery.com>
1201
1202         * tracepoint.h (trace_stop_reason): Add tracepoint_error.
1203         (struct trace_status): New field error_desc.
1204         * tracepoint.c (stop_reason_names): Add terror.
1205         (current_trace_status): Ensure non-NULL error description.
1206         (trace_status_command): Add error report.
1207         (trace_status_mi): Ditto.
1208         (trace_save): Add special case for error description.
1209         (parse_trace_status): Add case for errors.
1210
1211 2010-03-25  Keith Seitz  <keiths@redhat.com>
1212
1213         * dwarf2read.c (read_subroutine_type): If the compilation unit
1214         language is Java, mark any formal parameter named "this" as
1215         artificial (GCC/43521).
1216         (dwarf2_name): Add special handling for Java constructors.
1217
1218 2010-03-25  Tom Tromey  <tromey@redhat.com>
1219
1220         PR gdb/11327, PR gdb/11328, PR breakpoints/11368:
1221         * infrun.c (handle_inferior_event): Change initialization of
1222         stop_stack_dummy.
1223         (handle_inferior_event): Change assignment to stop_stack_dummy.
1224         (normal_stop): Update use of stop_stack_dummy.
1225         (struct inferior_status) <stop_stack_dummy>: Change type.
1226         * inferior.h (stop_stack_dummy): Update.
1227         * infcmd.c (stop_stack_dummy): Change type.
1228         * infcall.c (cleanup_delete_std_terminate_breakpoint): New
1229         function.
1230         (call_function_by_hand): Call set_std_terminate_breakpoint.
1231         Rewrite std::terminate handling.
1232         * breakpoint.h (enum bptype) <bp_std_terminate,
1233         bp_std_terminate_master>: New.
1234         (enum stop_stack_kind): New.
1235         (struct bpstat_what) <call_dummy>: Change type.
1236         (set_std_terminate_breakpoint, delete_std_terminate_breakpoint):
1237         Declare.
1238         * breakpoint.c (create_std_terminate_master_breakpoint): New
1239         function.
1240         (update_breakpoints_after_exec): Handle bp_std_terminate_master.
1241         Call create_std_terminate_master_breakpoint.
1242         (print_it_typical): Handle new breakpoint kinds.
1243         (bpstat_stop_status): Handle bp_std_terminate_master.
1244         (bpstat_what): Correctly set call_dummy field.  Handle
1245         bp_std_terminate_master and bp_std_terminate.
1246         (print_one_breakpoint_location): Update.
1247         (allocate_bp_location): Update.
1248         (set_std_terminate_breakpoint): New function.
1249         (delete_std_terminate_breakpoint): Likewise.
1250         (create_thread_event_breakpoint): Update.
1251         (delete_command): Update.
1252         (breakpoint_re_set_one): Update.
1253         (breakpoint_re_set): Call create_std_terminate_master_breakpoint.
1254
1255 2010-03-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
1256
1257         * symfile.c (build_section_addr_info_from_bfd): New.
1258         (build_section_addr_info_from_objfile): Base it on
1259         build_section_addr_info_from_bfd.
1260         (addrs_section_compar, addrs_section_sort): New.
1261         (addr_info_make_relative): New variables my_cleanup, abfd_addrs,
1262         addrs_sorted, abfd_addrs_sorted and addrs_to_abfd_addrs.  Build
1263         addrs_to_abfd_addrs.  Use it for recalculating ADDRS.
1264
1265 2010-03-24  Michael Snyder  <msnyder@localhost.localdomain>
1266
1267         * elfread.c (find_separate_debug_file_by_buildid):
1268         Remove unused local variable.
1269
1270 2010-03-24  Tom Tromey  <tromey@redhat.com>
1271
1272         PR breakpoints/9352:
1273         * NEWS: Mention changes to `commands' and `rbreak'.
1274         * symtab.c (do_end_rbreak_breakpoints): New function.
1275         (rbreak_command): Call start_rbreak_breakpoints; arrange to call
1276         end_rbreak_breakpoints.
1277         * breakpoint.c (breakpoint_count, tracepoint_count): Now static.
1278         (set_breakpoint_count): Likewise.  Clear last_was_multi.
1279         (multi_start, multi_end, last_was_multi): New globals.
1280         (start_rbreak_breakpoints, end_rbreak_breakpoints): New
1281         functions.
1282         (struct commands_info): New
1283         (do_map_commands_command): New function.
1284         (commands_command_1): New function.
1285         (commands_command): Use it.
1286         (commands_from_control_command): Likewise.
1287         (do_delete_breakpoint): New function.
1288         (delete_command): Use it.
1289         (map_breakpoint_numbers): Add 'data' argument.  Pass to callback.
1290         (do_map_disable_breakpoint): New function.
1291         (disable_command): Use it.
1292         (do_map_enable_breakpoint): New function.
1293         (enable_command): Use it.
1294         (enable_once_breakpoint): Add argument.
1295         (enable_once_command): Update.
1296         (enable_delete_breakpoint): Add argument.
1297         (enable_delete_command): Update.
1298         (break_command_really): Set last_was_multi when needed.
1299         (check_tracepoint_command): Fix formatting.
1300         (validate_commands_for_breakpoint): New function.
1301         (breakpoint_set_commands): Use it.
1302         (tracepoint_save_command): Update.
1303         * breakpoint.h (start_rbreak_breakpoints, end_rbreak_breakpoints):
1304         Declare.
1305
1306 2010-03-24  Tom Tromey  <tromey@redhat.com>
1307
1308         * breakpoint.h (struct counted_command_line): New struct.
1309         (struct breakpoint) <commands>: Change type.
1310         (struct bpstats) <commands>: Change type.
1311         <commands_left>: New field.
1312         * breakpoint.c (alloc_counted_command_line): New function.
1313         (incref_counted_command_line): Likewise.
1314         (decref_counted_command_line): Likewise.
1315         (do_cleanup_counted_command_line): Likewise.
1316         (make_cleanup_decref_counted_command_line): Likewise.
1317         (breakpoint_set_commands): Use decref_counted_command_line and
1318         alloc_counted_command_line.
1319         (commands_command): Don't error if breakpoint commands are
1320         executing.
1321         (commands_from_control_command): Likewise.
1322         (bpstat_free): Update.
1323         (bpstat_copy): Likewise.
1324         (bpstat_clear_actions): Likewise.
1325         (bpstat_do_actions_1): Likewise.
1326         (bpstat_stop_status): Likewise.
1327         (print_one_breakpoint_location): Likewise.
1328         (delete_breakpoint): Likewise.
1329         (bpstat_alloc): Initialize new field.
1330         (tracepoint_save_command): Update.
1331         * tracepoint.c (encode_actions): Update.
1332         (trace_dump_command): Update.
1333
1334 2010-03-24  Daniel Jacobowitz  <dan@codesourcery.com>
1335
1336         * dwarf2-frame.c (dwarf2_frame_find_quirks): Use producer_is_realview.
1337         * dwarf2read.c (load_full_comp_unit): Read DW_AT_producer.
1338         (read_structure_type): For RealView, set TYPE_STUB on structures with
1339         no byte size and no children.
1340         (read_subroutine_type): Mark functions as prototyped by default.
1341         * symtab.c (producer_is_realview): New function.
1342         * symtab.h (expand_line_sal): Fix declaration formatting.
1343         (producer_is_realview): Declare.
1344
1345 2010-03-24  Daniel Jacobowitz  <dan@codesourcery.com>
1346
1347         * arm-tdep.c (skip_prologue_function): New function.
1348         (submask, bit, bits, sbits, BranchDest): Move higher in the file.
1349         (thumb_analyze_prologue): Document return value.  Recognize more
1350         Thumb instructions, skippable calls, and some Thumb-2 instructions.
1351         Add debug output.
1352         (arm_skip_prologue): Remove call dummy check.  Check the prologue
1353         for non-GNU compilers.
1354         (arm_instruction_changes_pc): New function.
1355         (arm_analyze_prologue): New function, broken out from
1356         arm_scan_prologue.  Recognize more ARM instructions and skippable
1357         calls.  Update comments.  Handle NULL cache.  Return the address
1358         of the first unrecognized instruction.  Do not skip past other
1359         instructions which change control flow.  Add debug output.
1360         (arm_scan_prologue): Use arm_analyze_prologue.
1361         (ARM_PC_32): Delete.
1362         (shifted_reg_val): Simplify ARM_PC_32 check.
1363
1364 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1365
1366         * tracepoint.c (tvariables_info_1): Actually compute
1367         the number of rows in the result.
1368
1369 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
1370
1371         * remote.c (crc32): Constify `buf' parameter.
1372         (remote_verify_memory): New, abstracted out from...
1373         (compare_sections_command): ... this.  Remove hardcoded target
1374         checks.
1375         (init_remote_ops): Install remote_verify_memory.
1376         * target.c (target_verify_memory): New.
1377         * target.h (struct target_ops) <to_verify_memory>: New field.
1378         (target_verify_memory): Declare.
1379
1380 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1381
1382         Implement -trace-save.
1383
1384         * mi-cmds.h (mi_cmds_trace_save): Declare.
1385         * mi-cmds.c (mi_cmds): Register -trace-save.
1386         * mi/mi-main.c (mi_cmd_trace_save): New.
1387         * remote.c (remote_save_trace_data): Take const parameter.
1388         * target.h (struct target_ops::to_save_trace_data): Take
1389         const parameter.
1390         * target.c (update_current_target): Adjust to the above.
1391         * tracepoint.c (trave_save): New, extracted from
1392         (trace_save_command): ...this.
1393         (tfile_trace_find): Remove message that is unnecessary now
1394         that 'tfind' reports found frame.
1395         * tracepoint.h (trace_save): Declare.
1396
1397 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1398
1399         Implement -trace-find.
1400
1401         * mi/mi-cmds.c (mi_cmds): Register -trace-find.
1402         * mi/mi-cmds.h (mi_cmd_trace_find): Declare.
1403         * mi/mi-main.c (mi_cmd_trace_find): New.
1404         * target.h (struct target_ops): Document to_trace_find.
1405         * tracepoint.h (tfind_1): Declare.
1406         * tracepoint.c (finish_tfind_command): Rename to...
1407         (tfind_1): ...this.
1408         * remote.c (remote_trace_find): Return -1 if target say
1409         there's no frame.  Improve error diagnostics.
1410
1411 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1412
1413         -trace-define-variable and -trace-list-variables.
1414
1415         * tracepoint.c (create_trace_state_variable): Make
1416         private copy of name, as opposed to assuming the
1417         pointer lives forever.
1418         (tvariables_info_1): New.
1419         (tvariables_info): Use the above.
1420         * tracepoint.h (create_trace_state_variable, tvariables_info_1):
1421         Declare.
1422         * mi/mi-cmds.c (mi_cmds): Register -trace-define-variable
1423         and -trace-list-variables.
1424         * mi/mi-cmds.h (mi_cmd_trace_define_variable)
1425         (mi_cmd_trace_list_variables): New.
1426         * mi/mi-main.c (mi_cmd_trace_define_variable)
1427         (mi_cmd_trace_list_variables): New.
1428
1429 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1430
1431         Implement -break-passcount.
1432
1433         * mi/mi-cmd-break.c (mi_cmd_break_passcount): New.
1434         * mi/mi-cmds.c (mi_cmds): Register -break-passcount.
1435         * mi/mi-cmds.h (mi_cmd_break_passcount): Declare.
1436
1437 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1438
1439         -trace-start/-trace-end/-trace-status.
1440
1441         * mi/mi-cmds.c (mi_cmds): Register -trace-start, -trace-status
1442         and -trace-stop.
1443         * mi/mi-cmds.h (mi_cmd_trace_start, mi_cmd_trace_status)
1444         (mi_cmd_trace_stop): Declare.
1445         * mi/mi-main.c (mi_cmd_trace_start, mi_cmd_trace_status)
1446         (mi_cmd_trace_stop): New.
1447         * tracepoint.c (start_tracing): New, extracted from...
1448         (trace_start_command): ...this.
1449         (trace_status_mi): New.
1450         * tracepoint.h (struct trace_status): Document
1451         stopping_tracepoint.
1452         (start_tracing, stop_tracing, trace_status_mi): Declare.
1453
1454 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1455
1456         Implement creating tracepoints with -break-insert.
1457
1458         * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a
1459         to mean that tracepoint should be created.
1460
1461 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1462
1463         * breakpoint.c (check_no_tracepoint_commands): Use
1464         current spelling of 'teval'.
1465
1466 2010-03-24  Vladimir Prus  <vladimir@codesourcery.com>
1467
1468         Unify actions and commands
1469
1470         * defs.h (read_command_lines, read_command_lines_1): New
1471         parameters validator and closure.
1472         * tracepoint.h (struct action_line): Remove.
1473         * breakpoint.h (struct breakpoint): Remove the 'actions'
1474         field.
1475         * defs.h (enum command_control_type): New value
1476         while_stepping_control.
1477         (struct command_line): Add comments.
1478         * breakpoint.c (breakoint_is_tracepoint): New.
1479         (breakpoint_set_commands): For tracepoints,
1480         verify the commands are permissible.
1481         (check_tracepoint_commands): New.
1482         (commands_command): Require that each new line is validated using
1483         check_tracepoint_command, if we set commands for a tracepoint.
1484         (create_tracepoint_from_upload): Likewise.
1485         (print_one_breakpoint_location): Remove the code to print
1486         actions specifically.
1487         (tracepoint_save_command): Relay to print_command_lines.
1488         * cli/cli-script.c (process_next_line): New parameters validator
1489         and closure. Handle 'while-stepping'. Call validator if not null.
1490         (read_command_lines, read_command_lines1): Likewise.
1491         (recurse_read_control_structure): New parameters validator and
1492         closure. Handle while_stepping_control.
1493         (print_command_lines): Handle while-stepping.
1494         (get_command_line, define_command, document_command): Adjust.
1495         * remote.c (remote_download_tracepoint): Adjust.
1496         * tracepoint.c (make_cleanup_free_actions, read_actions)
1497         (free_actions, do_free_actions_cleanup): Remove.
1498         (trace_actions_command): Use read_command_lines.
1499         (validate_actionline): Use error in one place.
1500         (encode_actions_1): New, extracted from...
1501         (encode_actions): ...this. Also use cleanups for exception
1502         safety.
1503         (trace_dump_command): Adjust.
1504         * mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if
1505         it's tracepoint.
1506
1507 2010-03-23  Mike Frysinger  <vapier@gentoo.org>
1508
1509         * Makefile.in (OPCODES_CFLAGS): Add -I$(OPCODES_SRC)/..
1510
1511 2010-03-22  Stan Shebs  <stan@codesourcery.com>
1512
1513         * value.c (value_static_field): Be lazy about the field's value.
1514
1515 2010-03-22  Reid Kleckner  <reid@kleckner.net>
1516
1517         PR gdb/11094
1518         * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Add
1519         bp_jit_event.
1520         (disable_breakpoints_in_shlibs): Likewise.
1521
1522 2010-03-22  Ulrich Weigand  <uweigand@de.ibm.com>
1523
1524         * dwarf2read.c (partial_die_parent_scope): Work around buggy
1525         GCC 4.1 debug info generation (GCC PR c++/28460).
1526         (determine_prefix): Likewise.
1527
1528 2010-03-20  Daniel Jacobowitz  <dan@codesourcery.com>
1529
1530         * tui/tui-disasm.c (tui_get_begin_asm_address): Default to
1531         get_current_arch.
1532         * tui/tui-layout.c (extract_display_start_addr): Likewise.
1533
1534 2010-03-19  Stan Shebs  <stan@codesourcery.com>
1535
1536         * ax-gdb.c (gen_fetch): Handle bool.
1537         (gen_usual_unary): Ditto.
1538         (gen_cast): Ditto.
1539         (gen_equal): New function.
1540         (gen_less): New function.
1541         (gen_expr_binop_rest): Call them, also return integer type from
1542         logical operations.
1543         (gen_expr): Ditto.
1544
1545 2010-03-19  Tom Tromey  <tromey@redhat.com>
1546
1547         * jv-lang.c (jv_dynamics_objfile_data_key)
1548         (jv_type_objfile_data_key): New globals.
1549         (class_symtab): Move earlier.
1550         (jv_per_objfile_free): New function.
1551         (get_dynamics_objfile): Call set_objfile_data.  Add 'gdbarch'
1552         parameter.
1553         Remove ancient #if 1.
1554         (add_class_symbol): Remove redundant declaration.
1555         (java_lookup_class): Use alloc_type, not alloc_type_arch.
1556         (java_link_class_type): Mark as static.  Update.
1557         (jv_clear_object_type): New function.
1558         (set_java_object_type): Likewise.
1559         (get_java_object_type): Use set_java_object_type.
1560         (is_object_type): Likewise.
1561         (_initialize_java_language): Register new objfile keys.
1562         (get_java_class_symtab): Add 'gdbarch' parameter.
1563         (add_class_symtab_symbol): Update.
1564         (type_from_class): Update.
1565
1566 2010-03-19  Stan Shebs  <stan@codesourcery.com>
1567
1568         * ax-general.c (ax_const_l): Fix a sizing bug.
1569
1570 2010-03-18  Joel Brobecker  <brobecker@adacore.com>
1571
1572         GDB 7.1 released.
1573
1574 2010-03-18  Stan Shebs  <stan@codesourcery.com>
1575             Pedro Alves  <pedro@codesourcery.com>
1576
1577         * target.h (struct target_ops): New method
1578         to_set_circular_trace_buffer.
1579         (target_set_circular_trace_buffer): New macro.
1580         * target.c (update_current_target): Add
1581         to_set_circular_trace_buffer, fix to_set_disconnected_tracing
1582         default behavior.
1583         * remote.c (remote_set_circular_trace_buffer): New function.
1584         (init_remote_ops): Add it to vector.
1585         * tracepoint.h (struct trace_status): New field traceframes_created,
1586         change buffer_size and buffer_free to int.
1587         * tracepoint.c (circular_trace_buffer): New global.
1588         (start_tracing): Send values of disconnected tracing and circular
1589         trace buffer settings.
1590         (set_circular_trace_buffer): New function.
1591         (parse_trace_state): Handle total space and frames created.
1592         (trace_status_command): Display total space and total frames
1593         created.
1594         (trace_save): Write out new status values.
1595         (parse_trace_status): Set traceframe_count, traceframes_created,
1596         buffer_free and buffer_size to -1 by default.
1597         (_initialize_tracepoint): New setshow for circular-trace-buffer.
1598         * NEWS: Mention the circular trace buffer option.
1599
1600 2010-03-18  Tom Tromey  <tromey@redhat.com>
1601
1602         * infcmd.c (finish_command_continuation): Wrap print_return_value
1603         in TRY_CATCH.
1604
1605 2010-03-18  Joel Brobecker  <brobecker@adacore.com>
1606
1607         * dwarf2read.c (add_partial_subprogram): Make sure the subprogram
1608         DIE has a name before creating the associated partial symbol.
1609         (read_func_scope): Emit a complaint if the subprogram does not
1610         have a name or when we can't extract the subprogram PC bounds.
1611
1612 2010-03-18  Ulrich Weigand  <uweigand@de.ibm.com>
1613
1614         * mi/mi-main.c (mi_cmd_list_thread_groups): Use get_current_arch
1615         instead of selected frame architecture.
1616
1617 2010-03-18  Pedro Alves  <pedro@codesourcery.com>
1618
1619         * infcmd.c (until_command): Use ERROR_NO_INFERIOR.  Ensure there's
1620         a valid selected thread, and that it is not running.
1621         (advance_command): Ditto.
1622         (finish_command): Ditto.
1623
1624 2010-03-17 Stan Shebs  <stan@codesourcery.com>
1625
1626         * ax-gdb.c (require_rvalue): Disallow non-scalars.
1627
1628         * infcall.c: Include tracepoint.h.
1629         (call_function_by_hand): Disallow calls in tfind mode.
1630         * infcmd.c: Include tracepoint.h.
1631         (ensure_not_tfind_mode): New function.
1632         (continue_1): Call it.
1633         (step_1) Ditto.
1634         (jump_command): Ditto.
1635         (signal_command): Ditto.
1636         (advance_command): Ditto.
1637         (until_command): Ditto.
1638         (finish_command): Ditto.
1639         * tracepoint.h (disconnect_or_stop_tracing): Declare.
1640
1641         * ax-gdb.h (struct axs_value): New field optimized_out.
1642         (gen_trace_for_var): Add gdbarch argument.
1643         * ax-gdb.c (gen_trace_static_fields): New function.
1644         (gen_traced_pop): Call it, add gdbarch argument.
1645         (gen_trace_for_expr): Update call to it.
1646         (gen_trace_for_var): Ditto, and report optimized-out variables.
1647         (gen_struct_ref_recursive): Check for optimized-out value.
1648         (gen_struct_elt_for_reference): Ditto.
1649         (gen_static_field): Pass gdbarch instead of expression, assume
1650         optimization if field not found.
1651         (gen_var_ref): Set the optimized_out flag.
1652         (gen_expr): Error on optimized-out variable.
1653         * tracepoint.c (collect_symbol): Handle struct-valued vars as
1654         expressions, skip optimized-out variables with computed locations.
1655         * dwarf2loc.c (dwarf2_tracepoint_var_ref): Flag instead of
1656         erroring out if location expression missing.
1657         (loclist_tracepoint_var_ref): Don't error out here.
1658
1659 2010-03-17  Tom Tromey  <tromey@redhat.com>
1660
1661         * dwarf2read.c (dwarf2_get_section_info): Handle case where no
1662         DWARF data is available.
1663
1664 2010-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
1665
1666         * symfile.c (generic_load): Reset breakpoints after loading.
1667
1668 2010-03-17  Tom Tromey  <tromey@redhat.com>
1669
1670         * linux-nat.c (linux_nat_detach): Check debug_linux_nat.
1671
1672 2010-03-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1673
1674         * spu-tdep.c (spu_catch_start): Replace set_breakpoint call with the
1675         create_breakpoint call, adjust the parameters.
1676
1677 2010-03-16  Jan Kratochvil  <jan.kratochvil@redhat.com>
1678             Chandru <chandru@in.ibm.com>
1679
1680         * dwarf2read.c (read_subrange_type): Set TYPE_HIGH_BOUND_UNDEFINED.
1681         * valarith.c (value_subscripted_rvalue): Suppress error if
1682         TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED.
1683
1684 2010-03-16  Holger Hans Peter Freyther  <zecke@selfish.org>
1685
1686         * linux-record.c (record_linux_msghdr): Remove unintended semicolons.
1687
1688 2010-03-16  Joel Brobecker  <brobecker@adacore.com>
1689
1690         * ada-tasks.c (task_command_1): Check that the task ptid is valid
1691         before doing the associated thread switch.
1692
1693 2010-03-16  Daniel Jacobowitz  <dan@codesourcery.com>
1694
1695         * MAINTAINERS: Update my email address.
1696
1697 2010-03-16  Vladimir Prus  <vladimir@codesourcery.com>
1698
1699         Simplify MI breakpoint setting.
1700
1701         * breakpoint.c (break_command_really): Make nonstatic and
1702         rename to...
1703         (create_breakpoint): ...this. Rename prior function by this name
1704         to...
1705         (create_breakpoint_sal): ...this.
1706         (create_breakpoints): Rename to...
1707         (create_breakpoints_sal): ...this.
1708         (set_breakpoint): Remove.
1709         * breakpoint.h: Adjust to above changes.
1710         * mi/mi-cmd-break.c (mi_cmd_break_insert): Simplify.
1711
1712 2010-03-15 Stan Shebs  <stan@codesourcery.com>
1713
1714         * ax-gdb.c: Include cp-support.h.
1715         (find_field): Remove.
1716         (gen_primitive_field): New function.
1717         (gen_struct_ref_recursive): New function.
1718         (gen_struct_ref): Rewrite to call gen_struct_ref_recursive instead
1719         of find_field.
1720         (gen_static_field): New function.
1721         (gen_struct_elt_for_reference): New.
1722         (gen_namespace_elt): New.
1723         (gen_maybe_namespace_elt): New.
1724         (gen_aggregate_elt_ref): New.
1725         (gen_expr): Add OP_SCOPE, display opcode name in error message.
1726
1727 2010-03-15  Tom Tromey  <tromey@redhat.com>
1728
1729         * dwarf2read.c (die_needs_namespace): Also return 0 for
1730         DW_TAG_subprogram.
1731
1732 2010-03-15  Sami Wagiaalla  <swagiaal@redhat.com>
1733
1734         PR c++/7936:
1735         * cp-support.h: Added char *declaration element to using_direct
1736         data struct.
1737         (cp_add_using): Added char *declaration argument.
1738         (cp_add_using_directive): Ditto.
1739         (cp_lookup_symbol_imports): made extern.
1740         * cp-namespace.c: Updated with the above changes.
1741         * dwarf2read.c (read_import_statement): Ditto.
1742         (read_namespace): Ditto.
1743         (read_import_statement): Support import declarations.
1744         * cp-namespace.c (cp_lookup_symbol_imports): Check for imported
1745         declarations.
1746         Added support for 'declaration_only' search.
1747         (cp_lookup_symbol_namespace): Attempt to search for the name as
1748         is before consideration of imports.
1749         * symtab.c (lookup_symbol_aux_local): Added a 'declaration_only'
1750         search at every block level search.
1751         Now takes language argument.
1752         (lookup_symbol_aux): Updated.
1753
1754 2010-03-15  Tom Tromey  <tromey@redhat.com>
1755
1756         * c-exp.y (name_not_typename): Add 'operator' clause.
1757
1758 2010-03-15  Ralf Corsepius  <ralf.corsepius@rtems.org>  (tiny change)
1759
1760         * configure.ac: Exit if ${gdb_target_obs}" is not set.
1761         * configure: Regenerate.
1762
1763 2010-03-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1764
1765         * symfile.c (addr_info_make_relative): Ignore also missing ".dynbss"
1766         and ".sdynbss".  Update the comment.
1767
1768 2010-03-15  Jie Zhang  <jie@codesourcery.com>
1769
1770         * MAINTAINERS: Update my email address.
1771
1772 2010-03-14  Daniel Jacobowitz  <dan@codesourcery.com>
1773
1774         * gdbtypes.h (TYPE_IS_OPAQUE): Correct HAVE_CPLUS_STRUCT check.
1775
1776 2010-03-14  Daniel Jacobowitz  <dan@codesourcery.com>
1777
1778         * charset.c [USE_WIN32API]: Include <windows.h>.
1779          (_initialize_charset): Correct type of w32_host_default_charset.
1780
1781 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
1782
1783         * infrun.c (ptid_match): Don't assert that PTID is not a pid ptid.
1784
1785 2010-03-12  Tom Tromey  <tromey@redhat.com>
1786
1787         PR c++/9708:
1788         * dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: A variable
1789         in a lexical block does not need a namespace.
1790         (new_symbol) <DW_TAG_variable>: Put extern variables on
1791         list_in_scope in all cases.
1792
1793 2010-03-12 Stan Shebs  <stan@codesourcery.com>
1794
1795         * ax-gdb.c (gen_expr): Add shift expressions.
1796         (gen_expr_binop_rest): Ditto.
1797
1798 2010-03-12  Sami Wagiaalla  <swagiaal@redhat.com>
1799
1800         * buildsym.c (finish_block): Reset using_directives pointer
1801         after block initialization.
1802
1803 2010-03-12  H.J. Lu  <hongjiu.lu@intel.com>
1804
1805         * amd64-tdep.c (amd64_word_names): Replace "sp" with "".
1806         * i386-tdep.c (i386_word_names): Likewise.
1807
1808 2010-03-12  Pedro Alves  <pedro@codesourcery.com>
1809
1810         * target.c (memory_xfer_partial): Don't use the stack cache if
1811         inspecting trace frames.
1812         * tracepoint.c (finish_tfind_command): Invalidate the target
1813         dcache.
1814
1815 2010-03-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
1816
1817         * solib-svr4.c (LM_ADDR_CHECK) <info_verbose>: Use printf_unfiltered
1818         for the PIC displacement, print also the displacement value.
1819         (svr4_exec_displacement):  Print DISPLACEMENT if INFO_VERBOSE.
1820
1821 2010-03-10  Kevin Buettner  <kevinb@redhat.com>
1822
1823         * remote-mips.c (close_ports, mips_initialize_cleanups)
1824         (mips_exit_cleanups, mips_send_command, mips_open, pmon_open)
1825         (ddb_open, lsi_open, mips_remove_breakpoint, mips_remove_watchpoint)
1826         (mips_stopped_by_watchpoint, send_srec, pmon_checkset)
1827         (pmon_make_fastrec, pmon_check_ack, mips_expect_download)
1828         (pmon_check_entry_address, pmon_check_total, pmon_end_download)
1829         (pmon_download, pmon_load_fast, _initialize_remote_mips): Add
1830         comments describing each of these functions.
1831         (mips_enter_debug, mips_exit_debug, common_open)
1832         (mips_signal_from_protocol, pmon_makeb64, pmon_zeroset): Add
1833         blank line after the comment describing the function.
1834
1835 2010-03-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1836
1837         * solib-svr4.c (svr4_exec_displacement): Return now success, new
1838         parameter displacementp.  Update comment.
1839         (svr4_relocate_main_executable): Return if non-zero SECTION_OFFSETS
1840         element exists.  Return if svr4_exec_displacement was not successful.
1841         Update comment.
1842
1843 2010-03-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1844             Daniel Jacobowitz  <dan@codesourcery.com>
1845
1846         * solib-svr4.c (read_program_header): Support type == -1 to read
1847         all program headers.
1848         (read_program_headers_from_bfd): New function.
1849         (svr4_static_exec_displacement): Remove and move the comment ...
1850         (svr4_exec_displacement): ... here.  Remove variable found.  New
1851         variable displacement.  Check also DYNAMIC.  Verify DISPLACEMENT
1852         alignment for ELF targets.  Compare target vs. exec_bfd PHDRs for ELF
1853         targets using read_program_headers_from_bfd.  Remove the call of
1854         svr4_static_exec_displacement.
1855
1856 2010-03-10  Tom Tromey  <tromey@redhat.com>
1857
1858         * dwarf2read.c (struct pubnames_header): Remove.
1859         (_PUBNAMES_HEADER): Remove.
1860         (_ACTUAL_PUBNAMES_HEADER_SIZE): Remove.
1861         (struct aranges_header): Remove.
1862         (_ARANGES_HEADER, _ACTUAL_ARANGES_HEADER_SIZE): Remove.
1863         (struct dwarf2_per_objfile) <pubnames, aranges>: Remove.
1864         (PUBNAMES_SECTION): Remove.
1865         (ARANGES_SECTION): Remove.
1866         (dwarf2_locate_sections): Don't handle pubnames or aranges.
1867         (dwarf2_build_psymtabs): Remove dead code.
1868         (dwarf2_build_psymtabs_easy): Remove.
1869
1870 2010-03-10  Tom Tromey  <tromey@redhat.com>
1871
1872         * elfread.c (elf_symfile_read): Don't call
1873         dwarf2_build_frame_info.
1874         * dwarf2read.c (struct dwarf2_section_info) <readin>: New field.
1875         (struct dwarf2_per_objfile) <objfile>: New field.
1876         (dwarf2_has_info): Now idempotent.  Set objfile field.
1877         (dwarf2_read_section): Check and set readin field.  Call
1878         posix_madvise.
1879         (dwarf2_build_psymtabs): Don't read all sections.
1880         (read_type_comp_unit_head): Read types section.
1881         (create_debug_types_hash_table): Likewise.
1882         (init_cu_die_reader): Add asserts.
1883         (process_type_comp_unit): Add assert.
1884         (dwarf2_build_psymtabs_hard): Read info section.
1885         (load_partial_comp_unit): Add assert.
1886         (create_all_comp_units): Read info section.
1887         (load_full_comp_unit): Likewise.
1888         (dwarf2_ranges_read): Read ranges section.
1889         (dwarf2_record_block_ranges): Add assert.
1890         (dwarf2_read_abbrevs): Read abbrev section.
1891         (read_indirect_string): Read str section.
1892         (dwarf_decode_line_header): Read line section.
1893         (read_signatured_type_at_offset): Read types section.
1894         (dwarf_decode_macros): Read macinfo section.
1895         (dwarf2_symbol_mark_computed): Read loc section.
1896         * dwarf2-frame.c (dwarf2_frame_find_fde): Call
1897         dwarf2_build_frame_info.
1898         (dwarf2_build_frame_info): Unconditionally set
1899         dwarf2_frame_objfile_data on the objfile.
1900         * configure.ac: Check for posix_madvise.
1901         * config.in, configure: Rebuild.
1902
1903 2010-03-10  Tom Tromey  <tromey@redhat.com>
1904
1905         * xcoffread.c (xcoff_start_psymtab): Update.
1906         (xcoff_end_psymtab): Update.
1907         * psymtab.c (allocate_psymtab): Remove dead code.
1908         * psympriv.h (struct partial_symtab) <read_symtab_private>: Now
1909         void*.
1910         * mdebugread.c (parse_partial_symbols): Update.
1911         (new_psymtab): Likewise.
1912         * dwarf2read.c (process_psymtab_comp_unit): Update.
1913         (psymtab_to_symtab_1): Update.
1914         * dbxread.c (start_psymtab): Update.
1915         (end_psymtab): Likewise.
1916
1917 2010-03-10  Tom Tromey  <tromey@redhat.com>
1918
1919         * xcoffread.c: Include psymtab.h.
1920         (xcoff_sym_fns): Update.
1921         * symtab.h (struct partial_symbol): Remove.
1922         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.
1923         (struct partial_symtab): Remove.
1924         (PSYMTAB_TO_SYMTAB): Remove.
1925         (lookup_partial_symbol, lookup_partial_symtab, find_pc_psymtab)
1926         (find_pc_sect_psymtab): Remove.
1927         (find_pc_sect_symtab_via_partial): Declare.
1928         (find_pc_psymtab, find_pc_sect_psymbol, psymtab_to_symtab)
1929         (find_main_psymtab): Remove.
1930         (find_main_filename): Declare.
1931         (fixup_psymbol_section): Remove.
1932         (fixup_section): Declare.
1933         * symtab.c: Include psymtab.h.
1934         (lookup_symtab): Use lookup_symtab method.
1935         (lookup_partial_symtab): Remove.
1936         (find_pc_sect_psymtab_closer): Remove.
1937         (find_pc_sect_psymtab): Remove.
1938         (find_pc_sect_symtab_via_partial): New function.
1939         (find_pc_psymtab, find_pc_sect_psymbol, find_pc_psymbol): Remove.
1940         (fixup_section): No longer static.
1941         (fixup_psymbol_section): Remove.
1942         (lookup_symbol_aux): Use lookup_symbol_aux_quick.
1943         (lookup_global_symbol_from_objfile): Likewise.
1944         (lookup_symbol_aux_psymtabs): Remove.
1945         (lookup_symbol_aux_quick): New function.
1946         (lookup_symbol_global): Use lookup_symbol_aux_quick.
1947         (lookup_partial_symbol): Remove.
1948         (basic_lookup_transparent_type_quick): New function.
1949         (basic_lookup_transparent_type): Use it.
1950         (find_main_psymtab): Remove.
1951         (find_main_filename): New function.
1952         (find_pc_sect_symtab): Use find_pc_sect_symtab method.
1953         (find_line_symtab): Use expand_symtabs_with_filename method.
1954         (output_partial_symbol_filename): New function.
1955         (sources_info): Use map_partial_symbol_filenames.
1956         (struct search_symbols_data): New type.
1957         (search_symbols_file_matches): New function.
1958         (search_symbols_name_matches): Likewise.
1959         (search_symbols): Use expand_symtabs_matching method.
1960         (struct add_name_data): Rename from add_macro_name_data.
1961         (add_macro_name): Update.
1962         (add_partial_symbol_name): New function.
1963         (default_make_symbol_completion_list): Use
1964         map_partial_symbol_names.
1965         (struct add_partial_symbol_name): New type.
1966         (maybe_add_partial_symtab_filename): New function.
1967         (make_source_files_completion_list): Use
1968         map_partial_symbol_filenames.
1969         (expand_line_sal): Use expand_symtabs_with_filename method.
1970         * symmisc.c: Include psymtab.h.
1971         (print_objfile_statistics): Use print_stats method.
1972         (dump_objfile): Use dump method.
1973         (dump_psymtab, maintenance_print_psymbols)
1974         (maintenance_info_psymtabs, maintenance_check_symtabs)
1975         (extend_psymbol_list): Remove.
1976         * symfile.h (struct quick_symbol_functions): New struct.
1977         (struct sym_fns) <qf>: New field.
1978         (sort_pst_symbols): Remove.
1979         (increment_reading_symtab): Declare.
1980         * symfile.c: Include psymtab.h.
1981         (compare_psymbols, sort_pst_symbols): Remove.
1982         (psymtab_to_symtab): Remove.
1983         (increment_reading_symtab): New function.
1984         (symbol_file_add_with_addrs_or_offsets): Use expand_all_symtabs
1985         method.
1986         (set_initial_language): Use find_main_filename.
1987         (allocate_psymtab, discard_psymtab, cashier_psymtab): Remove.
1988         (free_named_symtabs): Remove unused code.
1989         (start_psymtab_common, add_psymbol_to_bcache)
1990         (append_psymbol_to_list, add_psymbol_to_list, init_psymbol_list):
1991         Remove.
1992         * stack.c: Include psymtab.h, symfile.h.
1993         (backtrace_command_1): Use find_pc_sect_symtab_via_partial.
1994         * source.h (psymtab_to_fullname): Don't declare.
1995         * source.c: Include psymtab.h.
1996         (select_source_symtab): Use find_last_source_symtab method.
1997         (forget_cached_source_info): Use forget_cached_source_info
1998         method.
1999         (find_and_open_source): No longer static.
2000         (psymtab_to_fullname): Remove.
2001         * somread.c: Include psymtab.h.
2002         (som_sym_fns): Update.
2003         * psympriv.h: New file.
2004         * psymtab.h: New file.
2005         * psymtab.c: New file.
2006         * objfiles.h: (ALL_OBJFILE_PSYMTABS): Remove.
2007         (ALL_PSYMTABS, ALL_PSPACE_PSYMTABS): Likewise.
2008         * objfiles.c: Include psymtab.h.
2009         (objfile_relocate1): Use relocate method.
2010         (objfile_has_partial_symbols): Use has_symbols method.
2011         * mipsread.c: Include psymtab.h.
2012         (ecoff_sym_fns): Update.
2013         * mi/mi-cmd-file.c: Include psymtab.h.
2014         (print_partial_file_name): New function.
2015         (mi_cmd_file_list_exec_source_files): Use
2016         map_partial_symbol_filenames.
2017         * mdebugread.c: Include psympriv.h.
2018         * machoread.c: Include psympriv.h.
2019         (macho_sym_fns): Update.
2020         * m2-exp.y (yylex): Use lookup_symtab.
2021         * elfread.c: Include psympriv.h.
2022         (elf_sym_fns): Update.
2023         * dwarf2read.c: Include psympriv.h.
2024         * dbxread.c: Include psympriv.h.
2025         (aout_sym_fns): Update.
2026         * cp-support.c: Include psymtab.h.
2027         (read_in_psymtabs): Remove.
2028         (make_symbol_overload_list_qualified): Use
2029         expand_symtabs_for_function method.
2030         * coffread.c: Include psympriv.h.
2031         (coff_sym_fns): Update.
2032         * blockframe.c: Include psymtab.h.
2033         (find_pc_partial_function): Use find_pc_sect_symtab method.
2034         * ada-lang.h (ada_update_initial_language): Update.
2035         * ada-lang.c: Include psymtab.h.
2036         (ada_update_initial_language): Remove 'main_pst' argument.
2037         (ada_lookup_partial_symbol): Remove.
2038         (struct ada_psym_data): New type.
2039         (ada_add_psyms): New function.
2040         (ada_add_non_local_symbols): Use map_ada_symtabs method.
2041         (struct add_partial_datum): New type.
2042         (ada_add_partial_symbol_completions): New function.
2043         (ada_make_symbol_completion_list): Use map_partial_symbol_names.
2044         (ada_exception_support_info_sniffer): Update.
2045         * Makefile.in (SFILES): Add psymtab.c.
2046         (COMMON_OBS): Add psymtab.o.
2047         (HFILES_NO_SRCDIR): Add psymtab.h, psympriv.h.
2048
2049 2010-03-10  Pierre Muller  <muller@ics.u-strasbg.fr>
2050
2051         * remote-fileio.c (cygwin_conv_path): Define macro for old cygwin API.
2052
2053 2010-03-10  Sami Wagiaalla  <swagiaal@redhat.com>
2054
2055         PR C++/11236:
2056         * cp-namespace.c (cp_add_using): Deleted.
2057         (cp_add_using_directive): Use obstack allocations.
2058         Merged the function cp_add_using into this one.
2059         Added 'struct obstack *' argument.
2060         (cp_scan_for_anonymous_namespaces): Updated.
2061         * cp-support.h: Updated.
2062         * dwarf2read.c (read_import_statement): Updated.
2063         (read_namespace): Updated.
2064
2065 2010-03-10  Pierre Muller  <muller@ics.u-strasbg.fr>
2066
2067         * windows-nat.c (cygwin_conv_path): Remove old macro.
2068
2069 2010-03-10  Pedro Alves  <pedro@codesourcery.com>
2070
2071         * breakpoint.c (condition_command): Handle watchpoint conditions.
2072         (is_hardware_watchpoint): Add comment.
2073         (is_watchpoint): New.
2074         (update_watchpoint): Don't reparse the watchpoint's condition
2075         unless necessary.
2076         (WP_IGNORE): New.
2077         (watchpoint_check): Use it.
2078         (bpstat_check_watchpoint): Handle it.
2079         (bpstat_check_breakpoint_conditions): Evaluate watchpoint local
2080         conditions in a frame where it makes sense.
2081         (watch_command_1): Store the innermost block of the condition
2082         expression.
2083         (delete_breakpoint): Delete the watchpoint condition expression.
2084         * breakpoint.h (struct bp_location) <cond>: Update comment.
2085         (struct breakpoint): New field `cond_exp_valid_block'.
2086
2087 2010-03-09  Joel Brobecker  <brobecker@adacore.com>
2088
2089         Adjust handling of Ada DIEs after dwarf2_physname patch.
2090         * dwarf2read.c (dwarf2_compute_name): Add handling of Ada DIEs.
2091
2092 2010-03-09  Christopher Faylor  <me+cygwin@cgf.cx>
2093             Pierre Muller  <muller@ics.u-strasbg.fr>
2094
2095         * windows-nat.c (cygwin_conv_path): Redefine to properly convert
2096         from/to posix/win32.
2097         (windows_make_so): Use non-Cygwin 1.7 specific function.
2098         (windows_create_inferior): Make sure that cygallargs points to
2099         original args in non Cygwin 1.7. case.
2100
2101 2010-03-09  Michael Snyder  <msnyder@vmware.com>
2102
2103         * i386-tdep.c (i386_record_lea_modrm_addr): Use extract_signed_int
2104         after target_read_memory to get host byte order.
2105         (i386_process_record): Ditto.
2106
2107 2010-03-09  Keith Seitz  <keiths@redhat.com>
2108
2109         Based on work from Daniel Jacobowitz  <dan@codesourcery.com>
2110         * c-typeprint.c (cp_type_print_method_args): For non-static methods,
2111         print out const or volatile qualifiers, too.
2112         (c_type_print_args): Add parameters show_artificial and language.
2113         Skip artificial parameters when requested.
2114         Use the appropriate language printer.
2115         (c_type_print_varspec): Tell c_type_print_args to skip artificial
2116         parameters and pass language_c.
2117         * dwarf2read.c (die_list): New file global.
2118         (struct partial_die_info): Update comments for name field.
2119         (pdi_needs_namespace): Renamed to ...
2120         (die_needs_namespace): ... this. Rewrite.
2121         (dwarf2_linkage_name): Remove.
2122         (add_partial_symbol): Do not predicate the call to
2123         partial_die_full_name based on pdi_needs_namespace.
2124         Remove call to cp_check_possible_namespace_symbols and associated
2125         outdated comments.
2126         (guess_structure_name): Do not inspect child subprogram DIEs.
2127         (dwarf2_fullname): Update comments.
2128         Use die_needs_namespace to assist in computing the name.
2129         (read_func_scope): Use dwarf2_name to get the DIE's name.
2130         Use dwarf2_physname to get the "linkage name" of the DIE.
2131         (dwarf2_add_member_field): Use dwarf2_physname instead of
2132         dwarf2_linkage_name.
2133         (read_structure_type): For structs and classes, set TYPE_NAME, too.
2134         (determine_class): Remove.
2135         (read_partial_die): Ignore DW_AT_MIPS_linkage_name for all languages
2136         except Ada.
2137         (new_symbol): Unconditionally call dwarf2_name.
2138         Compute the "linkage name" using dwarf2_physname.
2139         Use dwarf2_name instead of dwarf2_full_name for enumerator DIEs.
2140         When determining to scan for anonymous C++ namespaces, ignore
2141         the linkage name.
2142         (dwarf2_physname): New function.
2143         (dwarf2_full_name): Move content to new function and call
2144         that.
2145         (dwarf2_compute_name): "New" function.
2146         (_initialize_dwarf2_read): Initialize die_list.
2147         * gnu-v3-eabi.c (gnu_v3_find_method_in): Remove unused variable
2148         physname.
2149         (gnu_v3_print_method_ptr): Use the physname for virtual methods
2150         without a demangled name.
2151         Print out type information for non-virtual methods.
2152         * linespec.c (decode_line_1): Force ANY string using "::" (or
2153         "." for java) to use decode_compound, and clean up any stray quoting.
2154         If we found a file symtab, re-evaluate whether the remainder is_quoted.
2155         (decode_compound): Stop consuming at an open parenthesis.
2156         Keep template parameters.
2157         Keep any overload information.
2158         Keep keywords like "const".
2159         Remove paren_pointer.
2160         Move is_quoted check from set_flags to here.
2161         Remove #if 0 code from 2000. Ten years is long enough.
2162         (find_method): Before comparing symbol names, canonicalize the string
2163         from the user.
2164         If a specific overload is requested, find it. Otherwise throw an error.
2165         (find_method_overload_end): New function.
2166         (set_flags): Remove.
2167         (decode_compound): Assume that parentheses are matched.
2168         It's a lot easier.
2169         * symtab.c (symbol_find_demangled_name): Add DMGL_VERBOSE flag
2170         to cplus_demangle.
2171         * linespec.c (decode_line_1): Keep important keywords like
2172         "const" and "volatile".
2173         * symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): Remove.
2174         * typeprint.h (c_type_print_args): Add declaration.
2175         * ui-file.c (do_ui_file_obsavestring): New function.
2176         (ui_file_obsavestring): New function.
2177         * ui-file.h (ui_file_obsavestring): Add declaration.
2178         * valops.c (find_overload_match): Resolve the object to
2179         a non-pointer type.
2180         If the object is a data member, search the object for the member
2181         and return with staticp set.
2182         Use SYMBOL_NATURAL_NAME instead of SYMBOL_CPLUS_DEMANGLED_NAME.
2183         Do not attempt to extract a function name from non-function types.
2184         If the extracted function name and the original name are the same,
2185         we don't have a C++ method.
2186
2187         From Jan Kratochvil  <jan.kratochvil@redhat.com>:
2188         * dwarf2read.c (new_symbol <DW_TAG_enumerator>): Call dwarf2_full_name.
2189
2190         * ada-lang.c (ada_lookup_symbol): Remove linkage_name parameters
2191         and arguments from symbol lookups.
2192         * ax-gdb.c (gen_expr): Likewise.
2193         * cp-namespace.c (cp_lookup_symbol_nonlocal, lookup_namespace_scope,
2194         cp_lookup_symbol_namespace, lookup_symbol_file, lookup_nested_type,
2195         lookup_possible_namespace_symbol): Likewise.
2196         * cp-support.c (read_in_psymtabs): Likewise.
2197         * cp-support.h (cp_lookup_symbol_nonlocal): Likewise.
2198         * language.h (la_lookup_symbol_nonlocal): Likewise.
2199         * scm-valprint.c (scm_inferior_print): Likewise.
2200         * solib-darwin.c (darwin_relocate_section_addresses): Likewise.
2201         * solib-svr.c (elf_lookup_lib): Likewise.
2202         * solib.c (show_auto_solib_add): Likewise.
2203         * solist.h (lookup_lib_global, solib_global_lookup): Likewise.
2204         * symmisc.c (maintenance_check_symtabs): Likewise.
2205         * symtab.c (lookup_symbol_in_language, lookup_symbol_aux,
2206         lookup_symbol_aux_local, lookup_symbol_aux_block,
2207         lookup_symbol_from_objfile, lookup_symbol_aux_symtabs,
2208         lookup_symbol_aux_psymtabs,basic_lookup_symbol_nonlocal,
2209         lookup_symbol_static, lookup_symbol_global, symbol_matches_domain,
2210         basic_lookup_transparent_type, find_main_psymtab,
2211         lookup_block_symbol): Likewise.
2212         * symtab.h (basic_lookp_symbol_nonlocal, lookup_symbol_static,
2213         lookup_symbol_global, lookup_symbol_aux_block,
2214         lookup_symbol_partial_symbol, lookup_block_symbol,
2215         lookup_global_symbol, value_maybe_namespace_elt): Likewise.
2216
2217 2010-03-09  Pierre Muller  <muller@ics.u-strasbg.fr>
2218
2219         * python/python-internal.h: Include symtab.h.
2220
2221 2010-03-09  Joel Brobecker  <brobecker@adacore.com>
2222             Pierre Muller  <muller@ics.u-strasbg.fr>
2223
2224         * p-lang.c (is_pascal_string_type): Remove unneeded parentheses.
2225         * p-valprint.c (pascal_val_print): Remove undeed block and fix
2226         indentation.
2227
2228 2010-03-08  Tom Tromey  <tromey@redhat.com>
2229
2230         * breakpoint.c (breakpoint_1): Add "QUIT".
2231
2232 2010-03-08  Daniel Jacobowitz  <dan@codesourcery.com>
2233             Pedro Alves  <pedro@codesourcery.com>
2234
2235         * solib.c (solib_find): Replace extension if
2236         solib_symbols_extension is set in the target gdbarch.
2237         * arm-symbian-tdep.c (arm_symbian_init_abi): Set
2238         solib_symbols_extension to "sym".
2239         * gdbarch.sh (solib_symbols_extension): New variable.
2240         (pstring): New function.
2241         * gdbarch.h, gdbarch.c: Regenerate.
2242
2243 2010-03-08  Tom Tromey  <tromey@redhat.com>
2244
2245         PR cli/9591:
2246         * NEWS: Update.
2247         * utils.c: Include main.h.
2248         (fputs_maybe_filtered): Don't paginate if `batch_flag'.
2249         (defaulted_query): Use default answer if `batch_flag'.
2250         * main.h (batch_flag): Declare.
2251         * main.c (batch_flag): New global.
2252         (captured_main): Remove 'batch'.  Update.
2253
2254 2010-03-08  Kevin Buettner  <kevinb@redhat.com>
2255
2256         From Richard Sandiford, Martin M. Hunt, Corinna Vinschen,
2257         and Kevin Buettner:
2258
2259         * remote-mips.c (rockhopper_ops): New target_ops struct.
2260         (MON_ROCKHOPPER): New mips_monitor_type.
2261         (read_hex_value): New function.
2262         (mips_request): Send 8-byte values with a 'T' packet.  Read the
2263         packet argument as a string and use read_hex_value to parse it.
2264         (mips_exit_debug): Wait for response when using MON_ROCKHOPPER.
2265         (rockhopper_open): New function.
2266         (mips_wait): Read the PC, FP and SP fields as strings.  Use
2267         read_hex_value to parse them and mips_set_register to commit them.
2268         (mips_set_register): New function.
2269         (mips_fetch_registers): Do not cast register value to "unsigned"
2270         when reading a MON_ROCKHOPPER 't' packet.  Use mips_set_register.
2271         (mips_store_registers): Use a 'T' packet to set registers when
2272         using MON_ROCKHOPPER.
2273         (pmon_end_download): Don't run initEther if using MON_ROCKHOPPER
2274         and expect the total to be printed before the entry address.
2275         (_initialize_remote_mips): Initialize and add rockhopper_ops.
2276
2277 2010-03-08  Kevin Buettner  <kevinb@redhat.com>
2278
2279         * remote-mips.c (mips_fetch_word): Add new parameter, `valp'.
2280         Change return value to int.  Store value fetched in location
2281         addressed by `val'.  Use function's return value as success
2282         or failure indicator.  Adjust all callers.
2283
2284 2010-03-08  Pierre Muller  <muller@ics.u-strasbg.fr>
2285
2286         * p-lang.c (is_pascal_string_type): Check that TYPE arg is non NULL.
2287
2288 2010-03-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
2289             Hui Zhu  <teawater@gmail.com>
2290
2291         * record.c (record_open_1): Check tmp_to_stopped_by_watchpoint and
2292         tmp_to_stopped_data_address.
2293         (record_open): Reset tmp_to_stopped_by_watchpoint and
2294         tmp_to_stopped_data_address.
2295         * target.c (init_dummy_target): Add to_stopped_by_watchpoint and
2296         to_stopped_data_address.
2297
2298 2010-03-08  Hui Zhu  <teawater@gmail.com>
2299
2300         * i386-tdep.c (i386_process_record): Initialize regnum.
2301
2302 2010-03-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
2303
2304         * symfile.c (addr_info_make_relative): New variable sect_name, use it.
2305         Do not warn on ".gnu.liblist" and ".gnu.conflict".
2306
2307 2010-03-08  Joel Brobecker  <brobecker@adacore.com>
2308
2309         Memory error when reading wrong core file.
2310         * solib-svr4.c (solib_svr4_r_map): catch and print all exception
2311         errors while reading the inferior memory, and return zero if
2312         an exception was raised.
2313
2314 2010-03-07  Michael Snyder  <msnyder@vmware.com>
2315
2316         * record.c (record_restore): Rename tmpu8 to rectype.
2317
2318         * i386-tdep.c (i386_record_lea_modrm_addr): Rename local variables
2319         tmpu8, tmpi16, tmpi32, tmpulongest to addr8, addr16, addr32, addr64.
2320
2321         (i386_record_push): Rename local tmpulongest to addr.
2322
2323         (i386_process_record): Rename local tmpulongest to addr.
2324
2325         Rename local variables tmpu16, tmpu32, tmpu64 to addr16, addr32,
2326         addr64.
2327
2328         Rename local variable tmpu8 to opcode8 and regnum.
2329
2330 2010-03-07  Joel Brobecker  <brobecker@adacore.com>
2331
2332         * remote.c (remote_get_ada_task_ptid): New function.
2333         (init_remote_ops): Set remote_ops.to_get_ada_task_ptid.
2334
2335 2010-03-06  Christopher Faylor  <me+cygwin@cgf.cx>
2336
2337         * windows-nat.c: Reorganize #ifdef __CYGWIN__ considerations into one
2338         block.  Define helper macros to reduce ifdefs in code.
2339         (get_module_name): Use cygwin_buf_t for buffer and __PMAX for buffer
2340         size.  Call unadorned GetModuleFileNameEx rather than
2341         GetModuleFileNameEx*.
2342         (windows_make_so): Use __PMAX to denote maximum buffer size and
2343         cygwin_buf_t for buffer type.  Use GetSystemDirectory{W,A} as
2344         appropriate.
2345         (get_image_name): Use __PMAX to denote maximum buffer size.
2346         (handle_load_dll): Likewise.
2347         (windows_pid_to_exec_file): Likewise.
2348         (windows_create_inferior): Add many accommodations for older Cygwin and
2349         non-Cygwin.
2350         (bad_GetModuleFileNameExW): Control inclusion of this function based on
2351         __USEWIDE conditional.
2352         (bad_GetModuleFileNameExA): Likewise.
2353         (_initialize_loadable): Just use real function names without the dyn_
2354         part since they are defined earlier.
2355
2356 2010-03-05  Corinna Vinschen  <vinschen@redhat.com>
2357             Tom Tromey  <tromey@redhat.com>
2358
2359         * utils.c (host_char_to_target): Add 'gdbarch' argument.
2360         (parse_escape): Likewise.
2361         * python/py-utils.c (unicode_to_target_string): Update.
2362         (unicode_to_target_python_string): Update.
2363         (target_string_to_unicode): Update.
2364         * printcmd.c (printf_command): Update.
2365         * p-exp.y (yylex): Update.
2366         * objc-exp.y (yylex): Update.
2367         * mi/mi-parse.c: Include charset.h.
2368         (mi_parse_escape): New function.
2369         (mi_parse_argv): Use it.
2370         * jv-exp.y (yylex): Update.
2371         * i386-cygwin-tdep.c (i386_cygwin_auto_wide_charset): New
2372         function.
2373         (i386_cygwin_init_abi): Call set_gdbarch_auto_wide_charset.
2374         * gdbarch.sh (auto_charset, auto_wide_charset): New.
2375         * gdbarch.c: Rebuild.
2376         * gdbarch.h: Rebuild.
2377         * defs.h (parse_escape): Update.
2378         * cli/cli-setshow.c: Include arch-utils.h.
2379         (do_setshow_command): Update.
2380         * cli/cli-cmds.c (echo_command): Update.
2381         * charset.h (target_charset, target_wide_charset): Update.
2382         * charset.c: Include arch-utils.h.
2383         (target_charset_name): Default to "auto".
2384         (target_wide_charset_name): Likewise.
2385         (show_target_charset_name): Handle "auto".
2386         (show_target_wide_charset_name): Likewise.
2387         (be_le_arch): New global.
2388         (set_be_le_names): Add 'gdbarch' argument.
2389         (validate): Likewise.  Don't call set_be_le_names.
2390         (set_charset_sfunc, set_host_charset_sfunc)
2391         (set_target_charset_sfunc, set_target_wide_charset_sfunc):
2392         Update.
2393         (target_charset): Add 'gdbarch' argument.
2394         (target_wide_charset): Likewise.  Remove 'byte_order' argument.
2395         (auto_target_charset_name): New global.
2396         (default_auto_charset, default_auto_wide_charset): New functions.
2397         (_initialize_charset): Set auto_target_charset_name.  Allow "auto"
2398         for target charsets.  Copy result of nl_langinfo.  Use GetACP if
2399         USE_WIN32API.
2400         * c-lang.c (charset_for_string_type): Add 'gdbarch' argument,
2401         remove 'byte_order' argument.  Update.
2402         (classify_type): Likewise.
2403         (c_emit_char): Update.
2404         (c_printchar): Update.
2405         (c_printstr): Update.
2406         (c_get_string): Update.
2407         (evaluate_subexp_c): Update.
2408         * arch-utils.h (default_auto_charset, default_auto_wide_charset):
2409         Declare.
2410         * python/python.c (gdbpy_target_charset): New function.
2411         (gdbpy_target_wide_charset): Likewise.
2412         (GdbMethods): Update.
2413         * NEWS: Update.
2414
2415 2010-03-05  Ulrich Weigand  <uweigand@de.ibm.com>
2416
2417         * symfile.c (build_section_addr_info_from_objfile): Do not mask
2418         off high address bits.
2419
2420 2010-03-05  Ulrich Weigand  <uweigand@de.ibm.com>
2421
2422         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Extract
2423         address as UnsignedLongLong, not LongLong.
2424
2425 2010-03-05  Kevin Buettner  <kevinb@redhat.com>
2426             Pedro Alves  <pedro@codesourcery.com>
2427
2428         * remote-mips.c (gdbthread.h): Include.
2429         (remote_mips_ptid): Declare.
2430         (mips_error): Only mourn the inferior when inferior_ptid is non-null.
2431         (common_open): Set inferior_ptid, add it as an inferior, and
2432         as a thread too.  Delete FIXME comment regarding start_remote().
2433         (mips_close): Invoke generic_mourn_inferior().
2434         (mips_kill): Make sure that target_mourn_inferior is invoked.
2435         (mips_mourn_inferior): Don't invoke generic_mourn_inferior, as
2436         it's now invoked from mips_close().
2437         (mips_load): Don't null out inferior_ptid.  Don't call
2438         clear_symtab_users().
2439         (mips_thread_alive, mips_pid_to_str): New functions.
2440         (_initialize_remote_mips): Initialize remote_mips_ptid.  Initialize
2441         to_thread_alive and to_pid_to_str operations.
2442
2443 2010-03-04  Tom Tromey  <tromey@redhat.com>
2444
2445         * dwarf2read.c (skip_one_die) <DW_FORM_ref_addr>: Use offset size
2446         in DWARF 3 and later.
2447         (read_attribute_value) <DW_FORM_ref_addr>: Likewise.
2448
2449 2010-03-04  Keith Seitz  <keiths@redhat.com>
2450
2451         * linespec.c (decode_line_1): Update comments for is_quote_enclosed.
2452         If the filename portion of the linespec was quoted, recheck the
2453         remainder for additional quoting.
2454         (locate_first_half): Skip over completer chars, too.
2455
2456 2010-03-04  Tom Tromey  <tromey@redhat.com>
2457
2458         * printcmd.c (printf_command): Pass dummy argument to
2459         printf_filtered.
2460
2461 2010-03-04  Doug Evans  <dje@google.com>
2462
2463         * arm-tdep.c (arm_make_stub_cache): Delete unused locals reg,
2464         unwound_fp.
2465
2466         * arm-tdep.c (arm_stub_unwind_sniffer): Add comment.
2467
2468 2010-03-04  Pedro Alves  <pedro@codesourcery.com>
2469
2470         * breakpoint.c (update_watchpoint): Create a sentinel location if
2471         the software watchpoint isn't watching any memory.
2472         (breakpoint_address_bits): Skip dummy software watchpoint locations.
2473
2474 2010-03-04  Pedro Alves  <pedro@codesourcery.com>
2475
2476         * utils.c (fputs_maybe_filtered): Check if there's already a top
2477         level interpreter before dereferencing it.  If there isn't one,
2478         don't paginate either.
2479
2480 2010-03-04  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
2481
2482         * arm-tdep.c (arm_pc_is_thumb): Add heuristic that tries to get
2483         the state right when single stepping.
2484         (arm_get_next_pc_raw, thumb_get_next_pc_raw): New functions.
2485         Get the next PC along with the instruction state.
2486         (thumb_get_next_pc): Remove.
2487         (arm_get_next_pc): Modified to use arm_get_next_pc_raw.
2488
2489 2010-03-04  Hui Zhu  <teawater@gmail.com>
2490
2491         * i386-tdep.c (i386_process_record): Change "addr" to "tmpu64".
2492
2493 2010-03-03  Pedro Alves  <pedro@codesourcery.com>
2494
2495         * utils.c (fputs_maybe_filtered): Always disable pagination if the
2496         top level interpreter is MI.
2497
2498 2010-03-03 Stan Shebs  <stan@codesourcery.com>
2499
2500         * remote.c (remote_download_tracepoint): Iterate over locations.
2501         * tracepoint.c (validate_actionline): Ditto.
2502         (encode_actions): Add location argument.
2503         (trace_dump_command): Check all locations to see if stepping
2504         frame.
2505
2506 2010-03-03  H.J. Lu  <hongjiu.lu@intel.com>
2507             Eli Zaretskii  <eliz@gnu.org>
2508
2509         * NEWS: Add X86 general purpose registers section.
2510
2511 2010-03-03  Tom Tromey  <tromey@redhat.com>
2512
2513         PR mi/11098:
2514         * varobj.c (install_new_value): Handle case where new print_value
2515         is NULL.
2516
2517 2010-03-03  Dainis Jonitis  <jonitis@gmail.com>
2518
2519         PR gdb/11345:
2520         * printcmd.c (printf_command): Print end of format string using
2521         printf_filtered.
2522
2523 2010-03-02  Tom Tromey  <tromey@redhat.com>
2524
2525         * mi/mi-cmd-break.c (mi_read_next_line): Add missing 'void'.
2526         * defs.h (read_command_lines_1): Add missing 'void'.
2527         * cli/cli-script.c (recurse_read_control_structure): Add missing
2528         'void'.
2529         (read_next_line): Likewise.
2530         (read_command_lines_1): Likewise.
2531
2532 2010-03-02  Ulrich Weigand  <uweigand@de.ibm.com>
2533
2534         * spu-tdep.c (spu_analyze_prologue): Track instruction to
2535         store backchain as part of prologue.
2536
2537 2010-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
2538
2539         * progspace.c (update_address_spaces): Update inferior address spaces
2540         also.
2541
2542 2010-03-02  Doug Evans  <dje@google.com>
2543
2544         * dwarf2read.c (add_partial_subprogram): Add missing baseaddr to
2545         lowpc,highpc args to addrmap_set_empty.
2546
2547 2010-03-02  H.J. Lu  <hongjiu.lu@intel.com>
2548
2549         * amd64-tdep.c (amd64_byte_names): New.
2550         (amd64_word_names): Likewise.
2551         (amd64_dword_names): Likewise.
2552         (amd64_pseudo_register_name): Likewise.
2553         (amd64_pseudo_register_read): Likewise.
2554         (amd64_pseudo_register_write): Likewise.
2555         (amd64_init_abi): Set num_byte_regs, num_word_regs, num_dword_regs
2556         and num_mmx_regs.  Call set_gdbarch_pseudo_register_read,
2557         set_gdbarch_pseudo_register_write and
2558         set_tdesc_pseudo_register_name.  Don't call
2559         set_gdbarch_num_pseudo_regs.  Don't set mm0_regnum.
2560
2561         * i386-tdep.c (i386_num_mmx_regs): Removed.
2562         (i386_num_pseudo_regs): Likewise.
2563         (i386_byte_names): New.
2564         (i386_word_names): Likewise.
2565         (i386_byte_regnum_p): Likewise.
2566         (i386_word_regnum_p): Likewise.
2567         (i386_mmx_regnum_p): Updated.
2568         (i386_pseudo_register_name): Make it global.  Handle byte and
2569         word pseudo-registers.
2570         (i386_pseudo_register_read): Likewise.
2571         (i386_pseudo_register_write): Likewise.
2572         (i386_pseudo_register_type): Handle byte, word and dword
2573         pseudo-registers
2574         (i386_register_reggroup_p): Don't include pseudo
2575         registers, except for MXX, in any register groups.  Don't
2576         include pseudo byte, word, dword registers in general_reggroup.
2577         (i386_gdbarch_init): Set num_byte_regs, num_word_regs,
2578         num_dword_regs, al_regnum, ax_regnum and eax_regnum.  Put MMX
2579         pseudo-registers after word pseudo-registers.  Call
2580         set_gdbarch_num_pseudo_regs after calling gdbarch_init_osabi.
2581
2582         * i386-tdep.h (gdbarch_tdep): Add num_mmx_regs, num_byte_regs,
2583         al_regnum, num_word_regs, ax_regnum, num_dword_regs and
2584         eax_regnum.
2585         (i386_byte_regnum_p): New.
2586         (i386_word_regnum_p): Likewise.
2587         (i386_dword_regnum_p): Likewise.
2588         (i386_pseudo_register_name): Likewise.
2589         (i386_pseudo_register_read): Likewise.
2590         (i386_pseudo_register_write): Likewise.
2591
2592 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
2593
2594         * target-descriptions.c (tdesc_type): Remove
2595         TDESC_TYPE_I386_EFLAGS and TDESC_TYPE_I386_MXCSR.
2596         (tdesc_predefined_types): Likewise.
2597         (tdesc_gdb_type): Likewise.  Pass NULL to append_flags_type_flag
2598         if flag name is empty.
2599         (maint_print_c_tdesc_cmd): Handle TDESC_TYPE_FLAGS.
2600
2601         * features/i386/32bit-core.xml: Define i386_eflags.
2602         * features/i386/64bit-core.xml: Likewise.
2603
2604         * features/i386/32bit-sse.xml: Define i386_mxcsr.
2605         * features/i386/64bit-sse.xml: Likewise.
2606
2607         * features/i386/amd64-linux.c: Regenerated.
2608         * features/i386/amd64.c: Likewise.
2609         * features/i386/i386-linux.c: Likewise.
2610         * features/i386/i386.c: Likewise.
2611
2612 2010-03-01  Daniel Jacobowitz  <dan@codesourcery.com>
2613
2614         * gdbtypes.c (append_composite_type_field_raw): New.
2615         (append_composite_type_field_aligned): Use the new function.
2616         * gdbtypes.h (append_composite_type_field_raw): Declare.
2617         * target-descriptions.c (struct tdesc_type_field): Add start and end.
2618         (struct tdesc_type_flag): New type.
2619         (struct tdesc_type): Add TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS to
2620         kind.  Add size to u.u.  Add u.f for flags.
2621         (tdesc_gdb_type): Handle TDESC_TYPE_STRUCT and TDESC_TYPE_FLAGS.
2622         (tdesc_free_type): Likewise.
2623         (tdesc_create_struct, tdesc_set_struct_size, tdesc_create_flags): New.
2624         (tdesc_add_field): Handle TDESC_TYPE_STRUCT.
2625         (tdesc_add_bitfield, tdesc_add_flag): New.
2626         * target-descriptions.h (tdesc_create_struct, tdesc_set_struct_size)
2627         (tdesc_create_flags, tdesc_add_bitfield, tdesc_add_flag): Declare.
2628         * xml-tdesc.c (struct tdesc_parsing_data): Rename current_union to
2629         current_type.  Add current_type_size and current_type_is_flags.
2630         (tdesc_start_union): Clear the new fields.
2631         (tdesc_start_struct, tdesc_start_flags): New.
2632         (tdesc_start_field): Handle struct fields, including bitfields.
2633         (field_attributes): Make type optional.  Add start and end.
2634         (union_children): Rename to struct_union_children.
2635         (union_attributes): Rename to struct_union_attributes.  Add optional
2636         size.
2637         (flags_attributes): New.
2638         (feature_children): Add struct and flags.
2639         * features/gdb-target.dtd: Add flags and struct to features.
2640         Make field type optional.  Add field start and end.
2641
2642 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
2643
2644         * amd64-linux-nat.c (AMD64_LINUX_USER64_CS): New.
2645         (amd64_linux_read_description): Likewise.
2646         (_initialize_amd64_linux_nat): Set to_read_description to
2647         amd64_linux_read_description.
2648
2649         * amd64-linux-tdep.c: Include "features/i386/amd64-linux.c".
2650         (amd64_linux_register_name): Removed.
2651         (amd64_linux_register_type): Likewise.
2652         (amd64_linux_core_read_description): New.
2653         (amd64_linux_init_abi): Set target description to
2654         tdesc_amd64_linux if needed.  Support orig_rax in target
2655         description.  Don't call set_gdbarch_register_name nor
2656         set_gdbarch_register_type.  Call
2657         set_gdbarch_core_read_description.
2658         (_initialize_amd64_linux_tdep): Call
2659         initialize_tdesc_amd64_linux.
2660
2661         * amd64-linux-tdep.h (tdesc_amd64_linux): New.
2662
2663         * amd64-tdep.c:  Include "features/i386/amd64.c".
2664         (amd64_register_names): Removed.
2665         (amd64_register_name): Likewise.
2666         (amd64_register_type): Likewise.
2667         (amd64_init_abi):  Set num_core_regs and register_names.  Set
2668         target description to tdesc_amd64 if needed.  Don't call
2669         set_gdbarch_register_name nor set_gdbarch_register_type.
2670         (_initialize_amd64_tdep): New.
2671
2672         * i386-linux-nat.c (i386_linux_read_description): New.
2673         (_initialize_i386_linux_nat): Set to_read_description to
2674         i386_linux_read_description.
2675
2676         * i386-linux-tdep.c: Include "features/i386/i386-linux.c".
2677         (i386_linux_register_name): Removed.
2678         (i386_linux_core_read_description): New.
2679         (i386_linux_read_description): Likewise.
2680         (i386_linux_init_abi): Don't call set_gdbarch_register_name.
2681         Set target description to tdesc_i386_linux if needed.  Support
2682         orig_eax.  Set register_reggroup_p.  Call
2683         set_gdbarch_core_read_description.
2684         (_initialize_i386_linux_tdep): Call initialize_tdesc_i386_linux.
2685
2686         * i386-linux-tdep.h (tdesc_i386_linux): New.
2687
2688         * i386-nto-tdep.c (i386nto_regset_id): Replace I386_NUM_FREGS
2689         with I387_NUM_REGS.
2690
2691         * i386-tdep.c: Include "features/i386/i386.c".
2692         (i386_register_names): Make it const.
2693         (i386_mmx_names): Likewise.
2694         (i386_num_register_names): Removed.
2695         (i386_register_name): Likewise.
2696         (i386_eflags_type): Likewise.
2697         (i386_mxcsr_type): Likewise.
2698         (i386_sse_type): Likewise.
2699         (i386_register_type): Likewise.
2700         (i387_ext_type): Call tdesc_find_type instead of arch_float_type.
2701         (i386_pseudo_register_name): New.
2702         (i386_pseudo_register_type): Likewise.
2703         (i386_mmx_type): Make it static.
2704         (i386_gdbarch_init): Check arch.  Replace I386_NUM_FREGS with
2705         I387_NUM_REGS.  Set num_core_regs and register_names.  Don't
2706         call set_gdbarch_register_name nor set_gdbarch_register_type.
2707         Set register_reggroup_p.  Set target description to tdesc_i386
2708         if needed.  Call set_tdesc_pseudo_register_type,
2709         set_tdesc_pseudo_register_name and tdesc_use_registers.
2710         (_initialize_i386_tdep): Call initialize_tdesc_i386.
2711         initialize_tdesc_x86_64.
2712
2713         * i386-tdep.h (gdbarch_tdep): Remove i386_eflags_type,
2714         i386_mxcsr_type and i386_sse_type.  Add num_core_regs,
2715         register_names, tdesc and register_reggroup_p.
2716         (I386_NUM_FREGS): Removed.
2717         (i386_eflags_type): Likewise.
2718         (i386_mxcsr_type): Likewise.
2719         (i386_mmx_type): Likewise.
2720         (i386_sse_type): Likewise.
2721         (i386_register_name): Likewise.
2722         (i386_regnum): Add I386_MXCSR_REGNUM.
2723         (I386_SSE_NUM_REGS): Defined with I386_MXCSR_REGNUM.
2724
2725         * i387-tdep.h (I387_NUM_REGS): New.
2726
2727         * regformats/i386/i386-linux.dat: Generated.
2728         * regformats/i386/i386.dat: Likewise.
2729         * regformats/i386/amd64-linux.dat: Likewise.
2730         * regformats/i386/amd64.dat: Likewise.
2731
2732         * regformats/reg-i386-linux.dat: Removed.
2733         * regformats/reg-i386.dat: Likewise.
2734         * regformats/reg-x86-64-linux.dat: Likewise.
2735         * regformats/reg-x86-64.dat: Likewise.
2736
2737 2010-03-01  Corinna Vinschen  <vinschen@redhat.com>
2738
2739         * remote-fileio.c (remote_fileio_func_rename): Use Cygwin 1.7
2740         cygwin_conv_path API rather than the deprecated
2741         cygwin_conv_to_full_posix_path.
2742         * windows-nat.c:
2743         (GetModuleFileNameExA): Undefine for Cygwin.
2744         (GetModuleFileNameExW): Define for Cygwin.
2745         (get_module_name): Change size of pathbuf to PATH_MAX for Cygwin.
2746         Call GetModuleFileNameExW and convert path to POSIX using
2747         cygwin_conv_path.
2748         (windows_make_so): Always define p.  Drop unused variable m.
2749         Don't use Win32 functions to check file existance, rather use
2750         access on Cygwin.  Fetch system directory using GetSystemDirectoryW.
2751         Use canonicalize_file_name to get full path.
2752         (get_image_name): Use wcstombs, rather than WideCharToMultiByte
2753         to convert Unicode pathname to multibyte on Cygwin.  Otherwise,
2754         use correct target buffer size in call to WideCharToMultiByte.
2755         (handle_load_dll): Change size of dll_buf to PATH_MAX for Cygwin.
2756         (windows_pid_to_exec_file): Change size of path to PATH_MAX for Cygwin.
2757         (windows_create_inferior): Convert all paths and arguments to wchar_t
2758         and use CreateProcessW on Cygwin.
2759         (_initialize_windows_nat): Disable DOS-style path warning on Cygwin.
2760         (bad_GetModuleFileNameExA): Undefine for Cygwin.
2761         (bad_GetModuleFileNameExW): Define for Cygwin.
2762         (_initialize_loadable): Load GetModuleFileNameExW into
2763         dyn_GetModuleFileNameExW on Cygwin.  Don't load ANSI function on Cygwin.
2764
2765 2010-02-28  Phil Muldoon  <pmuldoon@redhat.com>
2766
2767         PR python/11036
2768         * python/py-frame.c (frapy_read_var): Add block argument and logic
2769         to cope with user provided blocks.
2770
2771 2010-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
2772
2773         * infcall.c (call_function_by_hand): Remove gdb_assert on sp and old_sp.
2774         New comment.
2775
2776 2010-02-28  Corinna Vinschen  <vinschen@redhat.com>
2777
2778         * Makefile.in (SUBDIR_MI_OBS): Move mi-common.o from here...
2779         (COMMON_OBS): ... to here since it's used unconditionally.
2780         (SUBDIR_MI_SRCS): Move mi/mi-common.c from here...
2781         (SFILES): To here.
2782
2783 2010-02-26  David Daney  <ddaney@caviumnetworks.com>
2784
2785         * mips-linux-tdep.c: Update struct sigframe comments.
2786         (SIGFRAME_CODE_OFFSET): Delete macro.
2787         (mips_linux_o32_sigframe_init): Calculate sigcontext_base using
2788         this_frame's sp.
2789         (mips_linux_n32n64_sigframe_init): Same.
2790
2791 2010-02-26  Kevin Buettner  <kevinb@redhat.com>
2792
2793         * remote-mips.c (mips_load): Don't use pseudo-register when
2794         invalidating regcache.
2795
2796 2010-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
2797
2798         * arm-tdep.c (thumb_get_next_pc): Correct conditional branch opcode.
2799
2800 2010-02-26  Pedro Alves  <pedro@codesourcery.com>
2801
2802         * NEWS: Add "New targets" section, and mention ARM Symbian
2803         support.
2804
2805 2010-02-26  Ulrich Weigand  <uweigand@de.ibm.com>
2806
2807         * dwarf2loc.c (struct piece_closure): Remove ARCH member,
2808         add ADDR_SIZE member.
2809         (allocate_piece_closure): Update.
2810         (copy_pieced_value_closure): Likewise.
2811         (dwarf2_evaluate_loc_desc): Likewise.
2812         (read_pieced_value): Use DWARF address size instead of
2813         GDB's gdbarch_addr_bit as size of values on the DWARF stack.
2814
2815 2010-02-26  Phil Muldoon  <pmuldoon@redhat.com>
2816             Tom Tromey  <tromey@redhat.com>
2817
2818         * python/py-type.c (typy_lookup_typename): Add in block argument.
2819         If provided restrict lookup to specified blocks.
2820         (gdbpy_lookup_type): Likewise.
2821         (typy_lookup_type): Likewise.
2822
2823 2010-02-25  Daniel Jacobowitz  <dan@codesourcery.com>
2824
2825         Symbian config
2826
2827         gdb/
2828         * arm-symbian-tdep.c: New.
2829         * configure.tgt (arm*-*-symbianelf*): New target.
2830         (*-*-symbianelf*): New OS.
2831         * osabi.c (gdb_osabi_names): Add Symbian.
2832         * defs.h (gdb_osabi): Add GDB_OSABI_SYMBIAN.
2833         * Makefile.in (ALL_TARGET_OBJS): Add arm-symbian-tdep.o.
2834         (ALLDEPFILES): Add arm-symbian-tdep.c.
2835
2836 2010-02-25  Daniel Jacobowitz  <dan@codesourcery.com>
2837
2838         * symfile.c (find_lowest_section): Include SEC_ALLOC sections.
2839
2840 2010-02-24  Pedro Alves  <pedro@codesourcery.com>
2841
2842         * mi/mi-main.c (mi_cmd_execute): Fix typo.
2843
2844 2010-02-24  Phil Muldoon  <pmuldoon@redhat.com>
2845             Tom Tromey  <tromey@redhat.com>
2846             Thiago Jung Bauermann  <bauerman@br.ibm.com>
2847
2848         * python/python.c (_initialize_python): Call
2849         gdbpy_initialize_symtabs, gdbpy_initialize_symbols and
2850         gdbpy_initialize_blocks.
2851         * python/python-internal.h: Declare struct symbol, block and
2852         symtab_and_line.  Declare block_object_type and
2853         symbol_object_type
2854         (gdbpy_lookup_symbol gdbpy_block_for_pc)
2855         (symtab_and_line_to_sal_object, symtab_to_symtab_object)
2856         (symbol_to_symbol_object,  block_to_block_object)
2857         (gdbpy_initialize_symtabs,gdbpy_initialize_symbols)
2858         (gdbpy_initialize_blocks ): Declare.
2859         * python/py-frame.c (frapy_block, frapy_function, frapy_find_sal)
2860         (frapy_select): Add methods.
2861         (frapy_read_var): Add symbol branch.
2862         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-symbol, py-symtab,
2863         py-block.
2864         (SUBDIR_PYTHON_SRCS): Likewise.
2865         (py-symbol.o): New rule.
2866         (py-symtab.o): Likewise.
2867         (py-block.o): Likewise.
2868         * python/py-symbol.c: New file.
2869         * python/py-symtab.c: Likewise.
2870         * python/py-block.c: Likewise.
2871
2872 2010-02-24  Pedro Alves  <pedro@codesourcery.com>
2873
2874         PR gdb/11321
2875
2876         * inferior.h (prepare_for_detach): Declare.
2877         (struct inferior) <detaching>: New field.
2878         * infrun.c (prepare_for_detach): New.
2879         (handle_inferior_event) <random signal>: Don't stop if detaching.
2880         * target.c (target_detach): Call prepare_for_detach.
2881
2882 2010-02-24  Pedro Alves  <pedro@codesourcery.com>
2883
2884         Per-process displaced stepping queue.
2885
2886         * infrun.c (displaced_step_ptid, displaced_step_request_queue)
2887         (displaced_step_gdbarch, displaced_step_closure,
2888         (displaced_step_original, displaced_step_copy): Move globals to
2889         this...
2890         (struct displaced_step_inferior_state): ... new structure.
2891         (displaced_step_inferior_states): New global.
2892         (get_displaced_stepping_state, add_displaced_stepping_state)
2893         (remove_displaced_stepping_state, infrun_inferior_exit): New
2894         functions.
2895         (displaced_step_clear): Add displaced_step_inferior_state
2896         parameter, and adjust to handle it.
2897         (displaced_step_clear_cleanup): Parameter is now a
2898         displaced_step_inferior_state.  Adjust.
2899         (displaced_step_prepare): Adjust.
2900         (displaced_step_fixup, displaced_step_fixup)
2901         (infrun_thread_ptid_changed, resume): Adjust.
2902         (init_wait_for_inferior): Don't call displaced_step_clear.
2903         (infrun_thread_stop_requested): Rewrite.
2904         (_initialize_infrun): Install infrun_inferior_exit as
2905         inferior_exit observer.
2906
2907 2010-02-24  Pedro Alves  <pedro@codesourcery.com>
2908
2909         * inferior.h (ptid_match): Declare.
2910         * infrun.c (ptid_match): New.
2911         * remote.c (queued_stop_reply): Rewrite and use ptid_match.
2912         (handle_notification): Add debug output.
2913         * linux-nat.c (ptid_match): Delete.
2914
2915 2010-02-24  David S. Miller  <davem@davemloft.net>
2916
2917         * gdb_ptrace.h (PT_SYSCALL): If PTRACE_SYSCALL is available, use it.
2918         * syscalls/sparc-linux.xml: New.
2919         * syscalls/sparc64-linux.xml: New.
2920         * Makefile.in (XML_SYSCALL_FILES): Add new syscall XML files.
2921         * sparc-linux-tdep.c (XML_SYSCALL_FILENAME_SPARC32): Define.
2922         (sparc32_linux_get_syscall_number): New function.
2923         (sparc32_linux_init_abi): Set syscall XML file name and hook up
2924         syscall number fetcher.
2925         * sparc64-linux-tdep.c (XML_SYSCALL_FILENAME_SPARC64): Define.
2926         (sparc64_linux_get_syscall_number): New function.
2927         (sparc64_linux_init_abi): Set syscall XML file name and hook up
2928         syscall number fetcher.
2929
2930 2010-02-24  Vladimir Prus  <vladimir@codesourcery.com>
2931
2932         Multiexec MI
2933
2934         * breakpoint.c (clear_syscall_counts): Take struct inferior*.
2935         * inferior.c (add_inferior_silent): Notify inferior_added
2936         observer.
2937         (delete_inferior_1): Notify inferior_removed observer.
2938         (exit_inferior_1): Pass inferior, not pid, to observer.
2939         (inferior_appeared): Likewise.
2940         (add_inferior_with_spaces): New.
2941         (add_inferior_command): Use the above.
2942         * inferior.h (delete_inferior_1, add_inferior_with_spaces):
2943         Declare.
2944
2945         * inflow.c (inflow_inferior_exit): Likewise.
2946         * jit.c (jit_inferior_exit_hook): Likewise.
2947
2948         * mi/mi-cmds.c (mi_cmds): Register add-inferior and
2949         remove-inferior.
2950         * mi/mi-cmds.h (mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
2951         * mi/mi-interp.c (mi_inferior_added, mi_inferior_removed): New.
2952         (report_initial_inferior): New.
2953         (mi_inferior_removed): Register the above. Make sure
2954         inferior_added observer is called on the first inferior.
2955         (mi_new_thread, mi_thread_exit): Thread group is now identified by
2956         inferior number, not pid.
2957         (mi_solib_loaded, mi_solib_unloaded): Report which inferiors are
2958         affected.
2959         * mi/mi-main.c (current_context): New.
2960         (proceed_thread_callback): Use typed closure.
2961         Proceed everything if pid is 0. Most implementation split into
2962         (proceed_thread): ... this.
2963         (run_one_inferior): New.
2964         (mi_cmd_exec_continue, mi_cmd_exec_interrupt, mi_cmd_exec_run):
2965         Adjust for multiexec behaviour.
2966         (mi_cmd_add_inferior, mi_cmd_remove_inferior): New.
2967         (mi_cmd_execute): Handle the 'thread-group' option here.
2968         Do some extra checks.
2969         * mi-parse.c (mi_parse): Handle the --all and --thread-group
2970         options.
2971         * mi-parse.h (struct mi_parse): New fields all and thread_group.
2972
2973 2010-02-24  Vladimir Prus  <vladimir@codesourcery.com>
2974
2975         Make -exec-run a proper MI commands.
2976
2977         * mi/mi-cmds.h (mi_cmd_exec_run): Declare.
2978         * mi/mi-cmds.c (mi_cmds): Adjust.
2979         * mi/mi-main.c (mi_cmd_exec_run): New.
2980
2981 2010-02-24  Pedro Alves  <pedro@codesourcery.com>
2982             Stan Shebs  <stan@codesourcery.com>
2983
2984         * tracepoint.h (set_traceframe_number)
2985         (cleanup_restore_current_traceframe): Declare.
2986         * tracepoint.c (set_traceframe_number): New.
2987         (struct current_traceframe_cleanup): New.
2988         (do_restore_current_traceframe_cleanup)
2989         (restore_current_traceframe_cleanup_dtor)
2990         (make_cleanup_restore_current_traceframe): New.
2991         * infrun.c: Include tracepoint.h.
2992         (fetch_inferior_event): Switch out and in of tfind mode.
2993
2994 2010-02-24  Pedro Alves  <pedro@codesourcery.com>
2995
2996         * breakpoint.c (breakpoint_init_inferior): Also delete
2997         bp_shlib_event breakpoints.
2998         * solib-frv.c (enable_break): Remove call to
2999         remove_solib_event_breakpoints.
3000         * solib-svr4.c (enable_break): Ditto.
3001         * solib-darwin.c (darwin_solib_create_inferior_hook): Ditto.
3002         * solib-pa64.c (pa64_solib_create_inferior_hook): Ditto.
3003         * solib-som.c (som_solib_create_inferior_hook): Ditto.
3004         * solib-spu.c (spu_enable_break): Ditto.
3005
3006 2010-02-23  Harald Koenig  <H.Koenig@science-computing.de>
3007
3008         * c-exp.y (token_and_value): s/union YYSTYPE/YYSTYPE.
3009
3010 2010-02-23  Harald Koenig  <H.Koenig@science-computing.de>
3011
3012         * varobj.c (varobj_update): Avoid non-constants in initializers.
3013
3014 2010-02-23  Tom Tromey  <tromey@redhat.com>
3015
3016         * dwarf2loc.c (read_pieced_value) <DWARF_VALUE_STACK>: Correctly
3017         handle big-endian values.
3018         (dwarf2_evaluate_loc_desc) <DWARF_VALUE_STACK>: Likewise.
3019
3020 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
3021
3022         PR9605
3023
3024         gdb/
3025         * breakpoint.c (insert_bp_location): If inserting the read
3026         watchpoint failed, fallback to an access watchpoint.
3027         (bpstat_check_watchpoint): Stop for read watchpoint triggers even
3028         if the value changed, if not watching the same memory for writes.
3029         (watchpoint_locations_match): Add comment.
3030         (update_global_location_list): Copy the location's watchpoint type.
3031         * i386-nat.c (i386_length_and_rw_bits): It's an internal error to
3032         handle read watchpoints here.
3033         (i386_insert_watchpoint): Read watchpoints aren't supported.
3034         * remote.c (remote_insert_watchpoint): Return 1 for unsupported
3035         packets.
3036         * target.h (target_insert_watchpoint): Update description.
3037
3038 2010-02-19  Tom Tromey  <tromey@redhat.com>
3039
3040         * p-typeprint.c (pascal_type_print_varspec_prefix): Update.
3041         * m2-typeprint.c (m2_print_type): Update.
3042         * gdbtypes.c (recursive_dump_type): Update.
3043         (copy_type_recursive): Update.
3044         * c-typeprint.c (c_type_print_varspec_prefix): Update.
3045         (c_type_print_base): Update.
3046         * gdbtypes.h (TYPE_CODE_TEMPLATE, TYPE_CODE_TEMPLATE_ARG):
3047         Remove.
3048         (struct cplus_struct_type) <ntemplate_args>: Remove.
3049         <struct template_arg>: Remove.
3050         <is_dynamic>: Move earlier.
3051         (TYPE_TEMPLATE_ARGS): Remove.
3052         (TYPE_NTEMPLATE_ARGS): Remove.
3053         (TYPE_TEMPLATE_ARG): Remove.
3054
3055 2010-02-19  Tom Tromey  <tromey@redhat.com>
3056
3057         PR c++/8693, PR c++/9496:
3058         * cp-namespace.c (cp_lookup_nested_type): Handle TYPE_CODE_UNION.
3059         * c-exp.y (lex_one_token): Rename from yylex.  Don't call
3060         write_dollar_variable.  Don't try to classify NAME tokens.
3061         (token_and_value): New type.
3062         (token_fifo, popping, name_obstack): New globals.
3063         (classify_name): New function.
3064         (classify_inner_name): Likewise.
3065         (yylex): Likewise.
3066         (VARIABLE): Now has type sval.
3067         (exp : VARIABLE): Call write_dollar_variable.
3068         (qualified_name): Use TYPENAME, not typebase.  Add production for
3069         multiple "::" instances.
3070         (variable): Use name_not_typename.
3071         (qualified_type): Remove.
3072         (typebase): Update.
3073
3074 2010-02-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3075
3076         * symfile.c (addr_info_make_relative): Extend comment.  Move SECT to
3077         a more inner block.  Initialize ADDR by LOWER_OFFSET only if it was
3078         found by bfd_get_section_by_name.
3079         * symfile.h (struct section_addr_info) <sectindex>: New comment.
3080
3081 2010-02-19  Joel Brobecker  <brobecker@adacore.com>
3082
3083         * NEWS: Add new "[...] since 7.1" section.  Rename the "[...] since
3084         7.0 section" into "Changes in 7.1".
3085
3086 2010-02-19  Joel Brobecker  <brobecker@adacore.com>
3087
3088         GDB 7.1 branch created (branch timestamp: 2010-02-18 20:00 UTC)
3089         * version.in: Bump version to 7.1.50.20100219-cvs.
3090
3091 2010-02-18  Harald Koenig  <H.Koenig@science-computing.de>
3092
3093         * mi/mi-main.c (mi_cmd_exec_jump): Drop unneeded `return'.
3094         * symfile.c (symfile_map_offsets_to_segments): Fix assertion.
3095
3096 2010-02-17  Tom Tromey  <tromey@redhat.com>
3097
3098         * NEWS: Add Python API Improvements section.
3099
3100 2010-02-18  Daniel Jacobowitz  <dan@codesourcery.com>
3101
3102         * NEWS: Correct typo.
3103
3104 2010-02-17  Tom Tromey  <tromey@redhat.com>
3105
3106         * objfiles.c (gdb_bfd_ref): Handle abfd==NULL.
3107
3108 2010-02-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
3109
3110         * symfile.c (build_section_addr_info_from_objfile): Include sections
3111         only if they are SEC_ALLOC or SEC_LOAD.
3112
3113 2010-02-17  H.J. Lu  <hongjiu.lu@intel.com>
3114
3115         PR shlibs/11293
3116         * solib-svr4.c (enable_break): Check size of CORE_ADDR instead
3117         of ULONGEST for address size.
3118
3119 2010-02-17  Tom Tromey  <tromey@redhat.com>
3120
3121         * NEWS: Add C++ improvements section.
3122
3123 2010-02-17  Ulrich Weigand  <uweigand@de.ibm.com>
3124
3125         * python/python-internal.h [!WITH_THREAD] (PyGILState_Release,
3126         PyThreadState_Swap): Avoid "statement with no effect" warning.
3127
3128 2010-02-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
3129
3130         * solib-svr4.c (enable_break <target_auxv_search>): New variable
3131         addr_bit.  Adjust LOAD_ADDR sign for cross-arch inferiors.
3132
3133 2010-02-17  Tristan Gingold  <gingold@adacore.com>
3134             Petr Hluzín <petr.hluzin@gmail.com>
3135
3136         * avr-tdep.c (avr_scan_prologue): Convert an if statement to a
3137         gdb_assert.  Fix info->size for SIG prologue.
3138
3139 2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
3140
3141         * infcmd.c (show_inferior_tty_command): Check for NULL.
3142         Correct output message.
3143
3144 2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
3145
3146         * linespec.c (decode_line_1): Handle FILE:FUNCTION even if
3147         FUNCTION contains parentheses.  Improve removal of a trailing
3148         single quote.
3149
3150 2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
3151
3152         * gcore.c (do_bfd_delete_cleanup): New function.
3153         (gcore_command): Use it.  Discard the cleanup after success.
3154         (gcore_copy_callback): Delete dead code.
3155
3156 2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
3157
3158         * symfile.c (addr_info_make_relative): Always use
3159         find_lowest_section.
3160
3161 2010-02-16  Sami Wagiaalla <swagiaal@redhat.com>
3162
3163         * NEWS: Added entry for namespace fixes.
3164
3165 2010-02-15  Tom Tromey  <tromey@redhat.com>
3166
3167         * dwarf2read.c (guess_structure_name): Allocate name on the
3168         objfile obstack.
3169
3170 2010-02-15  Tom Tromey  <tromey@redhat.com>
3171
3172         * c-typeprint.c (c_type_print_base): Reverse order of test.
3173
3174 2010-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
3175
3176         * solib-svr4.c (LM_ADDR_CHECK): New variable minpagesize.  Optionally
3177         initialize it from ELF BFD.  Extend the prelink condition by it.
3178
3179 2010-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
3180
3181         * defs.h (parse_pid_to_attach): New.
3182         * utils.c (parse_pid_to_attach): New.
3183         * darwin-nat.c (darwin_attach): Replace ARGS parsing by parse_pid.
3184         * gnu-nat.c (gnu_attach): Likewise.
3185         * nto-procfs.c (procfs_attach): Likewise.
3186         * procfs.c (procfs_attach): Likewise.
3187         * windows-nat.c (windows_attach): Likewise.
3188         * inf-ptrace.c (inf_ptrace_attach): Likewise.  Remove variable dummy.
3189         * inf-ttrace.c (inf_ttrace_attach): Likewise.
3190         * remote.c (extended_remote_attach_1): Likewise.  New comment on getpid
3191         check.
3192
3193 2010-02-14  Masaki Muranaka  <monaka@monami-software.com>
3194
3195         * MAINTAINERS: Add myself for write after approval privileges.
3196
3197 2010-02-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
3198
3199         * solib-svr4.c: (LM_ADDR_CHECK): Move variable align to a more inner
3200         block.
3201
3202 2010-02-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
3203
3204         * solib-svr4.c: (LM_ADDR_CHECK): Print successful prelink adjustment
3205         only if INFO_VERBOSE.
3206
3207 2010-02-12  Tomas Holmberg <th@virtutech.com>
3208
3209         * mi/mi-main.c: Added the --reverse flag to the following MI
3210         commands: exec-continue, exec-finish, exec-next, exec-step,
3211         exec-next-instruction, exec-step-instruction. This is to
3212         support reverse execution over the MI interface to gdb.
3213
3214 2010-02-12  Pedro Alves  <pedro@codesourcery.com>
3215
3216         * tracepoint.c (_initialize_tracepoint): Specify that the address
3217         range of `tfind outsize' is exclusive, and that the address range
3218         of `tfind range' is inclusive, in the commands' help strings.
3219
3220 2010-02-12  Joel Brobecker  <brobecker@adacore.com>
3221
3222         Spurious "dll not found" error messages on x64-windows.
3223         * windows-nat.c: Add include of complaints.h.
3224         (handle_unload_dll): Change dll-not-found error into a complaint.
3225
3226 2010-02-12  Pedro Alves  <pedro@codesourcery.com>
3227
3228         * breakpoint.c (allocate_bp_location): Use bp_loc_other for
3229         bp_tracepoint and bp_fast_tracepoint, not
3230         bp_loc_software_breakpoint.
3231         (update_global_location_list): Tracepoints are never duplicates of
3232         anything.
3233
3234 2010-02-12  Pedro Alves  <pedro@codesourcery.com>
3235
3236         * breakpoint.c (break_command_really): Change return type to int.
3237         Return false if no breakpoint was created, true otherwise.
3238         (trace_command): Don't set the tracepoint count if no tracepoint
3239         was created.
3240         (ftrace_command): Ditto.
3241         (create_tracepoint_from_upload): Bail out if the tracepoint wasn't
3242         created in the breakpoints table.
3243
3244 2010-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
3245             Ulrich Weigand  <uweigand@de.ibm.com>
3246
3247         * solib-svr4.c (LM_ADDR_CHECK): New comment on PPC-aware condition.
3248
3249 2010-02-11  Pedro Alves  <pedro@codesourcery.com>
3250
3251         * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out if
3252         the offset value isn't of integral type.
3253
3254 2010-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
3255
3256         * breakpoint.c (delete_breakpoint) <bpt->related_breakpoint != NULL>:
3257         New.
3258
3259 2010-02-11  Pedro Alves  <pedro@codesourcery.com>
3260
3261         * ax-gdb.c (gen_exp_binop_rest) [BINOP_SUBSCRIPT]: Error out on
3262         non-subscriptable types.
3263         * valarith.c (binop_types_user_defined_p): New, abstracted out
3264         from ...
3265         (binop_user_defined_p): ... this.
3266         * value.h (binop_types_user_defined_p): Declare.
3267
3268 2010-02-11  Pedro Alves  <pedro@codesourcery.com>
3269
3270         * tracepoint.c (tfile_open): Remove spurious discard_cleanups.
3271         Merge uploaded TSVs before merging uploaded tracepoints.
3272
3273 2010-02-11  Pedro Alves  <pedro@codesourcery.com>
3274
3275         * ax-gdb.c (gen_deref): Don't allow dereferencing void pointers.
3276
3277 2010-02-11  Vladimir Prus  <vladimir@codesourcery.com>
3278
3279         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals): Add extra
3280         whitespace character after a dot in comment.
3281         (mi_cmd_stack_list_arguments, mi_cmd_stack_list_variables):
3282         Likewise.
3283         (list_args_or_locals): For the 'all' (that is
3284         -stack-list-variables) case, always output list of tuples.
3285         Output 'arg' field if variable is argument.
3286
3287 2010-02-10  Tom Tromey  <tromey@redhat.com>
3288
3289         * parser-defs.h (parser_debug): Declare.
3290         * parse.c (_initialize_parse): Install "debug parser" set/show
3291         command.
3292         (parser_debug): New global.
3293         (show_parserdebug): New function.
3294         * c-exp.y (c_parse): Set yydebug.
3295
3296 2010-02-10  H.J. Lu  <hongjiu.lu@intel.com>
3297
3298         * target-descriptions.c (tdesc_type): Add TDESC_TYPE_I387_EXT,
3299         TDESC_TYPE_I386_EFLAGS and TDESC_TYPE_I386_MXCSR.
3300         (tdesc_predefined_types): Add i387_ext, i386_eflags and
3301         i386_mxcsr.
3302         (tdesc_find_type): New.
3303         (tdesc_gdb_type): Use tdesc_find_type.  Handle TDESC_TYPE_I387_EXT,
3304         TDESC_TYPE_I386_EFLAGS and TDESC_TYPE_I386_MXCSR.
3305
3306         * target-descriptions.h (tdesc_find_type): New.
3307
3308 2010-02-10  Michael Snyder  <msnyder@vmware.com>
3309
3310         * gdb-gdb.py: Comment fix.
3311
3312 2010-02-09  Tristan Gingold  <gingold@adacore.com>
3313
3314         * machoread.c (macho_symfile_relocate): New function.
3315         (macho_sym_fns): Use macho_symfile_relocate instead of
3316         default_symfile_relocate.
3317         (macho_oso_data): New type.
3318         (current_oso): New variable.
3319         (macho_add_oso_symfile): Do not compute section_addr_info, but
3320         instead set vma of sections.
3321         Do not set SYMFILE_VERBOSE to call symbol_file_add_from_bfd.
3322         Set and clear current_oso.
3323
3324 2010-02-09  Joel Brobecker  <brobecker@adacore.com>
3325
3326         Wrong type description for tagged type parameter.
3327         * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: When noside is
3328         EVAL_AVOID_SIDE_EFFECTS, also handle the case when type is a
3329         reference to a tagged type.
3330
3331 2010-02-09  Tristan Gingold  <gingold@adacore.com>
3332
3333         * objfiles.c (objfile_separate_debug_iterate): Do not iterate on
3334         brothers of the parent.
3335
3336 2010-02-08  Tom Tromey  <tromey@redhat.com>
3337
3338         PR c++/8017:
3339         * value.h: Update.
3340         * valops.c (search_struct_field): Make 'name' const.
3341         (search_struct_method): Likewise.
3342         (find_method_list): Make 'method' const.
3343         (value_struct_elt): Make 'name' and 'err' const.
3344         (value_find_oload_method_list): Make 'method' const.
3345         (find_overload_match): Make 'name' const.
3346         * eval.c (evaluate_subexp_standard): New locals function,
3347         function_name.
3348         <OP_FUNCALL>: Handle OP_SCOPE specially.
3349
3350 2010-02-08  Ulrich Weigand  <uweigand@de.ibm.com>
3351
3352         * infrun.c (handle_inferior_event): Do not look up regcache
3353         for exited processes.
3354
3355 2010-02-08  Chris Moller  <moller@mollerware.com>
3356
3357         PR gdb/10728
3358         * valarith.c (value_ptrdiff): Added a test for a zero type length,
3359         warn if found, and assume length = 1.
3360
3361 2010-02-08  Chris Moller  <cmoller@redhat.com>
3362
3363         PR gdb/9067
3364         * cp-valprint.c (cp_print_value_fields) Fix use of obstacks.
3365         cp_print_static_field)  Fix use of obstacks.
3366
3367 2010-02-08  Pedro Alves  <pedro@codesourcery.com>
3368
3369         * linux-nat.c (linux_nat_resume): In non-stop, also only tag
3370         resumed LWPs as resumed.
3371         (linux_nat_wait_1): If there's no resumed LWP in the set of LWPs
3372         we're waiting for, bail out with TARGET_WAITKIND_IGNORE, instead
3373         of throwing an internal error.  If an LWP of a process we're not
3374         waiting for reports a signal, don't force collecting a SIGSTOP,
3375         and if it was breakpoint hit in non-stop mode, cancel it.  Don't
3376         go through all LWPs cancelling breakpoints in non-stop mode.
3377         (resume_stopped_resumed_lwps): New.
3378         (linux_nat_wait): Use it.
3379
3380 2010-02-07  H.J. Lu  <hongjiu.lu@intel.com>
3381
3382         * features/Makefile (WHICH): Add i386/i386, i386/i386-linux,
3383         i386/amd64 and i386/amd64-linux.
3384         (i386/i386-expedite): New.
3385         (i386/i386-linux-expedite): Likewise.
3386         (i386/amd64-expedite):Likewise.
3387         (i386/amd64-linux-expedite): Likewise.
3388         ($(outdir)/i386/i386-linux.dat): Likewise.
3389         ($(outdir)/i386/amd64.dat): Likewise.
3390         ($(outdir)/i386/amd64-linux.dat): Likewise.
3391
3392         * features/i386/32bit-core.xml: New.
3393         * features/i386/32bit-linux.xml: Likewise.
3394         * features/i386/32bit-sse.xml: Likewise.
3395         * features/i386/64bit-core.xml: Likewise.
3396         * features/i386/64bit-linux.xml: Likewise.
3397         * features/i386/64bit-sse.xml: Likewise.
3398         * features/i386/i386-linux.xml: Likewise.
3399         * features/i386/i386.xml: Likewise.
3400         * features/i386/amd64-linux.xml: Likewise.
3401         * features/i386/amd64.xml: Likewise.
3402         * features/i386/i386-linux.c: Likewise.
3403         * features/i386/i386.c: Likewise.
3404         * features/i386/amd64-linux.c: Likewise.
3405         * features/i386/amd64.c: Likewise.
3406
3407 2010-02-05  Sami Wagiaalla  <swagiaal@redhat.com>
3408
3409         PR c++/7935:
3410         * cp-support.h: Added char* alias element to using_direct data
3411         struct.
3412         (cp_add_using): Added char* alias argument.
3413         (cp_add_using_directive): Ditto.
3414         * cp-namespace.c: Updated with the above changes.
3415         (cp_lookup_symbol_imports): Check for aliases.
3416         * dwarf2read.c (read_import_statement): Figure out local alias
3417         for the import and pass it on to cp_add_using.
3418         (read_namespace): Pass alias argument to cp_add_using.
3419
3420 2010-02-05  Hui Zhu  <teawater@gmail.com>
3421
3422         * defs.h (gdb_bfd_errmsg): New extern.
3423         * exec.c (exec_file_attach): Change bfd_errmsg to
3424         gdb_bfd_errmsg.
3425         * utils.c (AMBIGUOUS_MESS1): New macro.
3426         (AMBIGUOUS_MESS2): New macro.
3427         (gdb_bfd_errmsg): New function.
3428
3429 2010-02-04  Doug Evans  <dje@google.com>
3430
3431         * solib-svr4.c (enable_break): Add comment.
3432
3433 2010-02-04  Anthony Green  <green@moxielogic.com>
3434
3435         * moxie-tdep.c (moxie_analyze_prologue): Fail protocol analysis
3436         gracefully.
3437
3438 2010-02-04  Tom Tromey  <tromey@redhat.com>
3439
3440         * valops.c (search_struct_field): Account for
3441         value_embedded_offset.  Fix check for virtual base past the end of
3442         the object.  Use value_copy when making a slice of the value.
3443
3444 2010-02-04  H.J. Lu  <hongjiu.lu@intel.com>
3445
3446         PR tui/9622
3447         * tui/tui-interp.c (tui_init): Call tui_initialize_readline
3448         only if gdb_stdout is a tty.
3449
3450 2010-02-04  H.J. Lu  <hongjiu.lu@intel.com>
3451
3452         * target-descriptions.c: Include "osabi.h".
3453         (maint_print_c_tdesc_cmd): Generate set_tdesc_osabi for valid
3454         OSABI.
3455
3456 2010-02-04  Tristan Gingold  <gingold@adacore.com>
3457
3458         * machoread.c (macho_add_oso): Renamed to macho_register_oso.
3459         (macho_symtab_read): Adjust calls to macho_add_oso.
3460         (macho_oso_symfile): Renamed to macho_symfile_read_all_oso.
3461         (macho_symfile_read): Adjust call to macho_oso_symfile.
3462         (macho_new_init): Move this function after declarations.
3463         (macho_symfile_init): Ditto.
3464         * darwin-nat-info.c (darwin_lib_gdb_ports): Remove.
3465         * darwin-nat.c (darwin_lookup_task): Remove unused prototype.
3466
3467 2010-02-04  Vladimir Prus  <vladimir@codesourcery.com>
3468
3469         Include MI command in remotelog.
3470
3471         * mi/mi-main.c (mi_execute_command): Call target_log_command.
3472
3473 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
3474
3475         * remote.c (remote_state): Remove gdbarch.
3476         (init_remote_state): Don't set gdbarch.
3477         (remote_query_supported): Pass target_gdbarch instead of
3478         rs->gdbarch to gdbarch_qsupported.
3479
3480 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
3481
3482         * gdbarch.sh: Add qsupported.
3483
3484         * gdbarch.c: Regenerated.
3485         * gdbarch.h: Likewise.
3486
3487         * remote.c (remote_state): Add gdbarch.
3488         (init_remote_state): Set gdbarch.
3489         (remote_query_supported): Support gdbarch_qsupported.
3490
3491 2010-02-03  Daniel Jacobowitz  <dan@codesourcery.com>
3492
3493         * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Also check for
3494         __FreeBSD_kernel_version.
3495
3496 2010-02-03  Tristan Gingold  <gingold@adacore.com>
3497
3498         * symfile.h (struct sym_fns): Add sym_relocate field.
3499         (default_symfile_relocate): New prototype.
3500         (symfile_relocate_debug_section): First argument is now an objfile.
3501         * symfile.c (default_symfile_relocate): Rename from
3502         symfile_relocate_debug_section, first argument is now an objfile.
3503         (symfile_relocate_debug_section): New function.
3504         * coffread.c (coff_sym_fns): Set sym_relocate field.
3505         * somread.c (som_sym_fns): Ditto.
3506         * mipsread.c (ecoff_sym_fns): Ditto.
3507         * machoread.c (macho_sym_fns): Ditto.
3508         * elfread.c (elf_sym_fns): Ditto.
3509         * dwarf2read.c (dwarf2_read_section): Ditto.
3510         * xcoffread.c (xcoff_sym_fns): Ditto.
3511         * dbxread.c (aout_sym_fns): Ditto.
3512         (dbx_psymtab_to_symtab): Adjust call to symfile_relocate_debug_section.
3513         (elfstab_build_psymtabs): Ditto.
3514
3515 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
3516
3517         * defs.h (MAX_REGISTER_SIZE): Increase to 32.
3518
3519 2010-02-02  Tom Tromey  <tromey@redhat.com>
3520
3521         * valops.c (value_cast_structs): Try downcasting using the RTTI
3522         type.
3523
3524 2010-02-02  Tom Tromey  <tromey@redhat.com>
3525
3526         * gnu-v2-abi.c: Don't include gnu-v2-abi.h.
3527         (gnuv2_baseclass_offset): Now static.
3528         * Makefile.in (HFILES_NO_SRCDIR): Remove gnu-v2-abi.h.
3529         * gnu-v2-abi.h: Remove.
3530
3531 2010-02-02  Tom Tromey  <tromey@redhat.com>
3532
3533         * m2-typeprint.c (m2_record_fields): Don't use
3534         TYPE_DECLARED_TYPE.
3535         * gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
3536         (struct main_type) <flag_declared_class>: New field.
3537         (struct cplus_struct_type) <declared_type>: Remove.
3538         <ntemplate_args>: Move earlier.
3539         (DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
3540         (DECLARED_TYPE_TEMPLATE): Remove.
3541         (TYPE_DECLARED_TYPE): Remove.
3542         * gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
3543         * dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
3544         * c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
3545         TYPE_DECLARED_TYPE.
3546
3547 2010-02-02  Tom Tromey  <tromey@redhat.com>
3548
3549         PR c++/11226, PR c++/9629, PR c++/9688, PR c++/8890:
3550         * valops.c (search_struct_field): Compute nbases after calling
3551         CHECK_TYPEDEF.
3552         (check_field): Call CHECK_TYPEDEF.
3553         * cp-valprint.c (cp_print_value): Pass correct address to
3554         baseclass_offset.  Fix check for virtual base past the end of the
3555         object.  Don't offset address passed to cp_print_value_fields or
3556         apply_val_pretty_printer.
3557         (cp_print_value_fields): Fix call to val_print.
3558         (cp_print_value_fields_rtti): New function.
3559         * c-valprint.c (c_val_print): Use cp_print_value_fields_rtti.
3560         * p-valprint.c (pascal_object_print_value_fields): Fix call to
3561         val_print.
3562         * python/py-prettyprint.c (apply_val_pretty_printer): Add embedded
3563         offset to address.
3564         * language.h (struct language_defn) <la_val_print>: Document.
3565         * c-lang.h (cp_print_value_fields_rtti): Declare.
3566
3567 2010-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3568
3569         PR libc/11214:
3570         * linux-low.c (linux_tracefork_child) [!(__UCLIBC__ && HAS_NOMMU)]: New.
3571         (linux_test_for_tracefork): Move `stack' into [__UCLIBC__ && HAS_NOMMU].
3572         (linux_test_for_tracefork) [!(__UCLIBC__ && HAS_NOMMU)]: New.
3573
3574 2010-02-01  Michael Matz  <matz@suse.de>
3575             Daniel Jacobowitz  <dan@codesourcery.com>
3576
3577         * i386-tdep.c (i386_frame_cache): Assume valid anonymous
3578         functions use a frame pointer.
3579
3580 2010-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3581
3582         * solib-svr4.c (scan_dyntag): New variable dyn_addr.  Replace gdb_assert
3583         by a conditional setting DYN_ADDR.  Use DYN_ADDR.
3584         * config/djgpp/fnchange.lst: Add translations for
3585         symbol-without-target_section.exp and symbol-without-target_section.c.
3586
3587 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
3588
3589         * gdbarch.sh: Set LANG and LC_ALL to C, not c.
3590         (remote_breakpoint_for_pc): Correct invalid_p check.
3591         * gdbarch.c: Regenerated.
3592
3593 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
3594
3595         * arm-tdep.c (arm_find_mapping_symbol): New function, from
3596         arm_pc_is_thumb.
3597         (arm_pc_is_thumb): Use arm_find_mapping_symbol.
3598         (extend_buffer_earlier): New function.
3599         (MAX_IT_BLOCK_PREFIX, IT_SCAN_THRESHOLD): New constants.
3600         (arm_adjust_breakpoint_address): New function.
3601         (arm_gdbarch_init): Register arm_adjust_breakpoint_address.
3602
3603 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
3604
3605         * arm-linux-tdep.c (arm_linux_thumb2_be_breakpoint)
3606         (arm_linux_thumb2_le_breakpoint): New constants.
3607         (arm_linux_init_abi): Set thumb2_breakpoint and
3608         thumb2_breakpoint_size.
3609         * arm-tdep.c (thumb_insn_size, thumb_advance_itstate): New functions.
3610         (thumb_get_next_pc): Add a comment.  Rename IT to ITSTATE.
3611         Implement support for single stepping through IT blocks if
3612         a 32-bit Thumb breakpoint instruction is available.
3613         (arm_breakpoint_from_pc): If a 32-bit Thumb breakpoint instruction
3614         is available, use it when needed.
3615         (arm_remote_breakpoint_from_pc): New function.
3616         (arm_gdbarch_init): Register arm_remote_breakpoint_from_pc.
3617         * arm-tdep.h (struct gdbarch_tdep): Correct thumb_breakpoint
3618         comment.  Add thumb2_breakpoint and thumb2_breakpoint_size.
3619
3620 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
3621
3622         * arch-utils.c (default_remote_breakpoint_from_pc): New function.
3623         * arch-utils.h (default_remote_breakpoint_from_pc): Declare.
3624         * gdbarch.c, gdbarch.h: Regenerated.
3625         * gdbarch.sh (remote_breakpoint_from_pc): New architecture method.
3626         * remote.c (remote_insert_breakpoint, remote_insert_hw_breakpoint): Use
3627         gdbarch_remote_breakpoint_from_pc.
3628
3629 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
3630
3631         * infrun.c (prepare_to_proceed): Handle other signals which might
3632         match a breakpoint.
3633         (handle_inferior_event): Move the check for unusual breakpoint
3634         signals earlier.
3635
3636 2010-01-29  Paul Hilfinger  <hilfinger@adacore.com>
3637
3638         amd64 - function returning record with field straddling 2 registers.
3639         * amd64-tdep.c (amd_classify_aggregate): Handle the case of
3640         a record of length <= 16 in which a field straddles the two
3641         eightbytes.
3642
3643 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
3644
3645         Implement return values on amd64-windows.
3646         * amd64-windows-tdep.c: #include gdbcore.h and regcache.h.
3647         (amd64_windows_return_value): New function.
3648         (amd64_windows_init_abi): Call set_gdbarch_return_value with
3649         amd64_windows_return_value.
3650
3651 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
3652
3653         amd64-windows: 32 bytes allocated on stack by caller for integer
3654         parameter registers.
3655         * i386-tdep.h (struct gdbarch_tdep): Add new field
3656         integer_param_regs_saved_in_caller_frame.
3657         * amd64-windows-tdep.c (amd64_windows_init_abi): Set
3658         tdep->integer_param_regs_saved_in_caller_frame to 1.
3659         * amd64-tdep.c (amd64_push_dummy_call): Allocate some memory on
3660         stack if tdep->integer_param_regs_saved_in_caller_frame is set.
3661
3662 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
3663
3664         amd64-windows: memory args passed by pointer during function calls.
3665         * i386-tdep.h (gdbarch_tdep): Add field memory_args_by_pointer.
3666         * amd64-tdep.c (amd64_push_arguments): Add handling of architectures
3667         where tdep->memory_args_by_pointer is non-zero.
3668         * amd64-windows-tdep.c (amd64_windows_init_abi): Set
3669         tdep->memory_args_by_pointer to 1.
3670
3671 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
3672
3673         amd64-windows: Integer parameters in function calls.
3674         * i386-tdep.h (enum amd64_reg_class): New, moved here from
3675         amd64-tdep.c.
3676         (struct gdbarch_tdep): Add fields call_dummy_num_integer_regs,
3677         call_dummy_integer_regs, and classify.
3678         * amd64-tdep.h (amd64_classify): Add declaration.
3679         * amd64-tdep.c (amd64_dummy_call_integer_regs): New static constant.
3680         (amd64_reg_class): Delete, moved to i386-tdep.h.
3681         (amd64_classify): Make non-static.  Move declaration to amd64-tdep.h.
3682         Replace call to amd64_classify by call to tdep->classify.
3683         (amd64_push_arguments): Get the list of registers to use for
3684         passing integer parameters from the gdbarch tdep structure,
3685         rather than using a hardcoded one.  Replace calls to amd64_classify
3686         by calls to tdep->classify.
3687         (amd64_push_dummy_call): Get the register number used for
3688         the "hidden" argument from tdep->call_dummy_integer_regs.
3689         (amd64_init_abi): Initialize tdep->call_dummy_num_integer_regs
3690         and tdep->call_dummy_integer_regs.  Set tdep->classify.
3691         * amd64-windows-tdep.c: Add include of gdbtypes.h.
3692         (amd64_windows_dummy_call_integer_regs): New static global.
3693         (amd64_windows_classify): New function.
3694         (amd64_windows_init_abi): Initialize tdep->call_dummy_num_integer_regs
3695         tdep->call_dummy_integer_regs and tdep->classify.
3696
3697 2010-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
3698
3699         * regcache.c (regcache_xmalloc): Add aspace argument.  Use it
3700         for the new regcache.  All callers updated.
3701         (regcache_cpy, regcache_cpy_no_passthrough): Do not set aspace here.
3702         (get_thread_arch_regcache): Do not set aspace here.
3703         * regcache.h (regcache_xmalloc): Update declaration.
3704
3705         * frame.c, infcall.c, ppc-linux-tdep.c: Calls to
3706         regcache_xmalloc updated.
3707
3708 2010-01-28  Joel Brobecker  <brobecker@adacore.com>
3709
3710         Another -Wunused-function error in procfs.c (sparc-solaris)
3711         * procfs.c (insert_dbx_link_breakpoint): Delete declaration.  Move up.
3712         Only define if SYS_syssgi is defined.
3713         (remove_dbx_link_breakpoint): Delete declaration.  Move up.
3714         (dbx_link_addr, insert_dbx_link_bpt_in_file)
3715         (insert_dbx_link_bpt_in_region): Move up.  Only define if SYS_syssgi
3716         is itself defined.
3717
3718 2010-01-27  Christopher Faylor  <me+cygwin@cgf.cx>
3719
3720         * windows-nat.c (windows_initialization_done): New variable.
3721         (get_windows_debug_event): Issue error when process dies before
3722         completely initializing.
3723         (do_initial_windows_stuff): Set flag to indicate when we are done with
3724         the initial steps of attaching to the child.
3725
3726 2010-01-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
3727
3728         * symtab.h (struct symbol <symtab>): New comment on NULL values.
3729
3730 2010-01-27  Doug Evans  <dje@google.com>
3731
3732         * solib-svr4.c (solib_break_names): Add __dl_rtld_db_dlactivity.
3733
3734         * breakpoint.c (bpstat_stop_status): Delete useless code.
3735
3736 2010-01-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
3737
3738         * printcmd.c (display_uses_solib_p): Remove variable section.  Access
3739         objfile via SYMBOL_SYMTAB.
3740
3741 2010-01-26  Tom Tromey  <tromey@redhat.com>
3742
3743         PR exp/7643:
3744         * eval.c (evaluate_subexp_for_address) <UNOP_IND>: Call
3745         coerce_array on result.
3746
3747 2010-01-26  Sami Wagiaalla  <swagiaal@redhat.com>
3748
3749         * cp-namespace.c (cp_lookup_symbol_namespace): Added
3750         search_parent argument.
3751         (cp_add_using): Initialize 'searched' field.
3752         (reset_directive_searched): New function.
3753         * cp-support.h: Add 'searched' field to using_direct struct.
3754         (cp_lookup_symbol_imports): Ditto.
3755         * cp-namespace.c (cp_lookup_symbol_imports): Ditto.
3756         Perform recursive search.
3757         Implement non parent search.
3758         * valops.c (value_maybe_namespace_elt): Updated.
3759
3760 2010-01-26  Sami Wagiaalla  <swagiaal@redhat.com>
3761
3762         PR gdb/10929:
3763         * dwarf2read.c (read_lexical_block_scope): Create blocks for
3764         scopes which contain using directives even if they contain no
3765         declarations.
3766         * symtab.c (lookup_symbol_aux): Pass lowest level block to
3767         la_lookup_symbol_nonlocal.
3768         * cp-namespace.c (cp_lookup_symbol_nonlocal): call
3769         cp_lookup_symbol_namespace.
3770         (cp_lookup_symbol_namespace): Perform an import lookup at every
3771         block level.
3772         (cp_lookup_symbol_imports): New function.
3773         (cp_lookup_symbol_in_namespace): New function.
3774
3775 2010-01-25  Tom Tromey  <tromey@redhat.com>
3776
3777         PR gdb/11049:
3778         * c-valprint.c (c_val_print): Fix test of extract_unsigned_integer
3779         result.
3780
3781 2010-01-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3782
3783         * configure.ac: Only use host_os part when disabling TUI on osf.
3784         Use test to check variables, prefix strings with x.
3785         * configure: Regenerate.
3786
3787         * solib-osf.c (osf_current_sos): Initialize tail.
3788
3789 2010-01-25  gingold  <gingold@adacore.com>
3790
3791         * windows-nat.c (windows_continue): Use %x to print thread id.
3792         (get_windows_debug_event): Ditto.
3793
3794 2010-01-22  Tom Tromey  <tromey@redhat.com>
3795
3796         PR symtab/11199:
3797         * dwarf2read.c (quirk_gcc_member_function_pointer): Change return
3798         type and arguments.  Use smash_to_methodptr_type.
3799         (read_structure_type): Call quirk_gcc_member_function_pointer
3800         later.
3801         * gdbtypes.h (smash_to_methodptr_type): Declare.
3802         * gdbtypes.c (smash_to_methodptr_type): New function.
3803         (lookup_methodptr_type): Use it.
3804
3805 2010-01-21  Tom Tromey  <tromey@redhat.com>
3806
3807         PR symtab/11198:
3808         * symtab.h (lookup_minimal_symbol_and_objfile): Declare.
3809         * minsyms.c (lookup_minimal_symbol_and_objfile): New function.
3810         * glibc-tdep.c (find_minsym_and_objfile): Remove.
3811         (glibc_skip_solib_resolver): Use
3812         lookup_minimal_symbol_and_objfile.
3813
3814 2010-01-21  Kai Tietz  <kai.tietz@onevision.com>
3815
3816         * inflow.c (check_syscall): Guard by #if clause for GO32 and
3817         WIN32 targets.
3818
3819 2010-01-20  Tom Tromey  <tromey@redhat.com>
3820
3821         PR backtrace/10770:
3822         * valarith.c (value_binop): Handle BINOP_GTR, BINOP_LEQ, and
3823         BINOP_GEQ.  Handle BINOP_NOTEQUAL in the signed case.
3824         * dwarf2expr.c (new_dwarf_expr_context): Allocate
3825         dwarf_stack_values, not CORE_ADDRs.
3826         (execute_stack_op): Change DW_OP_div and comparison operators to
3827         use signed operands.
3828
3829 2010-01-20  Vladimir Prus  <vladimir@codesourcery.com>
3830
3831         Per-inferior args and tty and environment.
3832
3833         * infcmd.c (inferior_args): Rename to ...
3834         (inferior_args_scratch): ... this.
3835         (inferior_io_terminal): Rename to ...
3836         (inferior_io_terminal_scratch): ... this.
3837         (inferior_argc, inferior_argv): Remove.
3838         (set_inferior_io_terminal, get_inferior_io_terminal): Store
3839         inside current_inferior().
3840         (set_inferior_tty_command, show_inferior_tty_command): New.
3841         (get_inferior_args, set_inferior_args): Store inside
3842         current_inferior().
3843         (notice_args_set): Likewise and rename to...
3844         (set_args_command): ... this.
3845         (set_inferior_args_vector): Likewise.
3846         (notice_args_read): Rename to...
3847         (show_args_command): ...new.
3848         (tty_command): Remove.
3849         (run_command_1): Don't free old args, as they are freed by
3850         set_inferior_arg now.
3851         (run_no_args_command): Likewise.
3852         (inferior_environ): Remove.
3853         (run_command_1): Use environment of the current inferior.
3854         (environment_info, set_environment_command)
3855         (unset_environment_command, path_info, path_command): Likewise.
3856         (_initialize_infcmd): Adjust for function and variable renames.
3857         Do not init inferior_environ.
3858         * inferior.h (set_inferior_arg): Adjust prototype.
3859         (struct inferior): New fields args, argc, argv, terminal, environment.
3860         (inferior_environ): Remove declaration.
3861         * inferior.c (free_inferior): Free new fields.
3862         (add_inferior_silent): Initialize 'environment' field.
3863         * main.c (captured_main): Set arguments only after the initial
3864         inferior has been created.  Set set_inferior_io_terminal,
3865         not tty_command.
3866         * mi/mi-main.c (mi_cmd_env_path): Use environment of the current
3867         inferior.
3868         (_initialize_mi_cmd_env): Adjust for disappearance of global
3869         inferior_environ.
3870         * solib.c (solib_find): Use environment of the current inferior.
3871
3872 2010-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
3873
3874         * varobj.c (varobj_add_child, install_dynamic_child): Wrap into #if
3875         HAVE_PYTHON.
3876         (instantiate_pretty_printer): Move HAVE_PYTHON outside of the function.
3877
3878 2010-01-20  Joel Brobecker  <brobecker@adacore.com>
3879
3880         Get rid of ada-lang.c:function_name_from_pc.
3881         * ada-lang.c: Add "stack.h" #include.
3882         (function_name_from_pc): Delete.
3883         (is_known_support_routine): Replace call to function_name_from_pc
3884         by call to find_frame_funname.
3885         (ada_unhandled_exception_name_addr_from_raise): Likewise.
3886
3887 2010-01-19  Tom Tromey  <tromey@redhat.com>
3888
3889         PR c++/11026:
3890         * dwarf2read.c (read_partial_die): Allocate partial DIE's name on
3891         objfile obstack.
3892
3893 2010-01-19  Tom Tromey  <tromey@redhat.com>
3894
3895         * top.c (stop_sig, float_handler, do_nothing): Remove.
3896
3897 2010-01-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3898
3899         * breakpoint.c (watchpoint_check): Check the call
3900         gdbarch_in_function_epilogue_p before calling frame_find_by_id.
3901         Extend the comment.
3902         * config/djgpp/fnchange.lst: Add translations for
3903         watchpoint-cond-gone.exp, watchpoint-cond-gone.c and
3904         watchpoint-cond-gone-stripped.c.
3905
3906 2010-01-19  Tom Tromey  <tromey@redhat.com>
3907
3908         PR c++/8000:
3909         * dwarf2read.c (partial_die_parent_scope): Put enumeration type
3910         into parent scope, and enumerator into grandparent scope.
3911
3912 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3913
3914         * NEWS: Add entry for "set/show ada trust-PAD-over-XVS" commands.
3915
3916 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3917
3918         * configure.host: Make x86_64-*-solaris2.1[0-9]* an alias of
3919         i[34567]86-*-solaris2.1[0-9]*.
3920         * configure.tgt: Likewise.
3921
3922 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3923
3924         * NEWS: Document the source command enhancement allowing it
3925         to load Python scripts. Document the "set/show script-extension"
3926         commands.
3927
3928 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3929
3930         Add -Wunused-function to compile flags.
3931         * configure.ac: Add -Wunused-function to build_warnings.
3932         * configure: Regenerate.
3933
3934 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3935
3936         "delete" ada-lex.c:input function, not used.
3937         * ada-lex.l: #define YY_NO_INPUT.
3938
3939 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3940
3941         Delete free_named_symtabs and associated cleanup.
3942         * symfile.h (free_named_symtabs): Delete declaration.
3943         * symfile.c: Remove some commented out code (clear_symtab_users_once).
3944         (cashier_psymtab): Comment function out.
3945         Delete declaration.
3946         (free_named_symtabs): Delete.
3947         * coffread.c (coff_end_symtab): Remove call to free_named_symtabs.
3948         * dbxread.c (end_psymtab): Likewise.
3949         * dwarf2read.c (process_psymtab_comp_unit): Ditto.
3950         * exec.c (exec_close_1): Ditto.
3951         * xcoffread.c (xcoff_end_psymtab): Likewise.
3952
3953 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3954
3955         * stack.c (print_block_frame_labels): Comment function out.
3956
3957 2010-01-19  Joel Brobecker  <brobecker@adacore.com>
3958
3959         Delete unused or undefined functions.
3960         * breakpoint.c (ep_parse_optional_filename): Delete.
3961         * dcache.c (dcache_write_line): Remove declaration.
3962         * infrun.c (build_infrun): Remove declaration.
3963         * tracepoint.c (tracepoint_save_command): Remove declaration.
3964         * linux-nat.c (init_lwp_list): Delete. No longer used.
3965         * event-loop.c (check_async_signal_handlers): Delete declaration.
3966         * infrun.c (init_execution_control_state): Delete.
3967         (proceed): Update comment to avoid mentioning
3968         init_execution_control_state.
3969         * target.c (kill_or_be_killed, nosupport_runtime): Delete.
3970         * ada-lang.c (ada_to_static_fixed_value): Delete.
3971         * scm-lang.c (evaluate_subexp_scm): Delete declaration.
3972         * cp-namespace.c (cp_copy_usings): Delete.
3973         * xml-syscall.c (xml_number_of_syscalls): Delete.
3974         * progspace.c (find_program_space_by_num): Delete.
3975         * inflow.c (handle_sigio): Delete declaration.
3976         * hppa-tdep.c (hppa_alignof): Delete.
3977         * mipsnbsd-tdep.c (mipsnbsd_sigtramp_offset)
3978         (mipsnbsd_core_osabi_sniffer): Delete.
3979
3980 2010-01-18  Tom Tromey  <tromey@redhat.com>
3981
3982         PR c++/9680:
3983         * c-exp.y (REINTERPRET_CAST, DYNAMIC_CAST, STATIC_CAST)
3984         (CONST_CAST): New tokens.
3985         (exp): Add new productions.
3986         (ident_tokens): Add const_cast, dynamic_cast, static_cast, and
3987         reinterpret_cast.
3988         (is_cast_operator): New function.
3989         (yylex): Handle cast operators specially.
3990         * eval.c (evaluate_subexp_standard) <UNOP_DYNAMIC_CAST,
3991         UNOP_REINTERPRET_CAST>: New cases.
3992         * expprint.c (print_subexp_standard): Likewise.
3993         (op_name_standard): Likewise.
3994         (dump_subexp_body_standard): Likewise.
3995         * parse.c (operator_length_standard): Likewise.
3996         * expression.h (enum exp_opcode): New constants UNOP_DYNAMIC_CAST,
3997         UNOP_REINTERPRET_CAST.
3998         * gdbtypes.c (class_types_same_p): New function.
3999         (is_ancestor): Use it.
4000         (is_public_ancestor): New function.
4001         (is_unique_ancestor_worker): Likewise.
4002         (is_unique_ancestor): Likewise.
4003         * gdbtypes.h (class_types_same_p, is_public_ancestor)
4004         (is_unique_ancestor): Declare.
4005         * valops.c (value_reinterpret_cast): New function.
4006         (dynamic_cast_check_1): Likewise.
4007         (dynamic_cast_check_2): Likewise.
4008         (value_dynamic_cast): Likewise.
4009         * value.h (value_reinterpret_cast, value_dynamic_cast): Declare.
4010
4011 2010-01-18  Joel Brobecker  <brobecker@adacore.com>
4012
4013         Fix build failure when building without Python support.
4014         * python/python.c: Always include exceptions.h, even when HAVE_PYTHON
4015         is not defined.
4016
4017 2010-01-18  Joel Brobecker  <brobecker@adacore.com>
4018
4019         Use XVS field type instead of doing a parallel lookup.
4020         * ada-lang.c (ada_get_base_type): Follow the XVS field type
4021         if it is a reference type instead of doing a type lookup using
4022         the XVS field name.
4023
4024 2010-01-18  Joel Brobecker  <brobecker@adacore.com>
4025
4026         Trust PAD types instead of using PAD___XVS.
4027         * ada-lang.c (trust_pad_over_xvs): New static variable.
4028         (ada_is_aligner_type): If !trust_pad_over_xvs and there is a
4029         parallel XVS type, follow the XVS type instead of the PAD type.
4030         (unwrap_value): Make sure that there is no parallel XVE type
4031         before returning the value as is.
4032         (set_ada_list, show_ada_list): New static variables.
4033         (set_ada_command, show_ada_command): New functions.
4034         (_initialize_ada_language): Add new "set/show ada" prefix commands.
4035         Add new "set/show ada trust-PAD-over-XVS" setting.
4036
4037 2010-01-18  Tom Tromey  <tromey@redhat.com>
4038             Thiago Jung Bauermann  <bauerman@br.ibm.com>
4039
4040         Allow "source" to load python scripts.
4041         * exceptions.h (enum errors): Add UNSUPPORTED_ERROR.
4042         * python/python.c (source_python_script): New function.
4043         * python/python.h (source_python_script): Add declaration.
4044         * cli/cli-cmds.c: #include exceptions.h and python/python.h.
4045         (script_ext_off, script_ext_soft, script_ext_strict)
4046         (script_ext_enums, script_ext_mode): New static constants.
4047         (show_script_ext_mode, find_and_open_script): New functions.
4048         (source_script): Enhance to handle Python scripts.
4049         (init_cli_cmds): Add set/show script-extension commands.
4050
4051 2010-01-16  Stan Shebs  <stan@codesourcery.com>
4052
4053         * tracepoint.h (struct trace_status): Use unsigned long long
4054         instead of size_t.
4055         * tracepoint.c (trace_status_command): Fix printf directive.
4056         (trace_save_command): Check fwrite returns, fix printf directive.
4057         (trace_filename): New global.
4058         (tfile_open): Set it, check read returns.
4059         (tfile_close): Free trace_filename.
4060         (tfile_get_traceframe_address): Check read returns.
4061         (tfile_trace_find): Ditto.
4062         (tfile_fetch_registers): Ditto.
4063         (tfile_xfer_partial): Ditto.
4064         (tfile_get_trace_state_variable_value): Ditto.
4065
4066 2010-01-15  Stan Shebs  <stan@codesourcery.com>
4067
4068         Add trace file support.
4069         * tracepoint.h (enum trace_stop_reason): New enum.
4070         (struct trace_status): New struct.
4071         (parse_trace_status): Declare.
4072         (struct uploaded_tp): Move here from remote.c,
4073         add fields for actions.
4074         (struct uploaded_tsv): New struct.
4075         * tracepoint.c (tfile_ops): New target vector.
4076         (trace_fd): New global.
4077         (tfile_open): New function.
4078         (tfile_close): New function.
4079         (tfile_files_info): New function.
4080         (tfile_get_trace_status): New function.
4081         (tfile_get_traceframe_address): New function.
4082         (tfile_trace_find): New function.
4083         (tfile_fetch_registers): New function.
4084         (tfile_xfer_partial): New function.
4085         (tfile_get_trace_state_variable_value): New function.
4086         (init_tfile_ops): New function.
4087         (_initialize_tracepoint): Call it, add tfile target.
4088         (trace_status): New global.
4089         (current_trace_status): New function.
4090         (trace_running_p): Remove, change all users to get from
4091         current_trace_status()->running.
4092         (get_trace_status): Remove.
4093         (trace_status_command): Call target_get_trace_status directly,
4094         report more detail including tracing stop reasons.
4095         (trace_find_command): Always allow tfind on a file.
4096         (trace_find_pc_command): Ditto.
4097         (trace_find_tracepoint_command): Ditto.
4098         (trace_find_line_command): Ditto.
4099         (trace_find_range_command): Ditto.
4100         (trace_find_outside_command): Ditto.
4101         (trace_frames_offset, cur_offset): Declare as off_t.
4102         (trace_regblock_size): Rename from reg_size, update users.
4103         (parse_trace_status): New function.
4104         (tfile_interp_line): New function.
4105         (disconnect_or_stop_tracing): Ensure current trace
4106         status before asking what to do.
4107         (stop_reason_names): New global.
4108         (trace_save_command): New command.
4109         (get_uploaded_tp): Move here from remote.c.
4110         (find_matching_tracepoint): Ditto.
4111         (merge_uploaded_tracepoints): New function.
4112         (parse_trace_status): Use stop_reason_names.
4113         (_initialize_tracepoint): Define tsave command.
4114         * target.h (target_ops): New fields to_save_trace_data,
4115         to_upload_tracepoints, to_upload_trace_state_variables,
4116         to_get_raw_trace_data, change to_get_trace_status
4117         to take a pointer to a status struct.
4118         (target_save_trace_data): New macro.
4119         (target_upload_tracepoints): New macro.
4120         (target_upload_trace_state_variables): New macro.
4121         (target_get_raw_trace_data): New macro.
4122         * target.c (update_current_target): Add new methods, change
4123         signature of to_get_trace_status.
4124         * remote.c (hex2bin): Make globally visible.
4125         (bin2hex): Ditto.
4126         (remote_download_trace_state_variable): Download name also.
4127         (remote_get_trace_status): Update parameter, use
4128         parse_trace_status.
4129         (remote_save_trace_data): New function.
4130         (remote_upload_tracepoints): New function.
4131         (remote_upload_trace_state_variables): New function.
4132         (remote_get_raw_trace_data): New function.
4133         (remote_start_remote): Use them.
4134         (_initialize_remote_ops): Add operations.
4135         * ax-gdb.c: Include breakpoint.h.
4136         * breakpoint.c (create_tracepoint_from_upload): Use
4137         break_command_really, return tracepoint, warn about unimplemented
4138         parts.
4139         * NEWS: Mention trace file addition.
4140
4141 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4142
4143         Fix compilation warning on gcc-3.4.
4144         * exec.c (print_section_info): Move the `displacement' variable
4145         initialization to its declaration.
4146
4147 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4148
4149         * gdb-gdb.py (StructMainTypePrettyPrinter): Fix TYPE_CODE_RANGE
4150         comparison.
4151
4152 2010-01-15  Eric Botcazou  <botcazou@adacore.com>
4153
4154         "info tasks" broken by typedefs in ATCB type definitions.
4155         * ada-lang.c (ada_template_to_fixed_record_type_1): Add call to
4156         ada_check_typedef before retrieving the length of the type for
4157         regular fields.
4158
4159 2010-01-15  Joel Brobecker  <brobecker@adacore.com>
4160
4161         Do not use name-based lookup for unconstrained packed arrays.
4162         * ada-lang.c (find_parallel_type_by_descriptive_type):
4163         Limit the fallback to name-based lookups to the case where
4164         the type is a constrained packed array.
4165
4166 2010-01-15  Joel Brobecker  <brobecker@adacore.com>
4167
4168         Enhance gdb-gdb.py to handle main_type.type_specific.
4169         * gdb-gdb.py: Print the type-specific part of struct main_type.
4170
4171 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
4172
4173         * configure.ac (AC_CHECK_FUNCS): Check for setrlimit and getrlimit.
4174         * configure: Regenerate.
4175         * config.in: Regenerate.
4176         * utils.c: Include sys/resource.h.
4177         (dump_core, can_dump_core): New.
4178         (internal_vproblem): Update the comment.  Check can_dump_core while
4179         setting dump_core_p.  Replace two abort calls by dump_core calls.
4180
4181 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4182             Eli Zaretskii  <eliz@gnu.org>
4183
4184         * NEWS: Document the PIE support.
4185
4186 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4187
4188         * linux-tdep.c: Remove includes gdbcore.h, observer.h and elf-bfd.h.
4189         (check_is_pie_binary, _initialize_linux_tdep): Remove.
4190
4191 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4192
4193         * solib-svr4.c (svr4_exec_displacement): New comment for entry_point.
4194         Replace exec_entry_point call by bfd_get_start_address.
4195
4196 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4197
4198         Support Valgrind attachments broken by the PIE support.
4199         * auxv.c: Include gdbcore.h.
4200         (procfs_xfer_auxv): Make static.  Reduce its comment.  Drop its
4201         parameters ops, object and annex.  Remove their assertions.
4202         (ld_so_xfer_auxv, memory_xfer_auxv): New function.
4203         * auxv.h (procfs_xfer_auxv): Remove comment.  Rename to ...
4204         (memory_xfer_auxv): ... here.
4205         * linux-nat.c (linux_xfer_partial): Rename procfs_xfer_auxv to
4206         memory_xfer_auxv.
4207         * procfs.c (procfs_xfer_partial): Likewise.
4208         * solib-svr4.c (svr4_relocate_main_executable): New prototype.
4209         (svr4_special_symbol_handling): Call svr4_relocate_main_executable.
4210         (svr4_solib_create_inferior_hook): Conditionalize the
4211         svr4_relocate_main_executable call.
4212
4213 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4214
4215         * solib-svr4.c (scan_dyntag): Remove variable dyn_addr.  New variable
4216         target_section.  Find SECT in current_target_sections, gdb_assert it.
4217         (elf_lookup_lib_symbol): Pass the binary file if given symfile_objfile.
4218         New variable abfd.
4219         * symtab.c (lookup_objfile_from_block): Return the binary file instead
4220         of separate debug info file.
4221
4222 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4223
4224         Support PIEs with no symfile_objfile.
4225         * exec.c (print_section_info <abfd == exec_bfd>): Relocate Entry point.
4226         * solib-svr4.c (svr4_relocate_main_executable <exec_bfd>): New block.
4227
4228 2010-01-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
4229
4230         * solib-svr4.c (svr4_relocate_main_executable): Move the static exec
4231         code part to ...
4232         (svr4_static_exec_displacement): ... a new function.
4233         (svr4_exec_displacement): New function.
4234         (svr4_relocate_main_executable): Call svr4_exec_displacement.  Allocate
4235         new_offsets using alloca now.  Remove variable old_chain and changed.
4236         Call objfile_relocate unconditionally now.
4237
4238 2010-01-14  Doug Evans  <dje@google.com>
4239
4240         * gdbtypes.c (arch_flags_type): Fix comment.
4241         * gdbtypes.h (arch_composite_type): Fix comment.
4242
4243 2009-01-14  Tristan Gingold  <gingold@adacore.com>
4244
4245         * machoread.c (macho_add_oso_symfile): Add symfile_flags parameter.
4246         Call xstrdup for abfd->filename.  Pass symfile_flags and objfile flags
4247         to symbol_file_add_from_bfd.  Add OSO as separate objfile.
4248         (macho_oso_symfile): Add symfile_flags parameter.  Pass it to
4249         macho_add_oso_symfile.
4250         (macho_symfile_read): Pass symfile_flags to macho_oso_symfile.
4251
4252 2010-01-14  Joel Brobecker  <brobecker@adacore.com>
4253
4254         Tru64: Dead threads are never deleted.
4255         * dec-thread.c (dec_thread_ptid_is_alive): New function.
4256         (dec_thread_count_gdb_threads): Fix counter increment.
4257         (dec_thread_add_gdb_thread): Fix *listp increment.
4258         (resync_thread_list): Fix bug in deletion of dead threads that
4259         caused all threads to be deleted, instead of just the dead ones.
4260
4261 2010-01-13  Phil Muldoon  <pmuldoon@redhat.com>
4262
4263         PR python/10705
4264
4265         * python/python-internal.h: Add lazy_string_object_type
4266         definition.
4267         (create_lazy_string_object, gdbpy_initialize_lazy_string)
4268         (gdbpy_is_lazystring, gdbpy_extract_lazy_string): Define.
4269         * python/py-value.c (valpy_lazy_string): New function.
4270         (convert_value_from_python): Add lazy string conversion.
4271         * python/py-prettyprint.c (pretty_print_one_value): Check if
4272         return is also a lazy string.
4273         (print_string_repr): Add lazy string printing branch.
4274         (print_children): Likewise.
4275         * python/py-lazy-string.c: New file. Implement lazy strings.
4276         * python/python.c (_initialize_python): Call
4277         gdbpy_initialize_lazy_string.
4278         * varobj.c (value_get_print_value): Add lazy string printing
4279         branch.  Account for encoding.
4280         * c-lang.c (c_printstr): Account for new encoding argument.  If
4281         encoding is NULL, find encoding suited for type, otherwise use
4282         user encoding.
4283         * language.h (language_defn): Add encoding argument.
4284         (LA_PRINT_STRING): Likewise.
4285         * language.c (unk_lang_printstr): Update to reflect new encoding
4286         argument to language_defn.
4287         * ada-lang.h (ada_printstr): Likewise.
4288         * c-lang.h (c_printstr): Likewise.
4289         * p-lang.h (pascal_printstr);
4290         * f-lang.c (f_printstr): Likewise.
4291         * m2-lang.c (m2_printstr): Likewise.
4292         * objc-lang.c (objc_printstr): Likewise.
4293         * p-lang.c (pascal_printstr): Likewise.
4294         * scm-lang.c (scm_printstr): Likewise.
4295         * c-valprint.c (c_val_print): Update LA_PRINT_STRING call for
4296         encoding argument.
4297         * ada-valprint.c (ada_printstr): Likewise.
4298         * f-valprint.c (f_val_print): Likewise
4299         * m2-valprint.c (m2_val_print): Likewise.
4300         * p-valprint.c (pascal_val_print): Likewise.
4301         * expprint.c (print_subexp_standard): Likewise.
4302         * valprint.c (val_print_string): Likewise.
4303         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-lazy-string.
4304         (SUBDIR_PYTHON_SRCS): Likewise.
4305         (py-lazy-string.o): New rule.
4306
4307 2010-01-13  Doug Evans  <dje@google.com>
4308
4309         * mi/mi-main.c (list_available_thread_groups): Avoid "may be used
4310         uninitialized" warning from gcc on local `tree'.
4311
4312 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
4313
4314         Implement core awareness.
4315
4316         * bcache.c (compare_ints): Remove
4317         (print_percentage): Use compare_positive_ints.
4318         * defs.h (compare_positive_ints): Declare.
4319         * linux-nat.h (struct lin_lwp): New field core.
4320         (linux_nat_core_of_thread_1): Declare.
4321         * linux-nat.c (add_lwp): Init the 'core' field.
4322         (linux_nat_wait_1): Record the core.
4323         (linux_nat_core_of_thread_1, linux_nat_core_of_thread): New.
4324         (linux_nat_add_target): Register the above.
4325         * linux-thread-db.c (update_thread_core): New.
4326         (thread_db_find_new_threads): Update core information for
4327         every thread.
4328         * remote.c (struct private_thread_info): New.
4329         (free_private_thread_info, demand_private_info): New.
4330         (PACKET_qXfer_threads, use_osdata_threads): New.
4331         (struct thread_item, threads_parsing_context
4332         (start_thread, end_thread, thread_attributes)
4333         (thread_children, threads_children, threads_elements): New.
4334         (remote_threads_info): Try qXfer:threads before anything
4335         else.
4336         (remote_protocol_packets): Register qXfer:threads.
4337         (remote_open_1): Init use_osdata_threads.
4338         (struct stop_reply): New field 'core'.
4339         (remote_parse_stop_reply): Parse core number.
4340         (process_stop_reply): Record core number.
4341         (remote_xfer_partial): Handle qXfer:threads.
4342         (remote_core_of_thread): New.
4343         (init_remote_ops): Register remote_core_of_thread.
4344         (_initialize_remote): Register qXfer:read.
4345         * target.c (target_core_of_thread): New
4346         * target.h (enum target_object): New value TARGET_OBJECT_THREADS.
4347         (struct target_ops): New field to_core_of_threads.
4348         (target_core_of_thread): Declare.
4349         * gdbthread.h (struct thread_info): New field private_dtor.
4350         * thread.c (print_thread_info): Report the core.
4351         * ui-out.c (MAX_UI_OUT_LEVELS): Increase.
4352         * utils.c (compare_positive_ints): New.
4353         * features/threads.dtd: New.
4354         * mi/mi-interp.c (mi_on_normal_stop): Report the core.
4355         * mi/mi-main.c (struct collect_cores_data, collect_cores)
4356         (do_nothing, free_vector_of_osdata_items)
4357         (splay_tree_int_comparator, free_splay_tree): New.
4358         (print_one_inferior_data): Implemented printing of selected
4359         inferiors.  Collect and print cores.
4360         (output_cores): New.
4361         (mi_cmd_list_thread_groups): Support --recurse.  Permit specifying
4362         thread groups together with --available.
4363
4364 2010-01-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
4365
4366         * configure: Regenerate (for _STRUCTURED_PROC).
4367
4368 2010-01-12  Joel Brobecker  <brobecker@adacore.com>
4369
4370         Delete dead function.
4371         * ada-lang.c (extract_string): Delete.  No longer used.
4372
4373 2010-01-12  Joel Brobecker  <brobecker@adacore.com>
4374
4375         Fix -Wunused warning in dec-thread.c.
4376         * dec-thread.c (dec_thread_count_gdb_threads)
4377         (dec_thread_add_gdb_thread): Prevent -Wunused warning.
4378
4379 2010-01-12  Joel Brobecker  <brobecker@adacore.com>
4380
4381         * ada-valprint.c (ada_print_floating): Remove trailing space.
4382
4383 2010-01-12  Joel Brobecker  <brobecker@adacore.com>
4384
4385         Add support for DW_AT_GNAT_descriptive_type.
4386         * gdbtypes.h (enum type_specific_kind): New enum.
4387         (struct main_type) [type_specific_field]: New component.
4388         [type_specific]: Add new component "gnat_stuff".
4389         (struct gnat_aux_type): New type.
4390         (INIT_CPLUS_SPECIFIC): Also set TYPE_SPECIFIC_FIELD (type).
4391         (HAVE_CPLUS_STRUCT): Also check TYPE_SPECIFIC_FIELD (type).
4392         (gnat_aux_default, allocate_gnat_aux_type): Add declaration.
4393         (INIT_GNAT_SPECIFIC, ALLOCATE_GNAT_AUX_TYPE, HAVE_GNAT_AUX_INFO)
4394         (TYPE_SPECIFIC_FIELD): New macros.
4395         (TYPE_CPLUS_SPECIFIC): Return cplus_struct_default if the given
4396         type does not hold any cplus-specific data.
4397         (TYPE_RAW_CPLUS_SPECIFIC): New macro.
4398         (TYPE_GNAT_SPECIFIC, TYPE_DESCRIPTIVE_TYPE): New macros.
4399         (TYPE_IS_OPAQUE): Use HAVE_CPLUS_STRUCT to check if type has
4400         cplus-specific data.
4401         * gdbtypes.c (allocate_cplus_struct_type): Minor stylistic rewrite.
4402         Set new component TYPE_SPECIFIC_FIELD (type).
4403         (gnat_aux_default): New constant.
4404         (allocate_gnat_aux_type): New function.
4405         (init_type): Add initialization the type-specific stuff for
4406         TYPE_CODE_FLT and TYPE_CODE_FUNC types.
4407         (print_gnat_stuff): New function.
4408         (recursive_dump_type): Use HAVE_CPLUS_STRUCT to check for cplus-
4409         specific data.  Adjust code that prints the contents of the
4410         type-specific union using the TYPE_SPECIFIC_FIELD value.
4411         * dwarf2read.c (dwarf2_attach_fields_to_type): Do not allocate
4412         the type cplus stuff for Ada types.
4413         (dwarf2_add_member_fn, dwarf2_attach_fn_fields_to_type):
4414         Error out if these routines are called with an Ada type.
4415         (read_structure_type, read_array_type, read_subrange_type):
4416         Add call to set_descriptive_type.
4417         (set_die_type): Initialize the gnat-specific data if necessary.
4418         (need_gnat_info, die_descriptive_type, set_descriptive_type):
4419         New functions.
4420         * ada-lang.c (decode_constrained_packed_array_type): Use
4421         decode_constrained_packed_array_type instead of doing a standard
4422         lookup to locate a parallel type.
4423         (find_parallel_type_by_descriptive_type): New function.
4424         (ada_find_parallel_type_with_name): New function.
4425         (ada_find_parallel_type): Reimplement using
4426         ada_find_parallel_type_with_name.
4427         * ada-valprint.c (print_field_values): Use HAVE_CPLUS_STRUCT
4428         to check if type has a cplus stuff.
4429         * linespec.c (total_number_of_methods): Likewise.
4430         * mdebugread.c (new_type): Likewise.
4431
4432 2010-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
4433
4434         * NEWS: Document the 0b binary number prefix parsing.
4435
4436 2010-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
4437
4438         * objfiles.c (objfile_relocate1): Change the return type to int.
4439         Describe the new return value.  Return non-zero if data changed.
4440         (objfile_relocate): New variable changed.  Set it.  Call
4441         breakpoint_re_set depending on CHANGED.
4442
4443 2010-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
4444
4445         Implement binary numbers parsing.
4446         * c-exp.y (parse_number): New case 'b' and 'B'.
4447
4448 2010-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
4449             Tristan Gingold  <gingold@adacore.com>
4450
4451         * solib.c (info_sharedlibrary_command): Replace
4452         objfile_has_partial_symbols and objfile_has_full_symbols calls by
4453         objfile_has_symbols.
4454
4455 2010-01-10  Joel Brobecker  <brobecker@adacore.com>
4456
4457         * NEWS: Document the improvements made to the mips-irix port.
4458
4459 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4460
4461         Fix the documentation of valprint.c:value_print.
4462         * valprint.c (value_print): Update the function description to
4463         mention that the syntax of the output follows the current_language,
4464         not necessarily C.
4465
4466 2010-01-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4467
4468         Fix displacement of separate debug info files.
4469         * objfiles.c (objfile_relocate): Rename to ...
4470         (objfile_relocate1): ... here and make it static.  Extend the comment.
4471         (objfile_relocate): New function.
4472         * solib-spu.c (spu_relocate_main_executable): Explicitly check if
4473         SYMFILE_OBJFILE is NULL.  Remove variables objfile and old_chain.
4474         Remove following of SEPARATE_DEBUG_OBJFILE.  new_offsets is now
4475         allocated using alloca.
4476         * symfile.c (copy_section_addr_info): Remove.
4477         (build_section_addr_info_from_objfile): Make it global.  New variables
4478         addr_bit and mask, use them.
4479         * symfile.h (build_section_addr_info_from_objfile): New prototype.
4480         (copy_section_addr_info): Remove.
4481
4482 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4483
4484         Signal unwinder for mips-irix N32.
4485         * mips-irix-tdep.c: #include mips-tdep.h, trad-frame.h, and
4486         tramp-frame.h.
4487         (SIGTRAMP_FRAME_SIZE, SIGCONTEXT_PC_OFF, SIGCONTEXT_REGS_OFF)
4488         (SIGCONTEXT_FPREGS_OFF, SIGCONTEXT_FPCSR_OFF, SIGCONTEXT_HI_OFF)
4489         (SIGCONTEXT_LO_OFF): New macros.
4490         (mips_irix_n32_tramp_frame_init): New function.
4491         (mips_irix_n32_tramp_frame): New static constant.
4492         (mips_irix_init_abi): Prepend the mips_irix_n32_tramp_frame unwinder.
4493
4494 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4495
4496         Breakpoint in shared library does not work on mips-irix.
4497         * procfs.c: #include "observer.h".
4498         (procfs_inferior_created): New function, moving here the code
4499         which unsets the syssgi syscall-exit notifications.
4500         (procfs_create_inferior): Remove the code which unsets the syssgi
4501         syscall-exit notifications. It is too early to do this here.
4502         (_initialize_procfs): Attach the procfs_inferior_created observer.
4503
4504 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4505
4506         Wrong return convention for arrays (mips-irix).
4507         * mips-tdep.c (mips_n32n64_return_value): Arrays whose size is
4508         128 bits or smaller are returned the same way as structs
4509         and unions of the the same size.
4510
4511 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4512
4513         Cannot set the PC on mips-irix.
4514         * irix5-nat.c (fill_gregset): Check regno against the raw PC
4515         register number, no the cooked one.
4516
4517 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4518
4519         Error while loading core file on mips-irix.
4520         * solib-irix.c (irix_solib_create_inferior_hook): Do nothing
4521         if debugging from a core file.
4522
4523 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4524
4525         GDB hangs when attaching to process on mips-irix.
4526         * solib-irix.c (irix_solib_create_inferior_hook): Do nothing if
4527         attaching to a process.
4528
4529 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4530
4531         Use the correct breakpoint instruction on mips-irix.
4532         * mips-tdep.c (mips_breakpoint_from_pc): Add new static variable
4533         containing the correct breakpoint instruction to use on mips-irix.
4534         Use it when the osabi is GDB_OSABI_IRIX.
4535
4536 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4537
4538         -Wunused warning in procfs.c (mips-irix only).
4539         * procfs.c (gdb_praddset, gdb_prdelset): New macros.  Use them
4540         throughout instead of using praddset and prdelset respectively.
4541
4542 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4543
4544         GDB crash while stepping into function.
4545         * infrun.c (handle_inferior_event): Refetch the current frame
4546         after handling what.main_action, in case that pointer became
4547         dangling.
4548
4549 2010-01-09  Joel Brobecker  <brobecker@adacore.com>
4550
4551         Fix build failure of solaris-hosted cross debuggers.
4552         * ada-valprint.c, parse.c: Include defs.h before including ctype.h.
4553
4554 2010-01-09  Daniel Gutson  <dgutson@codesourcery.com>
4555
4556         Fix build failure on sparc-solaris.
4557         * procfs.c: (procfs_do_thread_registers) Use elfcore_write_lwpstatus.
4558
4559 2010-01-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
4560
4561         Move some symfile code into subroutines.
4562         * symfile.h (relative_addr_info_to_section_offsets)
4563         (addr_info_make_relative): New prototypes.
4564         * symfile.c (default_symfile_offsets): Move a part to ...
4565         (relative_addr_info_to_section_offsets): ... this new function.
4566         (default_symfile_offsets): Call it.
4567         (syms_from_objfile <!mainline && addrs && addrs->other[0].name>): Move
4568         this part to ...
4569         (addr_info_make_relative): ... this new function.
4570
4571 2010-01-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
4572
4573         Add from_tty to solib_create_inferior_hook.
4574         * infcmd.c (post_create_inferior): Move solib_add after
4575         solib_create_inferior_hook.  Pass from_tty to
4576         solib_create_inferior_hook.  Call solib_add and SOLIB_ADD with
4577         0 from_tty and comment why.
4578         * infrun.c (follow_exec): Pass from_tty solib_create_inferior_hook as 0.
4579         * linux-nat.c (linux_child_follow_fork): Likewise.
4580         * nto-procfs.c (procfs_post_attach, procfs_create_inferior): Likewise.
4581         * solib-darwin.c (darwin_solib_create_inferior_hook): New parameter
4582         from_tty.
4583         * solib-frv.c (frv_solib_create_inferior_hook): Likewise.
4584         * solib-irix.c (irix_solib_create_inferior_hook): Likewise.
4585         * solib-null.c (null_solib_create_inferior_hook): Likewise.
4586         * solib-osf.c (osf_solib_create_inferior_hook): Likewise.
4587         * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
4588         * solib-som.c (som_solib_create_inferior_hook): Likewise.
4589         * solib-spu.c (spu_solib_create_inferior_hook): New parameter from_tty.
4590         Pass it to svr4_so_ops.solib_create_inferior_hook.
4591         * solib-sunos.c (sunos_solib_create_inferior_hook): New parameter
4592         from_tty.
4593         * solib-svr4.c (enable_break): New parameter from_tty.  Pass it to
4594         solib_add.
4595         (svr4_solib_create_inferior_hook): New parameter from_tty.  Pass it to
4596         enable_break.
4597         * solib-target.c (solib_target_solib_create_inferior_hook): New
4598         parameter from_tty.
4599         * solib.c (solib_create_inferior_hook): New parameter from_tty.  Pass
4600         it to ops->solib_create_inferior_hook.
4601         (reload_shared_libraries): Pass from_tty to solib_create_inferior_hook.
4602         Move solib_add after solib_create_inferior_hook, call it now with
4603         from_tty as 0.  New comment there.
4604         * solib.h (solib_create_inferior_hook): New parameter from_tty.
4605         * solist.h (struct target_so_ops <solib_create_inferior_hook>):
4606         Likewise.
4607
4608 2010-01-08  Vladimir Prus  <vladimir@codesourcery.com>
4609
4610         Fix multiexec race.
4611         * infrun.c (handle_inferior_event): Use get_thread_regcache
4612         with events ptid, not get_current_regcache.
4613
4614 2009-01-08  Joel Brobecker  <brobecker@adacore.com>
4615
4616         GDB crash with empty executable name (MinGW).
4617         * source.c (openp): Add assert that parameter string is not NULL.
4618         if parameter string is an empty string, then return with a failure
4619         immediately.
4620
4621 2009-01-08  Joel Brobecker  <brobecker@adacore.com>
4622
4623         Get rid of support for VAX Floats.
4624         * ada-lang.h (ada_is_vax_floating_type, ada_vax_float_type_suffix)
4625         (ada_vax_float_print_function): Delete.
4626         * ada-lang.c (ada_is_vax_floating_type, ada_vax_float_type_suffix)
4627         (ada_vax_float_print_function): Delete.
4628         * ada-typeprint.c (print_vax_floating_point_type): Delete.
4629         (ada_print_type): Remove support for VAX floats.
4630         * ada-valprint.c (ada_val_print_1): Remove support for VAX floats.
4631
4632 2010-01-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
4633
4634         * stabsread.c (read_args): Handle zero arguments.
4635
4636 2009-01-08  Joel Brobecker  <brobecker@adacore.com>
4637
4638         Cannot find in-tree libiconv.a after reconfigure.
4639         * acinclude.m4 (AM_ICONV): If we find an in-tree libiconv.a
4640         that we can use, then cache the path to this archive.
4641         * configure: Regenerate.
4642
4643 2010-01-07  Stan Shebs  <stan@codesourcery.com>
4644
4645         Make tracepoint operations go through target vector.
4646         * target.h (enum trace_find_type): New enum.
4647         (struct target_ops): New fields to_trace_init,
4648         to_download_tracepoint, to_download_trace_state_variable,
4649         to_trace_set_readonly_regions, to_trace_start, to_get_trace_status,
4650         to_trace_stop, to_trace_find, to_get_trace_state_variable_value,
4651         to_set_disconnected_tracing.
4652         (target_trace_init): New macro.
4653         (target_download_tracepoint): New macro.
4654         (target_download_trace_state_variable): New macro.
4655         (target_trace_start): New macro.
4656         (target_trace_set_readonly_regions): New macro.
4657         (target_get_trace_status): New macro.
4658         (target_trace_stop): New macro.
4659         (target_trace_find): New macro.
4660         (target_get_trace_state_variable_value): New macro.
4661         (target_set_disconnected_tracing): New macro.
4662         * target.c (update_current_target): Inherit and set defaults for
4663         tracepoint operations.
4664         * tracepoint.c (default_collect): Make globally visible.
4665         (target_is_remote): Remove, along with all calls.
4666         (tvariables_info): Call target_get_trace_state_variable_value.
4667         (remote_set_transparent_ranges): Remove.
4668         (trace_start_command): Call target_trace_init,
4669         target_download_tracepoint, etc.
4670         (download_tracepoint): Remove.
4671         (trace_stop_command): Simplify.
4672         (stop_tracing): Call target_trace_stop.
4673         (get_trace_status): Call target_get_trace_status.
4674         (trace_status_command): Add case for targets that cannot trace.
4675         (finish_tfind_command): Change to take numerical arguments, call
4676         target_trace_find.
4677         (trace_find_command): Update call to finish_tfind_command.
4678         (trace_find_pc_command): Ditto.
4679         (trace_find_tracepoint_command): Ditto.
4680         (trace_find_line_command): Ditto.
4681         (trace_find_range_command): Ditto.
4682         (trace_find_outside_command): Ditto.
4683         (set_disconnected_tracing_value): Call
4684         target_set_disconnected_tracing.
4685         * remote.c: Add protocol encoding bits from tracepoint.c.
4686         (trace_error): Move from tracepoint.c.
4687         (remote_get_noisy_reply): Ditto.
4688         (free_actions_list_cleanup_wrapper): Ditto.
4689         (free_actions_list): Ditto.
4690         (remote_trace_init): New function.
4691         (remote_download_tracepoint): New function.
4692         (remote_download_trace_state_variable): New function.
4693         (remote_trace_set_readonly_regions): New function.
4694         (remote_trace_start): New function.
4695         (remote_get_trace_status): New function.
4696         (remote_trace_stop): New function.
4697         (remote_trace_find): New function.
4698         (remote_download_trace_state_variable): New function.
4699         (remote_set_disconnected_tracing): New function.
4700         (init_remote_ops): Add tracepoint operations.
4701
4702         * tracepoint.c (trace_dump_command): Don't decr_pc_after_break.
4703
4704 2010-01-07  Tristan Gingold  <gingold@adacore.com>
4705
4706         * symfile.c (build_section_addr_info_from_objfile): New function.
4707         (symbol_file_add_separate): Don't use offsets from objfile but
4708         built an addr info.
4709
4710 2010-01-06  Stan Shebs  <stan@codesourcery.com>
4711
4712         Support disconnected tracing.
4713         * infcmd.c (detach_command): Ask whether to stop tracing.
4714         * cli/cli-cmds.c (quit_command): Ditto.
4715         * breakpoint.h (struct breakpoint): New field number_on_target.
4716         * breakpoint.c (create_tracepoint_from_upload): New function.
4717         (get_tracepoint_by_number_on_target): New function.
4718         * remote.c (struct remote): New field disconnected_tracing.
4719         (remote_disconnected_tracing_feature): New function.
4720         (remote_protocol_features): Add DisconnectedTracing.
4721         (struct uploaded_tp): New struct.
4722         (uploaded_tps): New global.
4723         (get_uploaded_tp): New function.
4724         (find_matching_tracepoint): New function.
4725         (remote_get_tracing_state): New function.
4726         (remote_start_remote): Call it.
4727         * tracepoint.c (disconnected_tracing): New global.
4728         (trace_start_command): Initialize number_on_target.
4729         (stop_tracing): New function, split out from...
4730         (trace_stop_command): Call stop_tracing.
4731         (get_trace_status): New function, split out from...
4732         (trace_status_command): Call get_trace_status, add info on
4733         disconnection behavior.
4734         (disconnect_or_stop_tracing): New function.
4735         (finish_tfind_command): Translate from number on target.
4736         (trace_find_tracepoint_command): Translate to number on target.
4737         (send_disconnected_tracing_value): New function.
4738         (set_disconnected_tracing): New function.
4739         (_initialize_tracepoint): Add disconnected-tracing variable.
4740         * NEWS: Mention disconnected tracing.
4741
4742 2010-01-06  Tristan Gingold  <gingold@adacore.com>
4743
4744         * symtab.c (lookup_global_symbol_from_objfile): Rename objfile
4745         parameter to main_objfile.  Iterate on all separate debug objfiles.
4746         * symfile.h (symbol_file_add_separate)
4747         (find_separate_debug_file_by_debuglink): Remove parameter names.
4748         * symfile.c (symbol_file_add_separate): Use add_separate_objfile.
4749         (reread_symbols): Use free_objfile_separate_debug.
4750         * objfiles.h (struct objfile): Add separate_debug_objfile_link.
4751         Adjust comment.
4752         (objfile_separate_debug_iterate, add_separate_debug_objfile)
4753         (free_objfile_separate_debug): New prototypes.
4754         * objfiles.c (objfile_separate_debug_iterate): New function.
4755         (add_separate_debug_objfile, free_objfile_separate_debug): New
4756         functions.
4757         (free_objfile): Use free_objfile_separate_debug.  Adjust for
4758         multiple separate debug objfile.
4759         (objfile_has_symbols): Adjust comment.  Iterate on all separate
4760         debug objfiles.
4761         * minsyms.c (lookup_minimal_symbol): Adjust for multiple separate
4762         debug objfile.
4763         (lookup_minimal_symbol_text): Ditto.
4764         (lookup_minimal_symbol_by_pc_name): Ditto.
4765         (lookup_minimal_symbol_solib_trampoline): Ditto.
4766         (lookup_minimal_symbol_by_pc_section_1): Iterate on all separate
4767         debug objfiles.
4768
4769 2010-01-05  Stan Shebs  <stan@codesourcery.com>
4770
4771         Add fast tracepoints.
4772         * arch-utils.h (default_fast_tracepoint_valid_at): Declare.
4773         * arch-utils.c (default_fast_tracepoint_valid_at): New function.
4774         * breakpoint.h (enum bptype): Add bp_fast_tracepoint.
4775         * breakpoint.c (tracepoint_type): New function.
4776         (ALL_TRACEPOINTS): Use it.
4777         (should_be_inserted): Ditto.
4778         (bpstat_check_location): Ditto.
4779         (print_one_breakpoint_location): Ditto.
4780         (user_settable_breakpoint): Ditto.
4781         (set_breakpoint_location_function): Ditto.
4782         (disable_breakpoints_in_shlibs): Ditto.
4783         (delete_trace_command): Ditto.
4784         (print_it_typical): Add bp_fast_tracepoint case.
4785         (bpstat_what): Ditto.
4786         (print_one_breakpoint_location): Ditto.
4787         (allocate_bp_location): Ditto.
4788         (mention): Ditto.
4789         (breakpoint_re_set_one): Ditto.
4790         (disable_command): Ditto.
4791         (enable_command): Ditto.
4792         (check_fast_tracepoint_sals): New function.
4793         (break_command_really): Call it.
4794         (ftrace_command): New function.
4795         (_initialize_breakpoint): Add ftrace command.
4796         * gdbarch.sh (fast_tracepoint_valid_at): New.
4797         * gdbarch.h, gdbarch.c: Regenerate.
4798         * i386-tdep.c (i386_fast_tracepoint_valid_at): New function.
4799         (i386_gdbarch_init): Use it.
4800         * remote.c (struct remote_state): New field fast_tracepoints.
4801         (PACKET_FastTracepoints): New packet config type.
4802         (remote_fast_tracepoint_feature): New function.
4803         (remote_protocol_features): Add FastTracepoints.
4804         (remote_supports_fast_tracepoints): New function.
4805         (_initialize_remote): Add FastTracepoints.
4806         * tracepoint.c (download_tracepoint): Add fast tracepoint option.
4807         * NEWS: Mention fast tracepoints.
4808
4809 2010-01-06  Joel Brobecker  <brobecker@adacore.com>
4810
4811         * gdb-gdb.py: New file.
4812
4813 2010-01-05  Michael Snyder  <msnyder@vmware.com>
4814
4815         * infrun.c (handle_inferior_event): Fix typo in comment.
4816
4817 2010-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
4818
4819         * symfile.c (syms_from_objfile): Remove the !MAINLINE conditional.
4820
4821 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
4822
4823         * features/Makefile (WHICH): Add s390-linux32, s390-linux64,
4824         and s390x-linux64.
4825         (s390-linux32-expedite): Define.
4826         (s390-linux64-expedite): Define.
4827         (s390x-linux64-expedite): Define.
4828         * features/s390-acr.xml: New file.
4829         * features/s390-fpr.xml: New file.
4830         * features/s390-core32.xml: New file.
4831         * features/s390-core64.xml: New file.
4832         * features/s390x-core64.xml: New file.
4833         * features/s390-linux32.xml: New file.
4834         * features/s390-linux64.xml: New file.
4835         * features/s390x-linux64.xml: New file.
4836         * features/s390-linux32.c: New generated file.
4837         * features/s390-linux64.c: New generated file.
4838         * features/s390x-linux64.c: New generated file.
4839
4840         * regformats/s390-linux32.dat: New generated file.
4841         * regformats/s390-linux64.dat: New generated file.
4842         * regformats/s390x-linux64.dat: New generated file.
4843         * regformats/reg-s390.dat: Remove.
4844         * regformats/reg-s390x.dat: Remove.
4845
4846         * s390-nat.c: Include "auxv.h" and <elf.h>.
4847         (HWCAP_S390_HIGH_GPRS): Define if undefined.
4848         (s390_target_wordsize): New function.
4849         (s390_auxv_parse): Likewise.
4850         (s390_get_hwcap): Likewise.
4851         (s390_read_description): Likewise.
4852         (_initialize_s390_nat): Install s390_auxv_parse and
4853         s390_read_description.
4854
4855         * s390-tdep.c: Include "features/s390-linux32.c",
4856         "features/s390-linux64.c", and "features/s390x-linux64.c".
4857         (struct gdbarch_tdep): Add gpr_full_regnum, pc_regnum, and cc_regnum.
4858         (s390_register_call_saved): New function.
4859         (s390_register_name): Remove.
4860         (s390_register_type): Remove.
4861         (s390_dwarf_regmap): Add lower half GPR pseudo DWARF CFI regnums.
4862         (s390_dwarf_reg_to_regnum): Remap GPR regnums to full GPRs.
4863         (s390_adjust_frame_regnum): Remap GPR regnums to lower halves for CFI.
4864         (s390_pseudo_register_name): New function.
4865         (s390_pseudo_register_type): New function.
4866         (s390_pseudo_register_read): Handle both 32-bit and 64-bit cases.
4867         Handle full GPR pesudos and varying pseudo register numbers.
4868         (s390_pseudo_register_write): Likewise
4869         (s390x_pseudo_register_read): Remove.
4870         (s390x_pseudo_register_write): Likewise.
4871         (s390_register_group): Remove.
4872         (s390_pseudo_register_group): New function.
4873         (s390_regmap_gregset): Add GPR upper halves.
4874         (s390x_regmap_gregset): Likewise.
4875         (s390_regmap_fpregset): Likewise.
4876         (s390_regmap_upper): New global variable.
4877         (s390_upper_regset): New global variable.
4878         (s390_upper_regset_sections): New global variable.
4879         (s390_regset_from_core_section): Handle GPR upper halves.
4880         (s390_core_read_description): New function.
4881         (s390_prologue_frame_unwind_cache): Set up ABI call-saved/clobbered
4882         register information.  Handle varying pseudo register numbers.
4883         (s390_backchain_frame_unwind_cache): Likewise.
4884         (s390_frame_prev_register): Unwind full GPRs to show lower halves.
4885         (s390_stub_frame_unwind_cache): Handle varying pseudo register numbers.
4886         (s390_sigtramp_frame_unwind_cache): Unwind PSWM and PSWA as well as
4887         PC and CC pseudos.  Unwind upper halves and full GPRs as appropriate.
4888         Handle varying pseudo register numbers.
4889         (s390_unwind_pc): Handle varying pseudo register numbers.
4890         (s390_dwarf2_prev_register): New function.
4891         (s390_dwarf2_frame_init_reg): Set up ABI call-saved/clobbered
4892         register information.  Handle varying pseudo register numbers.
4893         Install s390_dwarf2_prev_register to unwind full GPRs.
4894         (s390_gdbarch_init): Handle target descriptions.  Assign varying
4895         pseudo register numbers.  Install s390_adjust_frame_regnum.
4896         (_initialize_s390_tdep): Initialize target descriptions.
4897
4898         * s390-tdep.h (S390_R0_UPPER_REGNUM .. S390_R15_UPPER_REGNUM): Define.
4899         (S390_NUM_REGS): Redefine to include upper half registers.
4900         (S390_PC_REGNUM, S390_CC_REGNUM): Remove.
4901         (S390_NUM_PSEUDO_REGS, S390_NUM_TOTAL_REGS): Likewise.
4902         (tdesc_s390_linux32): Add declaration.
4903         (tdesc_s390_linux64): Likewise.
4904         (tdesc_s390x_linux64): Likewise.
4905
4906 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
4907
4908         * regset.h (struct core_regset_section): Add HUMAN_NAME.
4909         * i386-linux-tdep.c (i386_linux_regset_sections): Fill in HUMAN_NAME.
4910         * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
4911         (ppc_linux_vmx_regset_sections): Likewise.
4912         (ppc_linux_fp_regset_sections): Likewise.
4913
4914         * corelow.c (get_core_register_section): Constify arguments.
4915         (get_core_registers): Use gdbarch_core_regset_sections instead
4916         of hard-coded platform-specific register section names.
4917
4918 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
4919
4920         * dwarf2loc.c (read_pieced_value): If a piece occupies part of
4921         a register, assume the least-significant part is used.
4922         (write_pieced_value): Likewise.
4923
4924 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
4925
4926         * printcmd.c: Include "arch-utils.h".
4927         (do_one_display): Re-parse expression if current architecture changed.
4928
4929 2010-01-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
4930             Joel Brobecker  <brobecker@adacore.com>
4931
4932         * gdbtypes.c (check_typedef): New comment on type length.
4933         * value.c (allocate_value_lazy): Remove the unused atype variable.  New
4934         comment on type length.
4935         (value_primitive_field): Keep the original TYPE value, new comment.
4936
4937 2010-01-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4938
4939         * cli/cli-script.c (process_next_line): Rename p1 as p_end and p2 as
4940         p_start.  Change != comparisons to > and < comparisons.
4941
4942 2010-01-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4943
4944         * cli/cli-script.c (process_next_line): Check P2 overrun.
4945
4946 2009-01-01  Joel Brobecker  <brobecker@adacore.com>
4947
4948         Update the copyright hearder to add year 2010 for most GDB files.
4949
4950 2009-01-01  Joel Brobecker  <brobecker@adacore.com>
4951
4952         Fix build failure in inf-ptrace.c.
4953         * inf-ptrace.c (inf_ptrace_follow_fork): Fix typo.
4954
4955 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
4956
4957         * top.c (print_gdb_version): Update copyright year.
4958
4959 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
4960
4961         Fix break *FUN'address thread NUM.
4962         * ada-lex.l (task): Expand rule to also match the thread keyword.
4963
4964 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
4965
4966         Fix break *FUN'address task NUM.
4967         * ada-lex.l (task): New rule.
4968         * ada-lang.c (valid_task_id): Make sure the Ada task list has
4969         been built before using it.
4970
4971 For older changes see ChangeLog-2009.
4972 \f
4973 Local Variables:
4974 mode: change-log
4975 left-margin: 8
4976 fill-column: 74
4977 version-control: never
4978 coding: utf-8
4979 End: