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