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