1 2009-12-20 Joel Brobecker <brobecker@adacore.com>
3 * darwin-nat-info.c, solib-spu.c, spu-multiarch.c,
4 regformats/regdat.sh, features/Makefile: Update copyright header.
6 2009-12-19 Maciej W. Rozycki <macro@codesourcery.com>
8 * arm-linux-tdep.c (ARM_OABI_SYSCALL_RESTART_SYSCALL): New macro.
9 (ARM_LDR_PC_SP_12): Likewise.
10 (arm_linux_restart_syscall_init): New function.
11 (arm_linux_restart_syscall_tramp_frame): New variable.
12 (arm_linux_init_abi): Install the
13 arm_linux_restart_syscall_tramp_frame unwinder.
15 2009-12-18 Doug Evans <dje@google.com>
17 * gdb_proc_service.h (psaddr_t): Fix type.
18 * linux-thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
19 signature to match glibc.
20 (thread_db_get_thread_local_address): Use psaddr_t for type of
21 address to match parameter of td_thr_tls_get_addr_p.
22 Cast through psaddr_t instead of (void*) to match parameter of
23 td_thr_tls_get_addr_p.
25 2009-12-17 Stan Shebs <stan@codesourcery.com>
27 * breakpoint.c (bpstat_check_location): Check for tracepoints.
29 2009-12-16 Michael Snyder <msnyder@vmware.com>
31 * i386-tdep.c (i386_process_record): Reformat comments.
33 2009-12-15 Gaius Mulley <gaius@glam.ac.uk>
35 * dwarf2read.c (read_subroutine_type): Add the subroutine
36 type to the die immediately to allow a parameter type to be
37 the same subroutine type.
39 2009-12-15 Tristan Gingold <gingold@adacore.com>
41 * machoread.c (macho_symfile_read): Set section size of dsym bfd
44 2009-12-15 Tristan Gingold <gingold@adacore.com>
46 * machoread.c (macho_check_dsym): Read uuid directly from load command
47 instead of from a fake section.
49 2009-12-15 Tristan Gingold <gingold@adacore.com>
51 * machoread.c (macho_symtab_read): Add comments. Always set
54 2009-12-14 Tristan Gingold <gingold@adacore.com>
56 * symfile.h (find_separate_debug_file_by_buildid): Remove prototype.
57 (bfd_open_maybe_remote): New prototype.
58 * symfile.c (bfd_open_maybe_remote): New function.
59 (separate_debug_file_exists, reread_symbols): Use it.
60 (struct build_id, build_id_bfd_get, build_id_verify)
61 (build_id_to_debug_filename)
62 (find_separate_debug_file_by_buildid): Move these ...
63 * elfread.c (struct build_id)
64 (build_id_bfd_get, build_id_verify, build_id_to_debug_filename)
65 (find_separate_debug_file_by_buildid): ... here.
67 2009-12-13 Paul N. Hilfinger <hilfinger@adacore.com>
69 * dwarf2read.c (struct attribute): Increase sizes of unsnd and snd
70 fields to allow larger integer sizes.
71 (read_subrange_type): Increase size of bound values.
72 Add logic to determine signedness based on base-type size, signedness.
73 (read_attribute_value): Change format for bad byte size in message.
74 (read_8_bytes): Increase size of result type.
75 (dump_die_shallow): Change format for value.
76 (dwarf2_get_attr_constant_value): Increase size of return type.
78 * gdbtypes.c (create_range_type): Change API to increase size of
79 bounds. struct field -> union field.
80 Always take signedness from base type.
81 (check_typedef): Use new API for TYPE_LOW_BOUND, TYPE_HIGH_BOUND.
82 (recursive_dump_type, copy_type_recursive): Adjust to new
83 representation of range types.
84 * gdbtypes.h (fields_or_bounds): New union containing struct field and
85 new struct range_bounds, used for range types.
86 (TYPE_RANGE_DATA): New macro to access range_bounds member.
87 (TYPE_LOW_BOUND, TYPE_HIGH_BOUND): Represent with new TYPE_RANGE_DATA.
88 (TYPE_LOW_BOUND_UNDEFINED, TYPE_HIGH_BOUND_UNDEFINED): New macros,
89 taking over the job of TYPE_FIELD_ARTIFICIAL for range bounds.
90 (SET_TYPE_LOW_BOUND, SET_TYPE_HIGH_BOUND, SET_TYPE_LOW_BOUND_DEFINED)
91 (SET_TYPE_HIGH_BOUND_DEFINED): New macros.
92 (TYPE_FIELDS, TYPE_BASECLASS, TYPE_BASECLASS_NAME, TYPE_FIELD)
93 (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED)
94 (TYPE_ARRAY_LOWER_BOUND_IS_UNDEFINED, TYPE_ARRAY_UPPER_BOUND_VALUE)
95 (TYPE_ARRAY_LOWER_BOUND_VALUE): Adjust to new representation.
96 (create_range_type): Adjust API.
97 * ada-lang.c (ada_modulus): Use new extended bound values.
98 (discrete_type_low_bound): Rename to...
99 (ada_discrete_type_low_bound): ... and make external.
100 (discrete_type_high_bound): Rename to...
101 (ada_discrete_type_high_bound): ... and make external.
102 (ada_value_slice_from_ptr, ada_array_bound_from_type)
103 (ada_evaluate_subexp, to_fixed_range_type):
104 Use ada_discrete_type_low_bound, ada_discrete_type_high_bound.
105 * ada-typeprint.c (print_range): Use ada_discrete_type_low_bound,
106 ada_discrete_type_high_bound. Don't look at field count, which
107 is no longer meaningful. Print bounds whenever argument is a range
109 * ada-lang.h (ada_discrete_type_low_bound,ada_discrete_type_high_bound):
111 * varobj.c (c_describe_child): Adjust to render larger values.
112 * mdebugread.c (parse_type): Use proper abstractions for range types:
113 TYPE_RANGE_DATA, SET_TYPE_LOW_BOUND_DEFINED,
114 SET_TYPE_HIGH_BOUND_DEFINED.
115 * p-typeprint.c (pascal_type_print_varspec_prefix): Use larger format
118 2009-12-11 Michael Snyder <msnyder@vmware.com>
120 * main.c (captured_main): Indentation.
122 2009-12-10 Michael Snyder <msnyder@vmware.com>
124 * i386-tdep.c (i386_record_lea_modrm_addr): Indent goto label.
125 (i386_process_record): Indent goto label. Use prefix opcode
126 constants from include/opcode/i386.h in switch statement.
128 2009-12-10 Chris Moller <cmoller@redhat.com>
131 * valops.c (value_cast_structs): Added test to return NULL if no
134 2009-12-10 Oza Pawandeep <paawan1982@yahoo.com>
136 * i386-tdep.c: Support for floating point recording.
137 Records and Replay the i386 floating point registers,
139 (i386_record_floats): New function.
140 (i386_process_record): Implement FP insns.
142 2009-12-03 Tristan Gingold <gingold@adacore.com>
144 * machoread.c (macho_symfile_read): Use symbol_file_add_separate
147 2009-12-09 Tristan Gingold <gingold@adacore.com>
149 * symfile.h (symbol_file_add_separate): New prototype.
150 (find_separate_debug_file_by_buildid): Ditto.
151 (find_separate_debug_file_by_debuglink): Ditto.
152 * symfile.c (reread_separate_symbols): Remove.
153 (find_separate_debug_file): Split into ...
154 (find_separate_debug_file_by_buildid): ... this and ...
155 (find_separate_debug_file_by_debuglink): ... this.
156 (symbol_file_add_with_addrs_or_offsets): Do not save orig_addrs.
157 Remove separate debug file handling.
158 (symbol_file_add_separate): New function.
159 (reread_symbols): Do not considere separate debug files, but free
160 them while handling their parent. Reindent.
161 * coffread.c (coff_symfile_read): Handle separate object file.
162 * elfread.c (elf_symfile_read): Ditto.
164 2009-12-09 Joel Brobecker <brobecker@adacore.com>
166 * acinclude.m4: Update comment.
168 2009-12-09 Joel Brobecker <brobecker@adacore.com>
170 * acinclude.m4: Link against in-tree libiconv by adding
171 libiconv.a to the LIBS instead of using -liconv.
172 * configure: Regenerate.
174 2009-12-08 Phil Muldoon <pmuldoon@redhat.com>
178 * python/py-type.c (typy_range): New Function.
180 2009-12-07 Doug Evans <dje@google.com>
182 * charset.c: Include environ.h.
183 (ignore_line_p): New function.
184 (find_charset_names): Handle older versions of iconv that print
185 human-readable output even if stdout is not a tty.
187 2009-12-07 Kevin Buettner <kevinb@redhat.com>
189 * configure.tgt: Add rx-*-elf target.
190 * rx-tdep.c: New target.
191 * NEWS: Announce Renesas RX support.
193 2009-12-07 Tristan Gingold <gingold@adacore.com>
195 * symfile.h (struct sym_fns): Adjust comment on sym_read.
196 * symfile.c (syms_from_objfile): Pass all symfile flags to sym_read.
197 * dbxread.c (dbx_symfile_read): Rename mainline to symfile_flags,
198 adjust header comment.
199 * elfread.c (elf_symfile_read): Ditto.
200 * somread.c (som_symfile_read): Ditto.
201 * xcoffread.c (xcoff_initial_scan): Ditto.
202 * coffread.c (coff_symfile_read): Rename mainline to symfile_flags.
203 * machoread.c (macho_symfile_read): Ditto.
204 * mipsread.c (mipscoff_symfile_read): Ditto.
206 2009-12-07 Tristan Gingold <gingold@adacore.com>
208 * dbxread.c (dbx_symfile_read): No need to test mainline to call
210 * xcoffread.c (xcoff_initial_scan): Ditto;
211 * coffread.c (coff_symfile_read): Remove call to init_psymbol_list.
212 * elfread.c (elf_symfile_read): Ditto.
213 * machoread.c (macho_symfile_read): Ditto.
215 2009-12-04 Daniel Jacobowitz <dan@codesourcery.com>
217 * valops.c (value_struct_elt_for_reference): Do not rely on
220 2009-12-03 Richard Ward <richard.j.ward1@googlemail.com>
222 * python/py-type.c (convert_field): New attribute "is_base_class".
224 2009-12-03 Tom Tromey <tromey@redhat.com>
226 * python/python.c (gdbpy_parse_and_eval): New function.
227 (GdbMethods): Add "parse_and_eval".
229 2009-12-03 Jan Kratochvil <jan.kratochvil@redhat.com>
231 * linux-thread-db.c (find_new_threads_once): Change errp and err types
233 (thread_db_find_new_threads_2): Change err type to td_err_e.
235 2009-12-03 Paul Pluzhnikov <ppluzhnikov@google.com>
239 * breakpoint.c (invalidate_bp_value_on_memory_change):
241 (_initialize_breakpoint): Add it as memory change observer.
243 2009-12-03 Tristan Gingold <gingold@adacore.com>
245 * machoread.c (macho_sym_fns): Set sym_segment routine.
247 2009-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
249 * ada-lang.c (ada_value_assign): Use observer_notify_memory_changed.
250 * valops.c (value_assign): Likewise.
251 * defs.h (deprecated_memory_changed_hook): Remove.
252 * top.c (deprecated_memory_changed_hook): Likewise.
253 * interps.c (clear_interpreter_hooks): Adjust.
255 2009-12-02 Tristan Gingold <gingold@adacore.com>
257 * symfile.h (dwarf2_build_psymtabs): Remove mainline parameter in
259 * dwarf2read.c (dwarf2_build_psymtabs): Remove mainline paramter in
260 definition, simplify code assuming it is always 0.
261 * coffread.c (coff_symfile_read): Adjust call.
262 * elfread.c (elf_symfile_read): Ditto.
263 * machoread.c (macho_symfile_read): Explicitely calls
264 init_psymbol_list if mainline is set.
266 2009-12-02 Tristan Gingold <gingold@adacore.com>
268 * dwarf2read.c (dwarf2_build_psymtabs_easy): Remove mainline parameter.
269 (dwarf2_build_psymtabs_hard): Ditto.
270 (dwarf2_build_psymtabs): Ajust calls.
271 * stabsread.h (elfstab_build_psymtabs): Remove mainline parameter on
273 (coffstab_build_psymtabs): Ditto.
274 (stabsect_build_psymtabs): Ditto.
275 * dbxread.c (coffstab_build_psymtabs): Remove mainline parameter on
277 (elfstab_build_psymtabs): Ditto.
278 (stabsect_build_psymtabs): Ditto.
279 * coffread.c (coff_symfile_read): Adjust call.
280 * elfread.c (elf_symfile_read): Ditto.
281 * somread.c (som_symfile_read): Ditto.
283 2009-12-02 Tristan Gingold <gingold@adacore.com>
285 * charset.c (_initialize_charset): Set a default value to
286 auto_host_charset_name if empty.
288 2009-12-01 Joseph Myers <joseph@codesourcery.com>
290 * gcore.c: Include solib.h.
291 (gcore_create_callback): Call solib_keep_data_in_core when
292 considering not saving memory in core file.
293 * solib-svr4.c (svr4_keep_data_in_core): New.
294 (_initialize_svr4_solib): Initialize
295 svr4_so_ops.keep_data_in_core.
296 * solib.c (solib_keep_data_in_core): New.
297 * solib.h (solib_keep_data_in_core): Declare.
298 * solist.h (struct target_so_ops): Add keep_data_in_core.
300 2009-11-30 Joseph Myers <joseph@codesourcery.com>
302 * configure: Regenerate.
304 2009-11-28 Vladimir Prus <vladimir@codesourcery.com>
306 * target.c (target_terminal_inferior): Use target_can_async_p, not
309 2009-11-27 Ulrich Weigand <uweigand@de.ibm.com>
311 * s390-nat.c (s390_can_use_hw_breakpoint): Only support breakpoints
312 of type bp_hardware_watchpoint.
314 2009-11-27 Joel Brobecker <brobecker@adacore.com>
316 * ada-lang.c: Apply some corrections to the previous comment addition.
318 2009-11-26 Joel Brobecker <brobecker@adacore.com>
320 * ada-lang.c: Update the comment explaining how to evaluate
323 2009-11-24 Daniel Jacobowitz <dan@codesourcery.com>
327 * breakpoint.c (find_condition_and_thread): Correct task error message.
328 * c-exp.y (yylex): Stop before "thread N", "task N", or abbreviations
331 2009-11-24 Joel Brobecker <brobecker@adacore.com>
333 * acinclude.m4: Include ../config/zlib.m4.
334 * configure.ac: Use AM_ZLIB to check for zlib support.
335 * configure: Regenerate.
337 2009-11-24 Joel Brobecker <brobecker@adacore.com>
339 * breakpoint.c (expand_line_sal_maybe): Adjust adjust the SAL
340 past the function prologue in the case where we were given only
343 2009-11-24 Pedro Alves <pedro@codesourcery.com>
345 * record.c (init_record_ops, init_record_core_ops): Actually
346 install record_stopped_data_address.
348 2009-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
350 * dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing.
352 2009-11-23 Tom Tromey <tromey@redhat.com>
354 * dwarf2read.c (find_partial_die): Don't reassign to 'back_to'.
356 2009-11-23 Michael Snyder <msnyder@vmware.com>
358 * NEWS: Mention hw watchpoint fix for process record.
360 2009-11-23 Paul Pluzhnikov <ppluzhnikov@google.com>
362 * cli/cli-cmds.c (disassemble_command): Split on comma.
363 (init_cli_cmds): Update help.
364 * NEWS: Mention incompatible change to 'disassemble'.
366 2009-11-22 Pedro Alves <pedro@codesourcery.com>
368 Make hardware breakpoints work for process repord.
370 * record.c (record_wait): Only adjust PC on software breakpoints
373 2009-11-22 Pedro Alves <pedro@codesourcery.com>
374 Michael Snyder <msnyder@vmware.com>
376 Make hardware watchpoints work for process record.
378 * breakpoint.c (hardware_watchpoint_inserted_in_range): New.
379 * breakpoint.h (hardware_watchpoint_inserted_in_range): Declare.
380 * record.c (record_beneath_to_stopped_by_watchpoint)
381 (record_beneath_to_stopped_data_address, record_hw_watchpoint):
383 (record_exec_insn): Check for watchpoint hits.
384 (tmp_to_stopped_by_watchpoint, tmp_to_stopped_data_address): New
386 (record_open): Set tmp_to_stopped_by_watchpoint,
387 tmp_to_stopped_data_address,
388 record_beneath_to_stopped_by_watchpoint and
389 record_beneath_to_stopped_data_address.
390 (record_wait): Report watchpoint hits to the core. Update and
392 (record_stopped_by_watchpoint): New.
393 (record_stopped_data_address): New.
394 (init_record_ops): Install them.
395 (init_record_core_ops): Ditto.
397 2009-11-21 Pedro Alves <pedro@codesourcery.com>
399 * breakpoint.c (update_watchpoint): Skip creating locations and
400 reading the selected frame if there's no execution.
401 (bpstat_stop_status): Use is_hardware_watchpoint. If not
402 stopping, update watchpoints and the global location list, instead
403 of removing and inserting all breakpoints.
404 (breakpoint_address_is_meaningful): Hardware watchpoints also have
405 a meaningful target address.
406 (watchpoint_locations_match): New.
407 (breakpoint_locations_match): New.
408 (watch_command_1): Create the watchpoint breakpoint without any
409 location initially. Use update_watchpoint to create the
410 watchpoint locations.
411 (update_global_location_list): Use breakpoint_locations_match, so
412 watchpoint locations are handled too. Also detect duplicate
413 watchpoint locations.
415 2009-11-21 Pedro Alves <pedro@codesourcery.com>
417 * breakpoint.h (struct breakpoint) <watchpoint_thread>: New field.
418 * breakpoint.c (watchpoint_in_thread_scope): New.
419 (update_watchpoint): Skip if the local watchpoint's thread doesn't
420 match the current thread, or if the current thread is running.
421 (watchpoint_check): Ditto.
422 (watch_command_1): Set the watchpoint's watchpoint_thread field.
424 2009-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
426 * breakpoint.c (bp_location_compare): Change parameter a to ap and b to
427 bp. New variables a and b.
428 (bp_location_compare_for_qsort): Remove.
429 (update_global_location_list): Use now bp_location_compare.
431 2009-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
433 Fix repeated rwatch output.
434 * amd64-linux-nat.c (amd64_linux_dr_set, amd64_linux_dr_set_control)
435 (amd64_linux_dr_set_addr, amd64_linux_dr_reset_addr)
436 (amd64_linux_dr_get_status): New comments.
437 (amd64_linux_dr_unset_status): New function.
438 (_initialize_amd64_linux_nat): Install it.
439 * i386-linux-nat.c (i386_linux_dr_get, i386_linux_dr_set)
440 (i386_linux_dr_set_control, i386_linux_dr_set_addr)
441 (i386_linux_dr_reset_addr, i386_linux_dr_get_status): New comments.
442 (i386_linux_dr_unset_status): New function.
443 (_initialize_i386_linux_nat): Install it.
444 * i386-nat.c (I386_DR_WATCH_MASK): New macro.
445 (I386_DR_WATCH_HIT): Use I386_DR_WATCH_MASK.
446 (i386_insert_aligned_watchpoint): Call i386_dr_low.unset_status.
447 * i386-nat.h (struct i386_dr_low_type): Extend comments for
448 set_control, set_addr, reset_addr and get_status. New unset_status.
449 * breakpoint.c (update_watchpoint): Extend the comment.
451 2009-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
452 Pedro Alves <pedro@codesourcery.com>
454 Fix reordered watchpoints triggered in other threads during all-stop.
456 * linux-nat.c (resume_callback, linux_nat_resume): Clear
457 stopped_by_watchpoint.
458 (save_sigtrap, linux_nat_stopped_by_watchpoint)
459 (linux_nat_stopped_data_address): New.
460 (stop_wait_callback, linux_nat_filter_event): Call save_sigtrap.
461 (linux_nat_add_target): Install linux_nat_stopped_by_watchpoint
462 and linux_nat_stopped_data_address.
463 * linux-nat.h (struct lwp_info): New fields stopped_by_watchpoint,
464 stopped_data_address_p and stopped_data_address.
466 2009-11-20 Michael Snyder <msnyder@vmware.com>
468 * target.h (struct target_ops): New methods to_get_bookmark
469 and to_goto_bookmark.
470 (target_get_bookmark): New macro.
471 (target_goto_bookmark): New macro.
472 * target.c (dummy_get_bookmark): New function, default implementation.
473 (dummy_goto_bookmark): New function, default implementation.
474 (update_current_target): Inherit new methods.
475 * record.c (record_get_bookmark): New function.
476 (record_goto_bookmark): New function.
477 (init_record_ops): Set to_get_bookmark and to_goto_bookmark methods.
478 * reverse.c (struct bookmark): New type.
479 (save_bookmark_command): New function (command).
480 (delete_bookmark_command): New function (command).
481 (goto_bookmark_command): New function (command).
482 (bookmarks_info): New function (command).
483 (_initialize_reverse): Add new bookmark commands.
484 * command.h (enum command_class): Add class_bookmark.
485 * NEWS: Mention bookmark commands.
487 2009-11-20 Pedro Alves <pedro@codesourcery.com>
489 * breakpoint.c (update_global_location_list): Fix duplicate
492 2009-11-20 Pedro Alves <pedro@codesourcery.com>
494 * infrun.c (handle_inferior_event): Hardware hatchpoint traps are
495 never random signals.
496 * breakpoint.c (update_global_location_list): Always delete
497 immediately delete hardware watchpoint locations and other
498 locations whose target address isn't meaningful. Update comment
499 explaining the hazard of moribund locations.
501 2009-11-19 Joel Brobecker <brobecker@adacore.com>
503 * ada-lang.c (discrete_type_p): TYPE_CODE_BOOL is also a discrete type.
505 2009-11-19 Joel Brobecker <brobecker@adacore.com>
507 * completer.c (complete_line_internal): Make sure the command
508 completer is not NULL before calling it.
510 2009-11-19 Jerome Guitton <guitton@adacore.com>
512 * ada-lang.c (packed_array_type): Rename to...
513 (constrained_packed_array_type): ...and update comment.
514 (decode_packed_array, decode_constrained_packed_array): Ditto.
515 (decode_packed_array_type, decode_constrained_packed_array_type):
517 (ada_is_constrained_packed_array_type): New function.
518 (ada_is_unconstrained_packed_array_type): New function.
519 (decode_packed_array_bitsize): New function, extracted from
520 decode_packed_array_type.
521 (ada_type_of_array): Add support for unconstrained packed arrays.
522 (ada_coerce_to_simple_array_ptr, ada_coerce_to_simple_array)
523 (ada_array_bound_from_type, ada_array_bound, ada_array_length)
524 (ada_prefer_type, to_fixed_array_type, ada_evaluate_subexp): Resync.
525 * ada-lang.h (ada_is_packed_array_type,
526 ada_is_constrained_packed_array_type): Renaming.
527 * ada-valprint.c (ada_val_print_1): Resync.
528 * ada-typeprint.c (print_array_type, ada_print_type): Resync.
530 2009-11-19 Joel Brobecker <brobecker@adacore.com>
532 Wrong function used to perform address addition/subtraction.
533 * ada-lang.c (ada_type_match): Stop making TYPE_CODE_VOID
534 a wildcard matching any type. For types that we don't already
535 handle specifically, make sure that both types have the same code.
537 2009-11-19 Joel Brobecker <brobecker@adacore.com>
539 * ada-lang.c (ada_decode): Add handling of "TB" suffixes for
542 2009-11-19 Joel Brobecker <brobecker@adacore.com>
544 * ada-lang.c (ada_remove_Xbn_suffix): New function.
545 (find_old_style_renaming_symbol): Add handling for function suffixes
546 present in the name of various procedures.
547 Do not overwrite the function symbol's name.
549 2009-11-19 Pedro Alves <pedro@codesourcery.com>
551 * breakpoint.c (breakpoint_address_bits): Visit all locations'
552 gdbarchs, not the breakpoint's gdbarch.
554 2009-11-18 Vladimir Prus <vladimir@codesourcery.com>
556 * cli/cli-script.c (process_next_line): Recognize 'end'
557 even when the line has leading space and we're not parsing
560 2009-11-18 Tom Tromey <tromey@redhat.com>
562 * symtab.c (symbol_set_names): Correctly set 'name' on symbol when
565 2009-11-18 Tristan Gingold <gingold@adacore.com>
567 * machoread.c (macho_oso_symfile): Fix typo. Add comments.
569 2009-11-17 Jan Kratochvil <jan.kratochvil@redhat.com>
571 * dbxread.c (set_namestring): Remove cast to unsigned. Check N_STRX
574 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
576 * features/m68k-core.xml: New file.
578 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
580 * regformats/reg-cf.dat: New file.
582 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
584 * m68k-tdep.c (m68k_register_name): Check fpregs_present.
585 (m68k_gdbarch_init): Remove a duplicate of set_gdbarch_fp0_regnum.
587 2009-11-17 Jan Kratochvil <jan.kratochvil@redhat.com>
589 Fix wrong debug output with `set debug infrun 1'.
590 * gdb/infrun.c (handle_inferior_event <debug_infrun>): New variable
591 old_chain. Temporarily switch INFERIOR_PTID.
592 * target.h (target_stopped_by_watchpoint): Extend the comment.
593 (target_stopped_data_address): New comment.
595 2009-11-16 Tom Tromey <tromey@redhat.com>
597 * xcoffread.c (scan_xcoff_symtab): Update.
598 * symfile.h (add_psymbol_to_list): Update prototype.
599 * symfile.c (add_psymbol_to_bcache): Add copy_name argument.
600 (add_psymbol_to_list): Likewise.
601 * stabsread.c (define_symbol): Update.
602 * mdebugread.c (parse_partial_symbols): Update.
603 (handle_psymbol_enumerators): Update.
604 (new_symbol): Update.
605 * dbxread.c (read_dbx_symtab): Update.
606 * coffread.c (process_coff_symbol): Update.
607 * symtab.h (prim_record_minimal_symbol_full): Declare.
608 (SYMBOL_SET_NAMES): Add copy_name argument.
609 * symtab.c (struct demangled_name_entry): New struct.
610 (hash_demangled_name_entry): New function.
611 (eq_demangled_name_entry): Likewise.
612 (create_demangled_names_hash): Use new functions.
613 (symbol_set_names): Use struct demangled_name_entry. Add
615 * minsyms.c (prim_record_minimal_symbol_full): New function.
616 (prim_record_minimal_symbol_and_info): Use it.
617 * elfread.c (record_minimal_symbol): Add name_len and copy_name
618 arguments. Call prim_record_minimal_symbol_full.
619 (elf_symtab_read): Add copy_names argument.
620 (elf_symfile_read): Update calls to elf_symtab_read.
621 * dwarf2read.c (add_partial_symbol): Don't copy symbol names.
622 (load_partial_dies): Likewise.
623 (new_symbol): Likewise.
624 * cp-namespace.c (check_one_possible_namespace_symbol): Don't save
625 name on the obstack. Update call to SYMBOL_SET_NAMES.
627 2009-11-15 Pedro Alves <pedro@codesourcery.com>
629 * infrun.c (handle_inferior_event): When handling a fork or vfork
630 event, check if the bpstat causes a stop, instead of if it
632 * breakpoint.c (bpstat_causes_stop): New.
633 * breakpoint.h (bpstat_causes_stop): Declare.
635 2009-11-15 Pedro Alves <pedro@codesourcery.com>
637 * breakpoint.c (should_be_inserted): Don't insert breakpoints if
638 the pspace doesn't allow breakpoints.
639 (insert_breakpoint_locations): Remove waiting_for_vfork_done
640 special case. Expect watchpoints that shouldn't be inserted, to
642 * progspace.h (struct program_space) <breakpoints_not_allowed>:
644 * infrun.c (handle_inferior_event): Clear it.
645 * linux-nat.c (linux_child_follow_fork): Set it.
647 2009-11-13 Doug Evans <dje@google.com>
649 * dcache.c (dcache_hit, dcache_read_line): Tweak comments.
650 (dcache_peek_byte, dcache_init, dcache_xfer_memory): Ditto.
651 * target.c (memory_xfer_partial): Tweak comments.
652 (target_xfer_partial, target_write_memory): Add comment.
653 (target_read_partial): Remove note from 2003-10-21.
654 (target_read, target_write): Add comments.
656 2009-11-13 Daniel Jacobowitz <dan@codesourcery.com>
658 * inline-frame.c (find_inline_frame_state): Check for changed PC
660 (inline_frame_sniffer): ... not here.
662 2009-11-13 Daniel Jacobowitz <dan@codesourcery.com>
664 * ui-file.c (stdio_file_read): Call gdb_select before read.
666 2009-11-13 Maciej W. Rozycki <macro@codesourcery.com>
668 * mips-tdep.c (mips_insn16_frame_this_id): Mark the outermost
670 (mips_insn32_frame_this_id): Likewise.
672 2009-11-13 Maciej W. Rozycki <macro@codesourcery.com>
674 * elfread.c (elf_symtab_read): Only mark a minimal symbol as
675 special if it actually exists. Merge the checks for this
678 2009-11-13 Kazu Hirata <kazu@codesourcery.com>
679 Maxim Kuvyrkov <maxim@codesourcery.com>
681 * remote-fileio.c (remote_fileio_request): Send Ctrl-C if it is
683 * remote-fileio.h: Update the prototype for remote_fileio_request.
684 * remote.c (struct remote_state): Add ctrlc_pending_p.
685 (remote_open_1): Clear ctrlc_pending_p.
686 (remote_stop_as): Set ctrlc_pending_p to 1.
687 (remote_wait_as): Pass ctrlc_pending_p to remote_fileio_request.
689 2009-11-13 Daniel Jacobowitz <dan@codesourcery.com>
691 * arm-tdep.c (arm_skip_stub): Recognize RealView veneer functions.
693 2009-11-13 Maciej W. Rozycki <macro@codesourcery.com>
695 * breakpoint.c (update_watchpoint): Only fiddle with frames for
698 2009-11-13 Pedro Alves <pedro@codesourcery.com>
700 * infrun.c (handle_inferior_event): Set stop_print_frame on
701 TARGET_WAITKIND_LOADED events, if stopping on solib-events.
703 2009-11-13 Doug Evans <dje@google.com>
705 * dcache.c (dcache_block): Replace member newer with next,prev.
706 (dcache_struct): Delete member newest.
707 (block_func): New typedef.
708 (append_block, remove_block, for_each_block): New functions.
709 (invalidate_block, free_block): New functions.
710 (dcache_invalidate): Update
711 (dcache_invalidate_line, dcache_alloc): Update to use new list
713 (dcache_free): Ditto. Fix memory leak.
715 2009-11-13 Paul Pluzhnikov <ppluzhnikov@google.com>
717 * python/py-prettyprint.c (print_string_repr): Suppress
720 2009-11-13 Tristan Gingold <gingold@adacore.com>
722 * avr-tdep.c (avr_push_dummy_call): Fix endianness issue and avoid
723 overlap between returned structure and return address/parameters.
725 2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
727 * remote-fileio.c (remote_fileio_func_read): Limit console
730 2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
731 Paul Brook <paul@codesourcery.com>
733 * c-typeprint.c (c_type_print_base): Skip artificial fields.
734 Use get_vptr_fieldno to skip the vtable pointer.
735 * dwarf2read.c (dwarf2_add_field): Set FIELD_ARTIFICIAL on artificial
737 (dwarf2_add_member_fn): Complain about virtual member functions
738 without DW_AT_vtable_elem_location and force TYPE_CPLUS_DYNAMIC.
739 * gdbtypes.c (get_vptr_fieldno): Update comment.
740 * gdbtypes.h (struct cplus_struct_type): Add is_dynamic.
741 (TYPE_CPLUS_DYNAMIC): New macro.
742 * gnu-v3-abi.c (gnuv3_dynamic_class): New.
743 (gnuv3_get_vtable): Rewrite to use gnuv3_dynamic_class. Move higher.
744 (gnuv3_rtti_type, gnuv3_get_virtual_fn, gnuv3_baseclass_offset): Use
746 * varobj.c (cplus_class_num_children, cplus_describe_child): Skip
747 artificial fields. Use get_vptr_fieldno to skip the vtable pointer.
749 2009-11-12 Paul Brook <paul@codesourcery.com>
750 Daniel Jacobowitz <dan@codesourcery.com>
752 * dwarf2read.c (dwarf2_add_member_fn): Calculate virtual function
753 offset for classes without DW_AT_containing_type.
755 2009-11-12 Paul Brook <paul@codesourcery.com>
756 Daniel Jacobowitz <dan@codesourcery.com>
758 * dwarf2read.c (struct field_info): Add baseclasses.
759 (dwarf2_add_field): Add base classes to a separate list.
760 (dwarf2_attach_fields_to_type): Merge base classes and fields.
762 2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
764 * dwarf2read.c (process_psymtab_comp_unit): Initialize per_cu backlink
765 at the same time as the forward link.
766 (load_partial_comp_unit): Initialize per_cu links before calling
769 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
772 * linux-thread-db.c (thread_db_info): New member.
773 (disable_thread_event_reporting): Call td_ta_clear_event.
775 2009-11-11 Keith Seitz <keiths@redhat.com>
777 * linespec.c (lookup_prefix_sym): Lookup the symbol
778 in both STRUCT_DOMAIN and VAR_DOMAIN.
780 2009-11-11 Michael Snyder <msnyder@vmware.com>
782 * darwin-nat-info.c: Update copyright.
787 * inline-frame.c: Ditto.
788 * inline-frame.h: Ditto.
791 2009-11-11 Michael Snyder <msnyder@vmware.com>
793 * findvar.c (top level): Fix and add comments.
795 2009-11-10 Keith Seitz <keiths@redhat.com>
797 * c-exp.y (operator_stoken): New function.
798 (OPERATOR): New token.
801 (operator): New rule.
802 (name): Add operator.
803 (ident_tokens): Add "new", "delete", and "operator".
804 * gdbtypes.c (rank_one_type): Don't complain about
805 void pointer conversion badness if both types are
808 2009-11-11 Jan Kratochvil <jan.kratochvil@redhat.com>
810 * symfile.c (separate_debug_file_exists): Change parameter parent_name
811 to parent_objfile. New variables parent_stat and abfd_stat. Call
812 strcmp and then bfd_stat functions to verify if NAME matches.
813 (find_separate_debug_file): Update the passed parameter at caller.
815 2009-11-11 Jan Kratochvil <jan.kratochvil@redhat.com>
817 * objfiles.c (objfile_relocate): Update also the field psymtabs_addrmap.
819 2009-11-11 Jan Kratochvil <jan.kratochvil@redhat.com>
821 * configure.ac: Call ACX_LARGEFILE.
822 * aclocal.m4: Call m4_include for ../config/largefile.m4 and
823 ../config/plugins.m4.
824 * configure: Regenerate.
825 * config.in: Regenerate.
827 2009-11-10 Keith Seitz <keiths@redhat.com>
829 * c-exp.y: Add new rule for resolving method overloads.
830 * eval.c (make_params): New function.
831 (free_param_types): New function.
832 (evaluate_subexp_standard): Pass expect_type to value_aggregate_elt.
833 Handle case TYPE_INSTANCE.
834 (evaluate_subexp_for_address): Pass expect_type to value_aggregate_elt.
835 * expression.h (enum exp_opcode): Add TYPE_INSTANCE.
836 (compare_parameters): Add declaration.
837 * parse.c (operator_length_standard): Add TYPE_INSTANCE.
838 * valops.c (value_aggregate_elt): Add new expect_type parameter.
839 Pass expect_type to value_struct_elt_for_reference.
840 (value_struct_elt_for_reference): Add expect_type parameter and use
842 Check for overload matches with and without artificial parameters.
843 Skip artificial methods.
844 (compare_parameters): New function.
845 * value.h (value_aggregate_elt): Add new expect_type parameter.
847 2009-11-10 Joseph Myers <joseph@codesourcery.com>
849 * solib-svr4.c (enable_break): Call
850 gdbarch_convert_from_func_ptr_addr on results of looking up
851 fallback symbol names.
853 2009-11-10 Daniel Gutson <dgutson@codesourcery.com>
855 * procfs.c (procfs_do_thread_registers): Added a call to fetch
856 register values before saving them in the core file
857 through the gcore command.
858 (procfs_corefile_thread_callback): Removed the backup of
859 inferior_ptid before calling procfs_do_thread_registers since
860 the function already saves and restores it before returning.
862 2009-11-10 Michael Snyder <msnyder@vmware.com>
864 * dcache.c (dcache_invalidate_line): Remove block from used list
865 when adding it to freed list.
867 2009-11-10 Michael Snyder <msnyder@vmware.com>
869 * dcache.c: Fix typo, shorten long lines in comment.
871 2009-11-10 Tristan Gingold <gingold@adacore.com>
873 * avr-tdep.c: Add AVR_PSEUDO_PC_REGNUM and AVR_NUM_PSEUDO_REGS.
874 (struct gdbarch_tdep): Add void_type, func_void_type and pc_type
876 (avr_register_name): Add "pc" name, renames "PC" to "PC2".
877 (avr_register_type): Handle AVR_PSEUDO_PC_REGNUM.
878 (avr_write_pc): Fix indentation.
879 (avr_pseudo_register_read): New function.
880 (avr_pseudo_register_write): New function.
881 (avr_frame_prev_register): Handle AVR_PSEUDO_PC_REGNUM.
882 (avr_gdbarch_init): Create types for pc. Register pseudo regs.
884 2009-11-10 Tristan Gingold <gingold@adacore.com>
886 * avr-tdep.c (avr_integer_to_address): New function.
887 (avr_gdbarch_init): Set integer_to_address.
889 2009-11-10 Tristan Gingold <gingold@adacore.com>
891 * avr-tdep.c (avr_skip_prologue): First try to skip prologue
892 using skip_prologue_using_sal.
894 2009-11-10 Tristan Gingold <gingold@adacore.com>
896 * avr-tdep.c (avr_extract_return_value): Remove.
897 (avr_return_value): Mostly rewritten. Fix handling for structures.
898 (avr_push_dummy_call): Handle struct_return.
900 2009-11-10 Tristan Gingold <gingold@adacore.com>
902 * avr-tdep.c (avr_scan_prologue): Decode instructions used for
903 small stack allocation.
904 Adjust code for prologue that don't write SP.
906 2009-11-10 Tristan Gingold <gingold@adacore.com>
908 * avr-tdep.c (avr_make_saddr): Return 0 for NULL.
910 2009-11-10 Tristan Gingold <gingold@adacore.com>
912 * avr-tdep.c (avr_dwarf_reg_to_regnum): New function.
913 (avr_gdbarch_init): Call set_gdbarch_dwarf2_reg_to_regnum.
915 2009-11-09 Sebastien Granjoux <seb.sfo@free.fr>
918 * symtab.c (find_line_symtab, append_exact_match_to_sals)
919 (expand_line_sal): Use full filename when setting breakpoints if
922 2009-11-09 Cary Coutant <ccoutant@google.com>
924 * dwarf2read.c (read_import_statement): Don't clobber original cu.
926 2009-11-09 Tom Tromey <tromey@redhat.com>
928 * python/python.c (execute_gdb_command): Copy the argument text.
930 2009-11-06 Vladimir Prus <vladimir@codesourcery.com>
932 * m68k-tdep.c (m68k_convert_register_p): Correct
935 2009-11-06 Vladimir Prus <vladimir@codesourcery.com>
937 * m68k-tdep.c (m68k_convert_register_p): Compare with
938 the actual type of fp registers, not one of the possible
941 2009-11-06 Vladimir Prus <vladimir@codesourcery.com>
943 Prevent program output from mix with "^running".
946 * mi/mi-interp.c (mi_on_resume): Output token
947 and "^running" together, so that nothing else gets
950 2009-11-05 Daniel Jacobowitz <dan@codesourcery.com>
952 * dwarf2read.c (struct dwarf2_cu): Remove ranges_offset and
954 (struct partial_die_info): Remove language, has_stmt_list, dirname,
956 (dwarf2_build_include_psymtabs): Take a die_info. Handle a missing
958 (dwarf2_get_pc_bounds): Take PST argument. Pass it
959 to dwarf2_ranges_read. Update all callers.
960 (init_cu_die_reader): Move earlier.
961 (dwarf2_find_base_address): New function.
962 (process_psymtab_comp_unit): Rewrite to use a full DIE for the
963 compilation unit. Use dwarf2_get_pc_bounds and
964 dwarf2_find_base_address.
965 (load_comp_unit): Rewrite to use a full DIE for the compilation unit.
966 (process_full_comp_unit): Use dwarf2_find_base_address.
967 (read_partial_die): Remove support for attributes only used
968 in the compilation unit DIE.
969 * symfile.c (allocate_psymtab): Make FILENAME const.
970 (start_psymtab_common): Likewise.
971 * symfile.h (allocate_psymtab, start_psymtab_common): Update
974 2009-11-05 Tom Tromey <tromey@redhat.com>
976 * symmisc.c (print_symbol_bcache_statistics): Print filename cache
978 (print_objfile_statistics): Likewise.
979 * symfile.c (reread_symbols): Initialize filename_cache.
980 (allocate_symtab): Cache the file name.
981 (allocate_psymtab): Likewise.
982 * solib-sunos.c (allocate_rt_common_objfile): Initialize
984 * objfiles.h (struct objfile) <filename_cache>: New field.
985 * objfiles.c (allocate_objfile): Initialize filename_cache.
986 (free_objfile): Free filename_cache.
988 2009-11-05 Tom Tromey <tromey@redhat.com>
990 * symfile.c (add_psymbol_to_bcache): Make 'psymbol' static again.
991 Zero the 'value' field.
993 2009-11-05 Doug Evans <dje@google.com>
995 * amd64-tdep.c (amd64_init_frame_cache): Enhance comment describing
998 2009-11-05 Daniel Jacobowitz <dan@codesourcery.com>
1000 * top.c (execute_command): Select a frame before checking the current
1001 language. Only output a message if verbose.
1003 2009-11-05 Tom Tromey <tromey@redhat.com>
1005 * symtab.h (SYMBOL_SET_LINKAGE_NAME): Update comment.
1006 * symfile.c (allocate_symtab): Don't use obsavestring on a
1008 * stabsread.c (define_symbol): Don't use obsavestring on a
1010 * mdebugread.c (parse_type): Don't use obsavestring on a constant
1012 (new_symtab): Likewise.
1013 * elfread.c (elf_symtab_read): Don't use obsavestring on a
1016 2009-11-04 Tom Tromey <tromey@redhat.com>
1018 * symfile.c (add_psymbol_to_bcache): Don't copy name. Make
1019 'psymbol' non-static.
1021 2009-11-03 Paul Pluzhnikov <ppluzhnikov@google.com>
1023 * linux-thread-db.c (disable_thread_event_reporting): Adjust.
1025 2009-11-03 Joel Brobecker <brobecker@adacore.com>
1027 * MAINTAINERS (Responsible Maintainers): Add Tristan Gingold as
1028 maintainer of the avr target.
1030 2009-11-02 Daniel Jacobowitz <dan@codesourcery.com>
1032 * elfread.c (elf_symfile_segments): Do not warn about
1033 uninitialized sections outside of load segments.
1035 2009-11-02 Jan Kratochvil <jan.kratochvil@redhat.com>
1037 * symfile.c (build_id_to_debug_filename): New variable debugdir. Move
1038 variables size, s and data into a new inner block. Change xmalloc for
1039 alloca, use direct BUILDID->SIZE there now. Loop for the
1040 DEBUG_FILE_DIRECTORY components.
1041 (find_separate_debug_file): New variable debugdir and debugdir_end.
1042 Loop for the DEBUG_FILE_DIRECTORY components.
1043 (_initialize_symfile): For "debug-file-directory" use plural and note
1044 one can use multiple components now.
1046 2009-11-02 Jan Kratochvil <jan.kratochvil@redhat.com>
1048 * symfile.c (find_separate_debug_file): Initialize dir, debugfile and
1049 canon_name to NULL. Change alloca to xmalloc, newly call xfree for it.
1050 New label cleanup_return_debugfile, jump to it from the failure paths.
1052 2009-11-02 Andrew Cagney <cagney@gnu.org>
1054 * symfile.c (separate_debug_file_exists): When the CRCs mismatch
1056 (find_separate_debug_file): Pass in the objfile's name.
1058 2009-11-02 Jan Kratochvil <jan.kratochvil@redhat.com>
1060 Remove INVALID_ENTRY_POINT.
1061 * frame.c (inside_entry_func): New variable entry_point. Return 0 if
1062 the entry point is not known.
1063 * solib-irix.c (enable_break): Likewise.
1064 * objfiles.c (init_entry_point_info): Stop using INVALID_ENTRY_POINT.
1065 Initialize EI.ENTRY_POINT_P.
1066 (entry_point_address): Rename to ...
1067 (entry_point_address_query): ... a new function. Use EI.ENTRY_POINT_P.
1068 (entry_point_address): New function.
1069 (objfile_relocate): Use EI.ENTRY_POINT_P.
1070 * objfiles.h (struct entry_info): Simplify entry_point comment. New
1071 field entry_point_p.
1072 (INVALID_ENTRY_POINT): Remove.
1073 (entry_point_address_query): New prototype.
1074 * solib-frv.c (enable_break): Check for NULL SYMFILE_OBJFILE and its
1075 EI.ENTRY_POINT_P. Return 0 if ".interp" is not found.
1077 2009-11-01 Michael Snyder <msnyder@vmware.com>
1079 * NEWS (New Commands): Mention record save/restore.
1081 2009-10-31 Michael Snyder <msnyder@vmware.com>
1083 * breakpoint.c (bpstat_stop_status): Fix broken comment.
1085 2009-10-31 Pedro Alves <pedro@codesourcery.com>
1087 * record.c (record_restore, cmd_record_save): Debug output goes to
1090 2009-10-31 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
1092 * breakpoint.c (catch_syscall_split_args): Remove unecessary warning
1093 displayed when the user provided a syscall name and there is no
1095 * xml-syscall.c: Renamed `_sysinfo' to `sysinfo'.
1096 (set_xml_syscall_file_name): Remove syscall_warn_user.
1097 (xml_init_syscalls_info): Remove warning.
1098 (init_sysinfo): Update warnings.
1100 2009-10-30 Vladimir Prus <vladimir@codesourcery.com>
1102 Fix breakpoint commands in MI.
1104 * mi/mi-main.c (mi_execute_command): Run bpstat_do_actions.
1105 * mi/mi-cmd-break.c (mi_cmd_break_commands): Pass 1 to
1106 read_command_line_1 to actually parse composite commands.
1108 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
1112 * target.c (simple_search_memory): Correct read_addr initialization
1113 in loop for searching subsequent chunks.
1115 2009-10-28 Daniel Jacobowitz <dan@codesourcery.com>
1117 Reported by Antti Hatala <ahatala@nvidia.com>.
1119 * arm-tdep.c (thumb_get_next_pc): Limit check to IT instructions
1122 2009-10-28 Pedro Alves <pedro@codesourcery.com>
1124 * dwarf2-frame.c (dwarf2_build_frame_info): Discard --gc-section
1127 2009-10-28 Pedro Alves <pedro@codesourcery.com>
1129 * infrun.c (keep_going): Wrap with resume_cleanups.
1131 2009-10-27 Paul Pluzhnikov <ppluzhnikov@google.com>
1133 * MAINTAINERS: Add self to "modify-after-approval" maintainers.
1135 2009-10-27 Paul Pluzhnikov <ppluzhnikov@google.com>
1138 * linux-thread-db.c (attach_thread): Return success/failure
1140 (thread_db_find_new_threads_silently): Retry until no new threads.
1141 (struct callback_data): New.
1142 (find_new_threads_callback): Count new threads, stop iteration
1144 (find_new_threads_once): New function.
1145 (thread_db_find_new_threads_2): Rename from
1146 thread_db_find_new_threads_1 and adjust.
1147 (thread_db_find_new_threads_1): New function.
1149 2009-10-26 Michael Eager <eager@eagercon.com>
1151 * MAINTAINERS: Add self to "modify-after-approval" maintainers.
1153 2009-10-26 Michael Snyder <msnyder@vmware.com>
1154 Hui Zhu <teawater@gmail.com>
1156 * Makefile.in (SFILES): Add gcore.c.
1157 (COMMON_OBS): Add gcore.o.
1158 * config/alpha/alpha-linux.mh (NATDEPFILES): Delete gcore.o.
1159 * config/alpha/fbsd.mh (NATDEPFILES): Ditto.
1160 * config/arm/linux.mh (NATDEPFILES): Ditto.
1161 * config/i386/fbsd.mh (NATDEPFILES): Ditto.
1162 * config/i386/fbsd64.mh (NATDEPFILES): Ditto.
1163 * config/i386/i386sol2.mh (NATDEPFILES): Ditto.
1164 * config/i386/linux.mh (NATDEPFILES): Ditto.
1165 * config/i386/linux64.mh (NATDEPFILES): Ditto.
1166 * config/i386/sol2-64.mh (NATDEPFILES): Ditto.
1167 * config/ia64/linux.mh (NATDEPFILES): Ditto.
1168 * config/m32r/linux.mh (NATDEPFILES): Ditto.
1169 * config/m68k/linux.mh (NATDEPFILES): Ditto.
1170 * config/mips/linux.mh (NATDEPFILES): Ditto.
1171 * config/pa/linux.mh (NATDEPFILES): Ditto.
1172 * config/powerpc/linux.mh (NATDEPFILES): Ditto.
1173 * config/powerpc/ppc64-linux.mh (NATDEPFILES): Ditto.
1174 * config/s390/s390.mh (NATDEPFILES): Ditto.
1175 * config/sparc/fbsd.mh (NATDEPFILES): Ditto.
1176 * config/sparc/linux.mh (NATDEPFILES): Ditto.
1177 * config/sparc/linux64.mh (NATDEPFILES): Ditto.
1178 * config/sparc/sol2.mh (NATDEPFILES): Ditto.
1179 * config/xtensa/linux.mh (NATDEPFILES): Ditto.
1180 * target.c (dummy_find_memory_regions): Change output.
1181 (dummy_make_corefile_notes): Ditto.
1183 2009-10-26 Tristan Gingold <gingold@adacore.com>
1185 * charset.c (_initialize_charset): Set a default value to
1186 auto_host_charset_name if empty.
1188 2009-10-26 Tristan Gingold <gingold@adacore.com>
1190 * avr-tdep.c (avr_push_dummy_call): Handle avr6 architecture.
1191 Fix the returned value. Fix style.
1193 2009-10-26 Joel Brobecker <brobecker@adacore.com>
1195 * MAINTAINERS (Responsible Maintainers): Add info about the microblaze
1196 targets. Add Michael Eager as the maintainer for this target.
1198 2009-10-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1200 Performance optimize large bp_location count.
1201 * breakpoint.c (ALL_BP_LOCATIONS_SAFE): Remove.
1202 (ALL_BP_LOCATIONS): New parameter BP_TMP. Use now bp_location and
1204 (bp_location_chain): Remove variable.
1205 (bp_location, bp_location_count)
1206 (bp_location_placed_address_before_address_max)
1207 (bp_location_shadow_len_after_address_max): New variables.
1208 (moribund_locations, update_watchpoint): Update the bp_location
1210 (breakpoint_restore_shadows): Extend the comment. Move the variable
1211 b to local blocks. Move the variables bp_addr, bp_size and bptoffset
1212 to a local block. New variables bc_l, bc_r and bc. New binary search
1213 for the left range boundary. New break on reaching the right range
1214 boundary. Move shadow existence conditionals to ...
1215 (bp_location_has_shadow): ... a new function.
1216 (insert_breakpoint_locations): Replace the temp variable by bp_tmp.
1217 Use now ALL_BP_LOCATIONS instead of ALL_BP_LOCATIONS_SAFE.
1218 (remove_breakpoints, remove_hw_watchpoints, reattach_breakpoints)
1219 (detach_breakpoints): New variable bp_tmp. Update the ALL_BP_LOCATIONS
1221 (update_breakpoints_after_exec): New variable bplocp_tmp. Update the
1222 ALL_BP_LOCATIONS calling convention.
1223 (breakpoint_here_p, software_breakpoint_inserted_here_p)
1224 (breakpoint_thread_match): New variable bptp_tmp. Drop the const
1225 attribute of bpt. Update the ALL_BP_LOCATIONS calling convention.
1226 (regular_breakpoint_inserted_here_p): Likewise. Update the bp_location
1228 (mark_breakpoints_out, breakpoint_init_inferior): New variable
1229 bptp_tmp. Update the ALL_BP_LOCATIONS calling convention.
1230 (bpstat_stop_status): New variables blp_tmp and update_locations. Drop
1231 the const attribute of bl. Update the ALL_BP_LOCATIONS calling
1232 convention. Protect HIT_COUNT increment by an ENABLE_STATE check.
1233 Delay the update_global_location_list call using update_locations.
1234 (set_default_breakpoint): Drop the check_duplicates name from comment.
1235 (disable_breakpoints_in_shlibs, disable_breakpoints_in_unloaded_shlib):
1236 New variable locp_tmp. Update the ALL_BP_LOCATIONS calling convention.
1237 (bp_location_compare, bp_location_compare_for_qsort)
1238 (bp_location_target_extensions_update): New functions.
1239 (check_duplicates, check_duplicates_for): Remove, moving their code ...
1240 (update_global_location_list): ... into this existing function. Remove
1241 variables next, loc2, old_locations, ret and ix. New variables locp,
1242 loc_first, old_location, old_locp and old_location_count. Stop using
1243 global_next, create now the array bp_location, sort it by
1244 bp_location_compare_for_qsort and call
1245 bp_location_target_extensions_update. Change quadratic iteration by
1246 loc2 into an in-sync scanning by locp and loc2p. Rename former loc
1248 (do_vec_free): Remove.
1249 (breakpoint_program_space_exit): Update the ALL_BP_LOCATIONS calling
1251 (remove_breakpoints_pid): New variable b_tmp. Update the
1252 ALL_BP_LOCATIONS calling convention.
1253 * breakpoint.h (struct bp_location <global_next>): Remove.
1255 2009-10-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1257 * mep-tdep.c: Update include for the new location cgen/bitset.h.
1259 2009-10-23 Tom Tromey <tromey@redhat.com>
1261 * blockframe.c (_initialize_blockframe): Remove declaration.
1263 2009-10-23 Doug Evans <dje@google.com>
1265 * record.c (record_core_xfer_partial): Pass correct offset to
1266 record_beneath_to_xfer_partial.
1268 2009-10-23 Michael Snyder <msnyder@vmware.com>
1270 * record.c (top level): Don't include byteswap.h.
1271 (netorder64): Use store_unsigned_integer instead of bswap_64.
1272 (netorder32): Use store_unsigned_integer instead of bswap_32.
1273 (netorder16): Use store_unsigned_integer instead of bswap_16.
1275 2009-10-23 Michael Snyder <msnyder@vmware.com>
1277 * record.c (netorder64): Use BFD_ENDIAN_LITTLE not LITTLE_ENDIAN.
1278 (netorder32): Ditto.
1279 (netorder16): Ditto.
1281 2009-10-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1283 * objfiles.c (allocate_objfile): Use xzalloc.
1285 2009-10-23 Hui Zhu <teawater@gmail.com>
1287 * record.c (record_restore): Use phex_nz.
1289 2009-10-23 Tristan Gingold <gingold@adacore.com>
1291 * frame.c (frame_unwind_pc): Fix typo: remove duplicate 0x.
1293 2009-10-23 Tristan Gingold <gingold@adacore.com>
1295 * objfiles.c (allocate_objfile): Remove useless test. Move
1296 declaration of last_one to the block that uses it.
1298 2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1300 * record.c (record_restore, cmd_record_save): Fix warnings.
1302 2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1304 * disasm.h (DISASSEMBLY_OMIT_FNAME) New define.
1305 (gdb_disassembly): Correct parameter name.
1306 * disasm.c (dump_insns): Adjust.
1307 (gdb_disassembly): Fix indentation.
1308 * cli/cli-cmds.c (disassemble_command): Adjust.
1310 2009-10-22 Michael Snyder <msnyder@vmware.com>
1312 * infrun.c (keep_going): If insert_breakpoints fails,
1315 2009-10-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1318 * dwarf2-frame.c (find_cie): Don't call bsearch on empty cie_table.
1319 * objfiles.c (find_pc_section): Likewise.
1320 (update_section_map): Don't allocate empty table.
1322 2009-10-22 Hui Zhu <teawater@gmail.com>
1323 Michael Snyder <msnyder@vmware.com>
1325 * record.c (RECORD_FILE_MAGIC): New constant.
1326 (record_arch_list_cleanups): Renamed from record_message_cleanups.
1327 (bfdcore_read): New function.
1328 (netorder64): New function.
1329 (netorder32): New function.
1330 (netorder16): New function.
1331 (record_restore): New function. Restore a saved record log.
1332 (bfdcore_write): New function.
1333 (cmd_record_restore): New function.
1334 (cmd_record_save): New function. Save a record log to a file.
1335 (_initialize_record): Set up commands for save and restore.
1337 2009-10-22 Michael Snyder <msnyder@vmware.com>
1339 * gcore.h: New file.
1340 * gcore.c (create_gcore_bfd): New function.
1341 (write_gcore_file): New function.
1342 (call_target_sbrk): New function. Abstracted from gcore_command.
1343 (gcore_command): Call call_target_sbrk.
1345 2009-10-22 Hui Zhu <teawater@gmail.com>
1346 Michael Snyder <msnyder@vmware.com>
1348 * record.c (record_core_ops): New ops target vector.
1349 (record_core_open_1): New function. Open core target.
1350 (record_open_1): New function. Open normal process record.
1351 (record_open): Call one of the above.
1352 (record_close): Allow for both core and normal targets.
1353 (record_core_resume): New function.
1354 (record_core_kill): New function.
1355 (record_core_fetch_registers): New function.
1356 (record_core_prepare_to_store): New function.
1357 (record_core_store_registers): New function.
1358 (record_core_xfer_partial): New function.
1359 (record_core_insert_breakpoint): New function.
1360 (record_core_remove_breakpoint): New function.
1361 (record_core_has_execution): New function.
1362 (init_record_core_ops): New function.
1363 (_initialize_record): Call init_record_core_ops, add_target.
1365 2009-10-22 Tristan Gingold <gingold@adacore.com>
1367 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Use
1368 amd64_supply_fxsave for amd64. Fix the offset.
1369 (i386_darwin_store_inferior_registers): Use amd64_collect_fxsave
1372 2009-10-21 Maxim Grigoriev <maxim2405@gmail.com>
1374 * xtensa-tdep.c (XTENSA_ISA_BADPC): New.
1375 (xtensa_scan_prologue): Replace read_memory with target_read_memory.
1376 (call0_analyze_prologue): Use XTENSA_ISA_BADPC instead of "0".
1377 (call0_frame_cache): Check error conditions on call0_analyze_prologue.
1379 2009-10-21 Paul Pluzhnikov <ppluzhnikov@google.com>
1381 * defs.h (pc_prefix): New prototype.
1382 * disasm.c (dump_insns): Mark current instruction.
1383 * printcmd.c (do_examine): Likewise.
1384 (pc_prefix): New function.
1385 * stack.c (print_frame_info): Disassemble entire current line.
1387 2009-10-21 Michael Snyder <msnyder@vmware.com>
1389 Elaborate "info record".
1390 * record.c (struct record_end_entry): New field 'insn_num'.
1391 (record_insn_count): New variable.
1392 (record_open): Initialize record_insn_count.
1393 (info_record_command): Display contents of record log as
1394 lowest, current, and highest instruction counts.
1395 (show_record_insn_number): Delete.
1396 (_initialize_record): Remove add_cmd show_record_insn_number.
1398 2009-10-21 Andrew Stubbs <ams@codesourcery.com>
1399 Joel Brobecker <brobecker@adacore.com>
1401 * Makefile.in (HFILES_NO_SRCDIR): Remove shnbsd-tdep.h
1402 * configure.tgt (sh*-*-linux*): Add corelow.o to gdb_target_obs.
1403 * sh-linux-tdep.c: Include sh-tdep.h.
1404 (REGSx16): New macro.
1405 (gregs_table, fpregs_table): New variables.
1406 (sh_linux_init_abi): Set core_gregmap and fpregmap.
1407 * sh-tdep.c: Include regset.h.
1408 (sh_corefile_supply_regset): New function.
1409 (sh_corefile_collect_regset): New function.
1410 (sh_corefile_gregset, sh_corefile_fpregset): New variables.
1411 (sh_regset_from_core_section): New function.
1412 (sh_gdbarch_init): Set up tdep value.
1413 Call set_gdbarch_regset_from_core_section.
1414 * sh-tdep.h (PC_REGNUM): New enum value.
1415 (struct sh_corefile_regs): New type.
1416 (sh_corefile_gregset): Export variable.
1417 (sh_corefile_supply_regset): New prototype.
1418 (sh_corefile_collect_regset): New prototype.
1419 * shnbsd-tdep.c: Remove include of regcache.h, gdb_assert.h and
1421 (regmap): Use new definition using struct sh_corefile_regs.
1422 (shnbsd_supply_gregset, shnbsd_collect_gregset): Delete.
1423 (shnbsd_gregset): Delete.
1424 (shnbsd_regset_from_core_section): Delete.
1425 (shnbsd_supply_reg, shnbsd_fill_reg): Use new regset interface.
1426 (shnbsd_init_abi): Set core_gregmap.
1427 (shnbsd_supply_reg): Delete.
1428 (shnbsd_fill_reg): Delete.
1429 (SHNBSD_SIZEOF_GREGS): Move ...
1430 * shnbsd-nat.c (SHNBSD_SIZEOF_GREGS): ... to here.
1431 Remove include of shnbsd-tdep.h.
1432 (shnbsd_fetch_inferior_registers): Replace shnbsd_supply_reg call
1433 with sh_corefile_supply_regset.
1434 (shnbsd_store_inferior_registers): Replace shnbsd_fill_reg call with
1435 sh_corefile_collect_regset.
1436 * shnbsd-tdep.h: Delete file.
1438 2009-10-21 Pierre Muller <muller@ics.u-strasbg.fr>
1440 * rs6000-nat.c (exec_one_dummy_insn): Add missing new ASPACE parameter
1441 to depreacted_insert_raw_breakpoint function call.
1442 * procfs.c (insert_dbx_link_bpt_in_file): Likewise.
1444 2009-10-20 Michael Snyder <msnyder@vmware.com>
1446 * record.c: Add some top-level comments for general explanation.
1448 2009-10-20 Hui Zhu <teawater@gmail.com>
1449 Michael Snyder <msnyder@vmware.com>
1451 * record.c (record_exec_insn): New function. Emulate one
1452 instruction, forward or backward. Abstracted from record_wait.
1453 (record_wait) Call record_exec_insn.
1455 2009-10-20 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
1457 * infrun.c (handle_inferior_event): Add pspace field to sal
1458 for reverse execution cases.
1460 2009-10-20 Ken Werner <ken@linux.vnet.ibm.com>
1462 * go32-nat.c (go32_create_inferior): Use inferior_appeared, not
1463 inferior_appeared_silent.
1464 * remote-sim.c (gdbsim_create_inferior): Ditto.
1466 2009-10-20 Pedro Alves <pedro@codesourcery.com>
1468 * darwin-nat.c (cancel_breakpoint): Pass the regcache's address
1469 space to breakpoint_inserted_here_p.
1471 2009-10-20 Pedro Alves <pedro@codesourcery.com>
1473 * linux-nat.c (linux_nat_thread_address_space): New.
1474 (linux_nat_add_target): Install it.
1475 * progspace.c (address_space_num): New.
1476 * progspace.h (address_space_num): Declare.
1477 * target.c (target_thread_address_space): Really query the target.
1478 * target.h (struct target_ops) <to_thread_address_space>: New
1481 2009-10-19 Joel Brobecker <brobecker@adacore.com>
1483 * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Add comment.
1485 2009-10-19 Pedro Alves <pedro@codesourcery.com>
1486 Stan Shebs <stan@codesourcery.com>
1488 Add base multi-executable/process support to GDB.
1490 * Makefile.in (SFILES): Add progspace.c.
1491 (COMMON_OBS): Add progspace.o.
1495 * breakpoint.h (struct bp_target_info) <placed_address_space>: New
1497 (struct bp_location) <pspace>: New field.
1498 (struct breakpoint) <pspace>: New field.
1499 (bpstat_stop_status, breakpoint_here_p)
1500 (moribund_breakpoint_here_p, breakpoint_inserted_here_p)
1501 (regular_breakpoint_inserted_here_p)
1502 (software_breakpoint_inserted_here_p, breakpoint_thread_match)
1503 (set_default_breakpoint): Adjust prototypes.
1504 (remove_breakpoints_pid, breakpoint_program_space_exit): Declare.
1505 (insert_single_step_breakpoint, deprecated_insert_raw_breakpoint):
1507 * breakpoint.c (executing_startup): Delete.
1508 (default_breakpoint_sspace): New.
1509 (breakpoint_restore_shadows): Skip if the address space doesn't
1511 (update_watchpoint): Record the frame's program space in the
1512 breakpoint location.
1513 (insert_bp_location): Record the address space in target_info.
1514 Adjust to pass the symbol space to solib_name_from_address.
1515 (breakpoint_program_space_exit): New.
1516 (insert_breakpoint_locations): Switch the symbol space and thread
1517 when inserting breakpoints. Don't insert breakpoints in a vfork
1518 parent waiting for vfork done if we're not attached to the vfork
1520 (remove_breakpoints_pid): New.
1521 (reattach_breakpoints): Switch to a thread of PID. Ignore
1522 breakpoints of other symbol spaces.
1523 (create_internal_breakpoint): Store the symbol space in the sal.
1524 (create_longjmp_master_breakpoint): Iterate over all symbol
1526 (update_breakpoints_after_exec): Ignore breakpoints for other
1528 (remove_breakpoint): Rename to ...
1529 (remove_breakpoint_1): ... this. Pass the breakpoints symbol
1530 space to solib_name_from_address.
1531 (remove_breakpoint): New.
1532 (mark_breakpoints_out): Ignore breakpoints from other symbol
1534 (breakpoint_init_inferior): Ditto.
1535 (breakpoint_here_p): Add an address space argument and adjust to
1536 use breakpoint_address_match.
1537 (moribund_breakpoint_here_p): Ditto.
1538 (regular_breakpoint_inserted_here_p): Ditto.
1539 (breakpoint_inserted_here_p): Ditto.
1540 (software_breakpoint_inserted_here_p): Ditto.
1541 (breakpoint_thread_match): Ditto.
1542 (bpstat_check_location): Ditto.
1543 (bpstat_stop_status): Ditto.
1544 (print_breakpoint_location): If there's a location to print,
1545 switch the current symbol space.
1546 (print_one_breakpoint_location): Add `allflag' argument.
1547 (print_one_breakpoint): Ditto. Adjust.
1548 (do_captured_breakpoint_query): Adjust.
1549 (breakpoint_1): Adjust.
1550 (breakpoint_has_pc): Also match the symbol space.
1551 (describe_other_breakpoints): Add a symbol space argument and
1553 (set_default_breakpoint): Add a symbol space argument. Set
1554 default_breakpoint_sspace.
1555 (breakpoint_address_match): New.
1556 (check_duplicates_for): Add an address space argument, and adjust.
1557 (set_raw_breakpoint): Record the symbol space in the location and
1559 (set_longjmp_breakpoint): Skip longjmp master breakpoints from
1560 other symbol spaces.
1561 (remove_thread_event_breakpoints, remove_solib_event_breakpoints)
1562 (disable_breakpoints_in_shlibs): Skip breakpoints from other
1564 (disable_breakpoints_in_unloaded_shlib): Match symbol spaces.
1565 (create_catchpoint): Set the symbol space in the sal.
1566 (disable_breakpoints_before_startup): Skip breakpoints from other
1567 symbol spaces. Set executing_startup in the current symbol space.
1568 (enable_breakpoints_after_startup): Clear executing_startup in the
1569 current symbol space. Skip breakpoints from other symbol spaces.
1570 (clone_momentary_breakpoint): Also copy the symbol space.
1571 (add_location_to_breakpoint): Set the location's symbol space.
1572 (bp_loc_is_permanent): Switch thread and symbol space.
1573 (create_breakpoint): Adjust.
1574 (expand_line_sal_maybe): Expand comment to mention symbol spaces.
1575 Switch thread and symbol space when reading memory.
1576 (parse_breakpoint_sals): Set the symbol space in the sal.
1577 (break_command_really): Ditto.
1578 (skip_prologue_sal): Switch and space.
1579 (resolve_sal_pc): Ditto.
1580 (watch_command_1): Record the symbol space in the sal.
1581 (create_ada_exception_breakpoint): Adjust.
1582 (clear_command): Adjust. Match symbol spaces.
1583 (update_global_location_list): Use breakpoint_address_match.
1584 (breakpoint_re_set_one): Switch thread and space.
1585 (breakpoint_re_set): Save symbol space.
1586 (breakpoint_re_set_thread): Also reset the symbol space.
1587 (deprecated_insert_raw_breakpoint): Add an address space argument.
1589 (insert_single_step_breakpoint): Ditto.
1590 (single_step_breakpoint_inserted_here_p): Ditto.
1591 (clear_syscall_counts): New.
1592 (_initialize_breakpoint): Install it as inferior_exit observer.
1594 * exec.h: Include "progspace.h".
1595 (exec_bfd, exec_bfd_mtime): New defines.
1596 (exec_close): Declare.
1597 * exec.c: Include "gdbthread.h" and "progspace.h".
1598 (exec_bfd, exec_bfd_mtime, current_target_sections_1): Delete.
1599 (using_exec_ops): New.
1600 (exec_close_1): Rename to exec_close, and make public.
1601 (exec_close): Rename to exec_close_1, and adjust all callers. Add
1602 description. Remove target sections and close executables from
1604 (exec_file_attach): Add comment.
1605 (add_target_sections): Check on `using_exec_ops' to check if the
1606 target should be pushed.
1607 (remove_target_sections): Only unpush the target if there are no
1608 more target sections in any symbol space.
1609 * gdbcore.h: Include "exec.h".
1610 (exec_bfd, exec_bfd_mtime): Remove declarations.
1612 * frame.h (get_frame_program_space, get_frame_address_space)
1613 (frame_unwind_program_space): Declare.
1614 * frame.c (struct frame_info) <pspace, aspace>: New fields.
1615 (create_sentinel_frame): Add program space argument. Set the
1616 pspace and aspace fields of the frame object.
1617 (get_current_frame, create_new_frame): Adjust.
1618 (get_frame_program_space): New.
1619 (frame_unwind_program_space): New.
1620 (get_frame_address_space): New.
1621 * stack.c (print_frame_info): Adjust.
1622 (print_frame): Use the frame's program space.
1624 * gdbthread.h (any_live_thread_of_process): Declare.
1625 * thread.c (any_live_thread_of_process): New.
1626 (switch_to_thread): Switch the program space as well.
1627 (restore_selected_frame): Don't warn if trying to restore frame
1630 * inferior.h: Include "progspace.h".
1631 (detach_fork): Declare.
1632 (struct inferior) <removable, aspace, pspace>
1633 <vfork_parent, vfork_child, pending_detach>
1634 <waiting_for_vfork_done>: New fields.
1635 <terminal_info>: Remove field.
1636 <data, num_data>: New fields.
1637 (register_inferior_data, register_inferior_data_with_cleanup)
1638 (clear_inferior_data, set_inferior_data, inferior_data): Declare.
1639 (exit_inferior, exit_inferior_silent, exit_inferior_num_silent)
1640 (inferior_appeared): Declare.
1641 (find_inferior_pid): Typo.
1642 (find_inferior_id, find_inferior_for_program_space): Declare.
1643 (set_current_inferior, save_current_inferior, prune_inferiors)
1644 (number_of_inferiors): Declare.
1645 (inferior_list): Declare.
1646 * inferior.c: Include "gdbcore.h" and "symfile.h".
1647 (inferior_list): Make public.
1648 (delete_inferior_1): Always delete thread silently.
1649 (find_inferior_id): Make public.
1650 (current_inferior_): New.
1651 (current_inferior): Use it.
1652 (set_current_inferior): New.
1653 (restore_inferior): New.
1654 (save_current_inferior): New.
1655 (free_inferior): Free the per-inferior data.
1656 (add_inferior_silent): Allocate per-inferior data.
1657 Call inferior_appeared.
1658 (delete_threads_of_inferior): New.
1659 (delete_inferior_1): Adjust interface to take an inferior pointer.
1660 (delete_inferior): Adjust.
1661 (delete_inferior_silent): Adjust.
1662 (exit_inferior_1): New.
1663 (exit_inferior): New.
1664 (exit_inferior_silent): New.
1665 (exit_inferior_num_silent): New.
1666 (detach_inferior): Adjust.
1667 (inferior_appeared): New.
1668 (discard_all_inferiors): Adjust.
1669 (find_inferior_id): Make public. Assert pid is not zero.
1670 (find_inferior_for_program_space): New.
1671 (have_inferiors): Check if we have any inferior with pid not zero.
1672 (have_live_inferiors): Go over all pushed targets looking for
1674 (prune_inferiors): New.
1675 (number_of_inferiors): New.
1676 (print_inferior): Add executable column. Print vfork parent/child
1678 (inferior_command): Adjust to cope with not running inferiors.
1679 (remove_inferior_command): New.
1680 (add_inferior_command): New.
1681 (clone_inferior_command): New.
1682 (struct inferior_data): New.
1683 (struct inferior_data_registration): New.
1684 (struct inferior_data_registry): New.
1685 (inferior_data_registry): New.
1686 (register_inferior_data_with_cleanup): New.
1687 (register_inferior_data): New.
1688 (inferior_alloc_data): New.
1689 (inferior_free_data): New.
1690 (clear_inferior_data): New.
1691 (set_inferior_data): New.
1692 (inferior_data): New.
1693 (initialize_inferiors): New.
1694 (_initialize_inferiors): Register "add-inferior",
1695 "remove-inferior" and "clone-inferior" commands.
1697 * objfiles.h: Include "progspace.h".
1698 (struct objfile) <pspace>: New field.
1699 (symfile_objfile, object_files): Don't declare.
1700 (ALL_PSPACE_OBJFILES): New.
1701 (ALL_PSPACE_OBJFILES_SAFE): New.
1702 (ALL_OBJFILES, ALL_OBJFILES_SAFE): Adjust.
1703 (ALL_PSPACE_SYMTABS): New.
1704 (ALL_PRIMARY_SYMTABS): Adjust.
1705 (ALL_PSPACE_PRIMARY_SYMTABS): New.
1706 (ALL_PSYMTABS): Adjust.
1707 (ALL_PSPACE_PSYMTABS): New.
1708 * objfiles.c (object_files, symfile_objfile): Delete.
1709 (struct objfile_sspace_info): New.
1710 (objfiles_pspace_data): New.
1711 (objfiles_pspace_data_cleanup): New.
1712 (get_objfile_pspace_data): New.
1713 (objfiles_changed_p): Delete.
1714 (allocate_objfile): Set the objfile's program space. Adjust to
1715 reference objfiles_changed_p in pspace data.
1716 (free_objfile): Adjust to reference objfiles_changed_p in pspace
1718 (objfile_relocate): Ditto.
1719 (update_section_map): Add pspace argument. Adjust to iterate over
1720 objfiles in the passed in pspace.
1721 (find_pc_section): Delete sections and num_sections statics.
1722 Adjust to refer to program space's objfiles_changed_p. Adjust to
1723 refer to sections and num_sections store in the objfile's pspace
1725 (objfiles_changed): Adjust to reference objfiles_changed_p in
1727 (_initialize_objfiles): New.
1728 * linespec.c (decode_all_digits, decode_dollar): Set the sal's
1730 * source.c (current_source_pspace): New.
1731 (get_current_source_symtab_and_line): Set the sal's program space.
1732 (set_current_source_symtab_and_line): Set current_source_pspace.
1733 (select_source_symtab): Ditto. Use ALL_OBJFILES.
1734 (forget_cached_source_info): Iterate over all program spaces.
1735 * symfile.c (clear_symtab_users): Adjust.
1736 * symmisc.c (print_symbol_bcache_statistics): Iterate over all
1738 (print_objfile_statistics): Ditto.
1739 (maintenance_print_msymbols): Ditto.
1740 (maintenance_print_objfiles): Ditto.
1741 (maintenance_info_symtabs): Ditto.
1742 (maintenance_info_psymtabs): Ditto.
1743 * symtab.h (SYMTAB_PSPACE): New.
1744 (struct symtab_and_line) <pspace>: New field.
1745 * symtab.c (init_sal): Clear the sal's program space.
1746 (find_pc_sect_symtab): Set the sal's program space. Switch thread
1748 (append_expanded_sal): Add program space argument. Iterate over
1750 (expand_line_sal): Iterate over all program spaces. Switch
1753 * target.h (enum target_waitkind) <TARGET_WAITKIND_VFORK_DONE>: New.
1754 (struct target_ops) <to_thread_address_space>: New field.
1755 (target_thread_address_space): Define.
1756 * target.c (target_detach): Only remove breakpoints from the
1757 inferior we're detaching.
1758 (target_thread_address_space): New.
1760 * defs.h (initialize_progspace): Declare.
1761 * top.c (gdb_init): Call it.
1763 * solist.h (struct so_list) <sspace>: New field.
1764 * solib.h (struct program_space): Forward declare.
1765 (solib_name_from_address): Adjust prototype.
1766 * solib.c (so_list_head): Replace with a macro referencing the
1768 (update_solib_list): Set the so's program space.
1769 (solib_name_from_address): Add a program space argument and adjust.
1771 * solib-svr4.c (struct svr4_info) <pid>: Delete field.
1772 <interp_text_sect_low, interp_text_sect_high, interp_plt_sect_low>
1773 <interp_plt_sect_high>: New fields.
1774 (svr4_info_p, svr4_info): Delete.
1775 (solib_svr4_sspace_data): New.
1776 (get_svr4_info): Rewrite.
1777 (svr4_sspace_data_cleanup): New.
1778 (open_symbol_file_object): Adjust.
1779 (svr4_default_sos): Adjust.
1780 (svr4_fetch_objfile_link_map): Adjust.
1781 (interp_text_sect_low, interp_text_sect_high, interp_plt_sect_low)
1782 (interp_plt_sect_high): Delete.
1783 (svr4_in_dynsym_resolve_code): Adjust.
1784 (enable_break): Adjust.
1785 (svr4_clear_solib): Revert bit that removed the svr4_info here,
1786 and reinstate clearing debug_base, debug_loader_offset_p,
1787 debug_loader_offset and debug_loader_name.
1788 (_initialize_svr4_solib): Register solib_svr4_pspace_data. Don't
1789 install an inferior_exit observer anymore.
1791 * printcmd.c (struct display) <pspace>: New field.
1792 (display_command): Set the display's sspace.
1793 (do_one_display): Match the display's sspace.
1794 (display_uses_solib_p): Ditto.
1796 * linux-fork.c (detach_fork): Moved to infrun.c.
1797 (_initialize_linux_fork): Moved "detach-on-fork" command to
1799 * infrun.c (detach_fork): Moved from linux-fork.c.
1800 (proceed_after_vfork_done): New.
1801 (handle_vfork_child_exec_or_exit): New.
1802 (follow_exec_mode_replace, follow_exec_mode_keep)
1803 (follow_exec_mode_names, follow_exec_mode_string)
1804 (show_follow_exec_mode_string): New.
1805 (follow_exec): New. Reinstate the mark_breakpoints_out call.
1806 Remove shared libraries before attaching new executable. If user
1807 wants to keep the inferior, keep it.
1808 (displaced_step_fixup): Adjust to pass an address space to the
1811 (clear_proceed_status): In all-stop mode, always clear the proceed
1812 status of all threads.
1813 (prepare_to_proceed): Adjust to pass an address space to the
1816 (adjust_pc_after_break): Ditto.
1817 (handle_inferior_event): When handling a process exit, switch the
1818 program space to the inferior's that had exited. Call
1819 handle_vfork_child_exec_or_exit. Adjust to pass an address space
1820 to the breakpoints module. In non-stop mode, when following a
1821 fork and detach-fork is off, also resume the other branch. Handle
1822 TARGET_WAITKIND_VFORK_DONE. Set the program space in sals.
1823 (normal_stop): Prune inferiors.
1824 (_initialize_infrun): Install the new "follow-exec-mode" command.
1825 "detach-on-fork" moved here.
1827 * regcache.h (get_regcache_aspace): Declare.
1828 * regcache.c (struct regcache) <aspace>: New field.
1829 (regcache_xmalloc): Clear the aspace.
1830 (get_regcache_aspace): New.
1831 (regcache_cpy): Copy the aspace field.
1832 (regcache_cpy_no_passthrough): Ditto.
1833 (get_thread_regcache): Fetch the thread's address space from the
1834 target, and store it in the regcache.
1836 * infcall.c (call_function_by_hand): Set the sal's pspace.
1838 * arch-utils.c (default_has_shared_address_space): New.
1839 * arch-utils.h (default_has_shared_address_space): Declare.
1841 * gdbarch.sh (has_shared_address_space): New.
1842 * gdbarch.h, gdbarch.c: Regenerate.
1844 * linux-tdep.c: Include auxv.h, target.h, elf/common.h.
1845 (linux_has_shared_address_space): New.
1846 (_initialize_linux_tdep): Declare.
1848 * arm-tdep.c (arm_software_single_step): Pass the frame's address
1849 space to insert_single_step_breakpoint.
1850 * arm-linux-tdep.c (arm_linux_software_single_step): Pass the
1851 frame's pspace to breakpoint functions.
1852 * cris-tdep.c (crisv32_single_step_through_delay): Ditto.
1853 (cris_software_single_step): Ditto.
1854 * mips-tdep.c (deal_with_atomic_sequence): Add frame argument.
1855 Pass the frame's pspace to breakpoint functions.
1856 (mips_software_single_step): Adjust.
1857 (mips_single_step_through_delay): Adjust.
1858 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
1859 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
1860 * solib-irix.c (enable_break): Adjust to pass the current frame's
1861 address space to breakpoint functions.
1862 * sparc-tdep.c (sparc_software_single_step): Ditto.
1863 * spu-tdep.c (spu_software_single_step): Ditto.
1864 * alpha-tdep.c (alpha_software_single_step): Ditto.
1865 * record.c (record_wait): Adjust to pass an address space to the
1868 * fork-child.c (fork_inferior): Set the new inferior's program and
1870 * inf-ptrace.c (inf_ptrace_follow_fork): Copy the parent's program
1872 (inf_ptrace_attach): Set the inferior's program and address spaces.
1873 * linux-nat.c: Include "solib.h".
1874 (linux_child_follow_fork): Manage parent and child's program and
1875 address spaces. Clone the parent's program space if necessary.
1876 Don't wait for the vfork to be done here. Refuse to resume if
1877 following the vfork parent while leaving the child stopped.
1878 (resume_callback): Don't resume a vfork parent.
1879 (linux_nat_resume): Also check for pending events in the
1880 lp->waitstatus field.
1881 (linux_handle_extended_wait): Report TARGET_WAITKIND_VFORK_DONE
1883 (stop_wait_callback): Don't wait for SIGSTOP on vfork parents.
1884 (cancel_breakpoint): Adjust.
1885 * linux-thread-db.c (thread_db_wait): Don't remove thread event
1887 (thread_db_mourn_inferior): Don't mark breakpoints out here.
1888 Remove thread event breakpoints after mourning.
1889 * corelow.c: Include progspace.h.
1890 (core_open): Set the inferior's program and address spaces.
1891 * remote.c (remote_add_inferior): Set the new inferior's program
1893 (remote_start_remote): Update address spaces.
1894 (extended_remote_create_inferior_1): Don't init the thread list if
1895 we already debugging other inferiors.
1896 * darwin-nat.c (darwin_attach): Set the new inferior's program and
1898 * gnu-nat.c (gnu_attach): Ditto.
1899 * go32-nat.c (go32_create_inferior): Ditto.
1900 * inf-ttrace.c (inf_ttrace_follow_fork, inf_ttrace_attach): Ditto.
1901 * monitor.c (monitor_open): Ditto.
1902 * nto-procfs.c (procfs_attach, procfs_create_inferior): Ditto.
1903 * procfs.c (do_attach): Ditto.
1904 * windows-nat.c (do_initial_windows_stuff): Ditto.
1906 * inflow.c (inferior_process_group)
1907 (terminal_init_inferior_with_pgrp, terminal_inferior,
1908 (terminal_ours_1, inflow_inferior_exit, copy_terminal_info)
1909 (child_terminal_info, new_tty_postfork, set_sigint_trap): Adjust
1910 to use per-inferior data instead of inferior->terminal_info.
1911 (inflow_inferior_data): New.
1912 (inflow_new_inferior): Delete.
1913 (inflow_inferior_data_cleanup): New.
1914 (get_inflow_inferior_data): New.
1916 * mi/mi-interp.c (mi_new_inferior): Rename to...
1917 (mi_inferior_appeared): ... this.
1918 (mi_interpreter_init): Adjust.
1920 * tui/tui-disasm.c: Include "progspace.h".
1921 (tui_set_disassem_content): Pass an address space to
1924 * NEWS: Mention multi-program debugging support. Mention new
1925 commands "add-inferior", "clone-inferior", "remove-inferior",
1926 "maint info program-spaces", and new option "set
1929 2009-10-19 Don Lee <don.lee@sunplusct.com>
1931 * score-tdep.c: Delete dead codes.
1933 2009-10-15 Michael Snyder <msnyder@vmware.com>
1935 * record.c (struct record_reg_entry): Replace ptr with union
1937 (struct record_mem_entry): Ditto.
1938 (record_reg_alloc): Don't alloc ptr if reg will fit into buf.
1939 (record_mem_alloc): Ditto.
1940 (record_reg_release): Don't free ptr if reg was stored in buf.
1941 (record_mem_release): Ditto.
1942 (record_get_loc): New function. Return a pointer to where the
1943 value (mem or reg) is to be stored.
1944 (record_arch_list_add_reg): Call record_get_loc instead of using ptr.
1945 (record_arch_list_add_mem): Ditto.
1946 (record_wait): Ditto.
1948 2009-10-16 Michael Eager <eager@eagercon.com>
1950 * microblaze-linux-tdep.c:
1951 microblaze_linux_memory_remove_breakpoint(): Add gdbarch to param,
1952 replace frame_pc_unwind with get_frame_address_in_block.
1953 * microblaze-tdep.c: Remove MICROBLAZE_REGISTER_SIZE.
1954 * microblaze-tdep.h: Add MICROBLAZE_REGISTER_SIZE.
1956 2008-10-15 Steven G. Kargl <kargl@gcc.gnu.org> (tiny patch)
1958 * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Conditionally compile in
1959 support for pcb->pcb_{fs,ds,es,gs} on FreeBSD older than 8.0.
1961 2009-10-15 Michael Eager <eager@eagercon.com>
1963 * config/djgpp/fnchange.lst: Add translations for cpu-microblaze.c,
1964 elf32-microblaze.c, microblaze-rom.c, microblaze-linux-tdep.c,
1965 microblaze-tdep.h, microblaze-tdep.c, microblaze-opc.h,
1966 microblaze-opcm.h, microblaze-dis.c, microblaze-dis.h, sim/microblaze,
1967 microblaze.h, and microblaze.isa.
1968 * configure.tgt: Add targets microblaze*-linux-*, microblaze*-xilinx-*.
1969 * Makefile.in: Build microblaze-tdep.o, microblaze-linux-tdep.o.
1970 HFILES_NO_SRCDIR: Add microblaze-tdep.h.
1971 * microblaze-linux-tdep.c: New.
1972 * microblaze-tdep.c: New.
1973 * microblaze-tdep.h: New.
1974 * NEWS: Announce Xilinx MicroBlaze support.
1976 2009-10-15 Paul Pluzhnikov <ppluzhnikov@google.com>
1979 * linux-nat.c (linux_nat_post_attach_wait): Adjust assert.
1980 (lin_lwp_attach_lwp, linux_nat_attach): Handle disappearing LWP.
1982 2009-10-15 Michael Snyder <msnyder@vmware.com>
1984 * record.c (record_insn_max_num): Make unsigned.
1985 (_initialize_record): Use uinteger instead of zinteger for
1986 set command, so that it will report "unlimited" for zero.
1988 2009-10-15 Michael Snyder <msnyder@vmware.com>
1990 * record.c (record_reg_alloc): New function.
1991 (record_reg_release): New function.
1992 (record_mem_alloc): New function.
1993 (record_mem_release): New function.
1994 (record_end_alloc): New function.
1995 (record_end_release): New function.
1996 (record_entry_release): New function.
1997 (record_list_release): Simplify, call record_entry_release.
1998 (record_list_release_next): Rename to record_list_release_following.
1999 Simplify and call record_entry_release.
2000 (record_list_release_first): Simplify, comment, and use
2001 record_entry_release.
2002 (record_arch_list_add_reg): Simplify, call record_reg_alloc.
2003 (record_arch_list_add_mem): Simplify, call record_mem_alloc.
2004 (record_arch_list_add_end): Simplify, call record_end_alloc.
2006 2009-10-14 Michael Snyder <msnyder@vmware.com>
2008 * record.c (record_list_release_first): Do not decrement
2010 (set_insn_num_max): Remove printf.
2011 Decrement record_insn_num in the loop.
2013 2009-10-14 Cary Coutant <ccoutant@google.com>
2015 * dwarf2read.c (read_import_statement): Call follow_die_ref_or_sig.
2017 2009-10-14 Keith Seitz <keiths@redhat.com>
2019 * dwarf2read.c (dwarf2_const_value): Fix order of arguments to
2020 store_unsigned_integer.
2022 2009-10-14 Pedro Alves <pedro@codesourcery.com>
2024 * configure.ac (build_warnings): Add -Wunused-value.
2025 * configure: Regenerate.
2027 2009-10-14 Tristan Gingold <gingold@adacore.com>
2029 * solib-darwin.c: Remove trailing whitespaces.
2030 (darwin_dyld_version_ok): Fix typo.
2032 2009-10-14 Andrew Stubbs <ams@codesourcery.com>
2034 * sh-tdep.c (sh_gdbarch_init): Add show_regs settings for
2035 bfd_mach_sh3_nommu, bfd_mach_sh2a_nofpu_or_sh3_nommu,
2036 bfd_mach_sh2a_or_sh3e, bfd_mach_sh2a_or_sh4, bfd_mach_sh4_nommu_nofpu,
2037 and bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu.
2038 Move bfd_mach_sh2a_or_sh4 to use the same configuration as
2041 2009-10-13 Daniel Jacobowitz <dan@codesourcery.com>
2043 * arm-tdep.c (arm_push_dummy_call): Set the low bit of LR for
2044 a Thumb entry point.
2045 (thumb_get_next_pc): Handle Thumb-2 and ARM v6 instructions. Refuse
2046 to single step into IT blocks.
2048 2009-10-13 Pedro Alves <pedro@codesourcery.com>
2050 * infcall.c (call_function_by_hand): Formatting.
2052 2009-10-13 Tristan Gingold <gingold@adacore.com>
2054 * solib-darwin.c: Add an empty line after comment for functions.
2055 (struct gdb_dyld_all_image_infos): Improve comment.
2056 (DYLD_VERSION): Removed and replaced by ...
2057 (DYLD_VERSION_MAX, DYLD_VERSION_MIN): ... New macros.
2058 (darwin_dyld_version_ok): New function.
2059 (darwin_load_image_infos): Call darwin_dyld_version_ok.
2060 (darwin_current_sos): Ditto.
2061 (darwin_solib_create_inferior_hook): Ditto.
2063 2009-10-13 Tristan Gingold <gingold@adacore.com>
2065 * machoread.c: Add an empty line after comment for functions.
2066 (oso_el_compare_name): New function.
2067 (macho_add_oso_symfile): New function.
2068 (macho_oso_symfile): Use macho_add_oso_symfile. Sort the oso
2069 and optimize accesses to libraries.
2071 2009-10-13 Tristan Gingold <gingold@adacore.com>
2073 * objfiles.c (objfile_has_symbols): New function.
2074 * objfiles.h (objfile_has_symbols): Add prototype.
2075 * symfile.c (symbol_file_add_with_addrs_or_offsets): Call
2076 objfile_has_symbols.
2077 (reread_symbols): Ditto.
2079 2009-10-12 Jiang Jilin <freephp@gmail.com>
2081 * i386-tdep.c (i386_process_record): Add xgetbv/xsetbv
2082 instructions support.
2084 2009-10-11 Pedro Alves <pedro@codesourcery.com>
2086 * procfs.c (procfs_make_note_section): Go back to only outputing
2087 an NT_PSTATUS note when UNIXWARE is defined.
2089 2009-10-11 Daniel Jacobowitz <dan@codesourcery.com>
2091 * features/xinclude.dtd: Correct EMPTY typo.
2093 2009-10-10 Michael Snyder <msnyder@vmware.com>
2095 * i386-tdep.c (i386_process_record): Or-equals, not not-equals.
2097 2009-10-10 Pedro Alves <pedro@codesourcery.com>
2099 * mi/mi-cmd-stack.c (list_args_or_locals): Use internal_error.
2100 Put "break" statements on their own line.
2102 2009-10-09 Pedro Alves <pedro@codesourcery.com>
2104 * linux-nat.c (linux_nat_wait_1): Bail out, if TARGET_WNOHANG and
2105 we found no event while waiting for a specific LWP.
2106 * infrun.c (handle_inferior_event): Handle TARGET_WAITKIND_IGNORE
2107 before anything else.
2109 2009-10-09 Pedro Alves <pedro@codesourcery.com>
2111 * procfs.c (procfs_make_note_section): Always output a NT_PSTATUS
2112 note when NEW_PROC_API is defined.
2114 2009-10-09 Pedro Alves <pedro@codesourcery.com>
2116 * corelow.c (core_has_fake_pid): New.
2117 (core_close): Clear it.
2118 (add_to_thread_list): Fake a pid if one is not found on a Solaris
2119 core. Add the inferior here. Always add the thread, don't use
2121 (core_open): Don't add the main thread or the inferior here unless
2122 we find that the core had no .reg/NN sections.
2123 (get_core_register_section): Handle Solaris cores with fake pids.
2125 * corelow.c (add_to_thread_list): Fix typo.
2127 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
2130 * elfread.c (elf_symtab_read): Don't use alloca in a loop.
2132 2009-10-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2134 * i386-nat.c (i386_stopped_by_hwbp): Remove.
2136 2009-10-07 Joel Brobecker <brobecker@adacore.com>
2138 * NEWS: Update following the GDB 7.0 release.
2140 2009-10-07 Pierre Muller <muller@ics.u-strasbg.fr>
2142 ARI fix: OP eol rule.
2143 * doublest.c (floatformat_from_length): Avoid operator at end of line.
2144 * dwarf2-frame.c (dwarf2_build_frame_info): Idem.
2145 * dwarf2read.c (read_array_order, dwarf_decode_macros): Idem.
2146 * eval.c (evaluate_subexp_standard): Idem.
2147 * event-loop.c (create_timer, handle_timer_event): Idem.
2148 * expprint.c (print_subexp_standard): Idem.
2149 * f-exp.y (variable): Idem.
2150 * f-typeprint.c (f_print_type): Idem.
2152 2009-10-06 Pierre Muller <muller@ics.u-strasbg.fr>
2154 ARI fix: OP eol rule.
2155 * blockframe.c (find_pc_partial_function): Avoid operator at end of
2157 * buildsym.c (find_symbol_in_list): Idem.
2158 (start_subfile, patch_subfile_names): Idem.
2159 * c-exp.y (variable, yylex): Idem.
2160 * c-typeprint.c (c_print_type, c_type_print_base): Idem.
2161 * c-valprint.c (c_val_print): Idem.
2162 * coffread.c (patch_opaque_types, process_coff_symbol): Idem.
2163 * corelow.c (core_open): Idem.
2164 * cris-tdep.c (move_reg_to_mem_movem_op): Idem.
2165 * cli/cli-decode.c (help_cmd_list, find_command_name_length): Idem.
2167 2009-10-06 Pierre Muller <muller@ics.u-strasbg.fr>
2169 ARI fix: OP eol rule.
2170 * ada-exp.y (block_lookup): Avoid operator at end of line.
2171 * aix-thread.c (pd_enable): Idem.
2172 * alpha-tdep.c (alpha_next_pc): Idem.
2173 * arm-tdep.c (arm_skip_prologue, arm_scan_prologue): Idem.
2174 (condition_true, coff_sym_is_thumb): Idem.
2176 2009-10-06 Joel Brobecker <brobecker@adacore.com>
2180 2009-10-06 Pierre Muller <muller@ics.u-strasbg.fr>
2183 * target.c (debug_to_thread_architecture): Replace %p by %s using
2184 host_address_to_string function.
2186 2009-10-06 Tristan Gingold <gingold@adacore.com>
2188 * darwin-nat.c: Add __TEXT __info_plist content.
2189 (darwin_attach_pid): Update error message.
2191 2009-10-06 Joel Brobecker <brobecker@adacore.com>
2193 * MAINTAINERS: Add Tristan Gingold as Maintainer of the Darwin port.
2195 2009-10-06 Joel Brobecker <brobecker@adacore.com>
2197 * MAINTAINERS: Add Jan Kratochvil as Maintainer of the ia64 target.
2199 2009-10-05 Pedro Alves <pedro@codesourcery.com>
2202 2009-10-04 Pedro Alves <pedro@codesourcery.com>
2203 * gdbinit.in: Set data-directory to @srcdir@.
2205 2009-10-04 Pedro Alves <pedro@codesourcery.com>
2207 * NEWS: Mention non-stop mode.
2209 2009-10-04 Pedro Alves <pedro@codesourcery.com>
2211 * gdbinit.in: Set data-directory to @srcdir@.
2213 2009-10-02 Pedro Alves <pedro@codesourcery.com>
2215 * linux-nat.c (TRAP_IS_SYSCALL, TRAP_REMOVE_SYSCALL_FLAG): Delete.
2216 (SYSCALL_SIGTRAP): New.
2217 (status_to_str): Adjust.
2218 (get_pending_status): Pending events in lp->waitstatus don't map
2219 to any signal. Simplify.
2220 (linux_handle_syscall_trap): New.
2221 (linux_handle_extended_wait): When handling PTRACE_EVENT_CLONE
2222 events, use linux_ops->to_resume instead of direct ptrace with
2223 PTRACE_CONT. Remove all TRAP_IS_SYSCALL handling.
2224 (wait_lwp): Handle syscall traps with linux_handle_syscall_trap,
2225 and clear the sysgood bit.
2226 (status_callback): Make it clearer and add comments.
2227 (cancel_breakpoints_callback): Ignore if LP has waitstatus set.
2228 (linux_nat_filter_event): Handle syscall traps with
2229 linux_handle_syscall_trap, and clear the sysgood bit. Move the
2230 check for storing siginfo to after handling extended statuses and
2231 syscall traps. Store status in the lwp object.
2232 (linux_wait_1): Don't swap the pending status out of the lwp
2233 object until after deciding we found an lwp with an interesting
2234 event. Requeue a new pending signal if we find one while getting
2235 rid or a pending SIGSTOP we sent ourselves. Don't clear the
2238 * infrun.c (deal_with_syscall_event): Rename to ...
2239 (handle_syscall_event): ... this. Always context switch and set
2240 stop_pc, even if not catching the syscall. If not catching the
2241 syscall, always resume with keep_going.
2242 (handle_inferior_event): Adjust.
2244 2009-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
2246 Fix compatibility of --with-system-readline and readline-6.0+.
2247 * configure.ac <--with-system-readline> (for readline_echoing_p): New
2249 * config.in: Regenerate.
2250 * configure: Regenerate.
2252 2009-10-01 Joel Brobecker <brobecker@adacore.com>
2254 * MAINTAINERS: Move Don Lee to the correct section (Write After
2257 2009-10-01 Phil Muldoon <pmuldoon@redhat.com>
2259 * infcall.c (call_function_by_hand): Add a new cleanup branch for
2260 std::terminate breakpoints.
2262 2009-09-29 Jan Kratochvil <jan.kratochvil@redhat.com>
2264 * ia64-tdep.c (ia64_convert_from_func_ptr_addr): New variable buf.
2265 Check first the descriptor memory is readable.
2267 2009-09-29 Tom Tromey <tromey@redhat.com>
2269 * python/py-value.c (valpy_string): NULL-terminate 'keywords'.
2271 2009-09-29 Ulrich Weigand <uweigand@de.ibm.com>
2273 * s390-tdep.c (s390_displaced_step_fixup): Use type ULONGEST
2274 instead of CORE_ADDR for "amode".
2276 2009-09-29 Joel Brobecker <brobecker@adacore.com>
2278 * ia64-tdep.c: Update the comments on how we insert/remove
2279 breakpoints for L-X instructions.
2280 (ia64_memory_insert_breakpoint, ia64_memory_remove_breakpoint):
2281 Update the comments inside these functions.
2283 2009-09-28 Ulrich Weigand <uweigand@de.ibm.com>
2285 * gdbarch.sh (displaced_step_hw_singlestep): New callback.
2286 * gdbarch.c, gdbarch.h: Regenerate.
2287 * arch-utils.c (default_displaced_step_hw_singlestep): New function.
2288 * arch-utils.h (default_displaced_step_hw_singlestep): Add prototype.
2290 * ppc-linux-tdep.c (ppc_displaced_step_hw_singlestep): New function.
2291 (rs6000_gdbarch_init): Install it.
2293 * infrun.c (displaced_step_fixup): Use new callback to determine
2294 whether to "step" or "continue" displaced copy.
2295 (resume): Likewise. Do not call maybe_software_singlestep
2296 for displaced stepping.
2297 (maybe_software_singlestep): Do not handle displaced stepping.
2299 2009-09-28 Ulrich Weigand <uweigand@de.ibm.com>
2301 * eval.c (evaluate_subexp_standard) [OP_OBJC_MSGCALL]: Support
2302 platforms that use function descriptors. Prefer to use function
2303 pointer types instead of function types.
2304 * linespec.c (decode_objc): Support function descriptors. Fully
2305 initialize SAL result.
2306 * objc-lang.c (find_methods): Support function descriptors.
2307 Do not require function symbol to point to text section.
2309 * ppc-sysv-tdep.c (ppc64_sysv_abi_push_dummy_call): When calling
2310 via a function pointer, use the descriptor it points to.
2312 2009-09-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2314 Fix ia64 breakpoints in the L-X slot.
2315 * ia64-tdep.c (ia64_memory_insert_breakpoint): Extend the comment.
2316 New variable shadow_slotnum, use it appropriately instead of slotnum.
2317 Move shadow_len initialization before SLOTNUM adjustment, cover now the
2318 whole remaining bundle. Error now on breakpoints requested for the
2319 slot 2 of L-X bundles. Better sanity check the requested slot 1 of L-X
2321 (ia64_memory_remove_breakpoint): New variable shadow_slotnum, use it
2322 appropriately instead of slotnum. Warn now on breakpoints requested
2323 for the slot 2 of L-X bundles. Better sanity check the requested slot
2324 1 of L-X bundles. Update the assertio check of PLACED_SIZE.
2325 (ia64_breakpoint_from_pc): New variable shadow_slotnum, use it
2326 appropriately instead of slotnum. Move *lenptr initialization before
2327 SLOTNUM adjustment, cover now the whole remaining bundle. Error now
2328 on breakpoints requested for the slot 2 of L-X bundles. Better sanity
2329 check the requested slot 1 of L-X bundles. Simplify the returned
2332 2009-09-28 Joel Brobecker <brobecker@adacore.com>
2334 * ia64-tdep.c (ia64_memory_insert_breakpoint): Check the slotnum
2335 and the type of instruction before deciding which slot to save
2336 in the breakpoint shadown contents.
2338 2009-09-28 Doug Evans <dje@google.com>
2340 * linux-nat.c (status_to_str): Handle TRAP_IS_SYSCALL.
2341 (TRAP_REMOVE_SYSCALL_FLAG): New macro.
2342 (linux_nat_wait_1): Mask off is-syscall bit in wait status for
2343 TRAP_IS_SYSCALL before passing value to caller.
2345 2009-09-28 Ulrich Weigand <uweigand@de.ibm.com>
2347 * valops.c (value_assign): Respect parent offset when
2348 assigning to a bitfield.
2350 2009-09-28 Hui Zhu <teawater@gmail.com>
2352 * i386-tdep.c (i386_process_record): Remove "0x" that
2355 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2357 * s390-tdep.c (op_bctr, op_bctgr, op_bct, op1_bctg, op2_bctg,
2358 op_bxh, op1_bxhg, op2_bxhg, op_bxle, op1_bxleg, op2_bxleg,
2359 op1_brct, op2_brct, op1_brctg, op2_brctg, op_brxh, op1_brxhg,
2360 op2_brxhg, op_brxle, op1_brxlg, op2_brxlg): New enum values.
2361 (is_rsi, is_rie): New insn format decoder routines.
2362 (s390_displaced_step_fixup): New function.
2363 (s390_gdbarch_init): Install displaced stepping routines.
2365 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2367 * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*):
2368 Add linux-tdep.o to gdb_target_obs.
2369 (s390*-*-*): Likewise.
2371 2009-09-27 Don Lee <don.lee@sunplusct.com>
2373 * score-tdep.c: Comment out some simulator dependent codes.
2374 * score-tdep.h: Delete some simulator dependent macro definitions.
2376 2009-09-27 Hui Zhu <teawater@gmail.com>
2378 * record.c (record_open): Change "query" to "error".
2379 (cmd_record_stop): Change "query" to "printf_unfiltered".
2381 2009-09-26 Pierre Muller <muller@ics.u-strasbg.fr>
2383 * i386-nat.c (i386_stopped_data_address): Also check that
2384 hitted watch register is not vacant.
2386 2009-09-25 Tom Tromey <tromey@redhat.com>
2389 * language.h (struct language_defn) <la_get_string>: Add
2390 'char_type' argument.
2391 (LA_GET_STRING): Likewise.
2392 (default_get_string, c_get_string): Update.
2393 * language.c (default_get_string): Add 'char_type' argument.
2394 * c-valprint.c (c_textual_element_type): Rename from
2395 textual_element_type. No longer static. Update callers.
2396 * c-lang.h (c_textual_element_type): Declare.
2397 * c-lang.c (c_get_string): Add 'char_type' argument.
2399 2009-09-25 Tom Tromey <tromey@redhat.com>
2401 * charset.c (iconv_open): Use UTF-16 and UTF-32, not UCS-2 and
2403 (iconv): Rename 'ucs_flag'.
2404 (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
2405 * c-lang.c (charset_for_string_type): Use UTF-16 and UTF-32, not
2407 (convert_ucn): Use UTF-32.
2409 2009-09-25 Nick Roberts <nickrob@snap.net.nz>
2411 * mi/gdb-mi.el: Remove file.
2413 2009-09-23 Joel Brobecker <brobecker@adacore.com>
2415 * record.c (record_open, record_store_registers, record_xfer_partial):
2416 Replace calls to nquery by calls to query.
2418 2009-09-23 John Wright <john.wright@hp.com>
2421 * event-top.c (command_line_handler): Terminate linebuffer before
2424 2009-09-22 Joel Brobecker <brobecker@adacore.com>
2426 * solib.c (solib_bfd_open): Relax a bit the compatibility check.
2428 2009-09-22 Daniel Jacobowitz <dan@codesourcery.com>
2430 * source.c (forget_cached_source_info): Clear last_source_visited.
2431 (init_last_source_visited): Delete.
2432 (directory_command): Do not clear last_source_visited. Call
2433 forget_cached_source_info only if required.
2434 (unset_substitute_path_command, set_substitute_path_command): Call
2435 forget_cached_source_info.
2436 * mi/mi-cmd-env.c (mi_cmd_env_dir): Do not call
2437 init_last_source_visited.
2438 * defs.h (init_last_source_visited): Delete declaration.
2440 2009-09-22 Tom Tromey <tromey@redhat.com>
2443 * python/py-value.c (valpy_int): Use PyLong_FromLongLong.
2444 (valpy_long): Likewise.
2446 2009-09-22 Tom Tromey <tromey@redhat.com>
2449 * eval.c (evaluate_subexp_standard) <do_call_it>: Handle internal
2450 functions in EVAL_AVOID_SIDE_EFFECTS case.
2452 2009-09-22 Jie Zhang <jie.zhang@analog.com>
2454 * MAINTAINERS: Add myself under Write After Approval.
2456 2009-09-22 Pierre Muller <muller@ics.u-strasbg.fr>
2458 * windows-nat.c (ctrl_c_handler): Also handle CTRL_BREAK_EVENT.
2460 2009-09-18 Keith Seitz <keiths@redhat.com>
2462 * cp-support.h (cp_validate_operator): Declare new function.
2463 * cp-support.c (cp_validate_operator): New function.
2464 * linespec.c (decode_compound): For C++ check for a valid operator.
2466 2009-09-21 Keith Seitz <keiths@redhat.com>
2468 * c-exp.y (qualified_name): Call CHECK_TYPEDEF before deciding
2469 that a type is not an aggregate type.
2471 2009-09-21 Jason Orendorff <jason.orendorff@gmail.com>
2474 * python/py-function.c (fnpy_init): Use xstrdup.
2476 2009-09-21 Jie Zhang <jie.zhang@analog.com>
2478 * doc/gdb.texinfo: Escape "{" and "}".
2480 2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
2484 * c-lang.c (c_printstr): Do not loop past options->print_max when
2485 iterating with wchar_iterate.
2487 2009-09-21 Phil Muldoon <pmuldoon@redhat.com>
2489 * python/py-value.c (valpy_getitem): Test value before allowing
2490 subscript operation.
2492 2009-09-21 Hui Zhu <teawater@gmail.com>
2493 Michael Snyder <msnyder@vmware.com>
2495 * amd64-linux-tdep.c (amd64_all_but_ip_registers_record): New
2497 (amd64_linux_syscall_record): Call
2498 amd64_all_but_ip_registers_record if syscall is
2500 (AMD64_LINUX_redzone, AMD64_LINUX_xstate,
2501 AMD64_LINUX_frame_size): New macros.
2502 (amd64_linux_record_signal): New function.
2503 (amd64_linux_init_abi): Call set_gdbarch_process_record_signal.
2505 2009-09-21 Hui Zhu <teawater@gmail.com>
2506 Michael Snyder <msnyder@vmware.com>
2508 * i386-linux-tdep.c (i386_all_but_ip_registers_record): New
2510 (i386_linux_intx80_sysenter_record): Call
2511 i386_all_but_ip_registers_record if syscall is sys_sigreturn
2512 or sys_rt_sigreturn.
2513 (I386_LINUX_xstate, I386_LINUX_frame_size): New macros.
2514 (i386_linux_record_signal): New function.
2515 (i386_linux_init_abi): Call set_gdbarch_process_record_signal.
2517 2009-09-21 Hui Zhu <teawater@gmail.com>
2518 Michael Snyder <msnyder@vmware.com>
2520 * record.c (record_end_entry): New struct.
2521 (record_type): Add end.
2522 (record_arch_list_add_end): Set rec->u.end.sigval to
2524 (record_message_args): New struct.
2525 (record_message): Call gdbarch_process_record_signal.
2526 (do_record_message): Add argument "signal".
2527 (record_resume): Ditto.
2528 (record_wait): Ditto. Check record_list->u.end.sigval
2531 2009-09-21 Hui Zhu <teawater@gmail.com>
2532 Michael Snyder <msnyder@vmware.com>
2534 * gdbarch.sh (process_record_signal): New interface.
2536 2009-09-19 Matt Rice <ratmice@gmail.com> (tiny change)
2538 Checked in by Joel Brobecker <brobecker@gnat.com>
2539 * varobj.c (varobj_update): Initialize children_changed.
2541 2009-09-19 Vladimir Prus <vladimir@codesourcery.com>
2543 * mi/mi-cmd-stack.c (list_args_or_locals): Workaround
2546 2009-09-19 Vladimir Prus <vladimir@codesourcery.com>
2548 * mi/mi-cmds.h (mi_cmd_stack_list_variables): Declare.
2549 * mi/mi-cmds.c (mi_cmds): Register -stack-list-variables.
2550 * mi/mi-cmd-stack.c (enum what_to_list): New.
2551 (list_args_or_locals): Accept what_to_list parameter.
2552 Use 'variables' as output name of all are requested.
2553 (mi_cmd_stack_list_variables): New.
2554 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Adjust.
2556 2009-09-19 Eli Zaretskii <eliz@gnu.org>
2558 * config/djgpp/fnchange.lst: Add missing edits.
2560 2009-09-18 Maxim Grigoriev <maxim2405@gmail.com>
2562 * xtensa-tdep.c (call0_analyze_prologue): Replace INT_MAX by UNIT_MAX.
2564 2009-09-18 Jan Kratochvil <jan.kratochvil@redhat.com>
2566 * objfiles.c (free_objfile): Clear SYMFILE_OBJFILE if it is OBJFILE.
2567 * rs6000-nat.c (vmap_ldinfo): Only assertion check SYMFILE_OBJFILE now.
2568 * symfile.c (syms_from_objfile, symbol_file_clear): Likewise.
2570 2009-09-18 Ulrich Weigand <uweigand@de.ibm.com>
2572 * rs6000-tdep.c (rs6000_builtin_type_vec128): Add v2_double
2575 2009-09-17 Joel Brobecker <brobecker@adacore.com>
2577 Fix a build failure on pa-hpux:
2578 * gdb_ptrace.h (PT_SYSCALL): Define here if not already defined.
2579 * inf-ttrace.c (inf_ttrace_wait): Fix compilation failure
2580 introduced after field syscall_id inside struct target_waitstatus
2581 has been renamed into syscall_number.
2583 2009-09-16 H.J. Lu <hongjiu.lu@intel.com>
2586 * Makefile.in (GDB_DATADIR_PATH): Renamed to ...
2587 (GDB_DATADIR): This.
2588 (xml-syscall-install): Updated.
2590 2009-09-16 Joel Brobecker <brobecker@adacore.com>
2592 GDB 7.0 branch created (branch timestamp: 2009-09-16 19:00 UTC)
2593 * version.in: Bump version to 7.0.50.20090916-cvs.
2595 2009-09-15 Tom Tromey <tromey@redhat.com>
2597 * varobj.h (varobj_update_result_t) <new>: New field.
2598 (varobj_get_child_range, varobj_set_child_range): Declare.
2599 (varobj_list_children): Update.
2600 (varobj_enable_pretty_printing, varobj_has_more)
2601 (varobj_pretty_printed_p): Declare.
2602 * varobj.c (pretty_printing): New global.
2603 (varobj_enable_pretty_printing): New function.
2604 (struct varobj_root) <from, to, constructor, child_iter,
2605 saved_item>: New fields.
2606 (varobj_create): Don't call install_default_visualizer.
2607 (instantiate_pretty_printer): Don't use value_copy.
2608 (varobj_has_more): New function.
2609 (restrict_range): New function.
2610 (install_dynamic_child): Likewise.
2611 (dynamic_varobj_has_child_method): Likewise.
2612 (update_dynamic_varobj_children): Remove 'new_and_unchanged'
2613 argument; add 'new', 'unchanged', 'from', and 'to' arguments.
2615 (varobj_get_num_children): Call update_dynamic_varobj_children.
2616 (varobj_list_children): Add 'from' and 'to' arguments. Ignore
2617 result of update_dynamic_varobj_children. Don't call
2618 install_default_visualizer. Restrict result range.
2619 (varobj_add_child): Don't call install_default_visualizer.
2620 (varobj_pretty_printed_p): New function.
2621 (install_visualizer): Rewrite. Move earlier in file.
2622 (install_default_visualizer): Likewise.
2623 (construct_visualizer): New function.
2624 (install_new_value_visualizer): Likewise.
2625 (install_new_value): Don't call release_value. Special case
2626 pretty-printed objects. Use value_incref. Rearrange "changed"
2628 (varobj_get_child_range): New function.
2629 (varobj_set_child_range): Likewise.
2630 (varobj_set_visualizer): Rewrite.
2631 (varobj_update): Rewrite pretty-printing logic.
2632 (new_variable): Initialize new fields.
2633 (free_variable): Destroy new fields.
2634 (value_of_root): Copy 'from' and 'to'.
2635 (my_value_of_variable): Handle pretty-printers.
2636 (value_get_print_value): Rework pretty-printing logic.
2637 (cplus_describe_child): Don't use release_value.
2638 * mi/mi-cmds.h (mi_cmd_enable_pretty_printing)
2639 (mi_cmd_var_set_update_range): Declare.
2640 * mi/mi-cmds.c (mi_cmds): Add enable-pretty-printing and
2641 var-set-update-range.
2642 * mi/mi-cmd-var.c (print_varobj): Update. Emit "dynamic"
2644 (mi_cmd_var_create): Emit "has_more" attribute.
2645 (mi_cmd_var_set_format): Plug memory leak.
2646 (mi_print_value_p): Replace 'type' argument with 'var'. Handle
2647 pretty-printed varobjs.
2648 (mi_cmd_var_list_children): Accept 'from' and 'to' arguments.
2649 Emit "has_more" attribute.
2650 (mi_cmd_var_evaluate_expression): Plug memory leak.
2651 (mi_cmd_var_assign): Likewise.
2652 (varobj_update_one): Likewise. Emit "dynamic", "has_more", and
2653 "new_children" attributes.
2654 (mi_cmd_enable_pretty_printing): New function.
2655 (mi_cmd_var_set_update_range): Likewise.
2657 2009-09-15 Doug Evans <dje@google.com>
2659 * dwarf2expr.h (dwarf_value_location): Add more comments describing
2661 (struct dwarf_stack_value): New struct.
2662 (struct dwarf_expr_context): Change type of `stack' from CORE_ADDR*
2663 to struct dwarf_stack_value*.
2664 (struct dwarf_expr_piece): Move `v.value' into its own struct, v.expr,
2665 all uses updated. Add v.expr.in_stack_memory.
2666 (dwarf_expr_push): Update declaration.
2667 (dwarf_expr_fetch_in_stack_memory): Declare.
2668 * dwarf2expr.c (dwarf_expr_grow_stack): Update calculation of
2669 size of stack value.
2670 (dwarf_expr_push): New arg in_stack_memory, all callers updated.
2671 (dwarf_expr_fetch_in_stack_memory): New function.
2672 (add_piece): Set in_stack_memory for non-literal values.
2673 (execute_stack_op): Allow ops to specify whether the value is on the
2675 (execute_stack_op, case DW_OP_fbreg): Mark value as in stack memory.
2676 (execute_stack_op, case DW_OP_call_frame_cfa): Ditto.
2677 (execute_stack_op, case DW_OP_dup): Copy in_stack_memory flag.
2678 (execute_stack_op, cases DW_OP_pick, DW_OP_over): Ditto.
2679 (execute_stack_op, cases DW_OP_swap, DW_OP_rot): Update type of
2681 * dwarf2loc.c (read_pieced_value): Call read_stack for values known
2682 to be on the program's stack.
2683 (dwarf2_evaluate_loc_desc, case DWARF_VALUE_MEMORY): Call
2684 set_value_stack only for objects known to be in stack memory.
2685 * dwarf2-frame.c (execute_stack_op): New arg initial_in_stack_memory,
2686 all callers updated.
2688 * target.c (memory_xfer_partial): Pass correct length to dcache_update.
2690 2009-09-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2692 Fix gcc-4.5 HEAD warnings for enum ada_operator.
2693 * Makefile.in (HFILES_NO_SRCDIR): Add ada-operator.inc.
2694 * ada-lang.h (enum ada_operator): Move it to ...
2695 * ada-operator.inc: ... a new file.
2696 * expression.h (enum exp_opcode): Include ada-operator.inc.
2697 New element OP_UNUSED_LAST. Update comment for OP_EXTENDED0.
2699 Fix gcc-4.5 HEAD warnings for GDB_FORM_cached_string.
2700 * dwarf2read.c (GDB_FORM_cached_string)
2701 (dwarf_form_name <GDB_FORM_cached_string>): Remove.
2702 (struct attribute <dwarf_form>): Reduce the bit width.
2703 (struct attribute <string_is_canonical>, DW_STRING_IS_CANONICAL): New.
2704 (read_attribute_value <DW_FORM_string>)
2705 (read_attribute_value <DW_FORM_strp>): Initialize
2706 DW_STRING_IS_CANONICAL.
2707 (dwarf2_name, dump_die_shallow <DW_FORM_string>)
2708 (dump_die_shallow <DW_FORM_strp>): Update the code using former
2709 GDB_FORM_cached_string.
2711 2009-09-14 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
2713 * amd64-linux-tdep.c: Include xml-syscall.h header, define the XML
2714 syscall name for the architecture.
2715 (amd64_linux_get_syscall_number): New function.
2716 (amd64_linux_init_abi): Register the correct functions for syscall
2717 catchpoint; set the correct syscall file name.
2718 * breakpoint.c: New include: xml-syscall.h.
2719 (set_raw_breakpoint_without_location): Setting the parameters
2720 for the catch syscall feature.
2721 (insert_catch_syscall): New.
2722 (remove_catch_syscall): New.
2723 (breakpoint_hit_catch_syscall): New.
2724 (print_it_catch_syscall): New.
2725 (print_one_catch_syscall): New.
2726 (print_mention_catch_syscall): New.
2727 (catch_syscall_breakpoint_ops): New.
2728 (syscall_catchpoint_p): New.
2729 (create_catchpoint_without_mention): New.
2730 (create_catchpoint): Modified in order to use
2731 create_catchpoint_without_mention.
2732 (create_syscall_event_catchpoint): New.
2733 (clean_up_filters): New.
2734 (catch_syscall_split_args): New.
2735 (catch_syscall_command_1): New.
2736 (delete_breakpoint): Add cleanup for catch syscall.
2737 (is_syscall_catchpoint_enabled): New.
2738 (catch_syscall_enabled): New.
2739 (catching_syscall_number): New.
2740 (catch_syscall_completer): New completer function.
2741 (add_catch_command): Add the completer function for catchpoints.
2742 * breakpoint.h (syscalls_to_be_caught): New vector.
2743 (catch_syscall_enabled): New.
2744 (catching_syscall_number): New.
2745 * gdbarch.c: Regenerated.
2746 * gdbarch.h: Regenerated.
2747 * gdbarch.sh: Add syscall catchpoint functions and structures.
2748 (get_syscall_number): New.
2749 (UNKNOWN_SYSCALL): New definition.
2750 * i386-linux-nat.c (i386_linux_resume): Select the proper request
2751 to be made for ptrace() considering if we are catching syscalls
2753 * i386-linux-tdep.c: Include xml-syscall.h header, define the XML
2754 syscall name for the architecture.
2755 (i386_linux_get_syscall_number): New.
2756 (i386_linux_init_abi): Register the correct functions for syscall
2757 catchpoint; set the correct syscall file name.
2758 * inf-child.c (inf_child_set_syscall_catchpoint): New.
2759 (inf_child_target): Assign default values to target_ops.
2760 * inf-ptrace.c (inf_ptrace_resume): Select the proper request
2761 to be made for ptrace() considering if we are catching syscalls
2763 * inferior.h (struct inferior): Included new variables
2764 any_syscall_count, syscalls_counts and total_syscalls_count,
2765 used to keep track of requested syscall catchpoints.
2766 * infrun.c (resume): Add syscall catchpoint.
2767 (deal_with_syscall_event): New.
2768 (handle_inferior_event): Add syscall entry/return events.
2769 (inferior_has_called_syscall): New.
2770 * linux-nat.c: Define some helpful variables to track wether we have
2771 support for the needed ptrace option.
2772 (linux_test_for_tracesysgood): New.
2773 (linux_supports_tracesysgood): New.
2774 (linux_enable_tracesysgood): New.
2775 (linux_enable_event_reporting): Save the current used ptrace
2777 (linux_child_post_attach): Calling linux_enable_tracesysgood.
2778 (linux_child_post_startup_inferior): Likewise.
2779 (linux_child_set_syscall_catchpoint): New function.
2780 (linux_handle_extended_wait): Handle the case which the inferior stops
2781 because it has called or returned from a syscall.
2782 (linux_target_install_ops): Install the necessary functions to handle
2783 syscall catchpoints.
2784 * linux-nat.h (struct lwp_info): Include syscall_state into the
2785 structure, which indicates if we are in a syscall entry or return.
2786 * ppc-linux-tdep.c: Include xml-syscall.h header, define the XML
2787 syscall filename for the arch.
2788 (ppc_linux_get_syscall_number): New.
2789 (ppc_linux_init_abi): Register the correct functions for syscall
2790 catchpoint; setting the correct name for the XML syscall file.
2791 * target.c (update_current_target): Update/copy functions related to
2793 (target_waitstatus_to_string): Add syscall catchpoint entry/return
2795 * target.h (struct target_waitstatus): Add syscall number.
2796 (struct syscall): New struct to hold information about syscalls
2798 (struct target_ops): Add ops for syscall catchpoint.
2799 (inferior_has_called_syscall): New.
2800 (target_set_syscall_catchpoint): New.
2801 * xml-support.c (xml_fetch_content_from_file): New function,
2802 transferred from xml-tdesc.c.
2803 * xml-support.h (xml_fetch_content_from_file): New.
2804 * xml-tdesc.c (fetch_xml_from_file): Function removed;
2805 transferred to xml-support.c.
2806 (file_read_description_xml): Updated to use the new
2807 xml_fetch_content_from_file function.
2808 * syscalls/gdb-syscalls.dtd: New definition file for syscall's XML
2810 * syscalls/amd64-linux.xml: New file containing information about
2811 syscalls for GNU/Linux systems that use amd64 architecture.
2812 * syscalls/i386-linux.xml: New file containing information about
2813 syscalls for GNU/Linux systems that use i386 architecture.
2814 * syscalls/ppc-linux.xml: New file containing information about
2815 syscalls for GNU/Linux systems that use PPC architecture.
2816 * syscalls/ppc64-linux.xml: New file containing information about
2817 syscalls for GNU/Linux systems that use PPC64 architecture.
2818 * xml-syscall.c: New file containing functions for manipulating
2819 syscall's XML files.
2820 * xml-syscall.h: New file, exporting the functions above mentioned.
2821 * Makefile.in: Support for relocatable GDB datadir and XML
2823 * NEWS: Added information about the catch syscall feature.
2825 2009-09-14 Doug Evans <dje@google.com>
2827 * target.c (memory_xfer_partial): Only update dcache after we know
2828 the write succeeded.
2830 2009-09-14 Paul Pluzhnikov <ppluzhnikov@google.com>
2832 *minsyms.c (lookup_minimal_symbol_by_pc_section_1): Assert non-NULL
2834 (lookup_minimal_symbol_by_pc_section): Check for NULL section.
2835 (lookup_minimal_symbol_by_pc): Adjust.
2837 2009-09-14 Paul Pluzhnikov <ppluzhnikov@google.com>
2839 * objfiles.c (qsort_cmp): Remove asserts.
2840 (insert_section_p, filter_debuginfo_sections): New function.
2841 (filter_overlapping_sections): Likewise.
2842 (update_section_map): Adjust.
2844 2009-09-13 Daniel Jacobowitz <dan@codesourcery.com>
2846 * frame.c (get_frame_id): Default to outer_frame_id if the this_id
2847 method does not supply an ID. Assert that the result is not
2849 (outer_frame_id): New.
2850 (frame_id_p): Accept outer_frame_id.
2851 (frame_id_eq): Allow outer_frame_id to be equal to itself.
2852 (frame_find_by_id): Revert previous local workarounds.
2853 (get_prev_frame_1): Adjust end-of-stack check to test outer_frame_id.
2854 * frame.h (null_frame_id, frame_id_p): Update comments.
2855 (outer_frame_id): Declare.
2856 * infrun.c (handle_inferior_event): Do not treat all steps from the
2857 outermost frame as subroutine calls.
2859 * libunwind-frame.c (libunwind_frame_this_id): Do not clear THIS_ID.
2860 * hppa-tdep.c (hppa_stub_frame_this_id): Likewise.
2861 * ia64-tdep.c (ia64_frame_this_id): Likewise.
2862 (ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id):
2863 Use outer_frame_id instead of null_frame_id.
2864 * amd64obsd-tdep.c (amd64obsd_trapframe_cache): Use outer_frame_id.
2865 * i386obsd-tdep.c (i386obsd_trapframe_cache): Likewise.
2866 * inline-frame.c (inline_frame_this_id): Refuse outer_frame_id.
2867 * thread.c (restore_selected_frame): Update comment and remove
2870 2009-09-11 Doug Evans <dje@google.com>
2872 * dwarf2expr.c (execute_stack_op, case DW_OP_piece): Delete unused
2873 local addr_or_regnum.
2875 * objfiles.c (struct objfile_data): Delete member cleanup and replace
2877 (register_objfile_data_with_cleanup): Delete arg cleanup and replace
2878 with save, free. All callers updated.
2879 (clear_objfile_data): Replace cleanup loop with separate save and
2881 * objfiles.h (register_objfile_data_with_cleanup): Update.
2882 * arm-tdep.c (arm_objfile_data_free): Renamed from
2883 arm_objfile_data_cleanup, all callers updated.
2884 * dwarf2read.c (dwarf2_per_objfile_free): Renamed from
2885 dwarf2_per_objfile_cleanup, all callers updated.
2886 * python/py-objfile.c (py_free_objfile): Renamed from clean_up_objfile,
2887 all callers updated.
2888 * python/py-type.c (save_objfile_types): Renamed from
2889 clean_up_objfile_types, all callers updated.
2891 2009-09-11 Tom Tromey <tromey@redhat.com>
2893 * dwarf2loc.c (struct piece_closure) <arch>: New field.
2894 (dwarf2_evaluate_loc_desc): Update.
2895 (dwarf2_loc_desc_needs_frame): Likewise.
2896 (allocate_piece_closure): Initialize new field.
2897 (read_pieced_value): Update.
2898 (write_pieced_value): Update.
2899 (copy_pieced_value_closure): Update.
2900 * dwarf2expr.h (enum dwarf_value_location): New.
2901 (struct dwarf_expr_context) <in_reg>: Remove.
2902 <location, len, data>: New fields.
2903 (struct dwarf_expr_piece) <in_reg, value>: Remove.
2904 <location, v>: New fields.
2905 * dwarf2expr.c (add_piece): Remove in_reg, value arguments.
2907 (require_composition): New function.
2908 (execute_stack_op): Update.
2909 <DW_OP_implicit_value, DW_OP_stack_value>: New cases.
2910 <DW_OP_reg0>: Set location, not in_reg.
2911 <DW_OP_regx>: Likewise. Use require_composition.
2912 <DW_OP_fbreg>: Update.
2913 <DW_OP_piece>: Likewise.
2914 * dwarf2-frame.c (execute_stack_op): Update.
2916 2009-09-10 Anthony Green <green@moxielogic.com>
2918 * moxie-tdep.c (moxie_analyze_prologue): Recognize new prologue
2921 2009-09-10 Michael Snyder <msnyder@vmware.com>
2923 * remote.c (PACKET_bc, PACKET_bs): New enums.
2924 (remote_protocol_features): Add ReverseStep, ReverseContinue.
2925 (remote_resume): Check for reverse capability.
2926 (_initialize_remote): Add packet config for "bs" and "bc" packets.
2927 * NEWS (new options): Mention set/show for "bs" and "bc" packets.
2929 2009-09-10 Joel Brobecker <brobecker@adacore.com>
2931 * top.c (interactive_mode): New static variable.
2932 (show_interactive_mode): New function.
2933 (input_from_terminal_p): If interactive_mode is not auto, then
2934 use that rather than checking the stdin settings.
2935 (init_main): Add "set/show interactive-mode" command.
2936 * NEWS: Add entry for new "set/show interactive-mode" command.
2938 2009-09-10 Joel Brobecker <brobecker@adacore.com>
2940 * configure.ac: Fix the names of the python source and object files
2941 following the renaming done in an earlier change.
2942 * configure: Regenerate.
2944 2009-09-08 Joel Brobecker <brobecker@adacore.com>
2946 Fix a build failure on AIX.
2947 * rs6000-nat.c (vmap_exec): Rewrite using target_get_section_table
2948 instead of relying on the to_sections/to_section_end target_ops
2949 field, since the latter have been removed in a previous patch.
2951 2009-09-08 Thiago Jung Bauermann <thiago.bauermann@gmail.com>
2953 * Makefile.in (py-cmd.o): Renamed from python-cmd.o. Updated
2955 (py-frame.o): Renamed from python-frame.o. Updated references.
2956 (py-function.o): Renamed from python-function.o. Updated references.
2957 (py-objfile.o): Renamed from python-objfile.o. Updated references.
2958 (py-prettyprint.o): Renamed from python-prettyprint.o. Updated
2960 (py-type.o): Renamed from python-type.o. Updated references.
2961 (py-utils.o): Renamed from python-utils.o. Updated references.
2962 (py-value.o): Renamed from python-value.o. Updated references.
2963 * py-cmd.c: Renamed from python-cmd.c.
2964 * py-frame.c: Renamed from python-frame.c.
2965 * py-function.c: Renamed from python-function.c.
2966 * py-objfile.c: Renamed from python-objfile.c.
2967 * py-prettyprint.c: Renamed from python-prettyprint.c.
2968 * py-type.c: Renamed from python-type.c.
2969 * py-utils.c: Renamed from python-utils.c.
2970 * py-value.c: Renamed from python-value.c.
2972 2009-09-08 Joel Brobecker <brobecker@adacore.com>
2974 Avoid quadratic behavior when computing the value of a register.
2975 * frame.c (frame_stash): New static constant.
2976 (frame_stash_add, frame_stash_find, frame_stash_invalidate):
2978 (get_frame_id): Minor reformatting. Add the frame to the frame stash.
2979 (frame_find_by_id): Search the frame stash first before walking all
2980 frames starting from te current_frame.
2981 (reinit_frame_stash): Add call to frame_stash_invalidate ();
2983 2009-09-08 Joel Brobecker <brobecker@adacore.com>
2985 * block.c (contained_in): Return zero for nested functions.
2986 * blockframe.c (block_innermost_frame): Delete unreferenced local
2989 2009-09-08 Doug Evans <dje@google.com>
2991 * target.c (initialize_targets): Fix thinko in stack_cache_enabled_p.
2993 2009-09-08 Michael Snyder <msnyder@vmware.com>
2995 * amd64-linux-tdep.h (enum amd64_syscall): New enum consts,
2996 to replace literal consts used in amd64-linux-tdep.c
2997 * linux-record.h (enum gdb_syscall): New enum consts, to replace
2998 literal consts used in amd64-linux-tdep.c and linux-record.c.
2999 * amd64-linux-tdep.c (amd64_canonicalize_syscall): New function,
3000 translate from native amd64 Linux syscall id to internal gdb id.
3001 (amd64_linux_syscall_record): Switch statement abstracted out
3002 and replaced with a call to amd64_canonicalize_syscall.
3003 * linux-record.c (record_linux_system_call): Replace literal
3004 consts with enum consts.
3005 * i386-linux-tdep.c (i386_canonicalize_syscall): New function,
3006 trivially translate from native i386 Linux syscalls to gdb syscalls.
3007 (i386_linux_intx80_sysenter_record):
3009 2009-09-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3011 * gdb/Makefile.in (check//%): Parse 'config.status --version'
3012 output to recreate the configuration from the testsuite directory,
3013 rather than running 'config.status --recheck' from a different
3014 build directory. Let configure do the recursion rather than
3017 2009-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3019 * ia64-tdep.c (ia64_memory_remove_breakpoint): Call do_cleanups
3022 2009-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3024 * ia64-tdep.c (ia64_memory_insert_breakpoint)
3025 (ia64_memory_remove_breakpoint): Return immediately if any of memory
3026 reads fail. Do not combine the VAL values.
3028 2009-09-08 Jan Kratochvil <jan.kratochvil@redhat.com>
3030 Fix ia64 shadowing of breakpoints in multiple slots of a single bundle.
3031 * ia64-tdep.c (ia64_memory_insert_breakpoint): New call
3032 of make_show_memory_breakpoints_cleanup with parameter 0. Move the
3033 reading of SHADOW_CONTENTS to this memory state point of code. Update
3034 comment for the memory re-read.
3036 2009-09-07 Michael Snyder <msnyder@vmware.com>
3038 * record.c: Minor comment and white space fix-ups.
3040 2009-09-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3042 * m68k-tdep.c (m68k_gdbarch_init): Allocate TDEP as cleared.
3043 * sparc-tdep.c (sparc32_gdbarch_init): Allocate TDEP as cleared.
3044 Remove explicit clearing of TDEP fields.
3046 2009-09-06 Hui Zhu <teawater@gmail.com>
3048 * i386-tdep.c (i386_record_check_override): Deleted.
3049 (i386_record_lea_modrm): Ditto.
3050 (i386_process_record): Ditto.
3052 2009-09-05 Eli Zaretskii <eliz@gnu.org>
3054 * config/djgpp/djconfig.sh: Fix for Autoconf 2.64.
3055 * config/djgpp/config.sed: Fix for Autoconf 2.64.
3057 2009-09-05 Hui Zhu <teawater@gmail.com>
3059 * i386-tdep.c (i386_record_s): Add orig_addr.
3060 (i386_record_check_override): New function.
3061 (i386_record_lea_modrm): Call i386_record_check_override.
3062 (i386_process_record): Ditto.
3064 2009-09-03 Nathan Froyd <froydnj@codesourcery.com>
3066 * dwarf2loc.c (struct piece_closure): New.
3067 (allocate_piece_closure): New function.
3068 (read_pieced_value): New function.
3069 (write_pieced_value): New function.
3070 (copy_pieced_value_closure): New function.
3071 (free_pieced_value_closure): New function.
3072 (pieced_value_funcs): Define.
3073 (dwarf2_evaluate_loc_desc): Return a computed value for a variable
3074 described with pieces.
3076 2009-09-03 Pierre Muller <muller@ics.u-strasbg.fr>
3077 Richard Earnshaw <rearnsha@arm.com>
3079 * arm-tdep.c (displaced_write_reg): Replace call to abort by call
3082 2009-09-02 Tom Tromey <tromey@redhat.com>
3084 * frame.h (frame_unwinder_is): Declare.
3085 * frame.c (frame_unwinder_is): New function.
3086 * dwarf2loc.c: Include dwarf2-frame.h.
3087 (dwarf_expr_frame_cfa): New function.
3088 (dwarf2_evaluate_loc_desc): Use it.
3089 (needs_frame_frame_cfa): New function.
3090 (dwarf2_loc_desc_needs_frame): Use it.
3091 * dwarf2expr.h (struct dwarf_expr_context) <get_frame_cfa>: New
3093 * dwarf2expr.c (execute_stack_op) <DW_OP_call_frame_cfa>: New
3095 * dwarf2-frame.h (dwarf2_frame_cfa): Declare.
3096 * dwarf2-frame.c (no_get_frame_cfa): New function.
3097 (execute_stack_op): Use it.
3098 (dwarf2_frame_cfa): New function.
3100 2009-09-02 Hui Zhu <teawater@gmail.com>
3102 * record.c (record_resume): Change "signal" to "siggnal".
3104 2009-09-01 Hui Zhu <teawater@gmail.com>
3106 * record.c (record_resume): Change "siggnal" to "signal".
3108 2009-09-01 Hui Zhu <teawater@gmail.com>
3110 * record.c (record_resume_siggnal): Deleted.
3111 (record_resume): Ditto.
3112 (record_wait): Change record_resume_siggnal to
3115 2009-08-31 Jacob Potter <jdpotter@google.com>
3116 Doug Evans <dje@google.com>
3118 Implement TARGET_OBJECT_STACK_MEMORY.
3119 * NEWS: Add note on new "set stack-cache" option.
3120 * corefile.c (read_stack): New function.
3121 * dcache.c (dcache_struct): New member ptid.
3122 (dcache_enable_p): Mark as obsolete.
3123 (show_dcache_enabled_p): Flag option as deprecated.
3124 (dcache_invalidate): Update ptid.
3125 (dcache_invalidate_line): New function.
3126 (dcache_read_line): No longer check cacheable attribute, stack
3127 accesses get cached despite attribute.
3128 (dcache_init): Set ptid.
3129 (dcache_xfer_memory): Flush cache if from different ptid than before.
3130 Update cache after write.
3131 (dcache_update): New function.
3132 (dcache_info): Report ptid.
3133 (_initialize_dcache): Update text for `remotecache' to indicate it
3135 * dcache.h (dcache_update): Declare.
3136 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Mark values on stack with
3138 * frame-unwind.c (frame_unwind_got_memory): Ditto.
3139 * gdbcore.h (read_stack): Declare.
3140 * memattr.c (mem_enable_command): Call target_dcache_invalidate
3141 instead of dcache_invalidate.
3142 (mem_disable_command, mem_delete_command): Ditto.
3143 * target.c (stack_cache_enabled_p_1): New static global.
3144 (stack_cache_enabled_p): New static global.
3145 (set_stack_cache_enabled_p): New function.
3146 (show_stack_cache_enabled_p): New function.
3147 (target_dcache): Make static.
3148 (target_dcache_invalidate): New function.
3149 (target_load, target_resume): Call target_dcache_invalidate
3150 instead of dcache_invalidate.
3151 (memory_xfer_partial): New arg object, all callers updated.
3152 Check for existing inferior before calling dcache routines.
3153 When writing non-TARGET_OBJECT_STACK_MEMORY, notify dcache.
3154 (target_xfer_partial): Call memory_xfer_partial for
3155 TARGET_OBJECT_STACK_MEMORY.
3156 (target_read_stack): New function.
3157 (initialize_targets): Install new option `stack-cache'.
3158 * target.h: Remove #include of dcache.h.
3159 (enum target_object): New value TARGET_OBJECT_STACK_MEMORY.
3160 (target_dcache): Delete.
3161 (target_dcache_invalidate): Declare.
3162 (target_read_stack): Declare.
3163 * top.c (prepare_execute_command): New function.
3164 (execute_command): Call prepare_execute_command
3165 instead of free_all_values.
3166 * top.h (prepare_execute_command): Declare.
3167 * valops.c (get_value_at): New function.
3168 (value_at): Guts moved to get_value_at.
3169 (value_at_lazy): Similarly.
3170 (value_fetch_lazy): Call read_stack for stack values.
3171 * value.c (struct value): New member `stack'.
3172 (value_stack, set_value_stack): New functions.
3173 * value.h (value_stack, set_value_stack): Declare.
3174 * mi/mi-main.c (mi_cmd_execute): Call prepare_execute_command
3175 instead of free_all_values.
3177 2009-08-29 Hui Zhu <teawater@gmail.com>
3179 * i386-tdep.c (i386_process_record): Fix the error of string
3180 ops instructions's handler.
3182 2009-08-28 Doug Evans <dje@google.com>
3184 * top.c (execute_command): Remove redundant comment.
3186 2009-08-28 Daniel Jacobowitz <dan@codesourcery.com>
3190 * value.c (value_primitive_field): Do not save value_offset for
3192 (unpack_bits_as_long): Do not read an entire ULONGEST.
3194 2009-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3196 Support constant DW_AT_data_member_location by GCC PR debug/40659.
3198 (dwarf2_add_field <DW_TAG_member> <DW_AT_data_member_location>):
3199 Initialize BYTE_OFFSET to 0 by default. Explicitly check if
3201 (dwarf2_add_field <DW_TAG_inheritance> <DW_AT_data_member_location>)
3202 (read_common_block <DW_AT_data_member_location>): New variable
3203 byte_offset. Fix crash on non-DW_BLOCK ATTR values.
3205 2009-08-28 Hui Zhu <teawater@gmail.com>
3207 * record.c (record_list_release_next): Change the first
3208 record_reg to record_end.
3210 2009-08-27 Doug Evans <dje@google.com>
3212 * value.c (free_all_values): Tweak comment.
3214 * NEWS: Add note on "info sharedlibrary".
3215 Remove note on "set print symbol-loading".
3216 * main.c (captured_main): Pass !batch for from_tty when calling
3217 symbol_file_add_main.
3218 * objfiles.h (objfile_has_partial_symbols): Declare.
3219 (objfile_has_full_symbols): Declare.
3220 * objfiles.c (objfile_has_partial_symbols): New function.
3221 (have_partial_symbols): Use it.
3222 (objfile_has_full_symbols): New function.
3223 (have_full_symbols): Use it.
3224 * solib.c: Include interps.h.
3225 (solib_read_symbols): Back out patch of 2008-07-10.
3226 Add test for info_verbose for symbol loading messages for
3227 consistency with symfile.c.
3228 (info_sharedlibrary_command): Handle optional parameter of regex of
3229 libraries to list. Inform user of libraries without debugging info.
3230 Rewrite to use ui_out routines to format output.
3231 * symfile.c (print_symbol_loading): Delete.
3232 (symbol_file_add_with_addrs_or_offsets): Back out patch of 2008-07-10.
3233 Print "no debugging symbols found" only if from_tty || info_verbose;
3234 and only check file being loaded, not all files.
3235 (reread_symbols): Test file being loaded for whether it has symbols,
3237 (__initialize_symfile): Delete `set print symbol-loading'.
3238 * symfile.h (print_symbol_loading): Delete.
3240 2009-08-27 Jan Kratochvil <jan.kratochvil@redhat.com>
3242 * varobj.c (varobj_create): Error if the specified frame was not found
3245 2009-08-26 Michael Snyder <msnyder@vmware.com>
3247 * i386-tdep.c (i386_process_record): Break out of prefix loop
3248 if not amd64. Otherwise inc/dec instructions are lost.
3250 2009-08-25 Keith Seitz <keiths@redhat.com>
3252 * c-exp.y (yylex): Add cxx_only check for tokentab2 and tokentab3
3254 (tokentab3): Add cxx_only for DOT_STAR.
3256 2009-08-25 Pedro Alves <pedro@codesourcery.com>
3258 * inferior.c (print_inferior): Align columns left. Remove header
3259 for the the "current" column. Rename column "Id" to "Num".
3260 Rename column "PID" to "Description". Print if there's no selected
3263 2009-08-25 Jan Kratochvil <jan.kratochvil@redhat.com>
3265 Fix ia64 start crash when GDB built with -lmcheck.
3266 * ia64-tdep.c (ia64_gdbarch_init): Allocate TDEP as cleared. Remove
3267 specific clearing of TDEP SIGCONTEXT_REGISTER_ADDRESS and
3270 2009-08-24 Keith Seitz <keiths@redhat.com>
3272 * c-exp.y (tokentab3): Add new token, ARROW_STAR. Changed all users.
3273 (tokentab2): Add new token, DOT_STAR. Changed all users.
3275 2009-08-24 Keith Seitz <keiths@redhat.com>
3277 * symtab.c (default_make_symbol_completion_list): Keep
3278 ':', too, so that we can limit searches in namespaces
3281 2009-08-24 Tom Tromey <tromey@redhat.com>
3283 * python/python-value.c (valpy_richcompare): Don't return from
3286 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3288 * CONTRIBUTE: Bump documented Autoconf version.
3289 * configure.ac: Do not substitute datarootdir, htmldir,
3290 pdfdir, docdir. Do not process --with-datarootdir,
3291 --with-htmldir, --with-pdfdir, --with-docdir.
3292 * configure: Regenerate.
3294 * aclocal.m4: Regenerate.
3295 * config.in: Likewise.
3296 * configure: Likewise.
3297 * gnulib/Makefile.in: Likewise.
3299 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of
3300 AC_GNU_SOURCE, AC_AIX, AC_ISC_POSIX.
3302 2009-08-21 Paul Pluzhnikov <ppluzhnikov@google.com>
3304 * objfiles.h (gdb_bfd_ref): New prototype.
3305 * objfiles.c (gdb_bfd_ref): New function.
3306 (allocate_objfile): Call it.
3307 (gdb_bfd_unref): Adjust assertion.
3308 * solib.c (solib_map_sections): Add reference.
3309 (symbol_add_stub): Don't add reference here.
3310 * symfile.c (reread_symbols): Add reference.
3312 2009-08-21 Ken Werner <ken@linux.vnet.ibm.com>
3313 Doug Evans <dje@google.com>
3315 * jit.c (jit_event_handler): Use paddress to print target addresses.
3316 Wrap printf string in _().
3318 2009-08-21 Doug Evans <dje@google.com>
3320 * jit.c (jit_read_descriptor): New arg gdbarch, all callers updated.
3321 (jit_read_code_entry, jit_register_code): Ditto.
3322 (jit_event_handler): Ditto.
3323 (jit_inferior_init): Renamed from previous jit_inferior_created_hook.
3324 (jit_inferior_created_hook, jit_breakpoint_re_set): New functions.
3325 (jit_inferior_created_observer): Renamed from
3326 jit_inferior_created_hook1, all callers updated.
3327 * jit.h (jit_breakpoint_re_set): Declare.
3328 (jit_event_handler): Update prototype.
3329 * breakpoint.c (breakpoint_re_set): Call jit_breakpoint_re_set instead
3330 of jit_inferior_created_hook.
3332 2009-08-21 Hui Zhu <teawater@gmail.com>
3334 * record.c (record_wait): Change the argument of
3335 record_beneath_to_wait to options.
3337 2009-08-20 Jacob Potter <jdpotter@google.com>
3339 Replace dcache with splay tree.
3340 Remove partially implemented writeback support.
3341 * dcache.c: Include splay-tree.h.
3342 (LINE_SIZE_POWER): Change from 5 to 6.
3343 (DCACHE_SIZE): Change from 64 to 4096.
3344 (ENTRY_INVALID, ENTRY_VALID, ENTRY_DIRTY): Delete.
3345 (state_chars): Delete.
3346 (struct dcache_block): Clean up; remove state and anydirty fields.
3347 (struct dcache_struct): Redefine as a splay tree and linked list.
3348 (last_cache): Make static.
3349 (dcache_invalidate, dcache_hit): Rewrite for new cache structure.
3350 (dcache_read_line, dcache_alloc): Rewrite for new cache structure.
3351 (dcache_write_line): Delete.
3352 (dcache_writeback): Delete.
3353 (dcache_peek_byte): Clean up; remove "invalid" state check.
3354 (dcache_poke_byte): Rewrite for new cache structure; clarify comment.
3355 (dcache_splay_tree_compare): New function.
3356 (dcache_init, dcache_free): Rewrite for new cache structure.
3357 (dcache_xfer_memory): Rewrite for new write-through cache structure.
3358 (dcache_print_line): New function.
3359 (dcache_info): Rewrite for new cache structure.
3360 (_initialize_dcache): Update "info dcache" help text.
3361 * dcache.h (dcache_xfer_memory): Update declaration.
3362 * target.c (memory_xfer_partial): Update calls to dcache_xfer_memory.
3364 2009-08-19 Reid Kleckner <reid@kleckner.net>
3366 Add interface for JIT code generation.
3367 * NEWS: Announce JIT interface.
3368 * Makefile.in (SFILES): Add jit.c.
3369 (HFILES_NO_SRCDIR): Add jit.h.
3370 (COMMON_OBS): Add jit.o.
3373 * breakpoint.h (enum bptype): Add bp_jit_event to enum.
3375 (update_breakpoints_after_exec): Delete jit breakpoints after exec.
3376 (bpstat_what): Update event table for bp_jit_event.
3377 (print_it_typical): Added case for bp_jit_event.
3378 (print_one_breakpoint_location): Added case for bp_jit_event.
3379 (allocate_bp_location): Added case for bp_jit_event.
3380 (mention): Added case for bp_jit_event.
3381 (delete_command): Added case for bp_jit_event.
3382 (breakpoint_re_set_one): Added case for bp_jit_event.
3383 (breakpoint_re_set): Added call to jit_inferior_created_hook.
3384 (create_jit_event_breakpoint): New.
3385 * infrun.c (handle_inferior_event): Add handler for jit event.
3386 (follow_exec): Add call to jit_inferior_created_hook.
3388 2009-08-19 Ulrich Weigand <uweigand@de.ibm.com>
3390 * value.c (enum internalvar_kind): Replace INTERNALVAR_SCALAR by
3391 INTERNALVAR_INTEGER and INTERNALVAR_POINTER.
3392 (union internalvar_data): Replace "scalar" member by "integer"
3394 (value_of_internalvar): Handle INTERNALVAR_INTEGER and
3395 INTERNALVAR_POINTER instead of INTERNALVAR_SCALAR.
3396 (get_internalvar_integer): Likewise.
3397 (set_internalvar): Likewise.
3398 (set_internalvar_integer): Likewise.
3399 (preserve_one_internalvar): Likewise.
3400 (value_from_pointer): Handle typedef'd pointer types.
3402 2009-08-18 Tom Tromey <tromey@redhat.com>
3404 * utils.c (add_internal_problem_command): Free set_doc and
3406 * remote.c (add_packet_config_cmd): Free set_doc and show_doc.
3407 * language.c (add_language): Free language_set_doc.
3409 2009-08-18 Tom Tromey <tromey@redhat.com>
3411 * Makefile.in (ALL_TARGET_OBS): Remove prologue-value.o, solib.o.
3413 2009-08-17 Ulrich Weigand <uweigand@de.ibm.com>
3415 * symfile.c (reread_symbols): Call objfiles_changed *before*
3416 calling clear_symtab_users.
3418 2009-08-17 Michael Snyder <msnyder@vmware.com>
3420 * amd64-tdep.c: Add a frame unwinder for function epilogues.
3421 (amd64_in_function_epilogue_p): New function.
3422 (amd64_epilogue_frame_sniffer): New function.
3423 (amd64_epilogue_frame_cache): New function.
3424 (amd64_epilogue_frame_this_id): New function.
3425 (amd64_epilogue_frame_unwind): New struct frame_unwind.
3426 (amd64_init_abi): Hook the new unwinder.
3428 * amd64-linux-tdep.c (amd64_linux_init_abi): Set gdbarch to use
3429 SVR4 method for skip_trampoline_code.
3431 2009-08-17 Pedro Alves <pedro@codesourcery.com>>
3433 * objfiles.c (objfile_relocate): Relocate the entry point before
3434 relocating the section offsets. Flush the section map before
3435 resetting breakpoints.
3437 2009-08-14 Doug Evans <dje@google.com>
3439 * symfile.c (find_separate_debug_file): Remove double free of
3442 2009-08-14 Pedro Alves <pedro@codesourcery.com>
3444 * top.c (any_thread_of): Delete.
3445 (kill_or_detach): Use any_thread_of_process.
3446 * top.c (print_inferior_quit_action): New.
3447 (quit_confirm): Rewrite to print info about all inferiors.
3448 * target.c (dispose_inferior): New.
3449 (target_preopen): Use it.
3451 2009-08-14 Pedro Alves <pedro@codesourcery.com>
3453 * ui-file.h (ui_file_xstrdup): Mention that the length argument
3455 * ui-file.c (ui_file_xstrdup): Don't dereference LENGTH if it is
3457 * aix-thread.c (aix_thread_extra_thread_info): Pass NULL as length
3458 parameter to ui_file_xstrdup.
3459 * arm-tdep.c (_initialize_arm_tdep): Ditto.
3460 * infrun.c (print_target_wait_results): Ditto.
3461 * language.c (add_language): Ditto.
3462 * linespec.c (cplusplus_error): Ditto.
3463 * remote.c (escape_buffer): Ditto.
3464 * typeprint.c (type_to_string): Ditto.
3465 * utils.c (error_stream): Ditto.
3466 * varobj.c (value_get_print_value): Ditto.
3467 * xtensa-tdep.c (xtensa_verify_config): Replace `dummy' local with
3468 `length' local. Pass it to ui_file_xstrdup, and avoid an strlen
3470 * gdbarch.sh (verify_gdbarch): Ditto.
3471 * gdbarch.c: Regenerate.
3472 * cli/cli-setshow.c (do_setshow_command): Pass NULL as length
3473 parameter to ui_file_xstrdup.
3474 * python/python-frame.c (frapy_str): Ditto.
3475 * python/python-type.c (typy_str): Use the length local instead of
3477 * python/python-value.c (valpy_str): Pass NULL as length parameter
3480 2009-08-13 Doug Evans <dje@google.com>
3482 * utils.c (gnu_debuglink_crc32): Store crc32_table as unsigned int
3483 instead of unsigned long.
3485 2009-08-13 Tom Tromey <tromey@redhat.com>
3487 * varobj.c (update_dynamic_varobj_children): Don't use
3489 * value.h: (preserve_one_value): Declare.
3490 (value_prepend_to_list, value_remove_from_list): Remove.
3491 * value.c (preserve_one_value): No longer static.
3492 (preserve_values): Call preserve_python_values.
3493 (value_prepend_to_list): Remove.
3494 (value_remove_from_list): Remove.
3495 * python/python.h (values_in_python): Don't declare.
3496 (preserve_python_values): Declare.
3497 * python/python-value.c (values_in_python): Change type. Move
3499 (struct value_object): Add struct tag.
3500 <next, prev>: New fields.
3501 (valpy_dealloc): Update.
3502 (note_value): New function.
3503 (valpy_new): Use value_incref, note_value.
3504 (preserve_python_values): New function.
3505 (valpy_positive): Don't use value_copy.
3506 (value_to_value_object): Use value_incref, note_value.
3507 (convert_value_from_python): Update comment.
3509 2009-08-13 Pedro Alves <pedro@codesourcery.com>
3511 * remote.c (remote_pid_to_str): If printing a process id and we
3512 don't know what the remote pid could be, output "Remote target";
3513 otherwise, use normal_pid_to_str.
3515 2009-08-13 Tom Tromey <tromey@redhat.com>
3517 * language.h (longest_raw_hex_string): Remove unused declaration.
3519 2009-08-13 Pedro Alves <pedro@codesourcery.com>
3523 * language.c (language, type, range, case_sensitive): Make const.
3524 (show_language_command): Don't call deprecated_show_value_hack.
3525 Special case "auto".
3526 (set_language_command): An unrecognized language is now an
3527 internal error instead of a user error. Don't call set_lang_str.
3528 (show_type_command): Don't call deprecated_show_value_hack.
3529 Special case "auto". Use warning.
3530 (set_type_command): An unrecognized type is now an internal error
3531 instead of a user error. Output type check mismatch with language
3532 here. Don't call set_type_str.
3533 (show_range_command): Don't call deprecated_show_value_hack.
3534 Special case "auto". Use warning.
3535 (set_range_command): An unrecognized range check is now an
3536 internal error instead of a warning. Output range check mismatch
3537 with language here. Don't call set_range_str.
3538 (show_case_command): Don't call deprecated_show_value_hack.
3539 Special case "auto". Use warning.
3540 (set_case_command): Don't call set_case_str. An unrecognized case
3541 check is now an internal error instead of a warning. Output range
3542 check mismatch with language here. Don't call set_case_str.
3543 (set_type_range_case): Don't call set_type_str, set_range_str or
3545 (set_lang_str, set_type_str, set_range_str, set_case_str): Delete.
3546 (add_language): Install or reinstall the "set language" command
3547 here, and make it an enum command. Build the enumeration and the
3548 help string from the current list of known languages.
3549 (_initialize_language): Don't install "set language" here. Make
3550 "set check type", "set check range" and "set case-sensitive" enum
3551 commands. Register the "auto" "local" and "unknown" languages in
3554 2009-08-13 Pedro Alves <pedro@codesourcery.com>
3556 Revert 2009-08-07 changes for PR gdb/8869:
3558 * language.c (set_language_command): Strip whitespace.
3559 (set_type_command): Likewise.
3560 (set_range_command): Likewise.
3562 * language.c (language_completer): New function.
3563 (range_or_type_completer): New function.
3564 (case_completer): New function.
3565 (_initialize_language): Set completers.
3566 * cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
3568 (add_setshow_string_noescape_cmd): Likewise.
3569 (add_setshow_integer_cmd): Likewise.
3570 (add_setshow_uinteger_cmd): Likewise.
3571 (add_setshow_zinteger_cmd): Likewise.
3572 (add_setshow_zuinteger_cmd): Likewise.
3573 * command.h (add_setshow_string_cmd,
3574 add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
3575 add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
3577 2009-08-12 Michael Snyder <msnyder@vmware.com>
3579 * remote.c (remote_add_inferior): Remove unused local.
3580 (remote_add_thread): Ditto.
3582 (remote_current_thread): Ditto.
3583 (remote_stop_ns): Ditto.
3584 (remote_parse_stop_reply): Ditto.
3585 (remote_get_pending_stop_replies): Ditto.
3586 (remote_wait_ns): Ditto.
3587 (remote_wait_as): Ditto.
3588 (send_g_packet): Ditto.
3589 (remote_fetch_registers): Ditto.
3590 (store_register_using_P): Ditto.
3591 (remote_store_registers): Ditto.
3592 (remote_remove_breakpoint): Ditto.
3593 (remote_write_qxfer): Ditto.
3594 (remote_read_qxfer): Ditto.
3596 2009-08-11 Tom Tromey <tromey@redhat.com>
3598 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Make a cleanup.
3599 (dwarf2_loc_desc_needs_frame): Likewise.
3600 * dwarf2expr.h (make_cleanup_free_dwarf_expr_context): Declare.
3601 * dwarf2expr.c (free_dwarf_expr_context_cleanup): New function.
3602 (make_cleanup_free_dwarf_expr_context): Likewise.
3603 * dwarf2-frame.c (execute_stack_op): Make a cleanup.
3605 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3607 * objfiles.c (gdb_bfd_unref): Use the bfd_usrdata accessor.
3608 * solib.c (symbol_add_stub): Likewise.
3609 * symfile.c (symfile_bfd_open): Assert BFD_USRDATA is NULL.
3611 2009-08-10 Paul Pluzhnikov <ppluzhnikov@google.com>
3613 * objfiles.c (qsort_cmp): Remove assert.
3614 (preferred_obj_section): New function.
3615 (update_section_map): Filter duplicates.
3617 2009-08-10 Tristan Gingold <gingold@adacore.com>
3619 * solib-darwin.c (find_program_interpreter): Simplify the code by
3620 looking up for the load_dylinker command instead of reading the
3621 corresponding (but deprecated) section.
3622 (darwin_solib_create_inferior_hook): Adjust: do not free the
3625 2009-08-10 Tristan Gingold <gingold@adacore.com>
3627 * i386-darwin-tdep.c (i386_m128_p): New function.
3628 (i386_darwin_arg_type_alignment): Ditto.
3629 (i386_darwin_push_dummy_call): Ditto.
3630 (i386_darwin_init_abi): Define Darwin specific push_dummy_call.
3631 Adjust long_double size. Adjust pc offset in setjump buffer.
3633 2009-08-10 Hui Zhu <teawater@gmail.com>
3635 Add Linux AMD64 process record support.
3637 * amd64-linux-tdep.c (amd64_linux_record_tdep): New variable.
3638 This struct has the argument for the function
3639 "record_linux_system_call".
3640 (amd64_linux_syscall_record): New function. Parse the
3641 system call instruction and call function
3642 "record_linux_system_call" to record execute log.
3643 (i386_linux_init_abi): Initialize "amd64_linux_record_tdep".
3644 Set "amd64_linux_syscall_record" to "i386_syscall_record".
3646 2009-08-10 Hui Zhu <teawater@gmail.com>
3648 Add process record Linux system call 64 bits support.
3650 * linux-record.h (linux_record_tdep): Add size_pointer,
3651 size_size_t, size_iovec and arg6. Change the values of
3652 size_int, size_long and size_ulong to
3653 gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
3654 gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT,
3655 gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT.
3656 * i386-linux-tdep.c (i386_linux_init_abi): Ditto.
3657 (i386_linux_intx80_sysenter_record): Add a check for system
3659 * linux-record.c (record_linux_system_call): Make this
3660 function support 64 bits.
3662 2009-08-10 Hui Zhu <teawater@gmail.com>
3664 Add AMD64 process record instruction set support.
3666 * i386-tdep.h (gdbarch_tdep): Add record_regmap for registers
3667 because the AMD64's registers order in GDB is not same with
3669 Add i386_syscall_record to be the syscall function handle
3671 (record_i386_regnum): Number for record_regmap.
3672 * i386-tdep.c (OT_QUAD): For 64 bits.
3673 (i386_record_s): Add rex_x, rex_b, rip_offset and
3674 popl_esp_hack for AMD64 instruction set. And regmap for
3676 (i386_record_lea_modrm_addr): Support AMD64 instruction set
3678 (i386_record_lea_modrm): Ditto.
3679 (i386_record_push): New function. Record the execution log
3681 (I386_RECORD_ARCH_LIST_ADD_REG): New macro to record the
3683 (i386_process_record): Support AMD64 instruction set.
3684 * amd64-tdep.c (amd64_record_regmap): For record_regmap.
3685 (amd64_init_abi): Set amd64_record_regmap to record_regmap.
3687 2009-08-08 Pedro Alves <pedro@codesourcery.com>
3689 * bfd-target.c (struct target_bfd_data): New.
3690 (target_bfd_xfer_partial): Adjust to get at the section table from
3692 (target_bfd_get_section_table): Ditto.
3693 (target_bfd_xclose): Ditto. Get the bfd pointer from the
3694 target_bfd_data structure, from the section table.
3695 (target_bfd_reopen): Store a struct target_bfd_data in the
3696 target_ops to_data field, instead of a target_section_table.
3698 2009-08-08 Aleksandar Ristovski <aristovski@qnx.com>
3699 Hui Zhu <teawater@gmail.com>
3701 * record.c (record_store_registers): Remove unused variable.
3703 2009-08-07 Tom Tromey <tromey@redhat.com>
3705 * language.c (set_language_command): Strip whitespace.
3706 (set_type_command): Likewise.
3707 (set_range_command): Likewise.
3709 2009-08-07 Tom Tromey <tromey@redhat.com>
3712 * language.c (language_completer): New function.
3713 (range_or_type_completer): New function.
3714 (case_completer): New function.
3715 (_initialize_language): Set completers.
3716 * cli/cli-decode.c (add_setshow_string_cmd): Return the "set"
3718 (add_setshow_string_noescape_cmd): Likewise.
3719 (add_setshow_integer_cmd): Likewise.
3720 (add_setshow_uinteger_cmd): Likewise.
3721 (add_setshow_zinteger_cmd): Likewise.
3722 (add_setshow_zuinteger_cmd): Likewise.
3723 * command.h (add_setshow_string_cmd,
3724 add_setshow_string_noescape_cmd, add_setshow_uinteger_cmd,
3725 add_setshow_zinteger_cmd, add_setshow_zuinteger_cmd): Update.
3727 2009-08-06 Paul Pluzhnikov <ppluzhnikov@google.com>
3730 * dwarf2-frame.c (qsort_fde_cmp): Use stable sort.
3732 2009-08-06 Paul Pluzhnikov <ppluzhnikov@google.com>
3734 * dwarf2-frame.c (struct dwarf2_cie): Remove 'next'.
3735 (struct dwarf2_cie_table): New.
3736 (struct dwarf2_fde): Remove 'next'.
3737 (struct dwarf2_fde_table): New.
3738 (struct comp_unit): Remove 'cie'.
3739 (bsearch_cie_cmp, bsearch_fde_cmp): New function.
3740 (find_cie, dwarf2_frame_find_fde): Use bsearch.
3741 (add_cie, add_fde): Use array instead of linked list.
3742 (decode_frame_entry, decode_frame_entry_1): New parameters.
3743 (qsort_fde_cmp): New function.
3744 (dwarf2_build_frame_info): Adjust.
3746 2009-08-06 Don Lee <don.lee@sunplusct.com>
3748 * score-tdep.c: Support a new Sunplus CT S+core variant, S+core 3.
3749 * score-tdep.h: Ditto.
3751 * configure.tgt: Test do we have a simulator.
3752 * MAINTAINERS: Add myself under target score
3754 2009-08-06 Nick Roberts <nickrob@snap.net.nz>
3756 * utils.c (defaulted_query): Don't ask for confirmation if server
3759 2009-08-05 Tom Tromey <tromey@redhat.com>
3761 * spu-tdep.h (SPUADDR_SPU): Cast result to int.
3763 2009-08-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3765 * objfiles.h (OBJF_KEEPBFD): Delete.
3766 (gdb_bfd_unref): New prototype.
3767 * objfiles.c (gdb_bfd_unref): New function.
3768 (free_objfile): Call gdb_bfd_unref.
3769 * solib.c (free_so): Likewise.
3770 (symbol_add_stub): Set refcount.
3772 2009-08-04 Hui Zhu <teawater@gmail.com>
3773 Michael Snyder <msnyder@vmware.com>
3775 * record.c (record_mem_entry): New field 'mem_entry_not_accessible'.
3776 (record_arch_list_add_mem): Initialize 'mem_entry_not_accessible'.
3777 (record_wait): Set 'mem_entry_not_accessible' flag if target
3778 memory not readable. Don't try to change target memory if
3779 'mem_entry_not_accessible' is set.
3781 2009-08-03 Richard Guenther <rguenther@suse.de>
3782 Jan Kratochvil <jan.kratochvil@redhat.com>
3784 Fix memory corruption on reread of file through a symbolic link.
3785 * symfile.c (find_separate_debug_file): Initialize CANON_NAME earlier.
3786 Allocate DEBUGFILE with length based on CANON_NAME. Free CANON_NAME on
3787 all the return paths.
3789 2009-08-03 Jim Ingham <jingham@apple.com>
3790 Vladimir Prus <vladimir@codesourcery.com>
3792 Implement -break-commands
3794 * breakpoint.c (get_breakpoint, breakpoint_set_commands): New.
3795 (commands_command): Use breakpoint_set_commands.
3796 * breakpoint.h (get_breakpoint, breakpoint_set_commands): Declare.
3798 * mi/mi-cmds.h (mi_cmd_break_commands): New.
3799 * mi/mi-cmds.c: Register -break-commands.
3800 * mi/mi-cmd-break.c (mi_cmd_break_commands, mi_read_next_line)
3801 (mi_command_line_array, mi_command_line_array_cnt)
3802 (mi_command_line_array_ptr): New.
3804 2009-08-03 Jim Ingham <jingham@apple.com>
3805 Vladimir Prus <vladimir@codesourcery.com>
3807 Refactor reading of commands
3809 * defs.h (read_command_lines_1): Declare.
3810 * cli/cli-script.c (read_next_line): Only return string,
3812 (process_next_line): New, extracted from read_next_line.
3813 (recurse_read_control_structure): Take a function pointer to the
3815 (get_command_line) Pass the read_next_line as reader function
3816 into recurse_read_control_structure.
3817 (read_command_lines_1): New, extracted from...
3818 (read_command_lines): ...here.
3820 2009-07-31 Kazu Hirata <kazu@codesourcery.com>
3822 * procfs.c (proc_set_current_signal): Populate mysinfo before
3824 (proc_clear_current_signal): Likewise.
3825 (proc_set_watchpoint): Populate pwatch before copying it to arg.
3827 2009-07-31 Michael Snyder <msnyder@vmware.com>
3829 * remote.c (store_register_using_P): Call putpkt and getpkt
3830 directly instead of calling remote_send.
3831 (store_registers_using_G): Ditto.
3832 (fetch_register_using_p): Ditto.
3834 * remote.c (store_register_using_P): Make error msg more verbose.
3835 (store_registers_using_G): Ditto.
3836 (fetch_register_using_p): Ditto.
3838 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3840 * spu-tdep.c: Include "infcall.h".
3841 (spu_address_class_type_flags): New function.
3842 (spu_address_class_type_flags_to_name): Likewise.
3843 (spu_address_class_name_to_type_flags): Likewise.
3844 (spu_pointer_to_address): Handle __ea pointers.
3845 (spu_auto_flush_cache_p): New static variable.
3846 (spu_objfile_from_frame): New function.
3847 (flush_ea_cache, spu_attach_normal_stop): Likewise.
3848 (show_spu_auto_flush_cache): Likewise.
3849 (spu_gdbarch_init): Install address class handlers.
3850 (_initialize_spu_tdep): Attach to normal_stop observer.
3851 Install "set spu auto-flush-cache" / "show spu auto-flush-cache"
3854 * NEWS: Mention "set/show spu auto-flush-cache" commands.
3856 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3858 * spu-tdep.c: Include "block.h".
3859 (setspucmdlist, showspucmdlist): New static variables.
3860 (spu_stop_on_load_p): Likewise.
3861 (spu_catch_start): New function.
3862 (show_spu_command, set_spu_command): New functions.
3863 (show_spu_stop_on_load): Likewise.
3864 (_initialize_spu_tdep): Attach spu_catch_start to new_objfile observer.
3865 Install "set spu" / "show spu" prefix command handler.
3866 Install "set spu stop-on-load" / "show spu stop-on-load" command.
3868 * NEWS: Mention "set/show spu stop-on-load" commands.
3870 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3872 * ppc-linux-tdep.c: Include "solib.h", "solist.h", "exceptions.h",
3873 "arch-utils.h", and "spu-tdep.h".
3874 (spu_context_objfile, spe_context_lm_addr, spe_context_offset):
3875 New static variables.
3876 (spe_context_cache_ptid, spe_context_cache_address): Likewise.
3877 (ppc_linux_spe_context_lookup): New function.
3878 (ppc_linux_spe_context_inferior_created): Likewise.
3879 (ppc_linux_spe_context_solib_loaded): Likewise.
3880 (ppc_linux_spe_context_solib_unloaded): Likewise.
3881 (ppc_linux_spe_context): Likewise.
3882 (struct ppu2spu_cache, struct ppu2spu_data): New data types.
3883 (ppu2spu_prev_arch, ppu2spu_this_id, ppu2spu_prev_register,
3884 ppu2spu_unwind_register, ppu2spu_sniffer,
3885 ppu2spu_dealloc_cache): New functions.
3886 (ppu2spu_unwind): New static variable.
3887 (ppc_linux_init_abi): Install cross-architecture unwinder.
3888 (_initialize_ppc_linux_tdep): Attach to observers.
3890 * spu-tdep.c (struct spu2ppu_cache): New data type.
3891 (spu2ppu_prev_arch, spu2ppu_this_id, spu2ppu_prev_register,
3892 spu2ppu_sniffer, spu2ppu_dealloc_cache): New functions.
3893 (spu2ppu_unwind): New static variable.
3894 (spu_gdbarch_init): Install cross-architecture unwinder.
3896 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3898 * target.h (enum strata): New value arch_stratum.
3899 * target.c (target_require_runnable): Skip arch_stratum targets.
3901 * configure.tgt (powerpc-*-linux* | powerpc64-*-linux*): Add
3902 solib-spu.o and spu-multiarch.o to gdb_target_obs.
3903 * Makefile.in (ALL_TARGET_OBS): Add solib-spu.o and spu-multiarch.o.
3904 (ALLDEPFILES): Add solib-spu.c and spu-multiarch.c.
3906 * solib-spu.c: New file.
3907 * solib-spu.h: New file.
3908 * spu-multiarch.c: New file.
3910 * spu-tdep.h (SPUADDR, SPUADDR_SPU, SPUADDR_ADDR): New macros.
3912 * spu-tdep.c (struct gdbarch_tdep): New member id.
3913 (spu_gdbarch_id): New function.
3914 (spu_lslr): New function.
3916 (spu_address_to_pointer): New function.
3917 (spu_pointer_to_address): Support SPU ID address encoding. Use
3918 spu_gdbarch_id and spu_lslr.
3919 (spu_integer_to_address): Likewise.
3920 (spu_frame_unwind_cache): Update for encoded addresses.
3921 (spu_unwind_pc, spu_unwind_sp): Likewise.
3922 (spu_read_pc, spu_write_pc): Likewise.
3923 (spu_push_dummy_call): Likewise.
3924 (spu_software_single_step): Likewise.
3925 (spu_get_longjmp_target): Likewise.
3926 (spu_overlay_update_osect): Likewise.
3928 (spu_dis_asm_print_address): New function.
3929 (gdb_print_insn_spu): Likewise.
3931 (spu_gdbarch_init): Store SPU ID in tdep structure.
3932 Install spu_address_to_pointer and gdb_print_insn_spu.
3934 * ppc-linux-tdep.c: Include "observer.h", "auxv.h", "elf/common.h"
3936 (ppc_linux_entry_point_addr): New static variable.
3937 (ppc_linux_inferior_created): New function.
3938 (ppc_linux_displaced_step_location): Likewise.
3939 (ppc_linux_init_abi): Enable Cell/B.E. support if supported
3941 (_initialize_ppc_linux_tdep): Attach to inferior_created observer.
3943 * NEWS: Mention multi-architecture and Cell/B.E. debugging
3946 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3948 * linux-nat.c: Include <sys/vfs.h>.
3949 (SPUFS_MAGIC): Define.
3950 (spu_enumerate_spu_ids): New function.
3951 (linux_proc_xfer_spu): New function.
3952 (linux_xfer_partial): Handle TARGET_OBJECT_SPU.
3954 (iterate_over_spus): New function.
3955 (struct linux_spu_corefile_data): New data type.
3956 (linux_spu_corefile_callback): New function.
3957 (linux_spu_make_corefile_notes): New function.
3958 (linux_nat_make_corefile_notes): Call it.
3960 * corelow.c (struct spuid_list): New data type.
3961 (add_to_spuid_list): New function.
3962 (core_xfer_partial): Handle TARGET_OBJECT_SPU.
3964 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3966 * features/Makefile: Allow sub-platform specific expedite settings.
3967 (WHICH): Add rs6000/powerpc-cell32l and rs6000/powerpc-cell64l.
3968 (rs6000/powerpc-cell32l-expedite): Define.
3969 (rs6000/powerpc-cell64l-expedite): Likewise.
3970 * features/rs6000/powerpc-cell32l.xml: New file.
3971 * features/rs6000/powerpc-cell64l.xml: New file.
3972 * features/rs6000/powerpc-cell32l.c: New generated file.
3973 * features/rs6000/powerpc-cell64l.c: New generated file.
3975 * regformats/rs6000/powerpc-cell32l.dat: New generated file.
3976 * regformats/rs6000/powerpc-cell64l.dat: New generated file.
3978 * config/djgpp/fnchange.lst: Add mappings for new files.
3980 * ppc-linux-tdep.h (tdesc_powerpc_cell32l): Add prototype.
3981 (tdesc_powerpc_cell64l): Likewise.
3982 * ppc-linux-tdep.c: Include "features/rs6000/powerpc-cell32l.c"
3983 and "features/rs6000/powerpc-cell64l.c".
3984 (_initialize_ppc_linux_tdep): Initialize target descriptions.
3985 (ppc_linux_spu_section): New function.
3986 (ppc_linux_core_read_description): Detect Cell/B.E. core files.
3987 * ppc-linux-nat.c (PPC_FEATURE_CELL): Define.
3988 (ppc_linux_read_description): Detect Cell/B.E. architecture.
3990 * rs6000-tdep.c (rs6000_gdbarch_init): Do not trust BFD wordsize
3991 if exec file is not PowerPC architecture.
3993 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
3995 * features/gdb-target.dtd (target): Accept optional
3996 <compatible> elements.
3997 (compatible): Define element.
3999 * target-descriptions.h (tdesc_compatible_p): New.
4000 (tdesc_add_compatible): New.
4001 * target-descriptions.c (arch_p): New VEC_P type.
4002 (struct target_desc): New member compatible.
4003 (free_target_description): Handle it.
4004 (maint_print_c_tdesc_cmd): Likewise.
4005 (tdesc_compatible_p): New function.
4006 (tdesc_add_compatible): New function.
4008 * xml-tdesc.c (tdesc_end_compatible): New function.
4009 (target_children): Handle <compatible> element.
4011 * arch-utils.c (choose_architecture_for_target): Accept target
4012 description instead of BFD architecture as input. Query target
4013 description for compatible architectures.
4014 (gdbarch_info_fill): Update call.
4016 * NEWS: Mention <compatible> element of target descriptions.
4018 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4020 * breakpoint.c (remove_breakpoints): If removing one breakpoint
4021 location fails, still continue to remove other locations.
4022 (remove_hw_watchpoints): Likewise.
4023 (detach_breakpoints): Likewise.
4025 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
4027 * breakpoint.h (enum enable_state): Add bp_startup_disabled.
4028 (disable_breakpoints_before_startup): Add prototype.
4029 (enable_breakpoints_after_startup): Likewise.
4031 * breakpoint.c (executing_startup): New static variable.
4032 (describe_other_breakpoints): Handle bp_startup_disabled.
4033 (check_duplicates_for): Likewise.
4034 (disable_breakpoints_before_startup): New function.
4035 (enable_breakpoints_after_startup): New function.
4036 (create_breakpoint): Mark new breakpoints as bp_startup_disabled
4037 if executing_startup flag is true.
4038 (break_command_really): Likewise.
4039 (breakpoint_re_set_one): Skip bp_startup_disabled breakpoints.
4041 2009-07-31 Julian Brown <julian@codesourcery.com>
4043 * arm-linux-tdep.c (arch-utils.h, inferior.h, gdbthread.h, symfile.h):
4045 (arm_linux_cleanup_svc, arm_linux_copy_svc): New.
4046 (cleanup_kernel_helper_return, arm_catch_kernel_helper_return): New.
4047 (arm_linux_displaced_step_copy_insn): New.
4048 (arm_linux_init_abi): Initialise displaced stepping callbacks.
4049 * arm-tdep.c (DISPLACED_STEPPING_ARCH_VERSION): New macro.
4051 (displaced_read_reg, displaced_in_arm_mode, branch_write_pc)
4052 (bx_write_pc, load_write_pc, alu_write_pc, displaced_write_reg)
4053 (insn_references_pc, copy_unmodified, cleanup_preload, copy_preload)
4054 (copy_preload_reg, cleanup_copro_load_store, copy_copro_load_store)
4055 (cleanup_branch, copy_b_bl_blx, copy_bx_blx_reg, cleanup_alu_imm)
4056 (copy_alu_imm, cleanup_alu_reg, copy_alu_reg)
4057 (cleanup_alu_shifted_reg, copy_alu_shifted_reg, cleanup_load)
4058 (cleanup_store, copy_extra_ld_st, copy_ldr_str_ldrb_strb)
4059 (cleanup_block_load_all, cleanup_block_store_pc)
4060 (cleanup_block_load_pc, copy_block_xfer, cleanup_svc, copy_svc)
4061 (copy_undef, copy_unpred): New.
4062 (decode_misc_memhint_neon, decode_unconditional)
4063 (decode_miscellaneous, decode_dp_misc, decode_ld_st_word_ubyte)
4064 (decode_media, decode_b_bl_ldmstm, decode_ext_reg_ld_st)
4065 (decode_svc_copro, arm_process_displaced_insn)
4066 (arm_displaced_init_closure, arm_displaced_step_copy_insn)
4067 (arm_displaced_step_fixup): New.
4068 (arm_gdbarch_init): Initialise max insn length field.
4069 * arm-tdep.h (DISPLACED_TEMPS, DISPLACED_MODIFIED_INSNS): New
4071 (displaced_step_closure, pc_write_style): New.
4072 (arm_displaced_init_closure, displaced_read_reg)
4073 (arm_process_displaced_insn, arm_displaced_init_closure)
4074 (displaced_read_reg, displaced_write_reg, arm_displaced_step_copy_insn)
4075 (arm_displaced_step_fixup): Add prototypes.
4077 2009-07-31 Pedro Alves <pedro@codesourcery.com>
4078 Julian Brown <julian@codesourcery.com>
4080 * infrun.c (displaced_step_fixup): If this is a software
4081 single-stepping arch, don't tell the target to single-step.
4082 (maybe_software_singlestep): Return 0 if we're using displaced
4084 (resume): If this is a software single-stepping arch, and
4085 displaced-stepping is enabled, use it for all single-step
4088 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4090 * Makefile.in (ACLOCAL, ACLOCAL_AMFLAGS, aclocal_m4_deps)
4091 (AUTOCONF, configure_deps, AUTOHEADER): New variables.
4092 ($(srcdir)/aclocal.m4, $(srcdir)/configure, $(srcdir)/config.in)
4093 (am--refresh): New rules.
4094 (stamp-h, config.status): List config.in and configure including
4096 * aclocal.m4: Regenerate.
4097 * configure: Regenerate.
4099 2009-07-30 Thomas Schwinge <tschwinge@gnu.org>
4101 * gnu-nat.c (add_task_commands) <stopped>: Register the correct
4104 2009-07-30 H.J. Lu <hongjiu.lu@intel.com>
4106 * ia64-tdep.c (ia64_access_reg): Correct paddress.
4108 2009-07-30 Jan Kratochvil <jan.kratochvil@redhat.com>
4110 Replace public function varobj_list by all_root_varobjs iterator.
4111 * mi/mi-cmd-var.c (struct mi_cmd_var_update, mi_cmd_var_update_iter):
4113 (mi_cmd_var_update): Replace the varobj_list call by all_root_varobjs.
4114 Remove the variables rootlist, cr. New variable data.
4115 * varobj.c (rootcount, varobj_list): Remove.
4116 (install_variable, uninstall_variable): Remove the rootcount updates.
4117 (all_root_varobjs): New function.
4118 (varobj_invalidate): Use the all_root_varobjs call. Move the code to...
4119 (varobj_invalidate_iter): ... a new function.
4120 * varobj.h (varobj_list): Remove the prototype.
4121 (all_root_varobjs): New prototype.
4123 2009-07-29 Paul Pluzhnikov <ppluzhnikov@google.com>
4126 * dbxread.c (read_dbx_symtab): Reduce stack use.
4128 2009-07-29 Jan Kratochvil <jan.kratochvil@redhat.com>
4130 Fix gcc-4.5 HEAD warnings.
4131 * cp-name-parser.y (%union <typed_val_int>, %token GLOBAL)
4132 (GLOBAL_CONSTRUCTORS, GLOBAL_DESTRUCTORS, demangler_special <GLOBAL>):
4134 (yylex <"global constructors keyed to ">)
4135 (yylex <"global destructors keyed to ">): Base it on DEMANGLER_SPECIAL.
4136 (cp_comp_to_string): Remove variables str, prefix and buf. Remove the
4137 GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS handling.
4138 (cp_print): Remove the GLOBAL_DESTRUCTORS and GLOBAL_CONSTRUCTORS
4141 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4143 * NEWS: Mention ARM VFP support.
4144 * target-descriptions.c (tdesc_register_type): Make public.
4145 (tdesc_unnumbered_register): New function.
4146 (tdesc_register_reggroup_p): Allow missing
4147 pseudo_register_reggroup_p.
4148 * target-descriptions.h (tdesc_register_type): Declare.
4149 (tdesc_unnumbered_register): Declare.
4150 * arm-tdep.c (arm_neon_quad_read, arm_neon_quad_write): New functions.
4151 (arm_push_dummy_call): Use arm_neon_quad_write.
4152 (arm_neon_double_type, arm_neon_quad_type): New functions.
4153 (arm_register_type): Handle VFP and NEON registers. Override the
4154 types of double-precision registers for NEON. Disable FPA registers
4155 if they are not present.
4156 (arm_dwarf_reg_to_regnum): Add current VFP and NEON register numbers.
4157 (arm_return_value): Use arm_neon_quad_write and arm_neon_quad_read.
4158 (arm_register_name): Handle VFP single and NEON quad registers.
4159 (arm_pseudo_read, arm_pseudo_write): New functions.
4160 (arm_gdbarch_init): Check for VFP and NEON in the target description.
4161 Assign numbers to double-precision registers. Register VFP and NEON
4162 pseudo registers. Remove a shadowed "i" variable.
4163 * arm-tdep.h (enum gdb_regnum): Add ARM_D0_REGNUM and
4165 (struct gdbarch_tdep): Add have_neon_pseudos, have_neon,
4166 have_vfp_registers, have_vfp_pseudos, neon_double_type,
4169 * features/Makefile: Make expedite settings only architecture
4171 (WHICH): Add new ARM descriptions.
4172 * features/arm-with-neon.xml, features/arm-with-vfpv2.c,
4173 features/arm-with-vfpv3.c, features/arm-vfpv2.xml,
4174 features/arm-vfpv3.xml, features/arm-with-vfpv2.xml,
4175 features/arm-with-vfpv3.xml, features/arm-with-neon.c: New files.
4176 * regformats/arm-with-neon.dat, regformats/arm-with-vfpv2.dat,
4177 regformats/arm-with-vfpv3.dat: Generate.
4179 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4181 * infrun.c (handle_inferior_event): Clear trap_expected after
4182 stepping past a single-step breakpoint.
4184 2009-07-28 Joseph Myers <joseph@codesourcery.com>
4186 * arm-tdep.c (enum arm_vfp_cprc_base_type,
4187 arm_vfp_cprc_unit_length, arm_vfp_cprc_reg_char,
4188 arm_vfp_cprc_sub_candidate, arm_vfp_call_candidate,
4189 arm_vfp_abi_for_function): New.
4190 (arm_push_dummy_call): Handle VFP ABI.
4191 (arm_extract_return_value, arm_store_return_value): Handle
4193 (arm_return_value): Handle VFP ABI.
4194 (arm_gdbarch_init): Default fp_model based on Tag_ABI_VFP_args for
4197 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
4199 * arch-utils.c (displaced_step_at_entry_point): Do not call
4200 gdbarch_convert_from_func_ptr_addr.
4201 * cris-tdep.c: Remove outdated comment.
4202 * infcall.c (call_function_by_hand): Do not call
4203 gdbarch_convert_from_func_ptr_addr after entry_point_address.
4204 * objfiles.c (entry_point_address): Call both
4205 gdbarch_convert_from_func_ptr_addr and
4206 gdbarch_addr_bits_remove.
4208 2009-07-28 Aleksandar Ristovski <aristovski@qnx.com>
4210 * nto-tdep.c (nto_thread_state_str): New array.
4211 (nto_extra_thread_info): New function definition.
4212 * nto-tdep.h (gdbthread.h): New include.
4213 (private_thread_info): New struct.
4214 (nto_extra_thread_info): New declaration.
4215 * nto-procfs.c (procfs_thread_alive): Properly check if
4216 thread is still alive.
4217 (update_thread_private_data_name, update_thread_private_data): New
4218 function definition.
4219 (procfs_find_new_threads): Fetch thread private data.
4220 (init_procfs_ops): Register to_extra_thread_info.
4222 2009-07-25 Pedro Alves <pedro@codesourcery.com>
4224 * stack.c (backtrace_command_1): Remove dead check of NULL current
4227 2009-07-23 Keith Seitz <keiths@redhat.com>
4229 * source.c (forward_search_command): Don't fclose the stream,
4230 just run the cleanups.
4231 (reverse_search_command): Likewise.
4233 2009-07-23 Paul Pluzhnikov <ppluzhnikov@google.com>
4235 * symtab.c (search_symbols): Add QUIT.
4237 2009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
4239 * symfile.c (symbol_file_add_with_addrs_or_offsets): Call observer.
4241 2009-07-22 Paul Pluzhnikov <ppluzhnikov@google.com>
4243 * objfiles.h (objfiles_changed): New prototype.
4244 * objfiles.c (objfiles_updated_p): Rename to objfiles_changed_p.
4245 (allocate_objfile, free_objfile): Must rebuild section map.
4246 (objfile_relocate): Likewise.
4247 (update_section_map, find_pc_section): Adjust.
4248 (set_objfiles_updated_on_exe_change): Remove.
4249 (set_objfiles_updated_on_solib_activity): Remove.
4250 (_initialize_objfiles): Remove.
4251 (objfiles_changed): New function.
4252 * symfile.c (reread_symbols): Call objfiles_changed.
4254 2009-07-22 Hui Zhu <teawater@gmail.com>
4256 * record.c (record_xfer_partial): Call error When nquery
4259 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
4261 * objfiles.c (objfiles_updated_p): New variable.
4262 (qsort_cmp, bsearch_cmp, update_section_map): New function.
4263 (find_pc_section): Use bsearch.
4264 (set_objfiles_updated_on_exe_change): New function.
4265 (set_objfiles_updated_on_solib_activity): New function.
4266 (_initialize_objfiles): New function.
4268 2009-07-21 Michael Eager <eager@eagercon.com>
4270 * features/rs6000/powerpc-405.xml: New.
4271 * rs6000-tdep.c: Add include & initialize for
4272 powerpc-405.c, add 405 to variants.
4273 * features/rs6000/powerpc-405.c: Generate.
4275 2009-07-21 Paul Pluzhnikov <ppluzhnikov@google.com>
4277 * utils.c (internal_vproblem): Always print failure message.
4279 2009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
4280 Vladimir Prus <vladimir@codesourcery.com>
4282 * valops.c (value_fetch_lazy): Handle bitfields explicitly.
4283 (value_assign): Remove unnecessary FIXME. Honor the container
4284 type of bitfields if possible.
4285 * value.c (struct value): Add parent field.
4286 (value_parent): New function.
4287 (value_free): Free the parent also.
4288 (value_copy): Copy the parent also.
4289 (value_primitive_field): Do not read the contents of a lazy
4290 value to create a child bitfield value. Set bitpos and offset
4291 according to the container type if possible.
4292 (unpack_bits_as_long): Rename from unpack_field_as_long. Take
4293 field_type, bitpos, and bitsize instead of type and fieldno.
4294 (unpack_field_as_long): Use unpack_bits_as_long.
4295 * value.h (value_parent, unpack_bits_as_long): New prototypes.
4297 2009-07-21 Daniel Jacobowitz <dan@codesourcery.com>
4299 * value.c (struct value): Add reference_count field.
4300 (allocate_value_lazy): Initialize reference_count.
4301 (value_incref): New function.
4302 (value_free): Check the reference count.
4303 * value.h (value_incref): New prototype.
4305 2009-07-20 Marc Khouzam <marc.khouzam@ericsson.com>
4307 * utils.c (defaulted_query): Update comment and remove dead code.
4309 2009-07-20 Doug Evans <dje@google.com>
4311 Add support for "comdat types" from DWARF4.
4312 * dwarf2read.c (dwarf2_per_objfile): New member types,
4314 (TYPES_SECTION): New macro.
4315 (dwarf2_per_cu_data): Change size of length field from 30 bits
4316 to 29 bits. New member from_debug_types.
4317 (signatured_type): New struct.
4318 (struct attribute): New union member signatured_type.
4319 (DW_SIGNATURED_TYPE): New macro.
4320 (dwarf2_attr_no_follow): New function.
4321 (read_type_unit_scope): New function.
4322 (follow_die_ref_or_sig, follow_die_sig): New functions.
4323 (dwarf2_locate_sectoins): Handle .debug_types.
4324 (dwarf2_build_psymtabs): Read .debug_types.
4325 (read_type_comp_unit_head): New function.
4326 (hash_type_signature, eq_type_signature): New functions.
4327 (create_debug_types_hash_table): New function.
4328 (lookup_signatured_type): New function.
4329 (process_psymtab_comp_unit): Handle type units too.
4330 (process_type_comp_unit, build_type_psymtabs): New functions.
4331 (dwarf2_build_psymtabs_hard): Call build_type_psymtabs.
4332 (load_partial_comp_unit): Assert not called for a type unit.
4333 (skip_one_die): Handle DW_FORM_sig8.
4334 (queue_comp_unit): Don't call load_full_comp_unit here, or
4335 update read_in_chain.
4336 (psymtab_to_symtab_1): Call read_signatured_type_at_offset for
4337 type units, or load_full_comp_unit for comp units after
4338 queue_comp_unit returns.
4339 (load_full_comp_unit): Assert not called for type units.
4340 (load_full_comp_unit): Update read_in_chain here.
4341 (process_die): Handle DW_TAG_type_unit.
4342 (read_structure_type): Look for signatured types.
4343 (read_enumeration_type): Ditto.
4344 (init_cu_die_reader): Handle .debug_types.
4345 (read_comp_unit): Assert hash not computed yet.
4346 (read_die_and_children): Expand debugging printf to handle .debug_types.
4347 (read_partial_die): Handle DW_TAG_type_unit:
4348 (find_patial_die): Handle .debug_types.
4349 (read_attribute_value): Handle DW_FORM_sig8.
4350 (die_type): Call follow_die_ref_or_sig instead of follow_die_ref.
4351 (die_containing_type): Ditto.
4352 (dwarf_tag_name): Handle DW_TAG_type_unit.
4353 (dwarf_attr_name): Handle DW_AT_signature.
4354 (dwarf_form_name): Handle DW_FORM_sec_offset, DW_FORM_exprloc,
4355 DW_FORM_flag_present, DW_FORM_sig8.
4356 (dump_die_shallow): Handlel DW_FORM_sig8.
4357 (maybe_queue_comp_unit): Change return type to int from void.
4358 All callers updated.
4359 (follow_die_ref): Handle .debug_types.
4360 (lookup_signatured_type_at_offset): New function.
4361 (read_signatured_type_at_offset): New function.
4362 (read_signatured_type): New function.
4364 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
4366 * arch-utils.c (gdbarch_info_fill): Only reference GDB_OSABI_DEFAULT
4367 if the macro is defined.
4369 2009-07-20 Pedro Alves <pedro@codesourcery.com>
4371 * features/gdb-target.dtd (target): Accept an optional 'osabi'
4373 (osabi): Define element.
4374 * features/mips-linux.xml (target): Add an osabi subelement set to
4376 * regformats/regdat.sh (xmlarch, xmlosabi): New variables. Don't
4377 write the architecture into $xmltarget. Store it in $xmlarch.
4378 Handle the 'osabi' type. Handle outputting the osabi element of
4379 the target description.
4380 * regformats/reg-x86-64-linux.dat (osabi): Set to GNU/Linux.
4381 * regformats/reg-i386-linux.dat (osabi): Set to GNU/Linux.
4383 * target-descriptions.h (tdesc_osabi, set_tdesc_osabi): Declare.
4384 * target-descriptions.c (struct target_desc) <osabi>: New field.
4385 (tdesc_osabi): New function.
4386 (set_tdesc_osabi): New function.
4387 * xml-tdesc.c: Include osabi.h.
4388 (tdesc_end_osabi): New.
4389 (target_children): Parse "osabi" elements.
4390 * arch-utils.c (gdbarch_info_fill): Try to get the osabi from the
4391 target description if the user didn't override it or it is not
4392 extractable from the bfd. If that still fails, fallback to the
4393 configured in default.
4394 * osabi.h (osabi_from_tdesc_string): Declare.
4395 * osabi.c (osabi_from_tdesc_string): New.
4396 (gdbarch_lookup_osabi): Return GDB_OSABI_UNKNOWN instead of
4399 * NEWS: Mention that target descriptions can now describe the
4402 2009-07-20 Mike Frysinger <vapier@gentoo.org>
4404 * configure.ac (AC_CHECK_FUNCS): Check for pipe.
4405 * config.in, configure: Regenerate.
4406 * tui/tui-io.c (TUI_USE_PIPE_FOR_READLINE): Define if HAVE_PIPE.
4408 2009-07-20 Pedro Alves <pedro@codesourcery.com>
4410 * gnu-nat.c: Include "inf-child.h".
4411 (gnu_mourn_inferior): Use the passed in target_ops
4412 instead of the gnu_ops global.
4413 (gnu_create_inferior): Inline `attach_to_child', use the passed in
4414 target_ops instead of the gnu_ops global.
4415 (gnu_can_run): Delete.
4416 (gnu_attach): Use the passed in target_ops instead of the gnu_ops
4418 (gnu_detach): Ditto.
4419 (gnu_prepare_to_store, gnu_open): Delete.
4420 (gnu_store_registers, gnu_fetch_registers): Delete declarations.
4422 (init_gnu_ops): Delete.
4424 (_initialize_gnu_nat): Don't call init_gnu_ops or add_target here.
4425 * gnu-nat.h (gnu_target): Declare.
4426 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Make
4428 (_initialize_i386gnu_nat): New.
4430 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
4432 * dwarf2loc.c (find_location_expression): Retrieve beginning and
4433 ending address offsets in location list entries as integers,
4436 2009-07-20 Ulrich Weigand <uweigand@de.ibm.com>
4438 * infrun.c (wait_for_inferior): Invalidate registers and overlay
4439 cache every time before calling target_wait.
4440 (handle_inferior_event): Make static. Always reset waiton_ptid.
4441 Never call registers_changed.
4442 (prepare_to_wait): Do not invaliate registers or overlay cache
4443 (moved to wait_for_inferior). Do not reset waiton_ptid (moved
4444 to handle_inferior_event).
4445 (fetch_inferior_event): Remove check for always-true condition.
4447 2009-07-20 Thomas Schwinge <tschwinge@gnu.org>
4449 * i386gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Adjust to
4450 2009-02-23 target_ops changes.
4452 2009-07-18 Michael Snyder <msnyder@vmware.com>
4454 * infrun.c (handle_inferior_event): Remove an execution_direction
4455 check in the "check for subroutine calls" test, and add some
4456 additional handling for reverse-stepping through shared libraries.
4458 2009-07-18 Anthony Green <green@moxielogic.com>
4460 * moxie-tdep.c (moxie_analyze_prologue): Take gdbarch as last
4461 parameter instead of frame_info.
4462 (moxie_frame_cache): Call moxie_analyze_prologue with different
4465 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
4467 * solib.c (solib_bfd_open): Do not call ops->bfd_open.
4468 (solib_map_sections): Call ops->bfd_open instead of solib_bfd_open.
4469 * solib-frv.c (_initialize_frv_solib): Initialize bfd_open member.
4470 * solib-irix.c (_initialize_irix_solib): Likewise.
4471 * solib-null.c (_initialize_null_solib): Likewise.
4472 * solib-osf.c (_initialize_osf_solib): Likewise.
4473 * solib-pa64.c (_initialize_pa64_solib): Likewise.
4474 * solib-som.c (_initialize_som_solib): Likewise.
4475 * solib-sunos.c (_initialize_sunos_solib): Likewise.
4476 * solib-svr4.c (_initialize_svr4_solib): Likewise.
4477 * solib-target.c (_initialize_solib_target): Likewise.
4479 2009-07-17 Ulrich Weigand <uweigand@de.ibm.com>
4481 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Respect mixed_mode flag.
4483 2009-07-16 Doug Evans <dje@google.com>
4485 * linux-thread.db.c (try_thread_db_load_1): Tweak comment.
4487 2007-07-16 Paul Pluzhnikov <ppluzhnikov@google.com>
4489 * linux-thread-db.c (thread_db_find_new_threads_silently):
4491 (try_thread_db_load_1): Call it.
4493 2009-07-15 Doug Evans <dje@google.com>
4495 Code reorg in preparation for adding comdat types support.
4496 * dwarf2read.c (struct die_reader_specs): New struct.
4497 (locate_pdi_sibling): New arg buffer. All callers updated.
4498 (load_partial_dies, read_partial_die): Ditto.
4499 (read_8_bytes): Change return type to ULONGEST.
4500 (read_comp_unit): Delete arg abfd. All callers updated.
4501 (read_die_and_children_1): Delete args abfd, cu. New arg reader.
4502 All callers updated.
4503 (read_die_and_children, read_die_and_siblings): Ditto.
4504 (read_full_die): Ditto. Move closer to callers.
4505 (skip_one_die): New arg buffer. All callers updated.
4506 (load_full_comp_unit): Change return type to void. All callers
4508 (partial_read_comp_unit_head): New args buffer, buffer_size.
4509 All callers updated.
4510 (process_psymtab_comp_unit): New function, split out from
4511 dwarf2_build_psymtabs_hard.
4512 (dwarf2_build_psymtabs_hard): Call it.
4513 (load_partial_comp_unit): Renamed from load_comp_unit.
4514 All callers updated.
4515 (skip_children): New arg buffer. All callers updated.
4516 (init_cu_die_reader): New function.
4517 (is_ref_attr): New function.
4518 (dwarf2_get_ref_die_offset): Call it.
4519 (alloc_one_comp_unit): New function.
4521 2009-07-14 Stan Shebs <stan@codesourcery.com>
4523 * MAINTAINERS (Global Maintainers): Add Doug Evans.
4525 2009-07-14 Stan Shebs <stan@codesourcery.com>
4527 Conditional tracepoints.
4528 * ax-gdb.h (gen_eval_for_expr): Declare.
4529 * ax-gdb.c (gen_expr): Generate bytecodes for BINOP_EQUAL
4530 and other comparisons.
4531 (gen_eval_for_expr): New function.
4532 (agent_eval_command): New maintenance command.
4533 (_initialize_ax_gdb): Define the command.
4534 * remote.c (struct remote_state): New field cond_tracepoints.
4535 (PACKET_ConditionalTracepoints): New packet config type.
4536 (remote_cond_tracepoint_feature): New function.
4537 (remote_protocol_features): Add ConditionalTracepoints.
4538 (remote_supports_cond_tracepoints): New function.
4539 (_initialize_remote): Add ConditionalTracepoints.
4540 * tracepoint.c (download_tracepoint): Add conditional.
4541 * NEWS: Mention conditional tracepoints.
4543 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
4545 * objfiles.c (objfile_relocate): Do not relocate the same
4546 BLOCKVECTOR_MAP address map multiple times.
4548 2009-07-14 Ulrich Weigand <uweigand@de.ibm.com>
4550 * remote.c (process_stop_reply): Access expedited target registers
4553 2009-07-13 Jan Kratochvil <jan.kratochvil@redhat.com>
4555 Fix memory access from signed 32bit inferior registers on 64bit GDB.
4556 * linux-nat.c (linux_xfer_partial <TARGET_OBJECT_MEMORY>): New variable
4557 addr_bit. Mask OFFSET by the ADDR_BIT width.
4559 2009-07-13 Anthony Green <green@moxielogic.com>
4561 * moxie-tdep.c (moxie_gdbarch_init): Call
4562 set_gdbarch_process_record.
4563 (moxie_process_record): New.
4564 (moxie_process_readu): New.
4566 2009-07-12 Michael Snyder <msnyder@vmware.com>
4568 * i386-tdep.c: Add a frame unwinder for function epilogues.
4569 (i386_in_function_epilogue_p): New function.
4570 (i386_epilogue_frame_sniffer): New function.
4571 (i386_epilogue_frame_cache): New function.
4572 (i386_epilogue_frame_this_id): New function.
4573 (i386_epilogue_frame_unwind): New struct frame_unwind.
4574 (i386_gdbarch_init): Hook the new unwinder.
4576 2009-07-11 Hui Zhu <teawater@gmail.com>
4578 * cli/cli-cmds.c (disassemble_command): Add a new modifier /r
4579 to "disassemble" command to print the raw instructions in hex as
4580 well as in symbolic form.
4581 (init_cli_cmds): Ditto.
4582 (print_disassembly): Change "mixed" to "flags" to translate
4583 the behavior of disassemble.
4584 (disassemble_current_function): Ditto.
4585 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
4586 * stack.c (gdb_disassembly_stub): Ditto.
4587 * disasm.c (do_mixed_source_and_assembly): Ditto.
4588 (do_mixed_source_and_assembly): Ditto.
4589 (do_assembly_only): Ditto.
4590 (gdb_disassembly): Ditto.
4591 (dump_insns): print the raw instructions in hex as well as in
4592 symbolic form if DISASSEMBLY_RAW_INSN and flags is true.
4593 * disasm.h (DISASSEMBLY_SOURCE): Include source code with the
4594 assembly if it and flags is true.
4595 (DISASSEMBLY_RAW_INSN): Include the raw instructions in hex with
4596 the assembly if it and flags is true.
4597 (gdb_disassembly): Update extern.
4598 * NEWS: Document disassemble/r support.
4600 2009-07-10 Tom Tromey <tromey@redhat.com>
4602 * dwarf2-frame.c: Include dwarf2.h, not elf/dwarf2.h.
4603 * dwarf2expr.c: Likewise.
4604 * dwarf2loc.c: Likewise.
4605 * dwarf2read.c: Likewise.
4606 * sh-tdep.c: Likewise.
4607 * xtensa-tdep.c: Likewise.
4609 2009-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4612 * mi/mi-cmd-var.c (mi_cmd_var_update): Remove variable nv. Move
4613 variables var, rootlist and cr to their local sub-block. Move the
4614 make_cleanup_ui_out_tuple_begin_end, make_cleanup_ui_out_list_begin_end
4615 and do_cleanups calls to the common base block. Remove the zero NV
4618 2009-07-10 Phil Muldoon <pmuldoon@redhat.com>
4620 * python/python-internal.h (apply_varobj_pretty_printer): Update
4622 (python_string_to_target_python_string): Add definition.
4623 * python/python-utils.c (unicode_to_encoded_python_string)
4624 (unicode_to_target_python_string)
4625 (python_string_to_target_python_string): New Functions.
4626 * python/python-prettyprint.c (pretty_print_one_value): Likewise.
4627 (print_string_repr): Refactor to logic to account for PyObject
4629 (apply_varobj_pretty_printer): Likewise.
4630 * python/python-value.c (valpy_string): Parse length keyword. Use
4631 length keyword in LA_GET_STRING.
4632 * varobj.c (value_get_print_value): Refactor logic to account for
4633 PyObject returned strings.
4634 * c-lang.c (c_get_string): If the length parameter is specified,
4635 use that. Return value in characters. Update comments.
4636 * language.h: Update c_get_string prototype comments.
4638 2009-07-09 Doug Evans <dje@google.com>
4640 * i386-tdep.c (i386_displaced_step_fixup): Fix order of arguments
4641 to read_memory_unsigned_integer.
4643 2009-07-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4645 Report error on inaccessible memory.
4646 * cli/cli-dump.c: Include gdbcore.h.
4647 (dump_memory_to_file): Call read_memory instead of target_read_memory.
4649 2009-07-09 Hui Zhu <teawater@gmail.com>
4651 * solib.c (solib_bfd_open): Output a warning if solib's
4652 architecture is not compatible with inferior's architecture.
4654 2009-07-09 Ulrich Weigand <uweigand@de.ibm.com>
4655 Jan Kratochvil <jan.kratochvil@redhat.com>
4657 * target.h (struct target_ops <to_thread_architecture>): Describe it.
4658 (target_thread_architecture): Refer to to_thread_architecture.
4660 2009-07-08 Pierre Muller <muller@ics.u-strasbg.fr>
4662 * cli/cli-cmds.c (init_cli_cmds): Add "inf" alias for "info" command.
4664 2009-07-07 Ulrich Weigand <uweigand@de.ibm.com>
4666 * tui/tui-stack.c (tui_make_status_line): Display PC as ?? if unknown.
4668 2009-07-07 Pierre Muller <muller@ics.u-strasbg.fr>
4670 * breakpoint.c (set_raw_breakpoint): Remove static modifier.
4672 2009-07-07 Tom Tromey <tromey@redhat.com>
4674 * c-lang.c (convert_octal): Only allow 3 octal digits.
4675 (print_wchar): Prefer 3-digit octal form. Fall back to hex if
4677 * c-exp.y (c_parse_escape): Only allow 3 octal digits.
4679 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
4681 * python/python-value.c (valpy_getitem): Remove incorrect assert.
4683 2009-07-07 Paul Pluzhnikov <ppluzhnikov@google.com>
4685 * python/python-value.c (valpy_getitem): Don't return from TRY_CATCH.
4687 2009-07-07 Sami Wagiaalla <swagiaal@redhat.com>
4689 * cp-support.h (struct using_direct): Rename members inner and
4690 outer to import_src, and import_dest respectively.
4691 * cp-namespace.c (cp_add_using_directive): Update.
4692 (cp_add_using): Update.
4693 (cp_copy_usings): Update.
4694 (cp_lookup_symbol_namespace): Update.
4695 (cp_scan_for_anonymous_namespaces): Update.
4696 * cp-support.c (make_symbol_overload_list_using): Update.
4697 * cp-support.h (cp_add_using_directive, cp_add_using): Rename
4698 arguments from inner and outer to src and dest respectively.
4699 * cp-namespace.c (cp_add_using_directive): Ditto.
4700 (cp_add_using): Ditto.
4702 2009-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4704 * mi/mi-cmd-var.c (mi_cmd_var_update): Replace a while loop by for loop.
4705 * varobj.c (varobj_invalidate): Replace a while loop by for loop.
4707 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
4709 Fix hang in floating varobjs.
4711 * varobj.c (varobj_invalidate): Advance to next
4712 element when processing floating varobj.
4714 2009-07-07 Vladimir Prus <vladimir@codesourcery.com>
4716 * varobj.c: Remove unnecessary include.
4718 2009-07-07 Tristan Gingold <gingold@adacore.com>
4720 * config/i386/darwin.mh (NATDEPFILES): Remove excServer.o.
4721 Remove excServer.c target. Remove _all target.
4722 * darwin.defs: Removed.
4724 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
4726 * configure.tgt (i[34567]86-*-nto*): Add build_gdbserver=yes.
4728 2009-07-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4730 * source.c (find_and_open_source): Remove the `objfile' parameter.
4731 Update the function comment.
4732 (open_source_file, symtab_to_fullname, psymtab_to_fullname): Update the
4733 find_and_open_source callers.
4735 2009-07-05 Pedro Alves <pedro@codesourcery.com>
4737 * coff-pe-read.c (read_pe_exported_syms): Recognize
4738 "pe-arm-wince-little" and "pei-arm-wince-little" bfd targets as PE
4741 2009-07-05 Pedro Alves <pedro@codesourcery.com>
4743 * arm-wince-tdep.c (arm_wince_skip_main_prologue): New.
4744 (arm_wince_init_abi): Register it as gdbarch_skip_main_prologue
4747 2009-06-29 Tristan Gingold <gingold@adacore.com>
4749 * i386-darwin-tdep.c (amd64_darwin_thread_state_reg_offset)
4750 (amd64_darwin_thread_state_num_regs)
4751 (amd64_darwin_sigcontext_addr, x86_darwin_init_abi_64): Moved to
4753 (_initialize_i386_darwin_tdep): Remove 64 bits parts.
4754 (darwin_dwarf_signal_frame_p): Make public.
4755 * amd64-darwin-tdep.c: New file with most chunks from
4757 * i386-darwin-tdep.h: Add a prototype for darwin_dwarf_signal_frame_p.
4758 (amd64_darwin_thread_state_reg_offset)
4759 (amd64_darwin_thread_state_num_regs): Moved to amd64-darwin-tdep.h
4760 * amd64-darwin-tdep.h: New file.
4761 * i386-darwin-nat.c: Only includes amd64-nat.h and amd64-darwin-tdep.h
4762 if BFD64 is defined.
4763 (i386_darwin_fetch_inferior_registers): Add #ifdef BFD64/#endif around
4765 (i386_darwin_store_inferior_registers): Ditto.
4766 (darwin_set_sstep): Ditto.
4767 (darwin_complete_target): Ditto.
4768 (amd64_darwin_sstep_at_sigreturn): Ditto.
4769 * configure.tgt: Create a separate entry for x86_64-*-darwin.
4770 Add 64 bits support for i386-*-darwin if --enable-64-bit-bfd.
4771 * Makefile.in (ALLDEPFILES): Add amd64-darwin-tdep.c, darwin-nat.c,
4772 i386-darwin-tdep.c i386-darwin-nat.c
4773 (ALL_64_TARGET_OBS): Add amd64-darwin-tdep.o
4775 2009-07-02 Pedro Alves <pedro@codesourcery.com>
4777 * linux-fork.c (forks_exist_p): Drop unnecessary extern.
4778 (add_fork, linux_fork_killall, linux_fork_mourn_inferior)
4779 (linux_fork_detach): Ditto.
4780 (delete_fork_command): Rename to ...
4781 (delete_checkpoint_command): ... this.
4782 (detach_fork_command): Rename to ...
4783 (detach_checkpoint_command): ... this.
4784 (info_forks_command): Rename to ...
4785 (info_checkpoints_command): ... this.
4786 (_initialize_linux_fork): Remove stale comments. Adjust.
4788 2009-07-02 Pedro Alves <pedro@codesourcery.com>
4790 * linux-nat.c (linux_child_follow_fork): If we're staying attached
4791 to the child process, enable event reporting on it. Don't handle
4792 checkpoints here. Instead, add the child fork to the lwp thread
4793 and inferior lists without clobbering the previous inferior. Let
4794 the thread_db layer learn about a new child process, even if
4795 following the parent.
4796 (linux_nat_switch_fork): Delete lwps of the current inferior only,
4797 instead of clearing the whole list. Use thread_change_ptid to
4798 give the core the illusion the new checkpoint is still the same
4799 inferior. Clear the register cache.
4800 (linux_handle_extended_wait): Handle checkpoints here.
4801 (linux_multi_process): Turn on.
4802 * linux-fork.c (struct fork_info) <pc>: Remove field.
4803 (init_fork_list): Do not delete the checkpoint from the inferior
4804 list (it is not there).
4805 (fork_load_infrun_state): Don't switch inferior_ptid here. Pass
4806 the new checkpoint's ptid to linux_nat_switch_fork.
4807 (fork_save_infrun_state): Make static. Don't stop the pc field of
4808 fork_info, it's gone.
4809 (linux_fork_mourn_inferior): Don't delete the checkpoint from the
4810 inferior list, it's not there.
4811 (linux_fork_detach): Ditto.
4812 (delete_fork_command): Replace mention of fork/checkpoint by
4814 (detach_fork_command): Likewise. Don't delete the checkpoint from
4816 (info_forks_command): Adjust.
4817 (restore_detach_fork): Delete.
4818 (checkpointing_pid): New.
4819 (linux_fork_checkpointing_p): New.
4820 (save_detach_fork): Delete.
4821 (checkpoint_command): Delete temp_detach_fork. Don't remove
4822 breakpoints, that's a nop. Store the pid of the process we're
4823 checkpointing, and use make_cleanup_restore_integer to restore it.
4824 Don't reinsert breakpoints here.
4825 (process_command, fork_command): Delete.
4826 (restart_command): Update comments to only mention checkpoints,
4828 (_initialize_linux_fork): Delete "fork", "process", "info forks"
4830 * linux-fork.h (fork_save_infrun_state, fork_list): Delete
4832 (linux_fork_checkpointing_p): Declare.
4833 * cli/cli-cmds.c (killlist): New.
4834 * cli/cli-cmds.h (killlist): Declare.
4835 * gdbcmd.h (killlist): Declare.
4836 * inferior.c: Include "gdbthread.h".
4837 (detach_inferior_command, kill_inferior_command)
4838 (inferior_command): New.
4839 (info_inferiors_command): Allow specifying a specific inferior id.
4840 (_initialize_inferiors): Register "inferior", "kill inferior" and
4841 "detach inferior" commands.
4842 * infcmd.c (_initialize_infcmd): Make "kill" a prefix command.
4843 * gdbthread.h (any_thread_of_process): Declare.
4844 * thread.c (any_thread_of_process): New.
4846 * NEWS: Mention multi-inferior debugging. Mention 'info
4847 inferiors', 'inferior', 'detach inferior' and 'kill inferior' as
4849 (Removed commands): New section, mentioning that 'info forks',
4850 'fork', 'process', 'delete fork' and 'detach fork' are now gone.
4852 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
4854 * gdbarch.sh (current_gdbarch): Remove global variable.
4855 (find_arch_by_info): Remove, inline into ...
4856 (gdbarch_find_by_info): ... this. Remove current_gdbarch swapping.
4857 (deprecated_current_gdbarch_select_hack): Rename to ...
4858 (deprecated_target_gdbarch_select_hack): ... this. Do not set
4859 or access current_gdbarch.
4860 * gdbarch.c, gdbarch.h: Regenerate.
4862 * arch-utils.c (gdbarch_update_p): Update call.
4863 (set_gdbarch_from_file): Likewise.
4865 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
4867 * defs.h (extract_signed_integer, extract_unsigned_integer,
4868 extract_long_unsigned_integer, store_signed_integer,
4869 store_unsigned_integer): Add BYTE_ORDER parameter.
4870 * findvar.c (extract_signed_integer, extract_unsigned_integer,
4871 extract_long_unsigned_integer, store_signed_integer,
4872 store_unsigned_integer): Add BYTE_ORDER parameter. Use it
4873 instead of current_gdbarch.
4875 * gdbcore.h (read_memory_integer, safe_read_memory_integer,
4876 read_memory_unsigned_integer, write_memory_signed_integer,
4877 write_memory_unsigned_integer): Add BYTE_ORDER parameter.
4878 * corefile.c (struct captured_read_memory_integer_arguments): Add
4880 (safe_read_memory_integer): Add BYTE_ORDER parameter. Store it into
4881 struct captured_read_memory_integer_arguments.
4882 (do_captured_read_memory_integer): Pass it to read_memory_integer.
4883 (read_memory_integer): Add BYTE_ORDER parameter. Pass it to
4884 extract_signed_integer.
4885 (read_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it to
4886 extract_unsigned_integer.
4887 (write_memory_signed_integer): Add BYTE_ORDER parameter. Pass it
4888 to store_signed_integer.
4889 (write_memory_unsigned_integer): Add BYTE_ORDER parameter. Pass it
4890 to store_unsigned_integer.
4892 * target.h (get_target_memory_unsigned): Add BYTE_ORDER parameter.
4893 * target.c (get_target_memory_unsigned): Add BYTE_ORDER parameter.
4894 Pass it to extract_unsigned_integer.
4897 Update calls to extract_signed_integer, extract_unsigned_integer,
4898 extract_long_unsigned_integer, store_signed_integer,
4899 store_unsigned_integer, read_memory_integer,
4900 read_memory_unsigned_integer, safe_read_memory_integer,
4901 write_memory_signed_integer, write_memory_unsigned_integer, and
4902 get_target_memory_unsigned to pass byte order:
4903 * ada-lang.c (ada_value_binop): Update.
4904 * ada-valprint.c (char_at): Update.
4905 * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Update.
4906 * alpha-tdep.c (alpha_lds, alpha_sts, alpha_push_dummy_call,
4907 alpha_extract_return_value, alpha_read_insn,
4908 alpha_get_longjmp_target): Update.
4909 * amd64-linux-tdep.c (amd64_linux_sigcontext_addr): Update.
4910 * amd64obsd-tdep.c (amd64obsd_supply_uthread,
4911 amd64obsd_collect_uthread, amd64obsd_trapframe_cache): Update.
4912 * amd64-tdep.c (amd64_push_dummy_call, amd64_analyze_prologue,
4913 amd64_frame_cache, amd64_sigtramp_frame_cache, fixup_riprel,
4914 amd64_displaced_step_fixup): Update.
4915 * arm-linux-tdep.c (arm_linux_sigreturn_init,
4916 arm_linux_rt_sigreturn_init, arm_linux_supply_gregset): Update.
4917 * arm-tdep.c (thumb_analyze_prologue, arm_skip_prologue,
4918 arm_scan_prologue, arm_push_dummy_call, thumb_get_next_pc,
4919 arm_get_next_pc, arm_extract_return_value, arm_store_return_value,
4920 arm_return_value): Update.
4921 * arm-wince-tdep.c (arm_pe_skip_trampoline_code): Update.
4922 * auxv.c (default_auxv_parse): Update.
4923 * avr-tdep.c (avr_address_to_pointer, avr_pointer_to_address,
4924 avr_scan_prologue, avr_extract_return_value,
4925 avr_frame_prev_register, avr_push_dummy_call): Update.
4926 * bsd-uthread.c (bsd_uthread_check_magic, bsd_uthread_lookup_offset,
4927 bsd_uthread_wait, bsd_uthread_thread_alive,
4928 bsd_uthread_extra_thread_info): Update.
4929 * c-lang.c (c_printstr, print_wchar): Update.
4930 * cp-valprint.c (cp_print_class_member): Update.
4931 * cris-tdep.c (cris_sigcontext_addr, cris_sigtramp_frame_unwind_cache,
4932 cris_push_dummy_call, cris_scan_prologue, cris_store_return_value,
4933 cris_extract_return_value, find_step_target, dip_prefix,
4934 sixteen_bit_offset_branch_op, none_reg_mode_jump_op,
4935 move_mem_to_reg_movem_op, get_data_from_address): Update.
4936 * dwarf2expr.c (dwarf2_read_address, execute_stack_op): Update.
4937 * dwarf2-frame.c (execute_cfa_program): Update.
4938 * dwarf2loc.c (find_location_expression): Update.
4939 * dwarf2read.c (dwarf2_const_value): Update.
4940 * expprint.c (print_subexp_standard): Update.
4941 * findvar.c (unsigned_pointer_to_address, signed_pointer_to_address,
4942 unsigned_address_to_pointer, address_to_signed_pointer,
4943 read_var_value): Update.
4944 * frame.c (frame_unwind_register_signed,
4945 frame_unwind_register_unsigned, get_frame_memory_signed,
4946 get_frame_memory_unsigned): Update.
4947 * frame-unwind.c (frame_unwind_got_constant): Update.
4948 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp,
4949 frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
4951 * frv-tdep.c (frv_analyze_prologue, frv_skip_main_prologue,
4952 frv_extract_return_value, find_func_descr,
4953 frv_convert_from_func_ptr_addr, frv_push_dummy_call): Update.
4954 * f-valprint.c (f_val_print): Update.
4955 * gnu-v3-abi.c (gnuv3_decode_method_ptr, gnuv3_make_method_ptr):
4957 * h8300-tdep.c (h8300_is_argument_spill, h8300_analyze_prologue,
4958 h8300_push_dummy_call, h8300_extract_return_value,
4959 h8300h_extract_return_value, h8300_store_return_value,
4960 h8300h_store_return_value): Update.
4961 * hppabsd-tdep.c (hppabsd_find_global_pointer): Update.
4962 * hppa-hpux-nat.c (hppa_hpux_fetch_register, hppa_hpux_store_register):
4964 * hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline,
4965 hppa64_hpux_in_solib_call_trampoline,
4966 hppa_hpux_in_solib_return_trampoline, hppa_hpux_skip_trampoline_code,
4967 hppa_hpux_sigtramp_frame_unwind_cache,
4968 hppa_hpux_sigtramp_unwind_sniffer, hppa32_hpux_find_global_pointer,
4969 hppa64_hpux_find_global_pointer, hppa_hpux_search_pattern,
4970 hppa32_hpux_search_dummy_call_sequence,
4971 hppa64_hpux_search_dummy_call_sequence, hppa_hpux_supply_save_state,
4972 hppa_hpux_unwind_adjust_stub): Update.
4973 * hppa-linux-tdep.c (insns_match_pattern,
4974 hppa_linux_find_global_pointer): Update.
4975 * hppa-tdep.c (hppa_in_function_epilogue_p, hppa32_push_dummy_call,
4976 hppa64_convert_code_addr_to_fptr, hppa64_push_dummy_call,
4977 skip_prologue_hard_way, hppa_frame_cache, hppa_fallback_frame_cache,
4978 hppa_pseudo_register_read, hppa_frame_prev_register_helper,
4979 hppa_match_insns): Update.
4980 * hpux-thread.c (hpux_thread_fetch_registers): Update.
4981 * i386-tdep.c (i386bsd_sigcontext_addr): Update.
4982 * i386-cygwin-tdep.c (core_process_module_section): Update.
4983 * i386-darwin-nat.c (i386_darwin_sstep_at_sigreturn,
4984 amd64_darwin_sstep_at_sigreturn): Update.
4985 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr,
4986 amd64_darwin_sigcontext_addr): Likewise.
4987 * i386-linux-nat.c (i386_linux_sigcontext_addr): Update.
4988 * i386nbsd-tdep.c (i386nbsd_sigtramp_cache_init): Update.
4989 * i386-nto-tdep.c (i386nto_sigcontext_addr): Update.
4990 * i386obsd-nat.c (i386obsd_supply_pcb): Update.
4991 * i386obsd-tdep.c (i386obsd_supply_uthread, i386obsd_collect_uthread,
4992 i386obsd_trapframe_cache): Update.
4993 * i386-tdep.c (i386_displaced_step_fixup, i386_follow_jump,
4994 i386_analyze_frame_setup, i386_analyze_prologue,
4995 i386_skip_main_prologue, i386_frame_cache, i386_sigtramp_frame_cache,
4996 i386_get_longjmp_target, i386_push_dummy_call,
4997 i386_pe_skip_trampoline_code, i386_svr4_sigcontext_addr,
4998 i386_fetch_pointer_argument): Update.
4999 * i387-tdep.c (i387_supply_fsave): Update.
5000 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Update.
5001 * ia64-tdep.c (ia64_pseudo_register_read, ia64_pseudo_register_write,
5002 examine_prologue, ia64_frame_cache, ia64_frame_prev_register,
5003 ia64_sigtramp_frame_cache, ia64_sigtramp_frame_prev_register,
5004 ia64_access_reg, ia64_access_rse_reg, ia64_libunwind_frame_this_id,
5005 ia64_libunwind_frame_prev_register,
5006 ia64_libunwind_sigtramp_frame_this_id,
5007 ia64_libunwind_sigtramp_frame_prev_register, ia64_find_global_pointer,
5008 find_extant_func_descr, find_func_descr,
5009 ia64_convert_from_func_ptr_addr, ia64_push_dummy_call, ia64_dummy_id,
5010 ia64_unwind_pc): Update.
5011 * iq2000-tdep.c (iq2000_pointer_to_address, iq2000_address_to_pointer,
5012 iq2000_scan_prologue, iq2000_extract_return_value,
5013 iq2000_push_dummy_call): Update.
5014 * irix5nat.c (fill_gregset): Update.
5015 * jv-lang.c (evaluate_subexp_java): Update.
5016 * jv-valprint.c (java_value_print): Update.
5017 * lm32-tdep.c (lm32_analyze_prologue, lm32_push_dummy_call,
5018 lm32_extract_return_value, lm32_store_return_value): Update.
5019 * m32c-tdep.c (m32c_push_dummy_call, m32c_return_value,
5020 m32c_skip_trampoline_code, m32c_m16c_address_to_pointer,
5021 m32c_m16c_pointer_to_address): Update.
5022 * m32r-tdep.c (m32r_store_return_value, decode_prologue,
5023 m32r_skip_prologue, m32r_push_dummy_call, m32r_extract_return_value):
5025 * m68hc11-tdep.c (m68hc11_pseudo_register_read,
5026 m68hc11_pseudo_register_write, m68hc11_analyze_instruction,
5027 m68hc11_push_dummy_call): Update.
5028 * m68linux-tdep.c (m68k_linux_pc_in_sigtramp,
5029 m68k_linux_get_sigtramp_info, m68k_linux_sigtramp_frame_cache):
5031 * m68k-tdep.c (m68k_push_dummy_call, m68k_analyze_frame_setup,
5032 m68k_analyze_register_saves, m68k_analyze_prologue, m68k_frame_cache,
5033 m68k_get_longjmp_target): Update.
5034 * m88k-tdep.c (m88k_fetch_instruction): Update.
5035 * mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_csr_write,
5036 mep_pseudo_cr32_write, mep_get_insn, mep_push_dummy_call): Update.
5037 * mi/mi-main.c (mi_cmd_data_write_memory): Update.
5038 * mips-linux-tdep.c (mips_linux_get_longjmp_target, supply_32bit_reg,
5039 mips64_linux_get_longjmp_target, mips64_fill_gregset,
5040 mips64_fill_fpregset, mips_linux_in_dynsym_stub): Update.
5041 * mipsnbdsd-tdep.c (mipsnbsd_get_longjmp_target): Update.
5042 * mips-tdep.c (mips_fetch_instruction, fetch_mips_16,
5043 mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call,
5044 mips_o32_push_dummy_call, mips_o64_push_dummy_call,
5045 mips_single_step_through_delay, mips_skip_pic_trampoline_code,
5046 mips_integer_to_address): Update.
5047 * mn10300-tdep.c (mn10300_analyze_prologue, mn10300_push_dummy_call):
5049 * monitor.c (monitor_supply_register, monitor_write_memory,
5050 monitor_read_memory_single): Update.
5051 * moxie-tdep.c (moxie_store_return_value, moxie_extract_return_value,
5052 moxie_analyze_prologue): Update.
5053 * mt-tdep.c (mt_return_value, mt_skip_prologue, mt_select_coprocessor,
5054 mt_pseudo_register_read, mt_pseudo_register_write, mt_registers_info,
5055 mt_push_dummy_call): Update.
5056 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
5057 read_objc_methlist_method, read_objc_object, read_objc_super,
5058 read_objc_class, find_implementation_from_class): Update.
5059 * ppc64-linux-tdep.c (ppc64_desc_entry_point,
5060 ppc64_linux_convert_from_func_ptr_addr, ppc_linux_sigtramp_cache):
5062 * ppcobsd-tdep.c (ppcobsd_sigtramp_frame_sniffer,
5063 ppcobsd_sigtramp_frame_cache): Update.
5064 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call,
5065 do_ppc_sysv_return_value, ppc64_sysv_abi_push_dummy_call,
5066 ppc64_sysv_abi_return_value): Update.
5067 * ppc-linux-nat.c (ppc_linux_auxv_parse): Update.
5068 * procfs.c (procfs_auxv_parse): Update.
5069 * p-valprint.c (pascal_val_print): Update.
5070 * regcache.c (regcache_raw_read_signed, regcache_raw_read_unsigned,
5071 regcache_raw_write_signed, regcache_raw_write_unsigned,
5072 regcache_cooked_read_signed, regcache_cooked_read_unsigned,
5073 regcache_cooked_write_signed, regcache_cooked_write_unsigned): Update.
5074 * remote-m32r-sdi.c (m32r_fetch_register): Update.
5075 * remote-mips.c (mips_wait, mips_fetch_registers, mips_xfer_memory):
5077 * rs6000-aix-tdep.c (rs6000_push_dummy_call, rs6000_return_value,
5078 rs6000_convert_from_func_ptr_addr, branch_dest,
5079 rs6000_software_single_step): Update.
5080 * rs6000-tdep.c (rs6000_in_function_epilogue_p,
5081 ppc_displaced_step_fixup, ppc_deal_with_atomic_sequence,
5082 bl_to_blrl_insn_p, rs6000_fetch_instruction, skip_prologue,
5083 rs6000_skip_main_prologue, rs6000_skip_trampoline_code,
5084 rs6000_frame_cache): Update.
5085 * s390-tdep.c (s390_pseudo_register_read, s390_pseudo_register_write,
5086 s390x_pseudo_register_read, s390x_pseudo_register_write, s390_load,
5087 s390_backchain_frame_unwind_cache, s390_sigtramp_frame_unwind_cache,
5088 extend_simple_arg, s390_push_dummy_call, s390_return_value): Update.
5089 * scm-exp.c (scm_lreadr): Update.
5090 * scm-lang.c (scm_get_field, scm_unpack): Update.
5091 * scm-valprint.c (scm_val_print): Update.
5092 * score-tdep.c (score_breakpoint_from_pc, score_push_dummy_call,
5093 score_fetch_inst): Update.
5094 * sh64-tdep.c (look_for_args_moves, sh64_skip_prologue_hard_way,
5095 sh64_analyze_prologue, sh64_push_dummy_call, sh64_extract_return_value,
5096 sh64_pseudo_register_read, sh64_pseudo_register_write,
5097 sh64_frame_prev_register): Update:
5098 * sh-tdep.c (sh_analyze_prologue, sh_push_dummy_call_fpu,
5099 sh_push_dummy_call_nofpu, sh_extract_return_value_nofpu,
5100 sh_store_return_value_nofpu, sh_in_function_epilogue_p): Update.
5101 * solib-darwin.c (darwin_load_image_infos): Update.
5102 * solib-frv.c (fetch_loadmap, lm_base, frv_current_sos, enable_break2,
5103 find_canonical_descriptor_in_load_object): Update.
5104 * solib-irix.c (extract_mips_address, fetch_lm_info, irix_current_sos,
5105 irix_open_symbol_file_object): Update.
5106 * solib-som.c (som_solib_create_inferior_hook, link_map_start,
5107 som_current_sos, som_open_symbol_file_object): Update.
5108 * solib-sunos.c (SOLIB_EXTRACT_ADDRESS, LM_ADDR, LM_NEXT, LM_NAME):
5110 * solib-svr4.c (read_program_header, scan_dyntag_auxv,
5111 solib_svr4_r_ldsomap): Update.
5112 * sparc64-linux-tdep.c (sparc64_linux_step_trap): Update.
5113 * sparc64obsd-tdep.c (sparc64obsd_supply_uthread,
5114 sparc64obsd_collect_uthread): Update.
5115 * sparc64-tdep.c (sparc64_pseudo_register_read,
5116 sparc64_pseudo_register_write, sparc64_supply_gregset,
5117 sparc64_collect_gregset): Update.
5118 * sparc-linux-tdep.c (sparc32_linux_step_trap): Update.
5119 * sparcobsd-tdep.c (sparc32obsd_supply_uthread,
5120 sparc32obsd_collect_uthread): Update.
5121 * sparc-tdep.c (sparc_fetch_wcookie, sparc32_push_dummy_code,
5122 sparc32_store_arguments, sparc32_return_value, sparc_supply_rwindow,
5123 sparc_collect_rwindow): Update.
5124 * spu-linux-nat.c (parse_spufs_run): Update.
5125 * spu-tdep.c (spu_pseudo_register_read_spu,
5126 spu_pseudo_register_write_spu, spu_pointer_to_address,
5127 spu_analyze_prologue, spu_in_function_epilogue_p,
5128 spu_frame_unwind_cache, spu_push_dummy_call, spu_software_single_step,
5129 spu_get_longjmp_target, spu_get_overlay_table, spu_overlay_update_osect,
5130 info_spu_signal_command, info_spu_mailbox_list, info_spu_dma_cmdlist,
5131 info_spu_dma_command, info_spu_proxydma_command): Update.
5132 * stack.c (print_frame_nameless_args, frame_info): Update.
5133 * symfile.c (read_target_long_array, simple_read_overlay_table,
5134 simple_read_overlay_region_table): Update.
5135 * target.c (debug_print_register): Update.
5136 * tramp-frame.c (tramp_frame_start): Update.
5137 * v850-tdep.c (v850_analyze_prologue, v850_push_dummy_call,
5138 v850_extract_return_value, v850_store_return_value,
5139 * valarith.c (value_binop, value_bit_index): Update.
5140 * valops.c (value_cast): Update.
5141 * valprint.c (val_print_type_code_int, val_print_string,
5142 read_string): Update.
5143 * value.c (unpack_long, unpack_double, unpack_field_as_long,
5144 modify_field, pack_long): Update.
5145 * vax-tdep.c (vax_store_arguments, vax_push_dummy_call,
5146 vax_skip_prologue): Update.
5147 * xstormy16-tdep.c (xstormy16_push_dummy_call,
5148 xstormy16_analyze_prologue, xstormy16_in_function_epilogue_p,
5149 xstormy16_resolve_jmp_table_entry, xstormy16_find_jmp_table_entry,
5150 xstormy16_pointer_to_address, xstormy16_address_to_pointer): Update.
5151 * xtensa-tdep.c (extract_call_winsize, xtensa_pseudo_register_read,
5152 xtensa_pseudo_register_write, xtensa_frame_cache,
5153 xtensa_push_dummy_call, call0_track_op, call0_frame_cache): Update.
5156 * dfp.h (decimal_to_string, decimal_from_string, decimal_from_integral,
5157 decimal_from_floating, decimal_to_doublest, decimal_is_zero): Add
5158 BYTE_ORDER parameter.
5159 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
5161 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
5162 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
5163 * dfp.c (match_endianness): Add BYTE_ORDER parameter. Use it
5164 instead of current_gdbarch.
5165 (decimal_to_string, decimal_from_integral, decimal_from_floating,
5166 decimal_to_doublest, decimal_is_zero): Add BYTE_ORDER parameter.
5167 Pass it to match_endianness.
5168 (decimal_binop): Add BYTE_ORDER_X, BYTE_ORDER_Y, and BYTE_ORDER_RESULT
5169 parameters. Pass them to match_endianness.
5170 (decimal_compare): Add BYTE_ORDER_X and BYTE_ORDER_Y parameters.
5171 Pass them to match_endianness.
5172 (decimal_convert): Add BYTE_ORDER_FROM and BYTE_ORDER_TO parameters.
5173 Pass them to match_endianness.
5174 * valarith.c (value_args_as_decimal): Add BYTE_ORDER_X and
5175 BYTE_ORDER_Y output parameters.
5176 (value_binop): Update call to value_args_as_decimal.
5178 Update calls to decimal_to_string, decimal_from_string,
5179 decimal_from_integral, decimal_from_floating, decimal_to_doublest,
5180 decimal_is_zero, decimal_binop, decimal_compare and decimal_convert
5181 to pass/receive byte order:
5182 * c-exp.y (parse_number): Update.
5183 * printcmd.c (printf_command): Update.
5184 * valarith.c (value_args_as_decimal, value_binop, value_logical_not,
5185 value_equal, value_less): Update.
5186 * valops.c (value_cast, value_one): Update.
5187 * valprint.c (print_decimal_floating): Update.
5188 * value.c (unpack_long, unpack_double): Update.
5189 * python/python-value.c (valpy_nonzero): Update.
5192 * ada-valprint.c (char_at): Add BYTE_ORDER parameter.
5193 (printstr): Update calls to char_at.
5194 (ada_val_print_array): Likewise.
5195 * valprint.c (read_string): Add BYTE_ORDER parameter.
5196 (val_print_string): Update call to read_string.
5197 * c-lang.c (c_get_string): Likewise.
5198 * charset.h (target_wide_charset): Add BYTE_ORDER parameter.
5199 * charset.c (target_wide_charset): Add BYTE_ORDER parameter.
5200 Use it instead of current_gdbarch.
5201 * printcmd.c (printf_command): Update calls to target_wide_charset.
5202 * c-lang.c (charset_for_string_type): Add BYTE_ORDER parameter.
5203 Pass to target_wide_charset. Use it instead of current_gdbarch.
5204 (classify_type): Add BYTE_ORDER parameter. Pass to
5205 charset_for_string_type. Allow NULL encoding pointer.
5206 (print_wchar): Add BYTE_ORDER parameter.
5207 (c_emit_char): Update calls to classify_type and print_wchar.
5208 (c_printchar, c_printstr): Likewise.
5211 * gdbarch.sh (in_solib_return_trampoline): Convert to type "m".
5212 * gdbarch.c, gdbarch.h: Regenerate.
5213 * arch-utils.h (generic_in_solib_return_trampoline): Add GDBARCH
5215 * arch-utils.c (generic_in_solib_return_trampoline): Likewise.
5216 * hppa-hpux-tdep.c (hppa_hpux_in_solib_return_trampoline): Likewise.
5217 * rs6000-tdep.c (rs6000_in_solib_return_trampoline): Likewise.
5218 (rs6000_skip_trampoline_code): Update call.
5220 * alpha-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
5221 dynamic_sigtramp_offset and pc_in_sigtramp callbacks.
5222 (alpha_read_insn): Add GDBARCH parameter.
5223 * alpha-tdep.c (alpha_lds, alpha_sts): Add GDBARCH parameter.
5224 (alpha_register_to_value): Pass architecture to alpha_sts.
5225 (alpha_extract_return_value): Likewise.
5226 (alpha_value_to_register): Pass architecture to alpha_lds.
5227 (alpha_store_return_value): Likewise.
5228 (alpha_read_insn): Add GDBARCH parameter.
5229 (alpha_skip_prologue): Pass architecture to alpha_read_insn.
5230 (alpha_heuristic_proc_start): Likewise.
5231 (alpha_heuristic_frame_unwind_cache): Likewise.
5232 (alpha_next_pc): Likewise.
5233 (alpha_sigtramp_frame_this_id): Pass architecture to
5234 tdep->dynamic_sigtramp_offset callback.
5235 (alpha_sigtramp_frame_sniffer): Pass architecture to
5236 tdep->pc_in_sigtramp callback.
5237 * alphafbsd-tdep.c (alphafbsd_pc_in_sigtramp): Add GDBARCH parameter.
5238 (alphafbsd_sigtramp_offset): Likewise.
5239 * alpha-linux-tdep.c (alpha_linux_sigtramp_offset_1): Add GDBARCH
5240 parameter. Pass to alpha_read_insn.
5241 (alpha_linux_sigtramp_offset): Add GDBARCH parameter. Pass to
5242 alpha_linux_sigtramp_offset_1.
5243 (alpha_linux_pc_in_sigtramp): Add GDBARCH parameter. Pass to
5244 alpha_linux_sigtramp_offset.
5245 (alpha_linux_sigcontext_addr): Pass architecture to alpha_read_insn
5246 and alpha_linux_sigtramp_offset.
5247 * alphanbsd-tdep.c (alphanbsd_sigtramp_offset): Add GDBARCH parameter.
5248 (alphanbsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
5249 alphanbsd_sigtramp_offset.
5250 * alphaobsd-tdep.c (alphaobsd_sigtramp_offset): Add GDBARCH parameter.
5251 (alphaobsd_pc_in_sigtramp): Add GDBARCH parameter. Pass to
5253 (alphaobsd_sigcontext_addr): Pass architecture to
5254 alphaobsd_sigtramp_offset.
5255 * alpha-osf1-tdep.c (alpha_osf1_pc_in_sigtramp): Add GDBARCH
5258 * amd64-tdep.c (amd64_analyze_prologue): Add GDBARCH parameter.
5259 (amd64_skip_prologue): Pass architecture to amd64_analyze_prologue.
5260 (amd64_frame_cache): Likewise.
5262 * arm-tdep.c (SWAP_SHORT, SWAP_INT): Remove.
5263 (thumb_analyze_prologue, arm_skip_prologue, arm_scan_prologue,
5264 thumb_get_next_pc, arm_get_next_pc): Do not use SWAP_ macros.
5265 * arm-wince-tdep.c: Include "frame.h".
5267 * avr-tdep.c (EXTRACT_INSN): Remove.
5268 (avr_scan_prologue): Add GDBARCH argument, inline EXTRACT_INSN.
5269 (avr_skip_prologue): Pass architecture to avr_scan_prologue.
5270 (avr_frame_unwind_cache): Likewise.
5272 * cris-tdep.c (struct instruction_environment): Add BYTE_ORDER member.
5273 (find_step_target): Initialize it.
5274 (get_data_from_address): Add BYTE_ORDER parameter.
5275 (bdap_prefix): Pass byte order to get_data_from_address.
5276 (handle_prefix_assign_mode_for_aritm_op): Likewise.
5277 (three_operand_add_sub_cmp_and_or_op): Likewise.
5278 (handle_inc_and_index_mode_for_aritm_op): Likewise.
5280 * frv-linux-tdep.c (frv_linux_pc_in_sigtramp): Add GDBARCH parameter.
5281 (frv_linux_sigcontext_reg_addr): Pass architecture to
5282 frv_linux_pc_in_sigtramp.
5283 (frv_linux_sigtramp_frame_sniffer): Likewise.
5285 * h8300-tdep.c (h8300_is_argument_spill): Add GDBARCH parameter.
5286 (h8300_analyze_prologue): Add GDBARCH parameter. Pass to
5287 h8300_is_argument_spill.
5288 (h8300_frame_cache, h8300_skip_prologue): Pass architecture
5289 to h8300_analyze_prologue.
5291 * hppa-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter to
5292 in_solib_call_trampoline callback.
5293 (hppa_in_solib_call_trampoline): Add GDBARCH parameter.
5294 * hppa-tdep.c (hppa64_convert_code_addr_to_fptr): Add GDBARCH
5296 (hppa64_push_dummy_call): Pass architecture to
5297 hppa64_convert_code_addr_to_fptr.
5298 (hppa_match_insns): Add GDBARCH parameter.
5299 (hppa_match_insns_relaxed): Add GDBARCH parameter. Pass to
5301 (hppa_skip_trampoline_code): Pass architecture to hppa_match_insns.
5302 (hppa_in_solib_call_trampoline): Add GDBARCH parameter. Pass to
5303 hppa_match_insns_relaxed.
5304 (hppa_stub_unwind_sniffer): Pass architecture to
5305 tdep->in_solib_call_trampoline callback.
5306 * hppa-hpux-tdep.c (hppa_hpux_search_pattern): Add GDBARCH parameter.
5307 (hppa32_hpux_search_dummy_call_sequence): Pass architecture to
5308 hppa_hpux_search_pattern.
5309 * hppa-linux-tdep.c (insns_match_pattern): Add GDBARCH parameter.
5310 (hppa_linux_sigtramp_find_sigcontext): Add GDBARCH parameter.
5311 Pass to insns_match_pattern.
5312 (hppa_linux_sigtramp_frame_unwind_cache): Pass architecture to
5313 hppa_linux_sigtramp_find_sigcontext.
5314 (hppa_linux_sigtramp_frame_sniffer): Likewise.
5315 (hppa32_hpux_in_solib_call_trampoline): Add GDBARCH parameter.
5316 (hppa64_hpux_in_solib_call_trampoline): Likewise.
5318 * i386-tdep.c (i386_follow_jump): Add GDBARCH parameter.
5319 (i386_analyze_frame_setup): Add GDBARCH parameter.
5320 (i386_analyze_prologue): Add GDBARCH parameter. Pass to
5321 i386_follow_jump and i386_analyze_frame_setup.
5322 (i386_skip_prologue): Pass architecture to i386_analyze_prologue
5323 and i386_follow_jump.
5324 (i386_frame_cache): Pass architecture to i386_analyze_prologue.
5325 (i386_pe_skip_trampoline_code): Add FRAME parameter.
5326 * i386-tdep.h (i386_pe_skip_trampoline_code): Add FRAME parameter.
5327 * i386-cygwin-tdep.c (i386_cygwin_skip_trampoline_code): Pass
5328 frame to i386_pe_skip_trampoline_code.
5330 * ia64-tdep.h (struct gdbarch_tdep): Add GDBARCH parameter
5331 to sigcontext_register_address callback.
5332 * ia64-tdep.c (ia64_find_global_pointer): Add GDBARCH parameter.
5333 (ia64_find_unwind_table): Pass architecture to
5334 ia64_find_global_pointer.
5335 (find_extant_func_descr): Add GDBARCH parameter.
5336 (find_func_descr): Pass architecture to find_extant_func_descr
5337 and ia64_find_global_pointer.
5338 (ia64_sigtramp_frame_init_saved_regs): Pass architecture to
5339 tdep->sigcontext_register_address callback.
5340 * ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Add
5343 * iq2000-tdep.c (iq2000_scan_prologue): Add GDBARCH parameter.
5344 (iq2000_frame_cache): Pass architecture to iq2000_scan_prologue.
5346 * lm32-tdep.c (lm32_analyze_prologue): Add GDBARCH parameter.
5347 (lm32_skip_prologue, lm32_frame_cache): Pass architecture to
5348 lm32_analyze_prologue.
5350 * m32r-tdep.c (decode_prologue): Add GDBARCH parameter.
5351 (m32r_skip_prologue): Pass architecture to decode_prologue.
5353 * m68hc11-tdep.c (m68hc11_analyze_instruction): Add GDBARCH parameter.
5354 (m68hc11_scan_prologue): Pass architecture to
5355 m68hc11_analyze_instruction.
5357 * m68k-tdep.c (m68k_analyze_frame_setup): Add GDBARCH parameter.
5358 (m68k_analyze_prologue): Pass architecture to
5359 m68k_analyze_frame_setup.
5361 * m88k-tdep.c (m88k_fetch_instruction): Add BYTE_ORDER parameter.
5362 (m88k_analyze_prologue): Add GDBARCH parameter. Pass byte order
5363 to m88k_fetch_instruction.
5364 (m88k_skip_prologue): Pass architecture to m88k_analyze_prologue.
5365 (m88k_frame_cache): Likewise.
5367 * mep-tdep.c (mep_get_insn): Add GDBARCH parameter.
5368 (mep_analyze_prologue): Pass architecture to mep_get_insn.
5370 * mips-tdep.c (mips_fetch_instruction): Add GDBARCH parameter.
5371 (mips32_next_pc): Pass architecture to mips_fetch_instruction.
5372 (deal_with_atomic_sequence): Likewise.
5373 (unpack_mips16): Add GDBARCH parameter, pass to mips_fetch_instruction.
5374 (mips16_scan_prologue): Likewise.
5375 (mips32_scan_prologue): Likewise.
5376 (mips16_in_function_epilogue_p): Likewise.
5377 (mips32_in_function_epilogue_p): Likewise.
5378 (mips_about_to_return): Likewise.
5379 (mips_insn16_frame_cache): Pass architecture to mips16_scan_prologue.
5380 (mips_insn32_frame_cache): Pass architecture to mips32_scan_prologue.
5381 (mips_skip_prologue): Pass architecture to mips16_scan_prologue
5382 and mips32_scan_prologue.
5383 (mips_in_function_epilogue_p): Pass architecture to
5384 mips16_in_function_epilogue_p and
5385 mips32_in_function_epilogue_p.
5386 (heuristic_proc_start): Pass architecture to mips_fetch_instruction
5387 and mips_about_to_return.
5388 (mips_skip_mips16_trampoline_code): Pass architecture to
5389 mips_fetch_instruction.
5390 (fetch_mips_16): Add GDBARCH parameter.
5391 (mips16_next_pc): Pass architecture to fetch_mips_16.
5392 (extended_mips16_next_pc): Pass architecture to unpack_mips16 and
5395 * objc-lang.c (read_objc_method, read_objc_methlist_nmethods,
5396 read_objc_methlist_method, read_objc_object, read_objc_super,
5397 read_objc_class): Add GDBARCH parameter.
5398 (find_implementation_from_class): Add GDBARCH parameter, pass
5399 to read_objc_class, read_objc_methlist_nmethods, and
5400 read_objc_methlist_method.
5401 (find_implementation): Add GDBARCH parameter, pass to
5402 read_objc_object and find_implementation_from_class.
5403 (resolve_msgsend, resolve_msgsend_stret): Pass architecture
5404 to find_implementation.
5405 (resolve_msgsend_super, resolve_msgsend_super_stret): Pass
5406 architecture to read_objc_super and find_implementation_from_class.
5408 * ppc64-linux-tdep.c (ppc64_desc_entry_point): Add GDBARCH parameter.
5409 (ppc64_standard_linkage1_target, ppc64_standard_linkage2_target,
5410 ppc64_standard_linkage3_target): Pass architecture to
5411 ppc64_desc_entry_point.
5412 * rs6000-tdep.c (bl_to_blrl_insn_p): Add BYTE_ORDER parameter.
5413 (skip_prologue): Pass byte order to bl_to_blrl_insn_p.
5414 (rs6000_fetch_instruction): Add GDBARCH parameter.
5415 (rs6000_skip_stack_check): Add GDBARCH parameter, pass to
5416 rs6000_fetch_instruction.
5417 (skip_prologue): Pass architecture to rs6000_fetch_instruction.
5419 * remote-mips.c (mips_store_word): Return old_contents as host
5420 integer value instead of target bytes.
5422 * s390-tdep.c (struct s390_prologue_data): Add BYTE_ORDER member.
5423 (s390_analyze_prologue): Initialize it.
5424 (extend_simple_arg): Add GDBARCH parameter.
5425 (s390_push_dummy_call): Pass architecture to extend_simple_arg.
5427 * scm-lang.c (scm_get_field): Add BYTE_ORDER parameter.
5428 * scm-lang.h (scm_get_field): Add BYTE_ORDER parameter.
5429 (SCM_CAR, SCM_CDR): Pass SCM_BYTE_ORDER to scm_get_field.
5430 * scm-valprint.c (scm_scmval_print): Likewise.
5431 (scm_scmlist_print, scm_ipruk, scm_scmval_print): Define
5434 * sh64-tdep.c (look_for_args_moves): Add GDBARCH parameter.
5435 (sh64_skip_prologue_hard_way): Add GDBARCH parameter, pass to
5436 look_for_args_moves.
5437 (sh64_skip_prologue): Pass architecture to
5438 sh64_skip_prologue_hard_way.
5439 * sh-tdep.c (sh_analyze_prologue): Add GDBARCH parameter.
5440 (sh_skip_prologue): Pass architecture to sh_analyze_prologue.
5441 (sh_frame_cache): Likewise.
5443 * solib-irix.c (extract_mips_address): Add GDBARCH parameter.
5444 (fetch_lm_info, irix_current_sos, irix_open_symbol_file_object):
5445 Pass architecture to extract_mips_address.
5447 * sparc-tdep.h (sparc_fetch_wcookie): Add GDBARCH parameter.
5448 * sparc-tdep.c (sparc_fetch_wcookie): Add GDBARCH parameter.
5449 (sparc_supply_rwindow, sparc_collect_rwindow): Pass architecture
5450 to sparc_fetch_wcookie.
5451 (sparc32_frame_prev_register): Likewise.
5452 * sparc64-tdep.c (sparc64_frame_prev_register): Likewise.
5453 * sparc32nbsd-tdep.c (sparc32nbsd_sigcontext_saved_regs): Likewise.
5454 * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_saved_regs): Likewise.
5456 * spu-tdep.c (spu_analyze_prologue): Add GDBARCH parameter.
5457 (spu_skip_prologue): Pass architecture to spu_analyze_prologue.
5458 (spu_virtual_frame_pointer): Likewise.
5459 (spu_frame_unwind_cache): Likewise.
5460 (info_spu_mailbox_list): Add BYTE_ORER parameter.
5461 (info_spu_mailbox_command): Pass byte order to info_spu_mailbox_list.
5462 (info_spu_dma_cmdlist): Add BYTE_ORER parameter.
5463 (info_spu_dma_command, info_spu_proxydma_command): Pass byte order
5464 to info_spu_dma_cmdlist.
5466 * symfile.c (read_target_long_array): Add GDBARCH parameter.
5467 (simple_read_overlay_table, simple_read_overlay_region_table,
5468 simple_overlay_update_1): Pass architecture to read_target_long_array.
5470 * v850-tdep.c (v850_analyze_prologue): Add GDBARCH parameter.
5471 (v850_frame_cache): Pass architecture to v850_analyze_prologue.
5473 * xstormy16-tdep.c (xstormy16_analyze_prologue): Add GDBARCH
5475 (xstormy16_skip_prologue, xstormy16_frame_cache): Pass architecture
5476 to xstormy16_analyze_prologue.
5477 (xstormy16_resolve_jmp_table_entry): Add GDBARCH parameter.
5478 (xstormy16_find_jmp_table_entry): Likewise.
5479 (xstormy16_skip_trampoline_code): Pass architecture to
5480 xstormy16_resolve_jmp_table_entry.
5481 (xstormy16_pointer_to_address): Likewise.
5482 (xstormy16_address_to_pointer): Pass architecture to
5483 xstormy16_find_jmp_table_entry.
5485 * xtensa-tdep.c (call0_track_op): Add GDBARCH parameter.
5486 (call0_analyze_prologue): Add GDBARCH parameter, pass to
5488 (call0_frame_cache): Pass architecture to call0_analyze_prologue.
5489 (xtensa_skip_prologue): Likewise.
5491 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
5493 * defs.h (strlen_paddr, paddr, paddr_nz): Remove.
5494 (paddress): Add GDBARCH parameter.
5495 * utils.c (strlen_paddr, paddr, paddr_nz): Remove.
5496 (paddress): Add GDBARCH parameter, use it instead of current_gdbarch.
5497 * ui-out.h (ui_out_field_core_addr): Add GDBARCH parameter.
5498 * ui-out.c (ui_out_field_core_addr): Add GDBARCH parameter,
5499 use it instead of current_gdbarch.
5501 Update calls to ui_out_field_core_addr to pass architecture:
5502 * ada-lang.c (print_one_exception): Update.
5503 * breakpoint.c (print_one_breakpoint_location,
5504 print_one_exception_catchpoint): Update.
5505 * disasm.c (dump_insns): Update.
5506 * darwin-nat-info.c (darwin_debug_regions_recurse): Update.
5507 * mi/mi-main.c (mi_cmd_data_read_memory): Update.
5508 * mi/mi-symbol-cmds.c: Include "objfiles.h".
5509 (mi_cmd_symbol_list_lines): Update.
5510 * stack.c (print_frame_info, print_frame): Update.
5512 Update callers of paddress to pass architecture:
5513 * ada-tasks.c (info_task): Update.
5514 * ada-valprint.c (ada_val_print_1): Update.
5515 * annotate.c (annotate_source, annotate_frame_begin): Update.
5516 * breakpoint.c (insert_bp_location, describe_other_breakpoints,
5518 * cli/cli-cmds.c (edit_command, list_command, print_disassembly):
5520 * corefile.c (memory_error): Update.
5521 * c-valprint.c (print_function_pointer_address, c_val_print): Update.
5522 * disasm.c (dis_asm_print_address): Update.
5523 * exec.c (print_section_info): Update.
5524 * f-valprint.c (f_val_print): Update.
5525 * infcmd.c: Include "arch-utils.h".
5526 (jump_command, program_info): Update.
5527 * linux-fork.c: Include "arch-utils.h".
5528 (info_forks_command): Update.
5529 * m2-valprint.c (print_function_pointer_address,
5530 print_unpacked_pointer, print_variable_at_address,
5531 m2_val_print): Update.
5532 * m32r-rom.c (m32r_load_section, m32r_load, m32r_upload_command):
5534 * printcmd.c (print_address, print_address_demangle, address_info):
5536 * p-valprint.c (pascal_val_print): Update.
5537 * source.c: Include "arch-utils.h".
5538 (line_info): Update.
5539 * stack.c (frame_info, print_block_frame_labels): Update.
5540 * symfile.c (add_symbol_file_command, list_overlays_command): Update.
5541 * symmisc.c (dump_msymbols, dump_psymtab, dump_symtab_1,
5542 print_symbol, print_partial_symbols, maintenance_info_psymtabs,
5543 maintenance_check_symtabs): Update.
5544 * symtab.c (find_pc_sect_symtab): Update.
5545 * target.c (deprecated_debug_xfer_memory): Update.
5546 * tracepoint.c (scope_info): Update.
5547 * tui/tui-stack.c (tui_make_status_line): Update.
5548 * valprint.c (val_print_string): Update.
5550 Update callers of paddr_nz to use paddress instead (keeping
5551 user-visible output identical):
5552 * alpha-tdep.c (alpha_heuristic_proc_start): Update.
5553 * amd64-tdep.c (fixup_riprel, amd64_displaced_step_copy_insn,
5554 amd64_displaced_step_fixup): Update.
5555 * arch-utils.c (simple_displaced_step_copy_insn): Update.
5556 * auxv.c (fprint_target_auxv): Update.
5557 * breakpoint.c (insert_single_step_breakpoint): Update.
5558 * buildsym.c (finish_block): Update.
5559 * cli/cli-dump.c (restore_section_callback): Update.
5560 * fbsd-nat.c (fbsd_find_memory_regions): Update.
5561 * frame.c (frame_unwind_register_value): Update.
5562 * gcore.c (gcore_create_callback): Update.
5563 * hppa-tdep.c (hppa_frame_cache, hppa_skip_trampoline_code): Update.
5564 * i386-tdep.c (i386_displaced_step_fixup, i386_record_modrm,
5565 i386_record_lea_modrm_addr, i386_record_lea_modrm,
5566 i386_process_record): Update.
5567 * ia64-tdep.c (ia64_frame_this_id, ia64_sigtramp_frame_this_id,
5568 ia64_libunwind_frame_this_id, ia64_libunwind_sigtramp_frame_this_id,
5569 ia64_dummy_id, ia64_access_reg, ia64_access_rse_reg): Update.
5570 * infrun.c (displaced_step_prepare, displaced_step_fixup,
5571 handle_inferior_event, insert_step_resume_breakpoint_at_sal,
5572 insert_longjmp_resume_breakpoint): Update.
5573 * linux-nat.c (linux_nat_find_memory_regions): Update.
5574 * linux-record.c (record_linux_system_call): Update.
5575 * mips-tdep.c (heuristic_proc_start, mips_eabi_push_dummy_call,
5576 mips_n32n64_push_dummy_call, mips_o32_push_dummy_call,
5577 mips_o64_push_dummy_call): Update.
5578 * monitor.c (monitor_error, monitor_remove_breakpoint): Update.
5579 * record.c (record_arch_list_add_mem, record_wait,
5580 record_xfer_partial): Update.
5581 * remote-mips.c (mips_fetch_word, mips_check_lsi_error,
5582 mips_common_breakpoint): Update.
5583 * remote-sim.c (gdbsim_xfer_inferior_memory): Update.
5584 * rs6000-tdep.c (ppc_displaced_step_fixup): Update.
5585 * solib-som.c (som_current_sos): Update.
5586 * symfile.c (load_progress, generic_load): Update.
5587 * symfile-mem.c (add_vsyscall_page): Update.
5588 * valops.c (value_fetch_lazy): Update.
5589 * windows-tdep.c (windows_xfer_shared_library): Update.
5591 Update callers of paddr_nz to use paddress instead (changing
5592 user-visible output to make it more correct):
5593 * dwarf2loc.c (locexpr_describe_location): Update.
5594 * ia64-tdep.c (ia64_memory_insert_breakpoint,
5595 ia64_memory_remove_breakpoint): Update.
5596 * jv-valprint.c (java_value_print): Update.
5597 * m32c-tdep.c (m32c_m16c_address_to_pointer): Update.
5598 * monitor.c (monitor_read_memory): Update.
5600 Update callers of paddr to use paddress instead (changing
5601 user-visible output to make it more correct):
5602 * arm-tdep.c (arm_push_dummy_call): Update.
5603 * breakpoint.c (insert_bp_location, create_thread_event_breakpoint,
5604 create_breakpoint): Update.
5605 * darwin-nat-info.c (darwin_debug_regions): Update.
5606 * dcache.c (dcache_info): Update.
5607 * dsrec.c (load_srec, make_srec): Update.
5608 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program,
5609 dwarf2_frame_cache): Update.
5610 * gcore.c (gcore_copy_callback): Update.
5611 * gnu-nat.c (gnu_xfer_memory): Update.
5612 * mips-linux-nat.c (mips_show_dr): Update.
5613 * monitor.c (monitor_write_memory, monitor_insert_breakpoint,
5614 monitor_remove_breakpoint): Update.
5615 * remote.c (compare_sections_command): Update.
5616 * remote-m32r-sdi.c (m32r_xfer_memory, m32r_insert_breakpoint,
5617 m32r_remove_breakpoint, m32r_insert_watchpoint,
5618 m32r_remove_watchpoint): Update.
5619 * sol-thread.c (info_cb): Update.
5620 * symfile.c (load_progress): Update.
5622 Update callers of paddress or paddr_nz to use hex_string instead
5623 (changes output of internal/error/debug messages only):
5624 * dwarf2read.c (dump_die_shallow): Update.
5625 * frame.c (fprint_field, fprint_frame, frame_pc_unwind,
5626 get_frame_func, create_new_frame): Update.
5627 * hppa-tdep.c (find_unwind_entry, unwind_command): Update.
5628 * ia64-tdep.c (get_kernel_table, ia64_find_proc_info_x,
5629 ia64_get_dyn_info_list): Update.
5630 * maint.c (maintenance_translate_address): Update.
5631 * mi/mi-cmd-var.c (mi_cmd_var_create): Update.
5632 * target.c (target_flash_erase): Update.
5634 Update callers of paddr/paddr_nz to use phex/phex_nz instead,
5635 using an appropriate address size. Remove use of strlen_paddr.
5636 * exec.c (exec_files_info): Update.
5637 * i386-nat.c (i386_show_dr): Update.
5638 * remote.c (remote_flash_erase): Update.
5639 * m32r-rom.c (m32r_load_section): Update.
5640 * monitor.c (monitor_vsprintf, monitor_store_register): Update.
5641 * remote.c (remote_check_symbols, remote_search_memory): Update.
5642 * remote-mips.c (mips_request, mips_common_breakpoint): Update.
5643 * scm-valprint.c (scm_ipruk, scm_scmval_print): Update.
5644 * sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs): Update.
5645 * sh-tdep.c (sh_generic_show_regs, sh3_show_regs, sh2e_show_regs,
5646 sh2a_show_regs, sh2a_nofpu_show_regs, sh3e_show_regs,
5647 sh3_dsp_show_regs, sh4_show_regs, sh4_nofpu_show_regs,
5648 sh_dsp_show_regs): Update.
5649 * xcoffsolib.c (sharedlibrary_command): Update.
5652 * maint.c (maint_print_section_info): Add ADDR_SIZE parameter.
5653 Use hex_string_custom instead of paddr.
5654 (print_bfd_section_info): Pass address size.
5655 (print_objfile_section_info): Likewise.
5657 * annotate.h (annotate_source): Add GDBARCH parameter.
5658 (annotate_frame_begin): Likewise.
5659 * annotate.c (annotate_source): Add GDBARCH parameter.
5660 (annotate_frame_begin): Likewise.
5661 * source.c (identify_source_line): Update call to annotate_source.
5662 * stack.c (print_frame_info, print_frame): Update call to
5663 annotate_frame_begin.
5665 * breakpoint.c (describe_other_breakpoints): Add GDBARCH parameter.
5666 (create_breakpoint, create_ada_exception_breakpoint): Update call.
5668 * stack.c (print_block_frame_labels): Add GDBARCH parameter.
5669 (print_frame_label_vars): Update call.
5671 * symmisc.c (print_partial_symbols): Add GDBARCH parameter.
5672 (dump_psymtab): Update call to print_partial_symbols.
5673 (struct print_symbol_args): Add GDBARCH member.
5674 (dump_symtab_1): Set print_symbol_args architecture member.
5675 (print_symbol): Use it.
5677 * windows-tdep.h (windows_xfer_shared_library): Add GDBARCH
5679 * windows-tdep.c (windows_xfer_shared_library): Likewise.
5680 * i386-cygwin-tdep.c (struct cpms_data): Add GDBARCH member.
5681 (core_process_module_section): Pass architecture from cpms_data to
5682 windows_xfer_shared_library.
5683 (windows_core_xfer_shared_libraries): Initialize cmps_data
5684 architecture member.
5685 * windows-nat.c (windows_xfer_shared_libraries): Pass architecture
5686 to windows_xfer_shared_library.
5688 * defs.h (print_address): Add GDBARCH parameter.
5689 * printcmd.c (print_address): Add GDBARCH parameter.
5690 (print_scalar_formatted, do_examine): Update call.
5691 * findcmd.c (find_command): Update call.
5692 * tracepoint.c: Include "arch-utils.h".
5693 (trace_find_line_command): Update call.
5694 * tui/tui-disasm.c (tui_disassemble): Update call.
5696 * value.h (print_address_demangle): Add GDBARCH parameter.
5697 * printcmd.c (print_address_demangle): Add GDBARCH parameter.
5698 * c-valprint.c (print_function_pointer_address, c_val_print):
5700 * f-valprint.c (f_val_print): Update call.
5701 * gnu-v3-abi.c (gnuv3_print_method_ptr): Update call.
5702 * jv-valprint.c (java_val_print): Update call.
5703 * m2-valprint.c (print_function_pointer_address, m2_val_print):
5705 * p-valprint.c (pascal_val_print): Update call.
5707 * disasm.c (gdb_disassemble_info): Install architecture into
5708 di.application_data field.
5710 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
5712 * disasm.h (gdb_disassembly): Add GDBARCH parameter.
5713 (gdb_print_insn): Likewise.
5714 * disasm.c (dump_insns): Add GDBARCH parameter. Use it instead
5716 (do_mixed_source_and_assembly): Add GDBARCH parameter. Pass to
5718 (do_assembly_only): Likewise.
5719 (gdb_disassembly): Add GDBARCH parameter. Use it instead of
5720 current_gdbarch. Pass to subroutines.
5721 (gdb_print_insn): Add GDBARCH parameter. Use it instead of
5724 * stack.c (struct gdb_disassembly_stub_args): Add GDBARCH member.
5725 (gdb_disassembly_stub): Pass architecture to gdb_disassembly.
5726 (do_gdb_disassembly): Add GDBARCH argument. Store into args.
5727 (print_frame_info): Pass architecture to do_gdb_disassembly.
5729 * printcmd.c (print_formatted): Pass architecture to gdb_print_insn.
5731 * mi/mi-cmd-disas.c: Include "arch-utils.h"
5732 (mi_cmd_disassemble): Pass architecture to gdb_disassembly.
5734 * cli/cli-cmds.c: Include "arch-utils.h".
5735 (print_disassembly): Add GDBARCH parameter. Pass to gdb_disassembly
5736 and tui_show_assembly.
5737 (disassemble_current_function): Pass architecture to
5738 tui_get_low_disassembly_address and print_disassembly.
5739 (disassemble_command): Pass architecture to
5740 tui_get_low_disassembly_address and print_disassembly.
5742 * tui/tui.c (tui_show_assembly): Add GDBARCH parameter. Pass to
5743 tui_update_source_windows_with_addr.
5745 * tui/tui-data.h (struct tui_locator_element): Add GDBARCH member.
5746 (struct tui_source_info): Likewise.
5747 * tui/tui-data.c (tui_clear_win_detail): Clear source_info.gdbarch.
5749 * tui/tui-disasm.c (tui_disassemble): Add GDBARCH parameter.
5750 Pass to gdb_print_insn.
5751 (tui_find_disassembly_address): Add GDBARCH parameter. Pass to
5753 (tui_set_disassem_content): Add GDBARCH parameter. Install into
5754 source_info.gdbarch. Pass to tui_disassemble.
5755 (tui_show_disassem): Add GDBARCH parameter. Pass to
5756 tui_update_source_window.
5757 (tui_show_disassem_and_update_source): Add GDBARCH parameter. Pass to
5758 tui_show_disassem and tui_update_source_window.
5760 (tui_get_begin_asm_address): Return locator architecture in addition
5761 to locator PC value.
5763 (tui_get_low_disassembly_address): Add GDBARCH parameter. Pass to
5764 tui_get_low_disassembly_address.
5766 (tui_vertical_disassem_scroll): Pass architecture to subroutines.
5768 * tui/tui-disasm.h (tui_set_disassem_content): Add GDBARCH parameter.
5769 (tui_show_disassem): Likewise.
5770 (tui_show_disassem_and_update_source): Likewise.
5771 (tui_get_begin_asm_address): Return architecture and PC value.
5773 * tui/tui.h (tui_get_low_disassembly_address): Add GDBARCH parameter.
5774 (tui_show_assembly): Add GDBARCH parameter.
5776 * tui/tui-layout.c (extract_display_start_addr): Return current window
5777 architecture in addition to current PC value.
5779 (tui_set_layout): Update calls to tui_get_low_disassembly_address and
5780 extract_display_start_addr. Pass architecture to
5781 tui_update_source_windows_with_addr.
5783 * tui/tui-source.c: Include "objfiles.h".
5784 (tui_set_source_content): Initialize window architecture.
5785 (tui_show_symtab_source): Add GDBARCH parameter. Pass to
5786 tui_update_source_window_as_is
5788 * tui/tui-source.h (tui_show_symtab_source): Add GDBARCH parameter.
5790 * tui/tui-stack.c (tui_set_locator_info): Add GDBARCH parameter.
5791 Install locator architecture.
5792 (tui_set_locator_filename): Update call.
5793 (tui_show_frame_info): Pass architecture to tui_set_locator_info
5796 * tui/tui-win.c (make_visible_with_new_height): Pass architecture
5797 to tui_update_source_window.
5799 * tui/tui-winsource.c: Include "objfiles.h".
5800 (tui_display_main): Update call to tui_get_begin_asm_address.
5801 Pass architecture to tui_update_source_windows_with_addr.
5802 (tui_update_source_window): Add GDBARCH parameter. Pass to
5803 tui_update_source_window_as_is.
5804 (tui_update_source_window_as_is): Add GDBARCH parameter.
5805 Pass to tui_set_disassem_content.
5806 (tui_update_source_windows_with_addr): Add GDBARCH parameter.
5807 Pass to subroutines.
5808 (tui_update_source_windows_with_line): Pass objfile architecture
5810 (tui_horizontal_source_scroll): Pass architecture to
5811 tui_update_source_window_as_is.
5813 * tui/tui-winsource.h (tui_update_source_window): Add GDBARCH
5815 (tui_update_source_window_as_is): Likewise.
5816 (tui_update_source_windows_with_addr): Likewise.
5818 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
5820 * breakpoint.h (struct breakpoint): New member GDBARCH.
5821 * breakpoint.c: Include "arch-utils.h".
5822 (set_raw_breakpoint_without_location): Add GDBARCH parameter.
5823 Use it to set breakpoint architecture.
5824 (set_raw_breakpoint): Add GDBARCH parameter.
5825 (create_internal_breakpoint): Likewise.
5826 (create_catchpoint): Likewise.
5827 (create_fork_vfork_event_catchpoint): Likewise.
5828 (create_breakpoint): Likewise.
5829 (create_breakpoints): Likewise.
5830 (break_command_really): Likewise.
5831 (create_ada_exception_breakpoint): Likewise.
5832 Update local callers to pass architecture:
5833 (create_internal_breakpoint): Update.
5834 (create_overlay_event_breakpoint): Update.
5835 (create_longjmp_master_breakpoint): Update.
5836 (create_thread_event_breakpoint): Update.
5837 (create_solib_event_breakpoint): Update.
5838 (create_catchpoint): Update.
5839 (create_fork_vfork_event_catchpoint): Update.
5840 (set_momentary_breakpoint): Update.
5841 (clone_momentary_breakpoint): Update.
5842 (create_breakpoint): Update.
5843 (create_breakpoints): Update.
5844 (break_command_really): Update.
5845 (break_command_1): Update.
5846 (set_breakpoint): Update.
5847 (watch_command_1): Update.
5848 (catch_fork_command_1): Update.
5849 (catch_exec_commnd_1): Update.
5850 (handle_gnu_v3_exceptions): Update.
5851 (create_ada_exception_breakpoint): Update.
5852 (catch_ada_exception_command): Update.
5853 (catch_assert_command): Update.
5854 (trace_command): Update.
5856 * breakpoint.h (struct bp_location): New member GDBARCH.
5857 * breakpoint.c (get_sal_arch): New function.
5858 (set_raw_breakpoint): Set location architecture.
5859 (add_location_to_breakpoint): Likewise.
5860 (clone_momentary_breakpoint): Likewise.
5861 (watch_command_1): Likewise.
5862 (update_watchpoint): Likewise.
5863 (bp_loc_is_permanent): Use location architecture instead of
5865 (adjust_breakpoint_address): Add GDBARCH parameter; use it
5866 instead of current_gdbarch.
5867 Update callers of adjust_breakpoint_address to pass
5868 breakpoint location architecture:
5869 (set_raw_breakpoint): Update.
5870 (watch_command_1): Update.
5872 * tracepoint.c: (collect_symbol): Add GDBARCH parameter, use instead
5874 (add_local_symbols): Add GDBARCH parameter. Pass to collect_symbol.
5875 (encode_actions): Pass tracepoint architecture to add_local_symbols
5876 (encode_actions): Use tracepoint architecture instead of
5877 current_gdbarch. Pass it to add_local_symbols and collect_symbol.
5879 * breakpoint.h (struct breakpoint_ops): Replace last_addr parameter
5880 of print_one callback with last_loc.
5881 * breakpoint.c (print_one_breakpoint_location): Replace last_addr
5882 parameter with last_loc.
5883 (print_one_breakpoint): Likewise.
5884 (do_captured_breakpoint_query): Update call.
5885 (breakpoint_1): Pass last_loc instead of last_addr to
5886 print_one_breakpoint. Pass last location architecture instead of
5887 current_gdbarch to set_next_address.
5888 Update all implementations of the print_one callback:
5889 * breakpoint.c (print_one_catch_fork): Update.
5890 (print_one_catch_vfork): Update.
5891 (print_one_catch_exec): Update.
5892 (print_one_exception_catchpoint): Update.
5893 * ada-lang.c (print_one_exception): Update.
5894 (print_one_catch_exception): Update.
5895 (print_one_catch_exception_unhandled): Update.
5896 (print_one_catch_assert): Update.
5898 * breakpoint.c (print_one_breakpoint_location): Add PRINT_ADDRESS_BITS
5899 parameter. Use it instead of gdbarch_addr_bit (current_gdbarch).
5900 (print_one_breakpoint): Add PRINT_ADDRESS_BITS parameter and pass it
5901 to print_one_breakpoint_location.
5902 (breakpoint_address_bits): New function.
5903 (do_captured_breakpoint_query): Compute number of address bits to print
5904 and pass it to print_one_breakpoint.
5905 (breakpoint_1): Likewise. Use it instead of current_gdbarch.
5907 * breakpoint.h (create_thread_event_breakpoint): Add GDBARCH.
5908 * breakpoint.c (create_thread_event_breakpoint): Likewise.
5909 Update callers to create_thread_event_breakpoint:
5910 * aix-thread.c (pd_enable): Update.
5911 * linux-thread-db.c (enable_thread_event): Update.
5913 * breakpoint.h (create_solib_event_breakpoint): Add GDBARCH.
5914 * breakpoint.c (create_solib_event_breakpoint): Likewise.
5915 Update callers to create_solib_event_breakpoint:
5916 * solib-frv.c (enable_break, enable_break2): Update.
5917 * solib-pa64.c (pa64_solib_create_inferior_hook): Update.
5918 * solib-som.c (som_solib_create_inferior_hook): Update.
5919 * solib-darwin.c (darwin_solib_create_inferior_hook): Update.
5920 * solib-svr4.c (enable_break): Update.
5922 * breakpoint.h (insert_single_step_breakpoint): Add GDBARCH.
5923 * breakpoint.c (insert_single_step_breakpoint): Likewise.
5924 Update callers to insert_single_step_breakpoint:
5925 * alpha-tdep.c (alpha_software_single_step): Update.
5926 * arm-linux-tdep.c (arm_linux_software_single_step): Update.
5927 * arm-tdep.c (arm_software_single_step): Update.
5928 * cris-tdep.c (cris_software_single_step): Update.
5929 * rs6000-aix-tdep.c (rs6000_software_single_step): Update.
5930 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Update.
5931 * sparc-tdep.c (sparc_software_single_step): Update.
5932 * spu-tdep.c (spu_software_single_step): Update.
5933 * mips-tdep.c (deal_with_atomic_sequence): Add GDBARCH parameter.
5934 Pass it to insert_single_step_breakpoint.
5935 (mips_software_single_step): Pass architecture to
5936 deal_with_atomic_sequence and insert_single_step_breakpoint.
5938 * breakpoint.h (deprecated_insert_raw_breakpoint): Add GDBARCH.
5939 (deprecated_remove_raw_breakpoint): Likewise.
5940 * breakpoint.c (deprecated_insert_raw_breakpoint): Add GDBARCH.
5941 (deprecated_remove_raw_breakpoint): Likewise.
5942 Update callers to deprecated_insert_raw_breakpoint and
5943 deprecated_remove_raw_breakpoint:
5944 * breakpoint.c (single_step_gdbarch): New static variable.
5945 (insert_single_step_breakpoint): Pass GDBARCH parameter to
5946 deprecated_insert_raw_breakpoint. Store it in single_step_gdbarch.
5947 (remove_single_step_breakpoints): Pass architecture stored in
5948 single_step_gdbarch to deprecated_remove_raw_breakpoint.
5949 * rs6000-nat.c (exec_one_dummy_insn): Update.
5950 * solib-irix.c (enable_break, disable_break): Update.
5951 * procfs.c (procfs_mourn_inferior): Update.
5952 (remove_dbx_link_breakpoint): Update.
5954 * breakpoint.h (set_breakpoint): Add GDBARCH parameter.
5955 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
5956 * breakpoint.c (set_breakpoint): Add GDBARCH parameter.
5957 (set_momentary_breakpoint, set_momentary_breakpoint_at_pc): Likewise.
5958 Update callers to set_breakpoint, set_momentary_breakpoint and
5959 set_momentary_breakpoint_at_pc:
5960 * breakpoint.c (set_momentary_breakpoint_at_pc): Update.
5961 (until_break_command): Update.
5962 * infcall.c (call_function_by_hand): Update.
5963 * infcmd.c (finish_backward, finish_forward): Update.
5964 * infrun.c (insert_step_resume_breakpoint_at_sal): Add GDBARCH
5965 parameter. Pass it to set_momentary_breakpoint.
5966 (insert_longjmp_resume_breakpoint): Add GDBARCH parameter.
5967 Pass it to set_momentary_breakpoint_at_pc.
5968 (handle_inferior_event): Update.
5969 (insert_step_resume_breakpoint_at_frame): Update.
5970 (insert_step_resume_breakpoint_at_caller): Update..
5971 * mi/mi-cmd-break.c: Include "arch-utils.h".
5972 (mi_cmd_break_insert): Update.
5974 * target.h (struct target_ops): Add GDBARCH parameter to
5975 to_insert_breakpoint, to_remove_breakpoint, to_insert_hw_breakpoint,
5976 and to_remove_hw_breakpoint members.
5977 (target_insert_breakpoint, target_remove_breakpoint,
5978 target_insert_hw_breakpoint, target_remove_hw_breakpoint): Add GDBARCH
5979 parameter, pass to target routine.
5980 (memory_remove_breakpoint, memory_insert_breakpoint): Add GDBARCH
5982 * target.c (debug_to_insert_breakpoint, debug_to_remove_breakpoint,
5983 debug_to_insert_hw_breakpoint, debug_to_remove_hw_breakpoint): Add
5984 GDBARCH parameter, pass to target routine.
5985 (update_current_target): Update function signature.
5986 * breakpoint.c (insert_bp_location, remove_breakpoint,
5987 deprecated_insert_raw_breakpoint, deprecated_remove_raw_breakpoint):
5988 Pass architecture to target_ routines.
5989 Update all implementations of the target breakpoint routines to take
5990 GDBARCH parameter and use it instead of GDBARCH as appropriate:
5991 * corelow.c (ignore): Update.
5992 * exec.c (ignore): Update.
5993 * mem-break.c (memory_insert_breakpoint): Update.
5994 (memory_remove_breakpoint): Update.
5995 * monitor.c (monitor_insert_breakpoint): Update.
5996 (monitor_remove_breakpoint): Update.
5997 * record.c (record_insert_breakpoint): Update.
5998 (record_beneath_to_insert_breakpoint): Update.
5999 (record_remove_breakpoint): Update.
6000 (record_beneath_to_remove_breakpoint): Update.
6001 * remote.c (remote_insert_breakpoint): Update.
6002 (remote_remove_breakpoint): Update.
6003 (remote_insert_hw_breakpoint): Update.
6004 (remote_remove_hw_breakpoint): Update.
6005 * remote-m32r-sdi.c (m32r_insert_breakpoint): Update.
6006 (m32r_remove_breakpoint): Update.
6007 * remote-mips.c (mips_insert_breakpoint): Update.
6008 (mips_remove_breakpoint): Update.
6009 * i386-nat.c (i386_insert_hw_breakpoint): Update.
6010 (i386_remove_hw_breakpoint): Update.
6011 * nto-procfs.c (procfs_insert_breakpoint): Update.
6012 (procfs_remove_breakpoint): Update.
6013 (procfs_insert_hw_breakpoint): Update.
6014 (procfs_remove_hw_breakpoint): Update.
6016 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6018 * frame.h (frame_unwind_arch): New.
6019 (frame_unwind_caller_arch): Likewise.
6020 * frame-unwind.h (frame_prev_arch_ftype): New type.
6021 (struct frame_unwind): New member prev_arch.
6022 * frame.c (struct frame_info): New member prev_arch.
6023 (frame_unwind_arch): New function.
6024 (frame_unwind_caller_arch): Likewise..
6025 (get_frame_arch): Reimplement in terms of frame_unwind_arch.
6026 * sentinel-frame.c (sentinel_frame_prev_arch): New function.
6027 (sentinel_frame_unwinder): Install it.
6029 * frame.c (frame_pc_unwind): Use frame_unwind_arch instead
6031 (frame_unwind_register_value): Likewise.
6032 (frame_unwind_register_signed): Likewise.
6033 (frame_unwind_register_unsigned): Likewise.
6034 * frame-unwind.c (frame_unwind_got_optimized): Likewise.
6035 (frame_unwind_got_register): Likewise.
6036 (frame_unwind_got_constant): Likewise.
6037 (frame_unwind_got_bytes): Likewise.
6038 (frame_unwind_got_address): Likewise.
6040 * frame.h (enum frame_type): New value ARCH_FRAME.
6041 * frame.c (fprint_frame_type): Handle ARCH_FRAME.
6042 * stack.c (print_frame_info): Likewise.
6044 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6046 * target.h (struct target_ops): New member to_thread_architecture.
6047 (target_thread_architecture): New macro.
6048 * target.c (update_current_target): Inherit to_thread_architecture.
6049 (default_thread_architecture): New function.
6050 (debug_to_thread_architecture): New function.
6051 (setup_target_debug): Handle to_thread_architecture.
6053 * regcache.h (get_thread_arch_regcache): New.
6054 * regcache.c (struct regcache_list): New data type.
6055 (current_regcache): Hold regcache list instead of single regcache.
6056 (current_thread_ptid, current_thread_arch): New static variables.
6057 (get_thread_arch_regcache): New function.
6058 (get_thread_regcache): Use it. Call target_thread_architecture.
6059 (regcache_thread_ptid_changed): Update to current_regcache changes.
6060 (registers_changed): Likewise. Reset current_thread_arch and
6061 current_thread_ptid.
6063 * remote.c (remote_wait): Access target registers in target_gdbarch.
6064 * linux-nat.c (linux_nat_do_thread_registers): Likewise.
6065 * proc-service.c (ps_lgetregs, ps_lsetregs): Likewise.
6066 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
6067 * sol-thread.c (ps_lgetregs, ps_lsetregs): Likewise.
6068 (ps_lgetfpregs, ps_lsetfpregs): Likewise.
6069 * solib-svr4.c (enable_break): Likewise.
6070 (svr4_relocate_main_executable): Likewise.
6072 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6074 * python/python-internal.h (struct language_defn): Declare.
6075 (python_gdbarch, python_language): Likewise.
6076 (ensure_python_env): Add prototype.
6077 (make_cleanup_py_restore_gil): Remove prototype.
6079 * python/python.c: Include "arch-utils.h", "value.h" and "language.h".
6080 (python_gdbarch, python_language): New global variables.
6081 (struct python_env): New data type.
6082 (ensure_python_env, restore_python_env): New functions.
6083 (eval_python_from_control_command): Call ensure_python_env to
6084 install current architecture and language.
6085 (python_command, gdbpy_new_objfile): Likewise.
6086 * python/python-cmd.c: Include "arch-utils.h" and "language.h".
6087 (cmdpy_destroyer, cmdpy_function, cmdpy_completer): Call
6089 * python/python-type.c (clean_up_objfile_types): Likewise.
6090 * python/python-objfile.c: Include "language.h".
6091 (clean_up_objfile): Call ensure_python_env.
6092 * python/python-prettyprint.c (apply_val_pretty_printer): Likewise.
6093 (apply_varobj_pretty_printer): Do not call PyGILState_Ensure.
6094 * varobj.c (varobj_ensure_python_env): New helper function.
6095 (varobj_get_display_hint, update_dynamic_varobj_children,
6096 install_default_visualizer, varobj_set_visualizer, free_variable,
6097 value_get_print_value): Call it.
6098 (value_get_print_value): Add varobj argument instead of pretty
6099 printer argument. Update all callers.
6101 * python/python-utils.c (py_gil_restore, make_cleanup_py_restore_gil):
6104 * value.h (internal_function_fn): Add GDBARCH and LANGUAGE argument.
6105 (call_internal_function): Likewise.
6106 * value.c (call_internal_function): Likewise. Pass to handler.
6107 * eval.c (evaluate_subexp_standard): Update call.
6108 * python/python-function.c: Include "language.h".
6109 (fnpy_call): Add GDBARCH and LANGAUAGE arguments and call
6110 make_cleanup_python_env.
6112 * python/python-value.c (builtin_type_pyint, builtin_type_pyfloat,
6113 builtin_type_pylong, builtin_type_pybool, builtin_type_pychar,
6114 valpy_str): Use python_gdbarch and python_language instead of
6115 current_gdbarch and current_language.
6116 * python/python-type.c (typy_lookup_typename): Likewise.
6118 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6120 * arch-utils.c (selected_byte_order): Return target_byte_order_user.
6121 (show_endian): Use target_byte_order_user if specified; otherwise
6122 use get_current_arch () instead of current_gdbarch.
6123 (show_architecture): Use set_architecture_string if specified;
6124 otherwise use get_current_arch () instead of current_gdbarch.
6125 (get_current_arch): New function.
6126 * arch-utils.h (get_current_arch): Add prototype.
6128 * osabi.c (show_osabi): Use get_current_arch () instead of
6131 * findcmd.c: Include "arch-utils.h".
6132 (parse_find_args): Add BIG_P argument. Use it instead of byte order
6134 (find_command): Use get_current_arch () instead of current_gdbarch.
6135 Pass byte order to parse_find_args.
6137 * maint.c: Include "arch-utils.h".
6138 (maintenance_print_architecture): Use get_current_arch () instead
6141 * reggroups.c: Include "arch-utils.h".
6142 (maintenance_print_reggroups): Use get_current_arch () instead
6145 * symfile.c: Include "arch-utils.h".
6146 (overlay_load_command): Use get_current_arch () instead of
6149 * value.c: Include "arch-utils.h".
6150 (show_convenience): Use get_current_arch () instead of
6153 * tui/tui-regs.c: Include "arch-utils.h".
6154 (tui_reg_next_command): Use get_current_arch () instead of
6157 * mi/mi-main.c: Include "arch-utils.h".
6158 (mi_cmd_data_read_memory): Use get_current_arch () instead of
6161 * parse.c: Include "arch-utils.h".
6162 (parse_exp_in_context): Use get_current_arch () instead of
6165 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6167 * gdbtypes.c (make_pointer_type, make_reference_type,
6168 smash_to_memberptr_type, lookup_array_range_type, check_stub_method):
6169 Use type architecture instead of current_gdbarch.
6171 * gdbtypes.h (address_space_name_to_int, address_space_int_to_name):
6172 Add GDBARCH paramter.
6173 * gdbtypes.c (address_space_name_to_int, address_space_int_to_name):
6174 Add GDBARCH parameter. Use it instead of current_gdbarch.
6175 * c-typeprint.c (c_type_print_modifier): Update call.
6176 * parse.c (push_type_address_space): Likewise.
6178 * findvar.c (extract_typed_address, store_typed_address): Use type
6179 architecture instead of current_gdbarch.
6181 * value.c (value_as_address, unpack_field_as_long): Use type architecture
6182 instead of current_gdbarch.
6184 * doublest.c (floatformat_from_length): Add GDBARCH argument. Use it
6185 instead of current_gdbarch.
6186 (floatformat_from_type): Pass type architecture.
6188 * infcall.c (find_function_addr): Use type architecture instead
6191 * valarith.c (value_bitstring_subscript, value_x_binop, value_neg,
6192 value_bit_index): Use type architecture instead of current_gdbarch.
6193 * valops.c (value_cast, value_slice): Likewise.
6195 * value.h (modify_field): Add TYPE argument.
6196 * value.c (modify_field): Add TYPE argument. Use type architecture
6197 instead of current_gdbarch.
6198 (set_internalvar_component): Likewise.
6199 * eval.c (evaluate_struct_tuple): Update call.
6200 * valops.c (value_assign): Likewise.
6201 * ada-lang.c (modify_general_field): Likewise. Add TYPE argument.
6202 (make_array_descriptor): Update calls.
6203 (move_bits): Add BITS_BIG_ENDIAN_P argument. Use it instead of
6205 (ada_value_assign, value_assign_to_component): Update calls.
6206 (decode_packed_array, ada_value_primitive_packed_val, ada_value_assign,
6207 value_assign_to_component): Use type arch instead of current_gdbarch.
6209 * printcmd.c (float_type_from_length): Remove GDBARCH argument,
6210 use type architecture instead.
6211 (print_scalar_formatted, printf_command): Update calls. Use type
6212 architecture instead of current_gdbarch.
6213 * valprint.c (val_print_type_code_int): Use type architecture
6214 instead of current_gdbarch.
6215 * varobj.c (value_get_print_value): Likewise.
6216 * python/python-prettyprint.c (print_string_repr): Add GDBARCH
6217 argument. Use it instead of current_gdbarch.
6218 (apply_val_pretty_printer): Update call.
6220 * ada-valprint.c (ada_val_print_1): Use type architecture instead
6222 * c-valprint.c (print_function_pointer_address): Add GDBARCH argument.
6223 Use it instead of current_gdbarch.
6224 (c_val_print): Update calls passing type architecture.
6225 * f-valprint.c (f_val_print): Use type architecture instead of
6227 * jv-valprint (java_value_print): Likewise.
6228 * m2-valprint.c (print_function_pointer_address): Add GDBARCH argument.
6229 Use it instead of current_gdbarch.
6230 (print_unpacked_pointer): Update calls passing type architecture.
6231 * scm-valprint.c (scm_scmval_print): Use type architecture instead of
6234 * gnu-v3-abi.c (get_class_arch): Remove.
6235 (gnuv3_rtti_type): Use get_type_arch instead of get_class_arch. Remove
6236 special-case check for Java classes.
6237 (gnuv3_virtual_fn_field, gnuv3_baseclass_offset, gnuv3_print_method_ptr,
6238 gnuv3_method_ptr_size, gnuv3_make_method_ptr, gnuv3_method_ptr_to_value):
6239 Use get_type_arch instead of get_class_arch.
6241 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6243 * gdbtypes.h (TYPE_OBJFILE_OWNED, TYPE_OWNER): New macros.
6244 (TYPE_OBJFILE, TYPE_ALLOC, TYPE_ZALLOC): Reimplement.
6245 (alloc_type_arch): Add prototype.
6246 (alloc_type_copy): Likewise.
6247 (get_type_arch): Likewise.
6248 (arch_type): Likewise.
6249 (arch_integer_type): Likewise.
6250 (arch_character_type): Likewise.
6251 (arch_boolean_type): Likewise.
6252 (init_float_type): Remove, replace by ...
6253 (arch_float_type): ... this.
6254 (init_complex_type): Remove, replace by ...
6255 (arch_complex_type): ... this.
6256 (init_flags_type): Remove, replace by ...
6257 (arch_flags_type): ... this.
6258 (init_composite_type): Remove, replace by ...
6259 (arch_composite_type): ... this.
6261 * gdbtypes.c (alloc_type): No longer support NULL objfile.
6262 (init_type): Likewise.
6263 (alloc_type_arch): New function.
6264 (alloc_type_copy): New function.
6265 (get_type_arch): New function.
6267 (smash_type): Preserve type ownership information.
6268 (make_pointer_type, make_reference_type, make_function_type,
6269 smash_to_memberptr_type, smash_to_method_type): No longer
6270 preserve OBJFILE across smash_type calls.
6271 (make_pointer_type, make_reference_type, make_function_type,
6272 lookup_memberptr_type, lookup_methodptr_type, allocate_stub_method,
6273 create_range_type, create_array_type, create_set_type, copy_type):
6274 Use alloc_type_copy when allocating types.
6275 (check_typedef): Use alloc_type_arch.
6276 (copy_type_recursive): Likewise. Preserve type ownership data
6278 (recursive_dump_type): Dump type ownership data.
6279 (alloc_type_instance): Update type ownership check.
6280 (copy_type, copy_type_recursive): Likewise.
6282 (arch_type): New function.
6283 (arch_integer_type): Likewise.
6284 (arch_character_type): Likewise.
6285 (arch_boolean_type): Likewise.
6286 (init_float_type): Remove, replace by ...
6287 (arch_float_type): ... this.
6288 (init_complex_type): Remove, replace by ...
6289 (arch_complex_type): ... this.
6290 (init_flags_type): Remove, replace by ...
6291 (arch_flags_type): ... this.
6292 (append_flags_type_flag): Move down.
6293 (init_composite_type): Remove, replace by ...
6294 (arch_composite_type): ... this.
6295 (append_composite_type_field_aligned,
6296 append_composite_type_field): Move down.
6298 * gdbarch.c (gdbtypes_post_init): Allocate all types
6299 using per-architecture routines.
6300 * ada-lang.c (ada_language_arch_info): Likewise.
6301 * f-lang.c (build_fortran_types): Likewise.
6302 * jv-lang.c (build_java_types): Likewise.
6303 * m2-lang.c (build_m2_types): Likewise.
6304 * scm-lang.c (build_scm_types): Likewise.
6306 * ada-lang.c (ada_type_of_array): Use alloc_type_copy.
6307 (packed_array_type): Likewise.
6308 (ada_template_to_fixed_record_type_1): Likewise.
6309 (template_to_static_fixed_type): Likewise.
6310 (to_record_with_fixed_variant_part): Likewise.
6311 (to_fixed_variant_branch_type): Likewise.
6312 (to_fixed_array_type): Likewise.
6313 (to_fixed_range_type): Likewise.
6314 (empty_record): Use type instead of objfile argument.
6315 Use alloc_type_copy.
6316 (to_fixed_variant_branch_type): Update call to empty_record.
6317 * jv-lang.c (type_from_class): Use alloc_type_arch.
6319 * arm-tdep.c (arm_ext_type): Allocate per-architecture type.
6320 * i386-tdep.c (i386_eflags_type, i386_mxcsr_type, i387_ext_type,
6321 i386_mmx_type, i386_sse_type): Likewise.
6322 * ia64-tdep.c (ia64_ext_type): Likewise.
6323 * m32c-tdep.c (make_types): Likewise.
6324 * m68k-tdep.c (m68k_ps_type, m68881_ext_type): Likewise.
6325 * rs6000-tdep.c (rs6000_builtin_type_vec64,
6326 rs6000_builtin_type_vec128): Likewise.
6327 * sparc-tdep.c (sparc_psr_type, sparc_fsr_type): Likewise.
6328 * sparc64-tdep.c (sparc64_pstate_type, sparc64_fsr_type,
6329 sparc64_fprs_type): Likewise.
6330 * spu-tdep.c (spu_builtin_type_vec128): Likewise.
6331 * xtensa-tdep.c (xtensa_register_type): Likewise.
6332 * linux-tdep.c (linux_get_siginfo_type): Likewise.
6333 * target-descriptions.c (tdesc_gdb_type): Likewise.
6334 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6336 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6338 * i386-tdep.h (struct gdbarch_tdep): Add i386_eflags_type and
6339 i386_mxcsr_type members.
6340 (i386_eflags_type): Make into function.
6341 (i386_mxcsr_type): Likewise.
6342 * i386-tdep.c (i386_eflags_type): Make into function.
6343 (i386_mxcsr_type): Likewise.
6344 (i386_register_type): Update uses.
6345 (i386_init_types): Remove.
6346 (_initialize_i386_tdep): Do not call it.
6347 * amd64-tdep.c (amd64_register_type): Update uses.
6349 * m68k-tdep.h (struct gdbarch_tdep): Add m68k_ps_type member.
6350 * m68k-tdep.c (m68k_ps_type): Make into function.
6351 (m68k_register_type): Update use.
6352 (m68k_init_types): Remove.
6353 (_initialize_m68k_tdep): Do not call it.
6355 * sparc-tdep.h (struct gdbarch_tdep): Add sparc_psr_type,
6356 sparc_fsr_type, sparc64_pstate_type, sparc64_fsr_type, and
6357 sparc64_fprs_type members.
6358 * sparc-tdep.c (sparc_psr_type): Make into function.
6359 (sparc_fsr_type): Likewise.
6360 (sparc32_register_type): Update uses.
6361 (sparc_init_types): Remove.
6362 (_initialize_sparc_tdep): Do not call it.
6363 * sparc64-tdep.c (sparc64_pstate_type): Make into function.
6364 (sparc64_fsr_type): Likewise.
6365 (sparc64_fprs_type): Likewise.
6366 (sparc64_register_type): Update uses.
6367 (sparc64_init_types): Remove.
6368 (_initialize_sparc64_tdep): Likewise.
6370 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6372 * gdbtypes.h (builtin_type_ieee_single, builtin_type_ieee_double,
6373 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
6374 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
6375 (init_float_type, init_complex_type): Add prototypes.
6376 * gdbtypes.c (builtin_type_ieee_single, builtin_type_ieee_double,
6377 builtin_type_i387_ext, builtin_type_m68881_ext, builtin_type_arm_ext,
6378 builtin_type_ia64_spill, builtin_type_ia64_quad): Remove.
6379 (_initialize_gdbtypes): Do not initialize them.
6380 (build_flt): Rename to ...
6381 (init_float_type): ... this. Make global.
6382 (build_complex): Rename to ...
6383 (init_complex_type): ... this. Make global. Remove BIT argument.
6384 (gdbtypes_post_init): Update calls.
6386 * ada-lang.c (ada_language_arch_info): Use init_float_type.
6387 * jv-lang.c (build_java_types): Likewise.
6388 * m2-lang.c (build_m2_types): Likewise.
6389 * f-lang.c (build_fortran_types): Use init_float_type and
6392 * target-descriptions.c (tdesc_gdb_type): Call init_float_type instead
6393 of using builtin_type_ieee_single, builtin_type_ieee_double, or
6394 builtin_type_arm_ext.
6396 * ia64-tdep.h (struct gdbarch_tdep): Add ia64_ext_type member.
6397 * ia64-tdep.c (builtin_type_ia64_ext): Remove.
6398 (_initialize_ia64_tdep): Do not initialize it.
6399 (floatformat_valid, floatformat_ia64_ext, floatformats_ia64_ext):
6401 (ia64_ext_type): New function.
6402 (ia64_register_reggroup_p, ia64_convert_register_p,
6403 ia64_register_to_value, ia64_value_to_register,
6404 ia64_extract_return_value, ia64_store_return_value): Use ia64_ext_type
6405 instead of builtin_type_ia64_ext.
6407 * i386-tdep.h (struct gdbarch_tdep): Add i387_ext_type member.
6408 (i387_ext_type): Add prototype.
6409 * i386-tdep.c (i387_ext_type): New function.
6410 (i386_extract_return_value, i386_store_return_value,
6411 i386_register_type): Use it instead of builtin_type_i387_ext.
6412 * amd64-tdep.c (amd64_register_type): Likewise.
6413 * i387-tdep.c (print_i387_value, i387_register_to_value,
6414 i387_value_to_register): Likewise.
6415 (print_i387_value, print_i387_ext): Add GDBARCH argument.
6416 (print_i387_ext, i387_print_float_info): Pass to subroutines.
6418 * m68k-tdep.h (struct gdbarch_tdep): Add m68881_ext_type member.
6419 * m68k-tdep.c (m68881_ext_type): New function.
6420 (m68k_register_type, m68k_convert_register_p): Use it instead
6421 of builtin_type_m68881_ext.
6423 * arm-tdep.h (struct gdbarch_tdep): Add arm_ext_type member.
6424 * arm-tdep.c (arm_ext_type): New function.
6425 (arm_register_type): Use it instead of builtin_type_arm_ext.
6427 * alpha-tdep.c (alpha_register_type): Use builtin types
6428 instead of builtin_type_ieee_double.
6430 * mips-tdep.c (mips_float_register_type, mips_double_register_type):
6432 (mips_register_type): Use builtin types instead of
6433 builtin_type_ieee_single and builtin_type_ieee_double.
6434 (mips_print_fp_register): Use builtin types instead of
6435 mips_float_register_type and mips_double_register_type.
6437 * hppa-tdep.c (hppa32_register_type, hppa64_register_type):
6438 Use builtin types instead of builtin_type_ieee_single and
6439 builtin_type_ieee_double.
6441 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6443 * gdbtypes.h (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
6444 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
6445 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
6446 builtin_type_int128, builtin_type_uint128): Remove.
6447 (struct builtin_type): New members builtin_int0, builtin_int8,
6448 builtin_uint8, builtin_int16, builtin_uint16, builtin_int32,
6449 builtin_uint32, builtin_int64, builtin_uint64, builtin_int128,
6450 and builtin_uint128.
6451 * gdbtypes.c (builtin_type_int0, builtin_type_int8, builtin_type_uint8,
6452 builtin_type_int16, builtin_type_uint16, builtin_type_int32,
6453 builtin_type_uint32, builtin_type_int64, builtin_type_uint64,
6454 builtin_type_int128, builtin_type_uint128): Remove.
6455 (_initialize_gdbtypes): Do not initialize them.
6456 (gdbtypes_post_init): Initialize fixed-size integer types.
6458 * dwarf2expr.c (unsigned_address_type, signed_address_type): Add
6459 GDBARCH argument. Return platform-specific type.
6460 (dwarf2_read_address, execute_stack_op): Update calls.
6462 * target-descriptions.c (tdesc_gdb_type): Use platform-specific types
6463 instead of global builtin_int_... variables.
6464 * mi/mi-main.c (mi_cmd_data_read_memory): Likewise.
6465 * printcmd.c (do_examine): Likewise.
6466 * jv-exp.y (parse_number): Likewise.
6468 * alpha-tdep.c (alpha_register_type, alpha_push_dummy_call,
6469 alpha_store_return_value): Likewise.
6470 * amd64-linux-tdep.c (amd64_linux_register_type): Likewise.
6471 * amd64-tdep.c (amd64_register_type): Likewise.
6472 * arm-tdep.c (arm_register_type): Likewise.
6473 * avr-tdep.c (avr_register_type): Likewise.
6474 * cris-tdep.c (cris_register_type, crisv32_register_type): Likewise.
6475 * frv-tdep.c (frv_register_type): Likewise.
6476 * h8300-tdep.c h8300_register_type): Likewise.
6477 * hppa-tdep.c (hppa64_push_dummy_call, hppa32_register_type,
6478 hppa64_register_type): Likewise.
6479 * i386-tdep.c (i386_mmx_type, i386_sse_type): Likewise.
6480 * iq2000-tdep.c (iq2000_register_type): Likewise.
6481 * lm32-tdep.c (lm32_register_type, lm32_push_dummy_call): Likewise.
6482 * m32r-tdep.c (m32r_register_type): Likewise.
6483 * m68hc11-tdep.c (m68hc11_register_type, m68hc11_pseudo_register_read,
6484 m68hc11_pseudo_register_write): Likewise.
6485 * m68k-tdep.c (m68k_register_type): Likewise.
6486 * m88k-tdep.c (m88k_register_type, m88k_store_arguments): Likewise.
6487 * mep-tdep.c (mep_register_type): Likewise.
6488 * mips-tdep.c (mips_register_type, mips_pseudo_register_type,
6489 mips_print_fp_register): Likewise.
6490 * moxie-tdep.c (moxie_register_type): Likewise.
6491 * mt-tdep.c (mt_copro_register_type, mt_register_type): Likewise.
6492 * rs6000-tdep.c (rs6000_builtin_type_vec64,
6493 rs6000_builtin_type_vec128): Likewise.
6494 * score-tdep.c (score_register_type): Likewise.
6495 * sparc-tdep.c (sparc32_register_type, sparc32_store_arguments):
6497 * sparc64-tdep.c (sparc64_register_type, sparc64_store_arguments):
6499 * spu-tdep.c (spu_builtin_type_vec128, spu_register_type): Likewise.
6500 * v850-tdep.c (v850_register_type): Likewise.
6501 * xstormy16-tdep.c (xstormy16_register_type): Likewise.
6502 * xtensa-tdep.c (xtensa_register_type): Likewise.
6504 * mt-tdep.c (struct gdbarch_tdep): New data structure.
6505 (mt_gdbarch_init): Alloc TDEP structures.
6506 (mt_register_type): Cache coprocessor type in TDEP instead of
6507 static global variable.
6509 * xtensa-tdep.h (struct gdbarch_tdep): Add type_entries member.
6510 * xtensa-tdep.c (type_entries): Remove.
6511 (xtensa_register_type): Cache fixed-size types in TDEP instead
6512 of in global variable.
6514 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6516 * gdbtypes.h (builtin_type_true_char): Remove.
6517 (builtin_type_true_unsigned_char): Likewise.
6518 (struct builtin_type): Add builtin_true_char and
6519 builtin_true_unsigned_char members.
6520 * gdbtypes.c (builtin_type_true_char): Remove.
6521 (builtin_type_true_unsigned_char): Likewise.
6522 (_initialize_gdbtypes): Do not initialize them.
6523 (gdbtypes_post_init): Initialize builtin_true_char and
6524 builtin_true_unsigned_char members of builtin_type.
6526 * printcmd.c (print_scalar_formatted): Use builtin_type
6527 members instead of builtin_type_true_char and
6528 builtin_type_true_unsigned_char.
6529 * ada-valprint.c (ada_val_print_1): Likewise.
6531 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6533 * gdbtypes.h (builtin_type_void): Remove.
6534 * gdbtypes.c (builtin_type_void): Remove.
6535 (_initialize_gdbtypes): Do not initialize it.
6537 (safe_parse_type): Add GDBARCH argument. Use it to construct
6539 (check_stub_method): Update call.
6541 * infcall.c (call_function_by_hand): Use platform-specific type
6542 instead of builtin_type_void.
6543 * valops.c (value_cast): Use input void type instead of
6546 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6548 * ada-lang.c (assign_component): Use platform-specific integer type
6549 instead of builtin_type_int32 type.
6550 (ada_evaluate_subexp) [OP_ATR_SIZE]: Likewise.
6552 * ax-gdb.c (gen_expr) [UNOP_NEG]: Use platform-specific integer type
6553 instead of builtin_type_int8 type.
6554 * valarith.c (value_x_unop): Likewise.
6555 * python/python-value.c (valpy_absolute): Avoid reference to
6556 builtin_type_int8 type.
6558 * eval.c (evaluate_subexp_standard): Use platform-specific integer
6559 type instead of builtin_type_int8 as EVAL_SKIP return value type.
6560 * ada-lang.c (ada_evaluate_subexp): Likewise.
6561 * jv-lang.c (evaluate_subexp_java): Likewise.
6562 * m2-lang.c (evaluate_subexp_modula2): Likewise.
6563 * scm-lang.c (evaluate_exp): Likewise.
6565 * value.h (value_bitstring): Add INDEX_TYPE argument.
6566 * valops.c (value_bitstring): Add INDEX_TYPE argument, use it instead
6567 of builtin_type_int32 as base range type.
6568 * eval.c (evaluate_subexp_standard): Update value_bitstring call.
6570 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6572 * gdbtypes.c (lookup_array_range_type): Add prototype.
6573 (lookup_string_range_type): Likewise.
6574 * gdbtypes.c (lookup_array_range_type): New function.
6575 (lookup_string_range_type): Likewise.
6577 * ax-gdb.c (gen_repeat): Use lookup_array_range_type.
6578 * parse.c (follow_types): Likewise.
6579 * jv-lang.c (java_array_type): Likewise.
6580 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6581 * mt-tdep.c (mt_register_type): Likewise.
6582 * sh-tdep.c (sh_sh4_build_float_register_type): Likewise.
6583 * sh64-tdep.c (sh64_build_float_register_type): Likewise.
6584 * value.c (allocate_repeat_value): Likewise.
6585 * valops.c (value_array, value_cstring): Likewise.
6586 * valops.c (value_string): Use lookup_string_range_type.
6588 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6590 * m2-typeprint.c (m2_print_bounds, m2_is_long_set_of_type): Remove
6591 redundant check for NULL TYPE_TARGET_TYPE.
6592 * m2-valprint.c (m2_print_long_set): Likewise.
6593 * p-valprint.c (pascal_type_print_base): Likewise.
6595 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6597 * printcmd.c (next_gdbarch): New static variable.
6598 (set_next_address, do_examine, x_command): Set it.
6599 (decode_format): Use 'a' size to indicate width of an address.
6600 (do_examine): Add GDBARCH argument. Handle 'a' size.
6601 (x_command): Pass architecture to do_examine.
6602 Error if called without argument the first time.
6603 (do_one_display): Pass architecture to do_examine.
6605 (examine_i_type, examine_b_type, examine_h_type, examine_w_type,
6606 examine_g_type): Remove.
6607 (_initialize_printcmd): Do not initialize them.
6608 (do_examine): Use builin_type_int... instead of examine_..._type.
6610 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6612 * gdbtypes.h (struct builtin_type): Add internal_fn member.
6613 * gdbtypes.c (gdbtypes_post_init): Initialize it.
6614 * value.c (internal_fn_type): Remove.
6615 (_initialize_values): Do not initialize it.
6617 * value.c (struct internalvar): Add enum internalvar_kind type and
6618 kind member. Restructure union internalvar_data type. Remove type,
6619 canonical, and make_value members.
6620 (init_if_undefined_command): Update for data structure changes.
6621 (create_internalvar): Likewise.
6622 (create_internalvar_type_lazy): Likewise.
6623 (get_internalvar_integer): Likewise.
6624 (get_internalvar_function): Likewise.
6625 (set_internalvar_component): Likewise.
6626 (set_internalvar): Likewise.
6627 (set_internalvar_integer): Likewise.
6628 (set_internalvar_function): Likewise.
6629 (clear_internalvar): Likewise.
6630 (add_internal_function): Likewise.
6631 (preserve_one_internalvar): New function.
6632 (preserve_values): Call it.
6634 * value.h (value_of_internalvar): Add GDBARCH parameter.
6635 (internalvar_make_value): Likewise.
6636 * value.c (value_of_internalvar): Add GDBARCH parameter. Pass it to
6637 make_value callback. Use it to generate per-architecture result value
6638 types for internal variables with no pre-defined type. Update for data
6640 (show_convenience): Pass architecture to value_of_internalvar.
6641 * eval.c (evaluate_subexp_standard): Likewise.
6642 * infrun.c (siginfo_make_value): Add GDBARCH parameter. Use it
6643 instead of current frame architecture. Return per-architecture type.
6645 * value.h (set_internalvar_string): Add prototype.
6646 * value.c (set_internalvar_string): New function.
6647 * tracepoint.c (set_traceframe_context): Use it.
6649 2009-07-02 Ulrich Weigand <uweigand@de.ibm.com>
6651 * jv-lang.h (java_int_type, java_byte_type, java_short_type,
6652 java_long_type, java_boolean_type, java_char_type, java_float_type,
6653 java_double_type, java_void_type): Remove.
6654 (struct builtin_java_type): New data type.
6655 (builtin_java_type): Add prototype.
6656 (java_primitive_type): Add GDBARCH argument.
6657 (java_primitive_type_from_name): Likewise.
6658 (type_from_class): Likewise.
6660 * jv-lang.c (java_int_type, java_byte_type, java_short_type,
6661 java_long_type, java_boolean_type, java_char_type, java_float_type,
6662 java_double_type, java_void_type): Remove.
6664 (build_java_types, builtin_java_type): New functions.
6665 (java_type_data): New static variable.
6666 (_initialize_java_language): Initialize it. No longer initialize
6668 (java_language_arch_info): Use per-architecture types.
6670 (java_primitive_type): Add GDBARCH argument. Return per-architecture
6671 type instead of refering to global variable.
6672 (java_primitive_type_from_name): Add GDBARCH argument.
6673 (java_primitive_type_name): New function.
6674 (java_demangled_signature_length): Use it instead of
6675 java_primitive_type_from_name.
6676 (java_demangled_signature_copy): Likewise.
6678 (type_from_class): Add GDBARCH argument. Pass to java_link_class_type,
6679 java_primitive_type, and recursive type_from_class call.
6680 (java_link_class_type): Add GDBARCH argument. Pass to type_from_class
6681 calls. Use per-architecture types instead of global types.
6683 * jv-exp.y (parse_java_type): New define.
6684 Use per-architecture types instead of global types througout.
6686 * jv-valprint.c (java_value_print): Pass architecture to
6687 type_from_class and java_primitive_type_from_name. Use per-
6688 architecture types instead of global types.
6690 2009-07-01 Doug Evans <dje@google.com>
6692 * NEWS: Mention biarch amd64-linux gdbserver and hardware watchpoint
6693 support for i386-linux, amd64-linux, and i386-win32 builds of
6696 2009-07-01 Nick Roberts <nickrob@snap.net.nz>
6698 * Makefile.in (HFILES_NO_SRCDIR): Remove entries for deleted files.
6700 2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
6702 * Makefile.in (TARGET_FLAGS_TO_PASS): Include also FORCE_PARALLEL.
6703 (check//%): Construct FORCE_PARALLEL for the sub-make. Extend the
6706 2009-06-30 Paul Pluzhnikov <ppluzhnikov@google.com>
6709 * dwarf2-frame.c (dwarf2_frame_state): Move cfa_offset, cfa_reg,
6710 cfa_how and cfa_exp into regs and adjust users.
6712 2009-06-30 Daniel Jacobowitz <dan@codesourcery.com>
6714 * dwarf2read.c (inherit_abstract_dies): Work around GCC PR 40573.
6716 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
6718 * mi/mi-cmd-stack.c (parse_print_values): New.
6719 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args): Use the above.
6721 2009-06-30 Vladimir Prus <vladimir@codesourcery.com>
6723 * varobj.c (varobj_get_type): Use type_to_string.
6725 2009-06-29 Pedro Alves <pedro@codesourcery.com>
6727 * infrun.c (handle_inferior_event): Context switch to the new
6728 thread when resuming for a new_thread_event.
6730 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6732 * ada-lang.h (ada_convert_actual): Add GDBARCH argument.
6733 * ada-lang.c (convert_actual): Remove stale prototype.
6734 (ensure_lval, make_array_descriptor, ada_convert_actual):
6735 Add GDBARCH argument and pass through to subroutine calls.
6736 (ensure_lval): Use GDBARCH instead of current_gdbarch.
6737 * infcall.c (value_arg_coerce): Update ada_convert_actual call.
6739 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6741 * ada-lang.c (resolve): Use per-architecture void type instead
6742 of platform-independent one.
6743 (ada_evaluate_subexp) [STRUCTOP_STRUCT]: Likewise.
6744 (ada_resolve_function): Reimplement fallback logic to avoid
6745 explicit reference to builtin_type_void.
6747 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6749 * ada-valprint.c (ada_print_scalar): Accept NULL type argument
6750 to indicate scalar should be printed as default integer.
6751 (print_optional_low_bound): Pass NULL to ada_print_scalar to
6752 indicate default integer output.
6753 * ada-typeprint.c (print_range, print_range_bound): Likewise.
6754 (print_choices): Likewise. Thus, accept NULL as val_type.
6755 * ada-lang.c (ada_variant_discrim_type): Return NULL when failed
6756 to look up controlling discriminant name.
6758 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6760 * ada-lang.c (to_fixed_range_type): Add ORIG_TYPE argument.
6761 Fall back to orig_type as index type if symbol lookup fails.
6762 Allocate result types from ORIG_TYPE's objfile.
6763 (ada_array_bound_from_type, to_fixed_array_type,
6764 ada_evaluate_subexp): Pass original index type to
6765 to_fixed_range_type. Do not pass objfile.
6767 * ada-typeprint.c (print_range_type_named): Add ORIG_TYPE argument.
6768 Fall back to orig_type as index type if symbol lookup fails.
6769 (print_array_type, ada_print_type): Pass original index type
6770 to print_range_type_named.
6772 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6774 * ada-lang.c (ada_index_type): Update comment.
6776 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6778 * ada-lang.c (ada_index_type): Make static. Add NAME argument.
6779 Throw error on invalid input arguments. Return NULL if unable
6780 to determine index type.
6782 (ada_array_bound_from_type): Remove TYPEP argument.
6783 (ada_array_bound): Make static. Return LONGEST instead of value.
6784 Update for ada_array_bound_from_type change.
6785 (ada_array_length): Return LONGEST instead of value.
6786 Update for ada_array_bound_from_type change.
6787 (make_array_descriptor): Update for ada_array_bound change.
6789 (ada_evaluate_subexp) [OP_ATR_RANGE, OP_ATR_FIRST, OP_ATR_LAST,
6790 OP_ATR_LENGTH]: Update for ada_array_bound_from_type,
6791 ada_array_bound, ada_array_length, ada_index_type changes.
6792 Always use ada_index_type to compute result type; fall back
6793 to architecture-specific integer type if ada_index_type fails.
6795 * ada-lang.h (ada_index_type): Remove prototype.
6796 (ada_array_bound): Likewise.
6798 2009-06-29 Pedro Alves <pedro@codesourcery.com>
6800 * dbxread.c (read_dbx_symtab): Clear has_line_numbers when ending
6803 2009-06-29 Tom Tromey <tromey@redhat.com>
6805 * README: Mention parallel check.
6807 2009-06-29 Sami Wagiaalla <swagiaal@redhat.com>
6809 * dwarf2read.c (read_import_statement): Properly set import location
6811 * cp-support.h (cp_add_using, cp_add_using_directive): Now take char*
6812 inner, char* outer arguments. Updated callers.
6814 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6816 * value.h (value_subscript, value_subscripted_rvalue,
6817 value_bitstring_subscript, value_ptradd): Use LONGEST instead
6818 of value as type of the index argument.
6819 (value_ptrsub): Remove.
6820 * valarith.c (value_subscript, value_subscripted_rvalue,
6821 value_bitstring_subscript, value_ptradd): Use LONGEST instead
6822 of value as type of the index argument.
6823 (value_ptrsub): Remove.
6825 * wrapper.h (gdb_value_subscript): Use LONGEST instead of
6826 value as type of the index argument.
6827 * wrapper.c (gdb_value_subscript): Likewise.
6829 Update calls to gdb_value_subscript, value_subscript,
6830 value_subscripted_rvalue, value_bitstring_subscript and
6831 value_ptradd to use LONGEST instead of value as index
6832 argument type. Use value_ptradd instead of value_ptrsub.
6833 * ada-lang.c (ada_value_subscript, ada_value_ptr_subscript,
6834 ada_tag_name_2): Update.
6835 * ada-tasks.c (read_atcb): Update.
6836 * eval.c (evaluate_subexp_standard): Update.
6837 * valarith.c (value_subscript): Update.
6838 * gnu-v2-abi.c (gnuv2_virtual_fn_field): Update.
6839 * gnu-v3-abi.c (gnuv3_get_virtual_fn, gnuv3_baseclass_offset,
6840 gnuv3_method_ptr_to_value): Update.
6841 * jv-lang.c (evaluate_subexp_java): Update.
6842 * m2-lang.c (evaluate_subexp_modula2): Update.
6843 * python/python-value.c (valpy_getitem, valpy_binop): Update.
6844 * wrapper.c (gdb_value_subscript): Update.
6845 * varobj.c (c_describe_child): Update.
6847 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6849 * gdbtypes.h (make_function_type): Remove OBJFILE parameter.
6850 * gdbtypes.c (make_function_type): Remove OBJFILE parameter.
6851 (lookup_function_type): Update call.
6852 * stabsread.c (read_type): Likewise.
6853 * dwarf2read.c (read_subroutine_type): Use lookup_function_type
6854 instead of make_function_type.
6855 * jv-lang.c (type_from_class): Likewise. Do not allocate types
6856 on the fake "dynamics" obstack.
6858 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6860 * gdbtypes.h (struct builtin_type): Remove builtin_core_addr,
6861 nodebug_text_symbol, nodebug_data_symbol, nodebug_unknown_symbol,
6862 and nodebug_tls_symbol members.
6863 (struct objfile_type): New data structure.
6864 (objfile_type): Add prototype.
6865 * gdbtypes.c (gdbtypes_post_init): Remove initialization code
6866 for types no longer in struct builtin_type.
6867 (objfile_type_data): New static variable.
6868 (_initialize_gdbtypes): Initialize it.
6869 (objfile_type): New function.
6871 * gdbtypes.h (builtin_type_error): Remove.
6872 * gdbtypes.c (build_complex): Do not use builtin_type_error.
6873 * symtab.c (builtin_type_error): Remove.
6874 (_initialize_symtab): Remove initialization.
6876 * stabsread.c (dbx_lookup_type, define_symbol, error_type,
6877 rs6000_builtin_type, read_range_type): Use per-objfile types
6878 instead of global or per-architecture builtin types.
6879 * coffread.c (decode_type): Likewise.
6880 * dwarf2read.c (read_array_type, read_tag_string_type,
6881 new_symbol, die_type): Likewise.
6882 * mdebugread.c (parse_symbol, basic_type, upgrade_type,
6883 parse_procedure, psymtab_to_symtab_1): Likewise.
6884 * xcoffread.c (process_xcoff_symbol): Likewise.
6885 * parse.c (write_exp_msymbol): Likewise.
6887 * stabsread.c (rs6000_builtin_type_data): New static variable.
6888 (_initialize_stabsread): Initialize it.
6889 (rs6000_builtin_type): Add OBJFILE argument. Allocate builtin
6890 types per-objfile instead of globally.
6892 * stabsread.c (dbx_lookup_type): Add OBJFILE argument. Use it
6893 instead of current_objfile; pass it to rs6000_builtin_type.
6894 (dbx_alloc_type, read_type, read_range_type): Update calls.
6895 (cleanup_undefined_types_noname): Add OBJFILE argument and
6896 pass it to dbx_lookup_type.
6897 (cleanup_undefined_types): Add OBJFILE argument and pass it
6898 to cleanup_undefined_types_noname.
6899 * stabsread.h (cleanup_undefined_types): Add OBJFILE argument.
6900 * buildsym.c (end_symtab): Update call.
6902 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6904 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6905 target_gdbarch instead of current_gdbarch.
6907 2009-06-29 Ulrich Weigand <uweigand@de.ibm.com>
6909 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-windows-tdep.o.
6910 (ALL_TARGET_OBS): Add moxie-tdep.o, i386-darwin-tdep.o, and
6913 * configure.tgt: Add comment.
6915 2009-06-28 Paul Pluzhnikov <ppluzhnikov@google.com>
6917 * mi/mi-cmds.c (mi_cmds): Remove unimplemented entries.
6919 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
6920 Jan Kratochvil <jan.kratochvil@redhat.com>
6922 * NEWS: Document inlined function support.
6923 * Makefile.in (SFILES): Add inline-frame.c.
6924 (COMMON_OBS): Add inline-frame.o.
6925 * block.c (contained_in): Rewrite to use lexical nesting.
6926 (block_linkage_function): Skip inlined function blocks.
6927 (block_inlined_p): New.
6928 * block.h (struct block): Update comment.
6929 (block_inlined_p): New prototype.
6930 * blockframe.c (get_frame_block): Handle inlined functions.
6931 (get_frame_function): Do not use block_linkage_function.
6932 (block_innermost_frame): Use get_frame_block and contained_in.
6933 * breakpoint.c (watchpoint_check): Remove extra reinit_frame_cache.
6934 Skip over inlined functions. Simplify epilogue check.
6935 (bpstat_check_breakpoint_conditions): Use get_stack_frame_id.
6937 (set_momentary_breakpoint): Only accept non-inlined frames.
6938 (watch_command_1): Use frame_unwind_caller_pc and
6939 frame_unwind_caller_id instead of get_prev_frame.
6940 (until_break_command): Likewise. Use get_stack_frame_id.
6941 * buildsym.c (end_symtab): Set SYMBOL_SYMTAB for block functions.
6942 * dwarf2loc.c (dwarf_expr_frame_base): Use block_linkage_function.
6943 * dwarf2read.c (process_die): Handle DW_TAG_inlined_subroutine.
6944 (read_func_scope, new_symbol): Likewise. Handle arguments specially
6945 for inlined functions without call site information.
6946 (inherit_abstract_dies): Allow tag mismatch for inlined subroutines.
6947 (die_specification): Treat DW_AT_abstract_origin as a specification.
6948 (read_type_die): Handle DW_TAG_inlined_subroutine.
6949 * frame-unwind.c (frame_unwind_init): Add inline_frame_unwind.
6950 * frame.c (fprint_frame_id): Print inline depth.
6951 (fprint_frame_type): Handle INLINE_FRAME and SENTINEL_FRAME.
6952 (skip_inlined_frames, get_stack_frame_id): New.
6953 (frame_unwind_caller_id): Use skip_inlined_frames.
6954 (frame_id_inlined_p): New.
6955 (frame_id_eq): Make the logic match the comments. Add inline_depth
6957 (frame_id_inner): Handle inlined functions.
6958 (frame_unwind_pc): New function, copied from frame_unwind_caller_pc.
6959 (frame_unwind_caller_pc): Use skip_inlined_frames and frame_unwind_pc.
6960 (get_prev_frame_1): Check for inline frames. Split out frame
6961 allocation to get_prev_frame_raw.
6962 (get_prev_frame_raw): New function.
6963 (get_prev_frame): Handle inline frames.
6964 (get_frame_pc): Use frame_unwind_pc.
6965 (get_frame_address_in_block): Skip inlined frames on both sides.
6966 (pc_notcurrent): Delete.
6967 (find_frame_sal): Rewrite to handle inline call sites. Use
6968 get_frame_address_in_block.
6969 (deprecated_update_frame_pc_hack): Make static.
6970 * frame.h: Update comments.
6971 (struct frame_id): Add inline_depth.
6972 (enum frame_type): Add INLINE_FRAME.
6973 (frame_id_inlined_p, get_stack_frame_id): New prototypes.
6974 * gdbthread.h (struct thread_info): Add step_stack_frame_id field.
6975 * infcmd.c (set_step_frame): New function.
6976 (step_once): Use set_step_frame. Handle inlined functions.
6977 (until_next_command): Use set_step_frame.
6978 (finish_backward), finish_forward): Use get_stack_frame_id.
6979 (finish_command): Support inlined functions.
6980 * inferior.h (set_step_info): New prototype.
6981 * infrun.c (RESUME_ALL): Use minus_one_ptid.
6982 (clear_proceed_status): Clear step_stack_frame_id.
6983 (init_wait_for_inferior): Call clear_inline_frame_state.
6984 (init_execution_control_state): Make static.
6985 (set_step_info): New function.
6986 (init_thread_stepping_state): Do not set the symtab or line here.
6987 (stepped_in_from): New function.
6988 (handle_inferior_event): Handle inlined functions. Use set_step_info.
6989 (insert_step_resume_breakpoint_at_frame): Use get_stack_frame_id.
6990 (struct inferior_status): Add step_stack_frame_id.
6991 (save_inferior_status, restore_inferior_status): Save and restore
6992 step_stack_frame_id.
6993 * inline-frame.c, inline-frame.h: New files.
6994 * minsyms.c (prim_record_minimal_symbol_and_info): Use XCALLOC.
6995 * regcache.c (regcache_write_pc): Call reinit_frame_cache.
6996 * s390-tdep.c (s390_prologue_frame_unwind_cache): Handle INLINE_FRAME.
6997 * stack.c (frame_show_address): New.
6998 (print_frame_info, print_frame): Use it.
6999 (find_frame_funname): Use get_frame_function. Handle inlined blocks.
7000 (frame_info): Mark inlined functions.
7001 (backtrace_command_1): Use get_current_user_frame.
7002 (print_frame_local_vars, print_frame_label_vars): Update comments.
7003 (return_command): Refuse inlined functions.
7004 * symtab.c (lookup_symbol_aux_local): Stop at inlined function
7006 (find_function_start_sal): Avoid inlined functions.
7007 (completion_list_add_fields): New function.
7008 (default_make_symbol_completion_list): Use it. Use block_static_block
7009 and block_global_block. Check for inlined functions.
7010 (skip_prologue_using_sal): Avoid line number comparison across
7012 * symtab.h (struct symbol): Add is_inlined.
7013 (SYMBOL_INLINED): New.
7014 * target.c (target_resume): Call clear_inline_frame_state.
7015 * valops.c (value_of_variable): Check block_inlined_p.
7017 2009-06-27 Daniel Jacobowitz <dan@codesourcery.com>
7019 * frame.c (frame_unwind_id): Renamed to ...
7020 (frame_unwind_caller_id): ... this. All callers updated.
7021 (frame_pc_unwind): Renamed to ...
7022 (frame_unwind_caller_pc): ... this. All callers updated.
7023 * frame.h: Document frame_unwind_caller_WHAT functions.
7024 (frame_unwind_id): Renamed to ...
7025 (frame_unwind_caller_id): ... this.
7026 (frame_pc_unwind): Renamed to ...
7027 (frame_unwind_caller_pc): ... this.
7028 * hppa-tdep.c (hppa_find_unwind_entry_in_block): Correct comment.
7029 * stack.c (parse_frame_specification_1): Do not rely on
7032 2009-06-27 Michael Snyder <msnyder@vmware.com>
7034 * infrun.c (handle_inferior_event): Improve handling of
7035 reverse-stepping into and over shared library functions.
7037 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
7039 * linespec.c (find_method): Add new not_found_ptr parameter to
7040 bring in line with symtab_from_filename, decode_variable.
7041 (decode_compound): Likewise. Also propagate not_found_ptr to
7043 (decode_line_1): Propagate not_found_ptr to decode_compound.
7044 (cplusplus_error): Now throws NOT_FOUND_ERROR.
7046 2009-06-25 Karen Osmond <karen.osmond@gmail.com>
7048 * MAINTAINERS (Write After Approval): Add self.
7050 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
7052 * valops.c (value_one): Reimplement broken decimal-float case.
7054 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
7056 * eval.c (evaluate_subexp_standard): Use expression architecture
7057 instead of current_gdbarch.
7059 * infrun.c (handle_inferior_event): Avoid unncessary reference
7060 to current_gdbarch and get_current_frame ().
7062 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
7064 * breakpoint.h (set_longjmp_breakpoint): Add THREAD argument.
7065 (enum bptype): Add bp_longjmp_master.
7067 * breakpoint.c (create_longjmp_master_breakpoint): New function.
7068 (update_breakpoints_after_exec): Handle bp_longjmp_master
7069 breakpoints. Call create_longjmp_master_breakpoint.
7070 (print_it_typical, bpstat_stop_status, bpstat_what,
7071 print_one_breakpoint_location, allocate_bp_location, mention,
7072 delete_command, breakpoint_re_set_one): Handle bp_longjmp_master.
7073 (breakpoint_re_set): Call create_longjmp_master_breakpoint.
7074 (create_longjmp_breakpoint): Delete.
7075 (set_longjmp_breakpoint): Add THREAD argument. Reimplement
7076 to install momentary clones of bp_longjmp_master breakpoints.
7078 * infcmd.c (step_1): Pass thread to set_longjmp_breakpoint.
7080 2009-06-23 Cary Coutant <ccoutant@google.com>
7082 * dwarf2read.c (dwarf_decode_lines): Ignore rows where is_stmt is 0.
7083 Set basic_block to 0 after a special opcode.
7085 2009-06-23 Jan Kratochvil <jan.kratochvil@redhat.com>
7087 Fix a regression by the mmap patch from 2009-06-16.
7088 * symfile.c (reread_symbols): Move sym_finish and clear_objfile_data
7089 calls before deleting the OBJFILE obstack. Extend the comment.
7091 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
7093 * jv-lang.h (JAVA_OBJECT_SIZE): Remove.
7094 (get_java_object_header_size): Add GDBARCH parameter.
7095 * jv-lang.c (get_java_object_header_size): Add GDBARCH parameter.
7096 Use it instead of current_gdbarch.
7097 (evaluate_subexp_java): Replace JAVA_OBJECT_SIZE with call to
7098 get_java_object_header_size.
7099 * jv-valprint.c (java_value_print): Likewise.
7101 2009-06-23 Sami Wagiaalla <swagiaal@redhat.com>
7103 * dwarf2read.c (process_die): Handle import statements
7104 (DW_TAG_imported_declaration, case DW_TAG_imported_module)
7105 (read_import_statement): New.
7106 (read_func_scope): Update using_directives to point to current context
7107 (read_lexical_block_scope): Ditto.
7108 * cp-support.h: Added prototype for cp_add_using.
7109 * cp-namespace.c: Removed local context_stack.
7110 (cp_initialize_namespace): Deleted.
7111 (cp_finalize_namespace): Deleted.
7112 (cp_add_using_directive): Use using_directives instead of using_list.
7113 (cp_add_using): No longer static.
7114 * buildsym.h: Created global using_direct variable.
7115 Created using_direct variable in context_stack.
7116 * buildsym.c (finish_block): Set using directives for the block under
7118 (start_symtab): Removed call to cp_initialize_namespace().
7119 (end_symtab): Removed call to cp_finalize_namespace().
7120 (push_context): Save and reset using_directives.
7121 * block.c (block_using): Return using directives for given
7122 block instead of static block.
7124 2009-06-23 Ulrich Weigand <uweigand@de.ibm.com>
7126 * target-descriptions.h (struct type): Do not declare.
7127 (struct tdesc_type): Declare.
7128 (tdesc_named_type): Change return type to struct tdesc_type *.
7129 (tdesc_record_type): Remove.
7130 (tdesc_create_vector): Add prototype.
7131 (tdesc_create_union): Likewise.
7132 (tdesc_add_field): Likewise.
7134 * target-descriptions.c (struct tdesc_reg): Replace gdb_type
7135 member by tdesc_type member.
7136 (struct tdesc_type_field, tdesc_type_field): Add type and vector def.
7137 (struct tdesc_type, tdesc_type_p): Likewise.
7138 (struct tdesc_arch_reg, tdesc_arch_reg): Likewise.
7139 (struct tdesc_feature): Change type of "types" to VEC(tdesc_type_p).
7140 (struct tdesc_arch_data): Replace registers member by arch_regs.
7142 (tdesc_predefined_types): Change to array of pre-defined
7143 struct tdesc_type structures. Add "code_ptr" and "data_ptr".
7144 (tdesc_named_type): Return struct tdesc_type * instead of GDB type.
7145 (tdesc_gdb_type): New function.
7147 (target_find_description): Update for data structure changes.
7148 (tdesc_data_cleanup): Likewise.
7149 (tdesc_numbered_register): Likewise.
7150 (tdesc_use_registers): Likewise.
7151 (tdesc_create_reg): Likewise.
7153 (tdesc_find_arch_register): New function.
7154 (tdesc_find_register): Use it.
7155 (tdesc_register_type): Use tdesc_gdb_type to generate GDB type from
7156 tdesc_type on demand; cache generated types in tdesc_arch_reg.
7158 (tdesc_free_type): New function.
7159 (tdesc_free_feature): Call it.
7161 (tdesc_create_vector): New function.
7162 (tdesc_create_union): Likewise.
7163 (tdesc_add_field): Likewise.
7164 (tdesc_record_type): Remove.
7166 (tdesc_type_id): Remove.
7167 (maint_print_c_tdesc_cmd): Update for data structure changes. Update
7168 generated code to create tdesc_type structures instead of GDB types.
7170 * xml-tdesc.c: Do not include "gdbtypes.h".
7171 (struct tdesc_parsing_data): Change type of current_union to
7172 struct tdesc_type *.
7173 (tdesc_start_reg): Do not special-case "code_ptr" or "data_ptr".
7174 (tdesc_start_union): Call tdesc_create_union.
7175 (tdesc_start_field): Call tdesc_add_field.
7176 (tdesc_start_vector): Call tdesc_create_vector.
7177 (tdesc_end_union): Remove.
7178 (feature_children): Remove reference to tdesc_end_union.
7180 * features/arm-with-iwmmxt.c: Regenerate.
7181 * features/mips-linux.c: Regenerate.
7182 * features/mips64-linux.c: Regenerate.
7183 * features/rs6000/powerpc-32.c: Regenerate.
7184 * features/rs6000/powerpc-32l.c: Regenerate.
7185 * features/rs6000/powerpc-403.c: Regenerate.
7186 * features/rs6000/powerpc-403gc.c: Regenerate.
7187 * features/rs6000/powerpc-505.c: Regenerate.
7188 * features/rs6000/powerpc-601.c: Regenerate.
7189 * features/rs6000/powerpc-602.c: Regenerate.
7190 * features/rs6000/powerpc-603.c: Regenerate.
7191 * features/rs6000/powerpc-604.c: Regenerate.
7192 * features/rs6000/powerpc-64.c: Regenerate.
7193 * features/rs6000/powerpc-64l.c: Regenerate.
7194 * features/rs6000/powerpc-7400.c: Regenerate.
7195 * features/rs6000/powerpc-750.c: Regenerate.
7196 * features/rs6000/powerpc-860.c: Regenerate.
7197 * features/rs6000/powerpc-altivec32.c: Regenerate.
7198 * features/rs6000/powerpc-altivec32l.c: Regenerate.
7199 * features/rs6000/powerpc-altivec64.c: Regenerate.
7200 * features/rs6000/powerpc-altivec64l.c: Regenerate.
7201 * features/rs6000/powerpc-e500.c: Regenerate.
7202 * features/rs6000/powerpc-e500l.c: Regenerate.
7203 * features/rs6000/powerpc-isa205-32l.c: Regenerate.
7204 * features/rs6000/powerpc-isa205-64l.c: Regenerate.
7205 * features/rs6000/powerpc-isa205-altivec32l.c: Regenerate.
7206 * features/rs6000/powerpc-isa205-altivec64l.c: Regenerate.
7207 * features/rs6000/powerpc-isa205-vsx32l.c: Regenerate.
7208 * features/rs6000/powerpc-isa205-vsx64l.c: Regenerate.
7209 * features/rs6000/powerpc-vsx32.c: Regenerate.
7210 * features/rs6000/powerpc-vsx32l.c: Regenerate.
7211 * features/rs6000/powerpc-vsx64.c: Regenerate.
7212 * features/rs6000/powerpc-vsx64l.c: Regenerate.
7213 * features/rs6000/rs6000.c: Regenerate.
7215 2009-06-23 Joel Brobecker <brobecker@adacore.com>
7217 * ada-lang.c (decode_packed_array): If the value is a pointer to
7218 an array, then use value_ind to dereference it, not ada_value_ind.
7219 (ada_template_to_fixed_record_type_1): Handle the case where a
7220 dynamic field is an aligner type.
7221 (to_fixed_array_type): Add handling for packed array types.
7222 (ada_get_base_type): Do not follow the XVS type if the type is
7224 (ada_evaluate_subexp): Split a few statements up for clarity
7226 <OP_FUNCALL>: Add handling of the case of a packed array that
7227 has already been fixed.
7229 2009-06-23 Joel Brobecker <brobecker@adacore.com>
7231 * ada-lang.c (evaluate_subexp): Delete. Use the version from eval.c.
7232 (evaluate_subexp_type): Reimplement using evaluate_subexp.
7233 * value.h (evaluate_subexp): Add declaration.
7234 * eval.c (evaluate_subexp): Make non-static.
7235 * objc-lang.c (print_object_command): Use evaluate_subexp.
7237 2009-06-23 Paul Pluzhnikov <ppluzhnikov@google.com>
7239 Revert 2009-05-14 breakpoint commit (no longer needed).
7240 * breakpoint.h (breakpoint_re_set_objfile): Remove
7241 * breakpoint.c (breakpoint_re_set_objfile): Likewise
7242 (create_overlay_event_breakpoint): Remove objfile parameter,
7243 iterate over all objfiles.
7244 * objfiles.c (objfile_relocate): Update.
7245 * symfile.c (new_symfile_objfile): Likewise.
7247 2009-06-23 Tom Tromey <tromey@redhat.com>
7250 * c-lang.c (classify_type): Iterate over typedefs.
7251 * c-valprint.c (textual_element_type): Iterate over typedefs.
7253 2009-06-22 Tristan Gingold <gingold@adacore.com>
7255 * darwin-nat.c (darwin_xfer_partial): Use host_address_to_string
7258 2009-06-22 Jan Kratochvil <jan.kratochvil@redhat.com>
7261 * buildsym.c (block_compar): New function.
7262 (end_symtab): Replace the bubble sort by a qsort based code.
7264 2009-06-22 Sami Wagiaalla <swagiaal@redhat.com>
7266 * MAINTAINERS (Write After Approval): Add self.
7268 2009-06-22 Ulrich Weigand <uweigand@de.ibm.com>
7270 * spu-tdep.c (spu_get_longjmp_target): New function.
7271 (spu_gdbarch_init): Install it.
7273 2009-06-22 H.J. Lu <hongjiu.lu@intel.com>
7276 * remote.c (getpkt_or_notif_sane_1): Initialize val to -1.
7278 2009-06-21 Michael Snyder <msnyder@vmware.com>
7280 * inferior.h: Update ancient comment.
7282 2009-06-20 Aleksandar Ristovski <aristovski@qnx.com>
7283 Pedro Alves <pedro@codesourcery.com>
7285 * solib-svr4.c (IGNORE_FIRST_LINK_MAP_ENTRY): Avoid dereferencing
7287 (scan_dyntag): Skip if input bfd isn't elf flavoured.
7288 (locate_base): Call elf_locate_base even without an exec_bfd.
7290 2009-06-19 Samuel Bronson <naesten@gmail.com>
7293 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
7294 for prefix commands to avoid duplicates in the output.
7296 2009-06-19 Samuel Bronson <naesten@gmail.com>
7299 * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
7302 2009-06-19 Jerome Guitton <guitton@adacore.com>
7304 * breakpoint.c (expand_line_sal_maybe): When explicit_line,
7305 skip prologue on each sals.
7306 (skip_prologue_sal): Return explicit_line and explicit_pc
7309 2009-06-19 Tristan Gingold <gingold@adacore.com>
7311 * darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
7314 2009-06-19 Tristan Gingold <gingold@adacore.com>
7315 * machoread.c (macho_symtab_read): Adjust for bfd changes.
7316 * darwin-nat.h (struct darwin_exception_msg): New type to describe
7318 (struct private_thread_info): New type to describe the state of the
7320 (DEF_VEC_I thread_t): Removed, replaced by ...
7321 (DEF_VEC_O darwin_thread_t): ... this new type.
7322 (struct darwin_inferior): Renamed to ...
7323 (struct private_inferior): ... this type. Fields added.
7324 (darwin_not_port): Moved into the private inferior structure.
7325 * darwin-nat.c: Add includes, improve comments.
7326 Rewrite to handle multiple threads and processes.
7327 (darwin_resume_to): New function and protype.
7328 (darwin_resume, darwin_wait_to, darwin_wait): Ditto.
7329 (darwin_kill_inferior): Add ops argument.
7330 (darwin_pid_to_str): New function.
7331 (darwin_thread_alive): Ditto.
7332 (darwin_inf, darwin_not_port): Removed.
7333 (darwin_inf_fake_stop): New variable.
7334 (msgin, msgout, msg_state, exc_msg): Removed.
7335 (mach_check_error): Use warning instead of error.
7336 (darwin_ptrace): Adjust debug level.
7337 (cmp_thread_t): Fix names (typo).
7338 (darwin_check_new_threads): Argument is now an inferior,
7339 adjust for new structures, add no change check, ignore dead ports,
7340 handle first thread case.
7341 (find_inferior_task_it): New function.
7342 (find_inferior_notify_it): Ditto.
7343 (darwin_find_inferior_by_task): Ditto.
7344 (darwin_find_inferior_by_notify): Ditto.
7345 (darwin_find_thread): Ditto.
7346 (darwin_suspend_inferior): Ditto.
7347 (darwin_resume_inferior): Ditto.
7348 (catch_exception_raise_state): Removed.
7349 (catch_exception_raise_state_identity): Removed.
7350 (darwin_suspend_inferior_it): New function.
7351 (darwin_resume_inferior_it): Ditto.
7352 (darwin_dump_message): New function, extracted from darwin_wait.
7353 (darwin_decode_exception_message): New function.
7354 (darwin_encode_reply): New function.
7355 (catch_exception_raise): Removed.
7356 (darwin_send_reply): New function, extracted from darwin_resume.
7357 (darwin_resume_thread): New function, extracted from darwin_resume.
7358 (struct resume_inferior_threads_param): New type.
7359 (darwin_resume_inferior_threads_it): New function.
7360 (darwin_resume_inferior_threads): New function.
7361 (darwin_suspend_inferior_threads): New function.
7362 (darwin_resume): Mostly rewritten to handle multiple threads and
7364 (darwin_decode_message): New function extracted from darwin_wait.
7365 (cancel_breakpoint): New function.
7366 (darwin_wait): Mostly rewritten. Handle multiple threads.
7367 (darwin_mourn_inferior): Adjust for per process structures.
7368 (darwin_reply_to_all_pending_messages): New function.
7369 (darwin_stop_inferior): Adjust for per inferior structures.
7370 (darwin_attach_pid): Ditto.
7371 (darwin_init_thread_list): Ditto.
7372 (darwin_attach): Ditto.
7373 (darwin_detach): Ditto.
7374 (darwin_files_info): Now empty.
7375 (darwin_pid_to_str): Adjust returns string to match one expected by
7377 (darwin_read_write_inferior): Rename err variable to match other uses.
7378 Adjust debug message. Handle submaps.
7379 (darwin_xfer_memory): Adjust for per inferior structures.
7380 (set_enable_mach_exceptions): Ditto.
7381 (darwin_pid_to_exec_file): New function.
7382 (darwin_get_ada_task_ptid): Ditto.
7383 (darwin_supports_multi_process): Ditto.
7384 (_initialize_darwin_inferior): Remove useless assertion, adjust for
7385 per inferior structures. Add new target operations.
7387 2009-06-18 Hui Zhu <teawater@gmail.com>
7388 Michael Snyder <msnyder@vmware.com>
7390 * infrun.c (handle_inferior_event): Improve reverse stepping
7391 through function epilogue.
7393 * infrun.c (handle_inferior_event): Reverse-next through
7396 2009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
7398 * dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
7401 2009-06-17 Tom Tromey <tromey@redhat.com>
7403 * dwarf2read.c (zlib_decompress_section): Use a cleanup.
7405 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7407 * gdbarch.sh (pointer_to_address): Change to type 'm'.
7408 (address_to_pointer): Likewise.
7409 * gdbarch.c, gdbarch.h: Regenerate.
7411 * inferior.h (unsigned_pointer_to_address): Add GDBARCH argument.
7412 (signed_pointer_to_address): Likewise.
7413 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
7414 * findvar.c (unsigned_pointer_to_address): Likewise.
7415 (signed_pointer_to_address): Likewise.
7416 (unsigned_address_to_pointer, address_to_signed_pointer): Likewise.
7418 * avr-tdep.c (avr_address_to_pointer): Likewise.
7419 (avr_pointer_to_address): Likewise.
7420 * iq2000-tdep.c (iq2000_pointer_to_address): Likewise.
7421 (iq2000_address_to_pointer): Likewise.
7422 * m32c-tdep.c (m32c_m16c_address_to_pointer): Likewise.
7423 (m32c_m16c_pointer_to_address): Likewise.
7424 * spu-tdep.c (spu_pointer_to_address): Likewise.
7425 * xstormy16-tdep.c (xstormy16_pointer_to_address): Likewise.
7426 (xstormy16_address_to_pointer): Likewise.
7428 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7430 * printcmd.c (print_scalar_formatted): Always truncate
7431 unsigned data types.
7433 * cli-dump.c (struct callback_data): Change type of load_offset
7435 (restore_binary_file): Update type casts.
7436 (restore_command): Parse load_offset as address, not long.
7438 * utils.c (string_to_core_addr): Do not sign-extend value.
7439 * varobj.c (find_frame_addr_in_frame_chain): Truncate frame_base
7440 before comparing against requested frame address.
7442 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7444 * gdbarch.sh (gcore_bfd_target): New gdbarch callback.
7445 * gdbarch.h, gdbarch.c: Regenerate.
7447 * gcore.c (default_gcore_target): Make return value const.
7448 Call gdbarch_gcore_bfd_target if present.
7449 (default_gcore_arch, default_gcore_mach): Use target_gdbarch.
7451 * corelow.c (core_read_description): Call gdbarch_core_read_description
7452 on core_gdbarch instead of current_gdbarch.
7454 * ppc-linux-tdep.c (ppc_linux_init_abi): Install gcore_bfd_target.
7456 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7458 * gdbtypes.c (create_string_type): Receive character type as argument.
7459 * gdbtypes.h (create_string_type): Add character type argument.
7460 * dwarf2read.c (read_tag_string_type): Pass character type to
7463 * value.h (value_string): Add character type argument.
7464 * valops.c (value_string): Add character type argument. Pass it to
7465 create_string_type. Do not allocate space in inferior.
7466 * valarith.c (value_concat): Pass character type to value_string.
7468 * value.h (value_typed_string): Rename to ...
7469 (value_cstring): ... this.
7470 * valops.c (value_typed_string): Rename to ...
7471 (value_cstring): ... this.
7472 * c-lang.c (evaluate_subexp_c): Update.
7474 * python/python-value.c (builtin_type_pychar): New define.
7475 (convert_value_from_python): Call value_cstring instead
7476 of value_from_string.
7477 * value.c (value_from_string): Remove.
7478 * value.h (value_from_string): Remove.
7480 * eval.c (evaluate_subexp_standard): Pass character type to
7481 value_string. Pass expression architecture to value_nsstring
7482 and lookup_child_selector.
7483 * objc-lang.h (lookup_objc_class): Add GDBARCH parameter.
7484 (lookup_child_selector): Likewise.
7485 (value_nsstring): Likewise.
7486 * objc-lang.c (lookup_objc_class): Add GDBARCH parameter.
7487 Pass character type to value_string..
7488 (lookup_child_selector): Likewise.
7489 (value_nsstring): Add GDBARCH parameter, use it instead of
7490 objfile architecture. Pass architecture to lookup_objc_class
7491 and lookup_child_selector. Pass character type to value_string.
7492 (end_msglist): Pass architecture to lookup_objc_class.
7493 * objc-exp.y: Pass architecture to lookup_objc_class.
7495 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7497 * gdbtypes.h (struct language_defn): Add forward declaration.
7498 (lookup_typename): Add LANGUAGE and GDBARCH parameters.
7499 (lookup_unsigned_typename): Likewise.
7500 (lookup_signed_typename): Likewise.
7501 * gdbtypes.c (lookup_typename): Add LANGUAGE and GDBARCH parameters.
7502 Use them instead of current_language and current_gdbarch.
7503 (lookup_unsigned_typename): Add LANGUAGE and GDBARCH parameters.
7504 Pass them to lookup_typename.
7505 (lookup_signed_typename): Likewise.
7507 * c-exp.y: Pass parse_language and parse_gdbarch to
7508 lookup_unsigned_typename and lookup_signed_typename.
7509 * objc-exp.y: Likewise.
7510 * m2-exp.y: Pass parse_language and parse_gdbarch to lookup_typename.
7512 * c-lang.c (evaluate_subexp_c): Pass expression language and
7513 gdbarch to lookup_typename.
7514 * printcmd.c (printf_command): Pass current language and
7515 gdbarch to lookup_typename.
7516 * python/python-type.c (typy_lookup_typename): Likewise.
7517 Include "language.h".
7519 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7521 * sparc64-nat.c (sparc64_gregset_supplies_p): Add GDBARCH parameter.
7522 Use it instead of current_gdbarch. Pass architecture to
7523 sparc32_gregset_supplies_p.
7524 (sparc64_fpregset_supplies_p): Add GDBARCH parameter. Use it instead
7525 of current_gdbarch. Pass architecture to sparc32_fpregset_supplies_p.
7526 * sparc64nbsd-nat.c (sparc64nbsd_gregset_supplies_p,
7527 sparc64nbsd_fpregset_supplies_p): Likewise.
7528 * sparc-nat.c (sparc_gregset_supplies_p, sparc_fpregset_supplies_p):
7529 Add GDBARCH parameter.
7530 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
7531 (sparc_fetch_inferior_registers): Pass regcache architecture to
7532 sparc_gregset_supplies_p and sparc_fpregset_supplies_p.
7533 (sparc_store_inferior_registers): Likewise.
7534 * sparc-nat.h (sparc_gregset_supplies_p, sparc_fpregset_supplies_p:
7535 Add GDBARCH parameter.
7536 (sparc32_gregset_supplies_p, sparc32_fpregset_supplies_p): Likewise.
7538 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7540 * ada-tasks.c (read_known_tasks_array): Use target_gdbarch instead
7542 * aix-thread.c (pd_enable): Likewise.
7543 * amd64-linux-nat.c (ps_get_thread_area): Likewise.
7544 * bsd-uthread.c (bsd_uthread_activate): Likewise.
7545 * linux-nat.c (linux_nat_info_proc_cmd): Likewise.
7546 * linux-thread-db.c (enable_thread_event): Likewise.
7547 * monitor.c (monitor_write_memory, monitor_read_memory): Likewise.
7548 * nto-procfs.c (procfs_open): Likewise.
7549 * procfs.c (invalidate_cache, procfs_insert_watchpoint,
7550 info_proc_mappings, info_mappings_callback): Likewise.
7551 * record.c (record_open): Likewise.
7552 * rs6000-nat.c (ARCH64): Likewise.
7553 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
7554 (darwin_bfd_open): Likewise.
7555 * memattr.c (mem_info_command): Likewise.
7557 * windows-nat.c (win32_resume): Use current regcache architecture
7558 instead of current_gdbarch.
7560 * dbug-rom.c (dbug_regname): Remove check against number of
7561 registers in current_gdbarch.
7562 * solib-pa64.c (read_dynamic_info): Remove unused variable.
7564 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7566 * dummy-frame.c (deprecated_pc_in_call_dummy): Add GDBARCH parameter,
7567 use it instead of current_gdbarch.
7568 * frame.h (deprecated_pc_in_call_dummy): Add GDBARCH parameter.
7569 * arm-tdep.c (arm_skip_prologue): Pass architecture to
7570 deprecated_pc_in_call_dummy.
7572 * symtab.c (skip_prologue_using_sal): Add GDBARCH parameter.
7573 Use it instead of current_gdbarch.
7574 * symtab.h (skip_prologue_using_sal): Add GDBARCH parameter.
7575 * breakpoint.c (expand_line_sal_maybe): Pass architecture to
7576 skip_prologue_using_sal.
7577 * arm-tdep.c (skip_prologue_using_sal): Likewise.
7578 * lm32-tdep.c (lm32_skip_prologue): Likewise.
7579 * m32-tdep.c (m32c_skip_prologue): Likewise.
7580 * mips-tdep.c (mips_skip_prologue): Likewise.
7581 * moxie-tdep.c (moxie_skip_prologue): Likewise.
7582 * mt-tdep.c (mt_frame_unwind_cache): Likewise.
7583 * rs6000-tdep.c (rs6000_skip_prologue): Likewise.
7584 * frv-tdep.c (frv_analyze_prologue): Add GDBARCH parameter, pass
7585 it to skip_prologue_using_sal. Update call sites ...
7586 (frv_skip_prologue, frv_frame_unwind_cache): ... here.
7588 * mn10300-tdep.c (struct mn10300_prologue): Add GDBARCH member.
7589 (check_for_saved): Use it instead of current_gdbarch.
7590 (mn10300_analyze_prologue): Set it.
7592 * value.c (using_struct_return): Add GDBARCH parameter. Use it
7593 instead of current_gdbarch.
7594 * value.h (using_struct_return): Add GDBARCH parameter.
7595 * eval.c (evaluate_subexp_standard): Pass architecture to
7596 using_struct_return.
7597 * infcall.c (call_function_by_hand): Likewise.
7598 * stack.c (return_command): Likewise.
7599 * sparc-tdep.c (sparc32_push_dummy_code): Likewise.
7601 * symtab.c (in_prologue): Add GDBARCH parameter. Use it instead of
7603 * symtab.h (in_prologue): Add GDBARCH parameter.
7604 * infrun.c (handle_inferior_event): Pass architecture to in_prologue.
7606 * eval.c (evaluate_subexp_standard): Use expression architecture
7607 instead of current_gdbarch.
7609 * c-lang.c (evaluate_subexp_c): Use expression architecture and
7610 language instead of current_gdbarch and current_language.
7612 * printcmd.c (do_one_display): Use expression architecture instead
7615 * infcmd.c (print_return_value): Use architecture of stop_regcache
7616 instead of current_gdbarch.
7617 (print_vector_info, print_float_info): Remove GDBARCH argument,
7618 use frame architecture instead.
7619 (vector_info, float_info): Update calls.
7621 * objc-lang.c (objc_skip_trampoline): Use frame architecture
7622 instead of current_gdbarch.
7624 * parse.c (write_dollar_variable): Use parse architecture instead
7627 * source.c (line_info): Use objfile architecture instead of
7630 * symtab.c (find_function_start_sal): Use gdbarch instead of
7632 (print_msymbol_info): Use objfile architecture instead of
7635 * valops.c (value_assign): Use frame architecture instead of
7638 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7640 * buildsym.c (record_line): Remove call to gdbarch_addr_bits_remove.
7642 * coffread.c (coff_symtab_read): Call gdbarch_addr_bits_remove before
7643 calling record_line.
7644 (enter_linenos): Likewise.
7645 * dbxread.c (process_one_symbol): Likewise.
7646 * dwarf2read.c (dwarf_decode_lines): Likewise.
7647 * mdebugread.c (psymtab_to_symtab_1): Likewise.
7648 * xcoffread.c (enter_line_range): Likewise.
7650 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7652 * ax-gdb.c (gen_bitfield_ref): Add EXP argument, use expression
7653 architecture instead of current_gdbarch.
7654 (gen_struct_ref): Add EXP argument, pass to get_bitfield_ref.
7655 (gen_expr): Pass expression to get_struct_ref.
7657 * symtab.h (struct symbol_ops): Add GDBARCH parameter to
7658 tracepoint_var_ref callback.
7659 * ax-gdb.c (gen_var_ref): Pass architecture to tracepoint_var_ref
7660 symbol operation callback.
7661 * dwarf2loc.c (dwarf2_tracepoint_var_ref): Add GDBARCH parameter.
7662 Use it instead of current_gdbarch.
7663 (locexpr_tracepoint_var_ref): Add GDBARCH parameter. Pass it to
7664 dwarf2_tracepoint_var_ref.
7665 (loclist_tracepoint_var_ref): Likewise.
7667 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7669 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
7670 Use it instead of address bits of current_gdbarch.
7671 * prologue-value.c (make_pv_area): Add ADDR_BIT argument.
7672 * arm-tdep.c (thumb_analyze_prologue): Pass address bits to
7674 (arm_scan_prologue): Likewise.
7675 * m32c-tdep.c (m32c_analyze_prologue): Likewise.
7676 * mep-tdep.c (mep_analyze_prologue): Likewise.
7677 * mn10300-tdep.c (mn10300_analyze_prologue): Likewise.
7678 * s390-tdep.c (s390_analyze_prologue): Likewise.
7680 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7682 * mi/mi-main.c (mi_cmd_data_list_register_names): Use selected
7683 frame architecture instead of current_gdbarch.
7684 (mi_cmd_data_list_changed_registers): Likewise.
7685 (mi_cmd_data_list_register_values): Likewise. Pass selected
7686 frame to get_register.
7687 (get_register): Add FRAME argument, use it as frame to retrieve
7688 registers from (instead of selected frame). Use frame architecture
7689 instead of current_gdbarch.
7690 (mi_cmd_data_write_register_values): Use current regcache
7691 architecture instead of current_gdbarch.
7693 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7695 * tui/tui-regs.c (tui_show_register_group): Remove GDBARCH parameter;
7696 use frame architecture instead. Replace current_gdbarch uses.
7697 (tui_show_registers): Update call.
7698 (tui_get_register): Remove GDBARCH parameter; use frame architecture
7700 (tui_show_register_group): Update call.
7701 (tui_check_register_values): Likewise.
7702 (tui_register_format): Remove GDBARCH parameter; use frame
7703 architecture instead. Replace current_gdbarch uses.
7704 (tui_get_register): Update call.
7706 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7708 * gdbarch.sh (construct_inferior_arguments): Remove.
7709 * gdbarch.c, gdbarch.h: Regenerate.
7710 * infcmd.c (get_inferior_args): Call construct_inferior_arguments
7711 directly instead of gdbarch_construct_inferior_arguments.
7712 (construct_inferior_arguments): Remove GDBARCH argument.
7713 * inferior.h (construct_inferior_arguments): Likewise.
7715 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7717 * symfile.c (section_is_mapped): Use objfile architecture instead
7719 (TARGET_LONG_BYTES): Remove.
7720 (read_target_long_array): Add SIZE argument. Use it instead of
7722 (simple_read_overlay_table): Retrieve long size from objfile
7723 architecture; pass it to read_target_long_array.
7724 (simple_read_overlay_region_table): Likewise.
7725 (simple_overlay_update_1): Likewise.
7727 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7729 * infrun.c (cleanup_displaced_step_closure): Remove.
7730 (displaced_step_clear_cleanup): Move to before displaced_step_prepare.
7731 (displaced_step_prepare): Use displaced_step_clear_cleanup instead
7732 of cleanup_displaced_step_closure.
7733 (handle_inferior_event, keep_going): Use thread architecture instead
7736 2009-06-17 Ulrich Weigand <uweigand@de.ibm.com>
7738 * infrun.c (handle_inferior_event): Use current frame architecture
7739 or thread architecture instead of current_gdbarch. Pass to
7740 handle_step_into_function and handle_step_into_function_backward.
7741 (handle_step_into_function): Add GDBARCH parameter. Use it instead
7743 (handle_step_into_function_backward): Likewise.
7744 (insert_step_resume_breakpoint_at_frame): Use frame architecture
7745 instead of current_gdbarch.
7746 (insert_step_resume_breakpoint_at_caller): Likewise.
7748 2009-06-17 Pierre Muller <muller@ics.u-strasbg.fr>
7749 Pedro Alves <pedro@codesourcery.com>
7751 * infcmd.c (post_create_inferior): Call breakpoint_re_set after target
7752 is pushed for watchpoint promotion to hardware watchpoint.
7754 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
7756 * dwarf2read.c (dwarf_info_section, dwarf_abbrev_section)
7757 (dwarf_line_section, dwarf_pubnames_section, dwarf_aranges_section)
7758 (dwarf_loc_section, dwarf_macinfo_section, dwarf_str_section)
7759 (dwarf_ranges_section, dwarf_frame_section)
7760 (dwarf_eh_frame_section): Removed.
7761 (dwarf2_resize_section): Likewise.
7762 (dwarf2_read_section): Now static, use bfd_mmap() if possible.
7763 (dwarf2_get_section_info): New function.
7764 (munmap_section_buffer): Likewise.
7765 (dwarf2_per_objfile_cleanup): Likewise.
7766 (section_is_p): Signature change.
7767 * dwarf2-frame.c (dwarf2_build_frame_info): Use
7768 dwarf2_get_section_info instead of dwarf2_read_section.
7770 2009-06-16 Paul Pluzhnikov <ppluzhnikov@google.com>
7772 * solib.c (symbol_add_stub): New FLAGS parameter.
7773 (solib_read_symbols): FROM_TTY -> FLAGS, call symbol_add_stub
7775 (solib_add): Defer breakpoint_re_set until after all solibs.
7776 * bsd-uthread.c (bsd_uthread_solib_loaded): Adjust.
7777 * rs6000-nat.c (objfile_symbol_add): Adjust.
7778 * symfile.c (syms_from_objfile): Merge parameters into ADD_FLAGS.
7779 (new_symfile_objfile): Likewise.
7780 (symbol_file_add_with_addrs_or_offsets): Likewise.
7781 (symbol_file_add_from_bfd): Likewise.
7782 (symbol_file_add): Likewise.
7783 * symfile.h (enum symfile_add_flags): New. Adjust prototypes.
7784 * symfile-mem.c (symbol_file_add_from_memory): Adjust.
7785 * windows-nat.c (safe_symbol_file_add_stub): Adjust.
7786 * machoread.c (macho_oso_symfile, macho_symfile_read): Adjust.
7788 2009-06-16 Keith Seitz <keiths@redhat.com>
7790 * linespec.c (collect_methods): Delete.
7791 (add_matching_methods): Reove destructor special case.
7792 (find_method): Call find_methods directly instead of
7794 * valops.c (value_struct_elt): Remove destructor
7796 (check_field): Likewise.
7797 (value_struct_elt_for_reference): Likewise.
7798 (destructor_name_p): Remove misleading comment about dtors
7799 being "special cases".
7800 * gdbtypes.h (get_destructor_fn_field): Remove. No longer needed.
7801 * gdbtypes.c (get_destructor_fn_field): Likewise.
7803 2009-06-16 Pedro Alves <pedro@codesourcery.com>
7805 * mi/mi-main.c (mi_cmd_data_read_memory): Dispatch
7806 TARGET_OJECT_MEMORY reads to the topmost target, not to the
7807 flattened current_target.
7809 2009-06-16 Tristan Gingold <gingold@adacore.com>
7811 * avr-tdep.c (struct gdbarch_tdep): Replace the unused field with
7813 (avr_register_name): Add const to register_names.
7814 (avr_scan_arg_moves): Move inside avr_scan_prologue.
7815 (avr_scan_prologue): Add pc_end argument.
7816 Only read prologue bytes that can be read.
7817 Limit the scan to the known prologue length.
7818 Makes pattern variables static and const.
7820 (avr_skip_prologue): Pass func_end argument to avr_scan_prologue.
7822 (avr_breakpoint_from_pc): Constify avr_break_insn.
7823 (avr_extract_return_value): Fix function comment.
7824 (avr_frame_unwind_cache): Fix GNU style violations.
7825 Pass current_pc argument to avr_scan_prologue to stop prologue
7826 analysis to the current pc. This fixes the bug with the 'next'
7828 Correctly set the SP register of the previous frame (use call_length).
7829 (avr_frame_prev_register): Fix indentation.
7830 Correctly read PC from the stack on avr6 architectures.
7831 (avr_push_dummy_call): Fix indentation.
7832 (avr_gdbarch_init): Set call_length according to the architecture.
7834 2009-06-15 Phil Muldoon <pmuldoon@redhat.com>
7836 * infcall.c (show_unwind_on_terminating_exception_p): New
7838 (call_function_by_hand): Create breakpoint and clean-up call for
7839 std::terminate.breakpoint. Add unwind_on_terminating_exception_p
7840 gate. Pop frame on breakpoint hit.
7841 (_initialize_infcall): Add add_setshow_boolean_cmd for
7842 unwind-on-terminating-exception.
7844 2009-06-12 Kevin Buettner <kevinb@redhat.com>
7846 * dwarf2read.c (dwarf2_psymtab_to_symtab): Propagate
7847 `has_section_at_zero' flag from stripped objfile to separate,
7848 debug info only, objfile.
7850 2009-06-12 Pedro Alves <pedro@codesourcery.com>
7852 * exec.h (section_table_xfer_memory_partial): Improve description,
7853 mention SECTION_NAME.
7854 * exec.c (section_table_xfer_memory_partial): Remove stale
7857 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
7859 * nto-tdep.h (nto_generic_supply_gpregset)
7860 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
7861 * nto-tdep.c (nto_generic_supply_gpregset)
7862 (nto_generic_supply_fpregset, nto_generic_supply_altregset): Remove.
7864 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
7866 * i386-nto-tdep.c (I386_NTO_SIGCONTEXT_OFFSET): Remove define.
7867 (i386nto_sigcontext_addr): Change the way context address is calculated.
7868 (i386nto_init_abi): Remove usage of deprecated sc_reg_offset and
7869 sc_sp_offset and set sc_reg_offset and sc_num_regs.
7871 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
7873 * i386-nto-tdep.c (i386_nto_target): Remove definition.
7874 (init_i386nto_ops): Use macros to set fields to global
7875 current_nto_target directly.
7876 (i386nto_init_abi): Remove unused nto_set_target call.
7877 * nto-tdep.h (nto_set_target): Remove unused declaration.
7878 * nto-tdep.c (nto_set_target): Remove unused function.
7880 2009-06-11 Pedro Alves <pedro@codesourcery.com>
7882 * breakpoint.c (break_command_really): Rename local variable
7883 breakpoint_chain to bkpt_chain.
7885 2009-06-11 Aleksandar Ristovski <aristovski@qnx.com>
7887 Add support for XMM registers.
7888 * i386-nto-tdep.c (i386nto_regset_id): Add case for SSE register set.
7889 (i386nto_register_area): Correctly calculate offsets and sizes for
7890 all supported registers.
7892 2009-06-11 Tom Tromey <tromey@redhat.com>
7894 * eval.c (evaluate_subexp_standard) <OP_OBJC_MSGCALL>: Remove
7895 'static' from local variable definitions.
7897 2009-06-11 Pedro Alves <pedro@codesourcery.com>
7899 * symtab.c (append_expanded_sal): Remove unused local variables.
7901 2009-06-11 Pedro Alves <pedro@codesourcery.com>
7903 * infrun.c (sched_multi): New global.
7904 (resume): If sched_multi is set, resume only threads of the
7906 (prepare_to_proceed): Don't switch over to wait_ptid if we're
7907 resuming a different inferior, and sched_multi is off.
7908 (show_schedule_multiple): New.
7909 (_initialize_infrun): Register new "set schedule-multiple" command.
7910 * inferior.h (sched_multi): Declare.
7911 * NEWS: Mention new "schedule-multiple" setting.
7913 2009-06-11 Pedro Alves <pedro@codesourcery.com>
7915 * varobj.c (varobj_create): Properly restore the selected frame.
7917 2009-06-05 Tom Tromey <tromey@redhat.com>
7919 * inferior.c (print_inferior): Make a table, not a list. Emit
7922 2009-06-10 Jonas Maebe <jonas.maebe@elis.ugent.be>
7924 * darwin-nat.c (darwin_stop_inferior): Pass 0 as options to
7925 darwin_wait (blocking wait).
7926 (darwin_kill_inferior): Likewise.
7928 2009-06-10 Pedro Alves <pedro@codesourcery.com>
7930 * infrun.c (handle_inferior_event): Update comment around trying
7931 to revert back to a stepping thread that has exited.
7933 2009-06-10 Cary Coutant <ccoutant@google.com>
7935 * dwarf2read.c (dwarf_decode_lines): Recognize and ignore
7936 DW_LNE_set_discriminator.
7938 2009-06-10 Pierre Muller <muller@ics.u-strasbg.fr>
7940 * breakpoint.c: ARI fixes.
7941 (create_overlay_event_breakpoint): Avoid assignment inside if statement.
7942 (print_one_breakpoint_location): Likewise.
7943 (create_longjmp_breakpoint): Likewise.
7944 (tracepoint_save_command): Likewise
7945 (bpstat_find_step_resume_breakpoint): No operator at end of line.
7946 (bpstat_stop_status): Likewise.
7947 (describe_other_breakpoints): Likewise.
7948 (hw_watchpoint_used_count): Likewise.
7949 (expand_line_sal_maybe): Likewise.
7950 (break_command_really): Likewise.
7951 (delete_command): Likewise.
7952 (do_enable_breakpoint): Likewise.
7953 (delete_trace_command): Likewise.
7954 (catch_exception_command_1): Likewise and remove extra parentheses.
7956 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
7958 * breakpoint.c (_initialize_breakpoint): Remove "bu" command alias of
7959 "ubreak" command that does not exist.
7961 2009-06-08 Pierre Muller <muller@ics.u-strasbg.fr>
7963 * cli/cli-decode.c (add_alias_cmd): Correct assertion.
7965 2009-06-07 Pedro Alves <pedro@codesourcery.com>
7967 * hppa-tdep.c (_initialize_hppa_tdep): Add declaration.
7969 2009-06-07 Pedro Alves <pedro@codesourcery.com>
7972 * proc-utils.h (procfs_first_available): Don't declare here.
7973 * sol-thread.c: Include procfs.h instead of sys/procfs.h and
7975 * procfs.c: Include procfs.h.
7976 (procfs_target): Make it public. Don't register
7977 procfs_can_use_hw_breakpoint here.
7978 (proc_set_watchpoint): Check for PCWATCH or PIOCSWATCH being
7979 defined instead of TARGET_HAS_HARDWARE_WATCHPOINTS.
7980 (procfs_can_use_hw_breakpoint): Remove check of
7981 TARGET_HAS_HARDWARE_WATCHPOINTS.
7982 (procfs_use_watchpoints): Register procfs_can_use_hw_breakpoint
7984 (_initialize_procfs): Don't add the procfs target here.
7986 * i386-sol2-nat.c: Include target.h and procfs.h.
7987 (_initialize_amd64_sol2_nat): Install the procfs target here,
7988 customized with watchpoints support.
7989 * irix5-nat.c: Include target.h.
7990 (_initialize_core_irix5): Rename to ...
7991 (_initialize_irix5_nat): ... this. Install the procfs target
7992 here, customized with watchpoints support.
7993 * alpha-nat.c: Include procfs.h.
7994 (_initialize_core_alpha): Rename to...
7995 (_initialize_alpha_nat): ... this. Install the procfs target
7996 here, customized with watchpoints support.
7997 * sparc-sol2-nat.c: Include target.h and procfs.h.
7998 (_initialize_sparc_sol2_nat): New.
8000 * config/i386/nm-i386sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
8001 * config/sparc/nm-sol2.h (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete.
8002 * config/mips/irix5.mh (NAT_FILE): Delete.
8003 * config/mips/irix6.mh (NAT_FILE): Delete.
8004 * config/mips/nm-irix5.h: Delete.
8006 20009-06-07 Pedro Alves <pedro@codesourcery.com>
8008 * auxv.c (procfs_xfer_auxv): Change type of the `object' argument
8009 to enum target_object. Cleanup comments.
8010 * auxv.h: Include "target.h". Cleanup comments to not mention
8011 NATIVE_XFER_AUXV anymore.
8013 2009-06-07 Pedro Alves <pedro@codesourcery.com>
8015 * inferior.h (procfs_first_available): Move declaration to...
8016 * proc-utils.h: ... here.
8017 * sol-thread.c: Include procfs.h and proc-utils.h.
8019 2009-06-07 Pedro Alves <pedro@codesourcery.com>
8021 * inferior.h (proc_iterate_over_mappings): Delete declaration.
8022 * nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
8023 * procfs.c (proc_iterate_over_mappings): Delete.
8025 2009-06-07 Pedro Alves <pedro@codesourcery.com>
8027 * target.h (struct target_ops): Make to_has_all_memory,
8028 to_has_memory, to_has_stack, to_has_registers and to_has_execution
8029 methods instead of variables.
8030 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1)
8031 (target_has_registers_1, target_has_execution_1): Declare
8033 (target_has_all_memory): Rewrite to call target_has_all_memory_1.
8034 (target_has_memory): Rewrite to call target_has_memory_1.
8035 (target_has_stack): Rewrite to call target_has_all_stack_1.
8036 (target_has_registers): Rewrite to call target_has_registers_1.
8037 (target_has_execution): Rewrite to call target_has_execution_1.
8038 (default_child_has_all_memory, default_child_has_memory)
8039 (default_child_has_stack, default_child_has_registers)
8040 (default_child_has_execution): Declare.
8041 (target_mark_running, target_mark_exited): Delete declarations.
8042 * target.c (default_child_has_all_memory,
8043 default_child_has_memory, default_child_has_stack,
8044 default_child_has_registers, default_child_has_execution): New.
8045 (target_has_all_memory_1, target_has_memory_1, target_has_stack_1,
8046 target_has_registers_1, target_has_execution_1): New.
8047 (add_target): Default the to_has_all_memory, to_has_all_memory,
8048 to_has_memory, to_has_stack, to_has_registers and to_has_execution
8049 callbacks to return 0.
8050 (update_current_target): Do not inherit to_has_all_memory,
8051 to_has_memory, to_has_stack, to_has_registers or to_has_execution.
8052 (target_mark_running, target_mark_exited): Delete.
8053 (memory_xfer_partial): Adjust.
8054 (target_read_memory, target_write_memory, target_search_memory):
8055 Dispatch to the the top-most target, not the flattened
8057 (target_info): Adjust.
8058 (init_dummy_target): Install return_zero as callback for
8059 to_has_all_memory, to_has_memory, to_has_stack, to_has_registers,
8061 (set_maintenance_target_async_permitted): Use have_live_inferiors
8062 instead of target_has_execution.
8063 * target-memory.c (target_write_memory_blocks): Dispatch memory
8064 writes to the the top-most target, not the flattened
8067 * breakpoint.c (insert_breakpoints): Don't check for
8068 target_has_execution here.
8069 (update_global_location_list): Check if there are live inferiors
8070 to debug instead of target_has_execution.
8071 * infcmd.c (kill_command, detach_command): Check if there are
8072 inferiors instead of target_has_execution.
8073 * inferior.h (have_live_inferiors): Declare.
8074 * inferior.c (have_live_inferiors): New.
8075 * infrun.c (normal_stop): Don't check for target_has_execution to
8076 finish the thread states.
8077 * thread.c (is_thread_state, is_stopped, is_exited, is_running)
8078 (any_running, is_executing): Remove checks for
8079 target_has_execution.
8080 * top.c (kill_or_detach): Don't try to kill core inferiors.
8081 (quit_target): Don't check for target_has_execution.
8083 * corelow.c (core_has_memory, core_has_stack, core_has_registers):
8085 (init_core_ops): Install core_has_memory, core_has_stack and
8087 * exec.c (exec_has_memory): New.
8088 (init_exec_ops): Install exec_has_memory.
8089 * remote.c (remote_add_inferior): Don't call target_mark_running.
8090 (remote_start_remote): Don't call target_mark_exited or call
8091 target_mark_running.
8092 (remote_open_1): Use have_inferiors instead of
8093 target_has_execution. Don't use target_mark_exited.
8094 (init_remote_ops): Install deafult_child_has_all_memory,
8095 default_child_has_memory, default_child_has_stack,
8096 default_child_has_registers, default_child_has_execution.
8097 * bsd-kvm.c (bsd_kvm_return_one): New.
8098 (bsd_kvm_add_target): Register bsd_kvm_return_one as
8099 to_has_memory, to_has_stack and to_has_registers callbacks.
8100 * remote-m32r-sdi.c (m32r_return_one): New.
8101 (init_m32r_ops): Register it.
8102 * inf-child.c (inf_child_target): Adjust to register
8103 default_child_has_all_memory, default_child_has_memory,
8104 default_child_has_stack, default_child_has_registers,
8105 default_child_has_execution callbacks.
8106 * gnu-nat.c (init_gnu_ops): Likewise.
8107 * go32-nat.c (init_go32_ops): Likewise.
8108 * hpux-thread.c (init_hpux_thread_ops): Likewise.
8109 * monitor.c (init_base_monitor_ops): Likewise.
8110 * nto-procfs.c (init_procfs_ops): Likewise.
8111 * remote-mips.c (_initialize_remote_mips): Likewise.
8112 * windows-nat.c (init_windows_ops): Likewise.
8113 * remote-sim.c (gdbsim_create_inferior): Don't use
8114 target_mark_running or target_mark_exited.
8115 (gdbsim_mourn_inferior): Don't call target_mark_exited.
8116 (init_gdbsim_ops): Adjust to register
8117 default_child_has_all_memory, default_child_has_memory,
8118 default_child_has_stack, default_child_has_registers,
8119 default_child_has_execution callbacks.
8121 * linux-nat.c (linux_nat_xfer_partial): If reading memory, and
8122 there's no inferior selected, defer to a lower stratum.
8124 2009-06-05 Tom Tromey <tromey@redhat.com>
8126 * varobj.c (update_dynamic_varobj_children): Wrap error text in
8128 (install_visualizer): Likewise.
8129 (varobj_set_visualizer): Likewise.
8131 2009-06-05 Marc Khouzam <marc.khouzam@ericsson.com>
8133 * mi/mi-main.c (mi_cmd_exec_continue)
8134 (mi_cmd_exec_interrupt): Adjust parsing of thread group
8135 ids to current reality, where they don't have any 'p' prefix.
8137 2009-06-05 Aleksandar Ristovski <aristovski@qnx.com>
8139 * corelow.c (core_open): Check for core_gdbarch before calling
8140 gdbarch_target_signal_from_host.
8142 2009-06-05 Tom Tromey <tromey@redhat.com>
8144 * c-exp.y (parse_number): Don't use K&R definition.
8146 (yyerror): Likewise.
8148 2009-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
8150 * varobj.c (varobj_update): Fix out of scope varobjs to not to change.
8152 2009-06-04 Ulrich Weigand <uweigand@de.ibm.com>
8154 * symtab.h: Rename SYMBOL_OPS to SYMBOL_COMPUTED_OPS.
8155 * ax-gdb.c (gen_var_ref): Likewise.
8156 * findvar.c (read_var_value, symbol_read_needs_frame): Likewise.
8157 * printcmd.c (address_info): Likewise.
8158 * dwarf2loc.c (dwarf_expr_frame_base): Likewise.
8159 * dwarf2read.c (dwarf2_symbol_mark_computed): Likewise.
8160 * symtab.h: Rename struct symbol_ops to struct symbol_computed_ops.
8161 * dwarf2loc.h: Likewise.
8162 * dwarf2loc.c (dwarf2_locexpr_funcs, dwarf2_loclist_funcs): Likewise.
8164 * symtab.h: (struct symbol_register_ops): New struct definition.
8165 (struct symbol): Make "ops" member a union of symbol_computed_ops and
8166 symbol_register_ops callback pointers.
8167 (SYMBOL_REGISTER_OPS): New macro.
8168 * tracepoint.c: Include "objfiles.h".
8169 (scope_info, collect_symbol): Use SYMBOL_REGISTER_OPS register_number
8170 callback to retrieve register numbers.
8171 * ax-gdb.c (gen_var_ref): Likewise.
8172 * findvar.c (read_var_value): Likewise.
8173 * printcmd.c (address_info): Likewise.
8175 * coffread.c (coff_reg_to_regnum): New function.
8176 (coff_register_funcs): New static variable.
8177 (process_coff_symbol): Do not call gdbarch_sdb_reg_to_regnum.
8178 Install SYMBOL_REGISTER_OPS callbacks.
8179 * mdebugread.c (mdebug_reg_to_regnum): New function.
8180 (mdebug_register_funcs): New static variable.
8181 (parse_symbol): Do not call gdbarch_ecoff_reg_to_regnum.
8182 Install SYMBOL_REGISTER_OPS callbacks.
8183 * stabsread.c (stab_reg_to_regnum): New function.
8184 (stab_register_funcs): New static variable.
8185 (define_symbol): Do not call gdbarch_stab_reg_to_regnum.
8186 Install SYMBOL_REGISTER_OPS callbacks.
8188 2009-06-03 Doug Evans <dje@google.com>
8190 * symfile.c (reread_symbols): Reset psymtabs_addrmap to NULL
8191 after discarding its contents.
8193 2009-06-03 Pedro Alves <pedro@codesourcery.com>
8195 * target.c: Include "exec.h".
8196 (update_current_target): Don't inherit to_sections or
8198 (target_get_section_table): New.
8199 (target_section_by_addr): Fetch the section table from the passed
8201 (memory_xfer_partial): Handle unmapped overlay sections before
8202 anything else. Get the overlay mapped address here. Adjust to
8203 use section_table_xfer_memory_partial.
8204 (get_target_memory): Request a TARGET_OBJECT_RAW_MEMORY object
8205 instead of TARGET_OBJECT_MEMORY.
8206 (target_resize_to_sections): Delete.
8207 (remove_target_sections): Adjust to remove target sections from
8208 `current_target_sections', and use resize_section_table.
8209 * target.h (struct target_ops) <to_sections, to_sections_end>:
8211 <to_get_section_table>: New method.
8212 (xfer_memory, print_section_info): Delete declarations.
8213 (struct target_section_table): New type.
8214 (target_get_section_table): Declare.
8215 (target_resize_to_sections): Delete declaration.
8216 (remove_target_sections): Delete declaration.
8217 * bfd-target.c (target_bfd_xfer_partial): Get the section table
8219 (target_bfd_get_section_table): New.
8220 (target_bfd_xclose): Adjust.
8221 (target_bfd_reopen): Store the section table in the to_data field.
8222 * corelow.c (core_data): New.
8223 (core_close): Adjust to release core_data and its sections.
8224 (core_open): Allocate core_data, and build its target sections
8226 (deprecated_core_resize_section_table): New.
8227 (core_files_info): Pass core_data to print_section_info.
8228 (core_xfer_partial): Adjust to use
8229 section_table_xfer_memory_partial for TARGET_OBJECT_MEMORY xfers.
8230 (init_core_ops): Do not install a deprecated_xfer_memory callback
8232 * solib.c (update_solib_list): Add the shared library sections
8233 to the current target sections table.
8234 * exec.c (current_target_sections_1): New global.
8235 (current_target_sections): New global.
8236 (exec_close_1): New function, refactored from exec_close. Remove
8237 the exec_bfd's sections from the current target sections table.
8238 Adjust to not use to_sections.
8239 (exec_close): Remove all target sections. Call exec_close_1.
8240 (exec_file_clear): Use exec_close_1 instead of unpushing the
8242 (exec_file_attach): Likewise. Adjust to not use to_sections. Add
8243 exec_bfd's sections to the current target sections table. Don't
8244 push the exec_ops target here.
8245 (resize_section_table): New.
8246 (add_target_sections): New.
8247 (remove_target_sections): Moved here.
8248 (section_table_xfer_memory): Adjust to implement the xfer_partial
8249 interface, and rename to...
8250 (section_table_xfer_memory_partial): ... this, replacing the
8251 current function of that same name.
8252 (exec_get_section_table): New.
8253 (exec_xfer_partial): New.
8254 (xfer_memory): Delete.
8255 (print_section_info): Replace the target_ops parameter by a
8256 target_section_table parameter.
8257 (exec_files_info, set_section_command, exec_set_section_address):
8258 Adjust to use the current sections table.
8259 (init_exec_ops): Do not register a deprecated_xfer_memory
8260 callback. Register to_xfer_partial and to_get_section_table
8262 * infrun.c (handle_inferior_event): Update comments around
8264 * rs6000-nat.c (xcoff_relocate_core): Adjust to use
8265 deprecated_core_resize_section_table.
8266 * exec.h (resize_section_table): Declare.
8267 (section_table_xfer_memory_partial): Add const char * argument.
8268 (remove_target_sections): Declare here.
8269 (add_target_sections): Declare.
8270 (print_section_info): Declare here.
8271 * gdbcore.h (deprecated_core_resize_section_table): Declare.
8273 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
8275 * value.h (struct internalvar): Remove.
8276 (get_internalvar_integer): Add prototype.
8277 (set_internalvar_integer): Add prototype.
8278 (clear_internalvar): Add prototype.
8280 * value.c (struct internalvar): Move here. Add type member. Remove
8281 endian member. Add union_internalvar member instead of value member.
8282 (init_if_undefined_command): Use intvar->type.
8283 (create_internalvar): Do not initialize value/endian, but type.
8284 (create_internalvar_type_lazy): Call create_internalvar.
8285 (value_of_internalvar): Handle host-side internalvar contents.
8286 (set_internalvar_component): Likewise.
8287 (set_internalvar): Likewise.
8288 (get_internalvar_integer): New function.
8289 (clear_internalvar): Likewise.
8290 (set_internalvar_integer): Likewise.
8291 (preserve_values): Handle host-side internalvar contents.
8293 * breakpoint.c (set_breakpoint_count, set_tracepoint_count): Call
8294 set_internalvar_integer instead of set_internalvar.
8295 * findcmd.c (find_command): Likewise.
8296 * infrun.c (handle_inferior_event): Likewise.
8297 * source.c (forward_search_command, reverse_search_command): Likewise.
8298 * tracepoint.c (set_traceframe_num, set_tracepoint_num,
8299 set_traceframe_context): Likewise.
8301 * printcmd.c (x_command): Call clear_internalvar instead of
8303 * tracepoint.c (set_traceframe_context): Likewise.
8305 * breakpoint.c (get_number_trailer): Call get_internalvar_integer
8306 instead of value_of_internalvar.
8307 * linespec.c (decode_dollar): Likewise.
8309 * expprint.c (dump_subexp_body_standard): Use internalvar_name
8310 instead of accessing internalvar private elements.
8311 * valops.c (value_assign): Copy from original source instead of
8312 accessing internalvar private elements.
8314 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
8316 * scm-lang.c (builtin_type_scm): Remove.
8317 (scm_lookup_name): Add GDBARCH parameter. Use it instead of
8318 objfile architecture. Use per-architecture builtin_scm_type instead
8319 of builtin_type_scm.
8320 (evaluate_exp): Pass expression architecture to scm_lookup_name.
8322 (scm_get_field): Add SIZE parameter. Use it instead of
8323 TYPE_LENGTH (builtin_type_scm).
8325 (build_scm_types): New function.
8326 (scm_type_data): New variable.
8327 (builtin_scm_type): New function.
8328 (_initialize_scheme_language): Do not initialize builtin_type_scm.
8329 Register build_scm_types as post-init function for scm_type_data.
8331 * scm-exp.c (scm_lreadr): Use per-architecture builtin_scm_type
8332 instead of builtin_type_scm.
8334 * scm-lang.h (SCM_CAR, SCM_CDR): Pass SCM_SIZE to scm_get_field.
8335 (scm_get_field): Add SIZE paramter.
8336 (scm_scmval_print): Remove prototype.
8337 (builtin_type_scm): Remove.
8338 (struct builtin_scm_type): Add structure definition.
8339 (builtin_scm_type): Add prototype.
8341 * scm-valprint.c (scm_inferior_print): Add TYPE parameter. Use it
8342 instead of builtin_core_addr type; do not use objfile architecture.
8343 (scm_scmlist_print): Add TYPE parameter. Use it to define SCM_SIZE.
8344 Pass type to scm_scmval_print.
8345 (scm_ipruk): Add TYPE parameter. Use it to define SCM_SIZE.
8346 (scm_scmval_print): Make static. Add TYPE parameter. Use it to
8347 define SCM_SIZE. Pass type to scm_ipruk and scm_scmlist_print.
8348 (scm_val_print): Pass type to scm_inferior_print and scm_scmval_print.
8350 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
8352 * mdebugread.c (mdebug_type_void, mdebug_type_char, mdebug_type_short,
8353 mdebug_type_int, mdebug_type_int_32, mdebug_type_int_64,
8354 mdebug_type_long_32, mdebug_type_long_64, mdebug_type_long_long_64,
8355 mdebug_type_unsigned_char, mdebug_type_unsigned_short,
8356 mdebug_type_unsigned_int_32, mdebug_type_unsigned_int_64,
8357 mdebug_type_unsigned_long_32, mdebug_type_unsigned_long_64,
8358 mdebug_type_unsigned_long_long_64, mdebug_type_adr_32,
8359 mdebug_type_adr_64, mdebug_type_float, mdebug_type_double,
8360 mdebug_type_complex, mdebug_type_double_complex,
8361 mdebug_type_fixed_dec, mdebug_type_float_dec, mdebug_type_string):
8364 (basic_type_data): New global variable.
8365 (basic_type): New function.
8366 (parse_type): Remove static basic type map map_bt. Call basic_type
8367 to get basic types instead of using mdebug_type_ variables.
8369 (parse_symbol): Use builtin types instead of mdebug_type_ variables.
8370 (upgrade_type): Likewise.
8371 (parse_procedure): Likewise.
8372 (psymtab_to_symtab_1): Likewise.
8374 (_initialize_mdebugread): Do not initialize mdebug_type_ variables.
8375 Initialize basic_type_data.
8377 2009-06-03 Ulrich Weigand <uweigand@de.ibm.com>
8379 * dfp.h (decimal_binop): Convert LEN_RESULT to input parameter.
8380 * dfp.c (promote_decimal): Remove.
8381 (decimal_binop): Convert LEN_RESULT to input parameter.
8382 Remove call to decimal_binop.
8383 (decimal_compare): Remove call to decimal_binop.
8385 * valarith.c (value_binop): Pass desired result type length
8388 2009-06-01 Tristan Gingold <gingold@adacore.com>
8390 * configure.tgt (avr): Set gdb_sim to use the simulator.
8392 2009-05-29 Doug Evans <dje@google.com>
8394 * infrun.c (prepare_to_proceed): Document. Assert !non_stop.
8395 If scheduler-locking is enabled, we're not going to be singlestepping
8396 any other previously stopped thread.
8398 2009-05-29 Pedro Alves <pedro@codesourcery.com>
8400 * mi/mi-interp.c (mi_on_resume): Initialize `count' to 0.
8402 2009-05-29 Eli Zaretskii <eliz@gnu.org>
8404 * i386-tdep.c (i386_go32_init_abi): Use SVR4 register numbering
8405 for stabs and COFF debug info.
8407 2009-05-28 Pedro Alves <pedro@codesourcery.com>
8409 * infrun.c (handle_inferior_event): When thread hoping, switch
8410 inferior_ptid to the event thread before removing breakpoints from
8411 the target. If not stopping, also try to revert back to a thread
8412 that was doing a "next". Check if that thread still exists before
8414 (currently_stepping_thread): Delete and merge with ...
8415 (currently_stepping): ... this.
8416 (currently_stepping_callback): Rename to ...
8417 (currently_stepping_or_nexting_callback): ... this, and also
8418 return true if the thread was stepping over a call (has a
8419 step-resume breakpoint).
8421 2009-05-28 Tom Tromey <tromey@redhat.com>
8423 * python/python.c (gdbpy_parameter): Rename. Fix error message.
8424 (GdbMethods): Change "get_parameter" to "parameter".
8426 2009-05-28 Pierre Muller <muller@ics.u-strasbg.fr>
8427 Paul Pluzhnikov <ppluzhnikov@google.com>
8429 * configure.ac (!have_libpython): Add python-prettyprint source
8431 * configure: Regenerate.
8432 * python/python-prettyprint.c: Move "#ifdef HAVE_PYTHON" before
8435 2009-05-27 Vladimir Prus <vladimir@codesourcery.com>
8436 Tom Tromey <tromey@redhat.com>
8437 Thiago Jung Bauermann <bauerman@br.ibm.com>
8439 * mi/mi-main.c (mi_cmd_list_features): List "python" feature.
8440 * varobj.h (varobj_set_visualizer): Declare.
8441 (varobj_get_display_hint): Likewise.
8442 (varobj_update_result_t) <children_changed, value_installed>: New
8444 * mi/mi-cmds.c (mi_cmds): Add var-set-visualizer.
8445 * mi/mi-cmds.h (mi_cmd_var_set_visualizer,
8446 mi_cmd_var_set_child_range): Declare.
8447 * mi/mi-cmd-var.c (mi_cmd_var_set_visualizer): New function.
8448 (mi_cmd_var_list_children): Emit display hint.
8449 (varobj_update_one): Emit display hint. Handle dynamic children.
8450 * python/python.c (GdbMethods): Add "default_visualizer".
8451 * python/python-internal.h (apply_varobj_pretty_printer,
8452 gdbpy_get_varobj_pretty_printer, gdbpy_get_display_hint):
8454 (gdbpy_default_visualizer): Likewise.
8455 * varobj.c: Include python.h, python-internal.h.
8456 (PyObject): New typedef.
8457 (struct varobj) <children_requested, pretty_printer>: New fields.
8458 (varobj_create): Call install_default_visualizer.
8459 (instantiate_pretty_printer): New function.
8460 (varobj_set_display_format): Update.
8461 (varobj_get_display_hint): New function.
8462 (update_dynamic_varobj_children): New function.
8463 (varobj_get_num_children): Handle dynamic children.
8464 (varobj_list_children): Likewise.
8465 (install_new_value): Likewise.
8466 (varobj_add_child): New function.
8467 (install_visualizer): Likewise.
8468 (install_default_visualizer): Likewise.
8469 (varobj_set_visualizer): Likewise.
8470 (varobj_update): Handle dynamic children.
8471 (create_child): Use create_child_with_value.
8472 (create_child_with_value): New function.
8473 (value_get_print_value): Call pretty printer. Add value_formatter
8475 (c_value_of_variable): Update.
8476 (varobj_invalidate): Always free all_rootvarobj.
8477 * python/python-prettyprint.c (apply_varobj_pretty_printer): New
8479 (gdbpy_get_varobj_pretty_printer): Likewise.
8480 (gdbpy_default_visualizer): Likewise.
8482 2009-05-27 Tom Tromey <tromey@redhat.com>
8483 Thiago Jung Bauermann <bauerman@br.ibm.com>
8484 Phil Muldoon <pmuldoon@redhat.com>
8485 Paul Pluzhnikov <ppluzhnikov@google.com>
8486 Vladimir Prus <vladimir@codesourcery.com>
8488 * python/python-value.c (value_object_to_value): New function.
8489 * python/python-internal.h: Include frameobject.h.
8490 (gdbpy_children_cst, gdbpy_to_string_cst, gdbpy_display_hint_cst):
8492 (value_object_to_value): Declare.
8493 * printcmd.c (struct format_data) <raw>: New field.
8494 (last_format): Default to 0.
8495 (decode_format): Initialize val.raw. Handle /r flag.
8496 (print_command_1): Initialize fmt.raw and opts.raw.
8497 (output_command): Likewise.
8498 (x_command): Fix initialization of fmt.format. Initialize
8500 (display_command): Initialize fmt.raw.
8501 (do_one_display): Set opts.raw.
8502 * python/python.c (gdbpy_to_string_cst, gdbpy_children_cst,
8503 gdbpy_display_hint_cst): New globals.
8504 (_initialize_python): Initialize them. Set gdb.pretty_printers.
8505 * cp-valprint.c: Include python.h.
8506 (cp_print_value): Call apply_val_pretty_printer.
8507 * python/python.h (apply_val_pretty_printer): Declare.
8508 * stack.c (print_this_frame_argument_p): Remove.
8509 (print_frame_args): Compute summary flag. Don't use
8510 print_this_frame_argument_p.
8511 * valprint.c: Include python.h.
8512 (user_print_options): Initialize new fields.
8513 (scalar_type_p): New function.
8514 (val_print): Handle 'raw' and 'summary' modes. Call
8515 apply_val_pretty_printer.
8516 (value_print): Handle 'raw' mode.
8517 * valprint.h (struct value_print_options) <raw, summary>: New
8519 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-prettyprint.o
8520 (SUBDIR_PYTHON_SRCS): Add python-prettyprint.c.
8521 (python-prettyprint.o): New target.
8522 * python/python-prettyprint.c: New file.
8524 2009-05-27 Tom Tromey <tromey@redhat.com>
8525 Paul Pluzhnikov <ppluzhnikov@google.com>
8527 * mi/mi-main.c (mi_cmd_data_evaluate_expression): Use
8529 * cli/cli-dump.c (dump_value_to_file): Use value_address.
8530 * valprint.c (common_val_print): Likewise.
8531 * v850-tdep.c (v850_push_dummy_call): Use value_address.
8532 * tracepoint.c (encode_actions): Use value_address.
8533 * printcmd.c (print_formatted): Use value_address.
8534 (x_command): Likewise.
8535 * p-valprint.c (pascal_object_print_static_field): Use
8537 * mn10300-tdep.c (mn10300_push_dummy_call): Use value_address.
8538 * mips-tdep.c (mips_eabi_push_dummy_call): Use value_address.
8539 * m32r-tdep.c (m32r_push_dummy_call): Use value_address.
8540 * jv-valprint.c (java_value_print): Use value_address.
8541 * infcall.c (find_function_addr): Use value_address.
8542 * gnu-v3-abi.c (gnuv3_rtti_type): Use value_address.
8543 * gnu-v2-abi.c (gnuv2_value_rtti_type): Use value_address.
8544 * frv-tdep.c (frv_push_dummy_call): Use value_address.
8545 * frame.c (frame_register_unwind): Use value_address.
8546 (frame_unwind_register_value): Likewise.
8547 * darwin-nat-info.c (info_mach_region_command): Use
8549 * cp-valprint.c (cp_print_static_field): Use value_address.
8550 * c-valprint.c (c_value_print): Use value_address.
8551 * breakpoint.c (update_watchpoint): Use value_address.
8552 (can_use_hardware_watchpoint): Likewise.
8553 * ada-valprint.c (ada_val_print_1): Use value_address.
8554 (ada_value_print): Likewise.
8555 * ada-tasks.c (read_fat_string_value): Use value_address.
8556 * jv-lang.c (java_link_class_type): Use set_value_address.
8557 (java_link_class_type): Likewise.
8558 (get_java_utf8_name): Use value_address.
8559 (type_from_class): Likewise.
8560 (java_link_class_type): Likewise.
8561 * findvar.c (value_of_register): Use set_value_address.
8562 (read_var_value): Likewise.
8563 (read_var_value): Likewise.
8564 * eval.c (evaluate_subexp_standard): Use set_value_address.
8565 (evaluate_subexp_standard): Use value_address.
8566 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Use set_value_address.
8567 * ada-lang.c (coerce_unspec_val_to_type): Use set_value_address.
8568 (ada_value_primitive_packed_val): Likewise.
8569 (ensure_lval): Likewise.
8570 (thin_data_pntr): Use value_address.
8571 (desc_bounds): Likewise.
8572 (ada_value_primitive_packed_val): Likewise.
8573 (value_assign_to_component): Likewise.
8574 (ensure_lval): Likewise.
8575 (make_array_descriptor): Likewise.
8576 (ada_to_fixed_value): Likewise.
8577 (unwrap_value): Likewise.
8578 * value.c (deprecated_value_address_hack): Remove.
8579 (value_address): New function.
8580 (value_raw_address): Likewise.
8581 (set_value_address): Likewise.
8582 (value_fn_field): Use set_value_address.
8583 (value_from_contents_and_address): Likewise.
8584 (value_fn_field): Likewise.
8585 (allocate_value_lazy): Don't use VALUE_ADDRESS.
8586 (value_as_address): Use value_address.
8587 (value_static_field): Likewise.
8588 * valops.c (search_struct_field): Use set_value_address.
8589 (value_at): Likewise.
8590 (value_at_lazy): Likewise.
8591 (value_repeat): Likewise.
8592 (value_cast_structs): Use value_address.
8593 (value_cast): Likewise.
8594 (value_fetch_lazy): Likewise.
8595 (value_assign): Likewise.
8596 (value_repeat): Likewise.
8597 (address_of_variable): Likewise.
8598 (value_coerce_array): Likewise.
8599 (value_coerce_function): Likewise.
8600 (value_addr): Likewise.
8601 (search_struct_field): Likewise.
8602 (search_struct_method): Likewise.
8603 (find_method_list): Likewise.
8604 (value_struct_elt_for_reference): Likewise.
8605 (value_full_object): Likewise.
8606 * jv-valprint.c (java_value_print): Use set_value_address.
8607 * value.h (deprecated_value_address_hack): Remove.
8608 (VALUE_ADDRESS): Remove.
8609 (value_address): Declare.
8610 (value_raw_address): Declare.
8611 (set_value_address): Declare.
8613 2009-05-27 Tom Tromey <tromey@redhat.com>
8614 Thiago Jung Bauermann <bauerman@br.ibm.com>
8615 Phil Muldoon <pmuldoon@redhat.com>
8616 Paul Pluzhnikov <ppluzhnikov@google.com>
8618 * python/python.c (_initialize_python): Call
8619 gdbpy_initialize_types.
8620 (GdbMethods): Add "lookup_type".
8621 * python/python-value.c (value_object) <type>: New field.
8622 (valpy_dealloc): Decref type.
8623 (valpy_new): Initialize type.
8624 (valpy_get_type): New function.
8625 (value_to_value_object): Initialize type.
8626 (valpy_cast): New function.
8627 (value_object_getset): Add "type".
8628 (value_object_methods): Add "cast".
8629 * python/python-internal.h (type_to_type_object): Declare.
8630 (type_object_to_type): Likewise.
8631 (gdbpy_initialize_types): Likewise.
8632 (gdbpy_lookup_type): Declare.
8633 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o.
8634 (SUBDIR_PYTHON_SRCS): Add python-type.c.
8635 (python-type.o): New target.
8636 * python/python-type.c: New file.
8638 2009-05-27 Tom Tromey <tromey@redhat.com>
8639 Thiago Jung Bauermann <bauerman@br.ibm.com>
8640 Phil Muldoon <pmuldoon@redhat.com>
8642 * python/python.c: Include objfiles.h, observer.h.
8643 (gdbpy_auto_load): New global.
8644 (gdbpy_current_objfile): Likewise.
8645 (GDBPY_AUTO_FILENAME): New define.
8646 (gdbpy_new_objfile): New function.
8647 (gdbpy_get_current_objfile): Likewise.
8648 (gdbpy_objfiles): Likewise.
8649 (_initialize_python): Add "maint set auto-load". Call
8650 gdbpy_initialize_objfile. Attach objfile observer.
8651 (GdbMethods): New methods current_objfile, objfiles.
8652 * python/python-objfile.c: New file.
8653 * python/python-internal.h (objfile_to_objfile_object): Declare.
8654 (objfpy_get_printers): Likewise.
8655 (gdbpy_initialize_objfile): Likewise.
8656 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o.
8657 (SUBDIR_PYTHON_SRCS): Add python-objfile.c.
8658 (python-objfile.o): New target.
8660 2009-05-27 Pedro Alves <pedro@codesourcery.com>
8662 * infrun.c (follow_exec): Clear the stop_requested flag.
8663 * linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
8666 2009-05-27 Aleksandar Ristovski <aristovski@qnx.com>
8668 * nto-procfs.c (get_regset): Pass correct pointer.
8670 2009-05-26 Doug Evans <dje@google.com>
8672 * dwarf2read.c (follow_die_ref): Add comment.
8673 (dwarf2_mark_helper): Tweak comment.
8674 (dwarf2_mark): Move description to its proper place.
8676 2009-05-25 Pierre Muller <muller@ics.u-strasbg.fr>
8678 * procfs.c (procfs_wait): Add options parameter.
8680 2009-05-24 Doug Evans <dje@google.com>
8682 Global renaming of find_thread_pid to find_thread_ptid.
8683 * gdbthread.h (find_thread_ptid): Renamed from find_thread_pid.
8684 * thread.c (find_thread_ptid): Renamed from find_thread_pid.
8685 All callers updated.
8687 * infrun.c (follow_fork): Initialize new step_* locals
8688 to avoid "may be used uninitialized" warnings.
8690 2009-05-24 Pedro Alves <pedro@codesourcery.com>
8692 * inflow.c (copy_terminal_info): Deep copy `run_terminal'.
8694 2009-05-24 Pedro Alves <pedro@codesourcery.com>
8696 * gdbthread.h (struct thread_info): New `pending_follow' field.
8697 * thread.c (new_thread): New function.
8698 (add_thread_silent): Use it.
8699 * breakpoint.c (internal_breakpoint_number): New global, moved
8701 (create_internal_breakpoint): ... this.
8702 (clone_momentary_breakpoint): New.
8703 * breakpoint.h (clone_momentary_breakpoint): Declare.
8704 * infrun.c (nullify_last_target_wait_ptid): Move declaration
8706 (pending_follow): Delete.
8707 (follow_fork): Handle pending follow fork event here. Moved the
8708 preserving of thread stepping state here.
8709 (resume): Don't handle pending follow fork events here. Only
8710 install the inferior's terminal modes if we're about to resume it.
8711 (proceed): Handle possible pending follow fork events here.
8712 (init_wait_for_inferior): No need to clear pending_follow anymore,
8714 (handle_inferior_event): Adjust to per-thread `pending_follow'.
8715 Call `follow_fork' to handle following the fork. If the
8716 follow-fork is cancelled, stop stepping.
8717 * linux-nat.c (linux_child_follow_fork): Adjust to per-thread
8718 `pending_follow' events. Remove code that handled preserving the
8719 thread stepping state.
8720 * inf-ptrace.c (inf_ptrace_follow_fork): Ditto.
8721 * inf-ttrace.c (inf_ttrace_follow_fork): Ditto.
8723 2009-05-24 Pierre Muller <muller@ics.u-strasbg.fr>
8725 * symfile.c (add_shared_symbol_files_command): Remove
8726 prototype and function.
8727 (_initialize _symfile): Move "add-shared-symbol-files"
8728 command and "assf" alias.
8729 * windows-nat.c (_initialize_windows_nat): to here.
8730 Change "add-shared-symbol-files" to alias.
8732 * config/i386/cygwin.mh: Remove NAT_FILE.
8733 * config/i386/mingw.mh: Remove NAT_FILE.
8734 * config/i386/mingw64.mh: Remove NAT_FILE.
8735 * config/i386/nm-cygwin.h: Remove file.
8736 * config/i386/nm-cygwin64.h: Remove file.
8738 2009-05-24 Hui Zhu <teawater@gmail.com>
8740 * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
8741 I386_LINUX_RECORD_IOCTL_*,
8742 I386_LINUX_RECORD_FCNTL_*) Removed.
8743 (i386_linux_init_abi): Change size of record from macros to
8746 2009-05-24 Hui Zhu <teawater@gmail.com>
8748 * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
8749 * linux-record.c (record_linux_system_call): Ditto.
8750 * linux-record.h (linux_record_tdep): Ditto.
8752 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8754 Replace the savestring calls by xstrdup calls where possible.
8755 * breakpoint.c (condition_command, set_raw_breakpoint)
8756 (create_catchpoint, update_breakpoint_locations): Replace the
8757 savestring calls by xstrdup calls where possible.
8758 * buildsym.c (start_subfile, patch_subfile_names, record_debugformat)
8759 (record_producer): Likewise.
8760 * coffread.c (coff_start_symtab, complete_symtab): Likewise.
8761 * corefile.c (set_gnutarget): Likewise.
8762 * dbxread.c (add_new_header_file): Likewise.
8763 * demangle.c (set_demangling_command, set_demangling_style): Likewise.
8764 * event-top.c (push_prompt, pop_prompt, command_line_handler)
8765 (set_async_prompt): Likewise.
8766 * infcmd.c (set_inferior_io_terminal, attach_command_post_wait):
8768 * language.c (set_language_command, _initialize_language): Likewise.
8769 * linespec.c (decode_line_2): Likewise.
8770 * rs6000-nat.c (add_vmap): Likewise.
8771 * top.c (set_prompt, init_history, init_main): Likewise.
8772 * tracepoint.c (stringify_collection_list): Likewise.
8773 * varobj.c (varobj_create): Remove variable expr_len. Replace the
8774 savestring calls by xstrdup calls where possible.
8775 (value_of_root, c_name_of_variable, c_describe_child): Replace the
8776 savestring calls by xstrdup calls where possible.
8777 * xcoffread.c (complete_symtab): Likewise.
8778 * cli/cli-script.c (build_command_line, define_command): Likewise.
8779 * cli/cli-setshow.c (do_setshow_command): Likewise.
8781 2009-05-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8783 Remove already unreachable code.
8784 * varobj.c (varobj_get_handle): Fix comment when error is called.
8785 All callers updated.
8787 2009-05-23 Eli Zaretskii <eliz@gnu.org>
8789 * README (`configure' options): Document GDB-specific options to
8792 * symtab.c (skip_prologue_using_lineinfo): New function.
8793 (find_function_start_sal): Use it to get to the first line of
8794 function's body that has an entry in the lineinfo table.
8796 * symmisc.c (dump_symtab): Switch the current language to
8797 the language of the symtab we are dumping only if the symtab's
8798 language is neither language_auto nor language_unknown.
8800 * coffread.c (coff_symtab_read): Set language_minimal as the
8801 language for the "_globals_" pseudo-file.
8802 (process_coff_symbol): Set the symbol's language to the language
8805 2009-05-22 Pedro Alves <pedro@codesourcery.com>
8807 * target.h (struct section_table): Rename to ...
8808 (struct target_section): ... this.
8809 * exec.c: Adjust all references.
8810 * exec.h: Adjust all references.
8811 * nto-tdep.c: Adjust all references.
8812 * nto-tdep.h: Adjust all references.
8813 * ppc-linux-tdep.c: Adjust all references.
8814 * rs6000-nat.c: Adjust all references.
8815 * s390-tdep.c: Adjust all references.
8816 * solib-darwin.c: Adjust all references.
8817 * solib-frv.c: Adjust all references.
8818 * solib-irix.c: Adjust all references.
8819 * solib-null.c: Adjust all references.
8820 * solib-osf.c: Adjust all references.
8821 * solib-pa64.c: Adjust all references.
8822 * solib-som.c: Adjust all references.
8823 * solib-sunos.c: Adjust all references.
8824 * solib-svr4.c: Adjust all references.
8825 * solib-target.c: Adjust all references.
8826 * solib.c: Adjust all references.
8827 * solist.h: Adjust all references.
8828 * symfile.c: Adjust all references.
8829 * symfile.h: Adjust all references.
8830 * target.c: Adjust all references.
8832 2009-05-22 Hui Zhu <teawater@gmail.com>
8834 Add sys_fcntl argument interfaces to linux_record_tdep.
8836 * linux-record.h (linux_record_tdep): Add fcntl_F_GETLK,
8837 fcntl_F_GETLK64, fcntl_F_SETLK64 and fcntl_F_SETLKW64 to be
8839 * i386-linux-tdep.c (I386_LINUX_RECORD_FCNTL_F_GETLK,
8840 I386_LINUX_RECORD_FCNTL_F_GETLK64,
8841 I386_LINUX_RECORD_FCNTL_F_SETLK64,
8842 I386_LINUX_RECORD_FCNTL_F_SETLKW64): New macros. The values
8843 of I386 Linux sys_fcntl arguments.
8844 (i386_linux_init_abi): Set macros values to linux_record_tdep.
8845 * linux-record.c (record_linux_system_call): Change to use
8846 the interface in linux_record_tdep in sys_fcntl and
8849 * linux-record.c (record_linux_system_call): Fix the process
8850 record build error about type in CYGWIN.
8852 2009-05-22 Pedro Alves <pedro@codesourcery.com>
8854 * inflow.c (kill_command): Delete left over static declaration.
8856 2009-05-22 Pedro Alves <pedro@codesourcery.com>
8858 * bfd-target.c: Don't include gdb_assert.h or gdb_string.h.
8860 (struct section_closure): Delete.
8861 (add_to_section_table): Delete.
8862 (build_target_sections_from_bfd): Delete.
8863 (target_bfd_xfer_partial): Use section_table_xfer_memory_partial.
8864 (target_bfd_reopen): Use build_section_table.
8865 * exec.c (xfer_memory): Move most code except for overlay
8866 debugging support from here...
8867 (section_table_xfer_memory): ... to this new function.
8868 (section_table_xfer_memory_partial): New.
8869 * exec.h (section_table_xfer_memory_partial): Declare.
8870 * bfd-target.h (build_target_sections_from_bfd): Delete
8873 2009-05-22 Pedro Alves <pedro@codesourcery.com>
8875 * remote.c (compare_sections_command): Don't declare exec_bfd.
8876 * tracepoint.c: Include "gdbcore.h".
8877 (remote_set_transparent_ranges): Don't declare exec_bfd.
8879 2009-05-21 Pedro Alves <pedro@codesourcery.com>
8881 * aix-thread.c (init_aix_thread_ops): Whitespace.
8883 2009-05-21 Pedro Alves <pedro@codesourcery.com>
8885 * dec-thread.c (dec_thread_wait): Add options parameter. Use it
8886 to call the to_wait method in the target beneath.
8887 * remote-m32r-sdi.c (m32r_wait): Add options parameter.
8889 2009-05-21 Joel Brobecker <brobecker@adacore.com>
8891 * aix-thread.c (aix_thread_wait): Add options parameter. Use it
8892 to call the to_wait method in the target_beneath.
8894 2009-05-21 Pedro Alves <pedro@codesourcery.com>
8896 * linux-nat.c (linux_nat_terminal_inferior)
8897 (linux_nat_terminal_ours): Don't check sync_execution.
8898 * remote.c (remote_terminal_inferior, remote_terminal_ours):
8899 Don't check sync_execution. Update comments.
8900 * target.c (target_terminal_inferior): New.
8901 * target.h (target_terminal_inferior): Delete macro, and declare
8903 * event-top.c (async_disable_stdin): Make idempotent. Don't give
8904 the target the terminal here.
8905 * inflow.c (terminal_ours_1): Don't return early without setting
8908 2009-05-21 Pedro Alves <pedro@codesourcery.com>
8910 * target.h (TARGET_WNOHANG): New.
8911 * target.c (target_wait): Add `options' argument. Adjust.
8912 (struct target_ops) <to_wait>: Add `options' argument.
8913 (target_wait): Add `options' argument.
8914 * infrun.c (wait_for_inferior): Pass 0 as options to
8915 target_wait (blocking wait).
8916 (fetch_inferior_event): Pass TARGET_WNOHANG as options to
8918 * fork-child.c (startup_inferior): Pass 0 as options to
8919 target_wait (blocking wait).
8920 * linux-nat.c (linux_nat_create_inferior): Remove async masking.
8921 (linux_nat_wait_1): Add `target_options' argument. Use it instead
8922 of checking on target_can_async_p.
8923 (linux_nat_wait): Add `target_options' argument. Adjust.
8924 * remote.c (remote_wait_ns): Add `options' argument. Adjust to
8925 check on TARGET_WNOWAIT instead of checking on remote_is_async_p.
8926 (remote_wait_as): Add `options' argument. Adjust to check on
8927 TARGET_WNOWAIT instead of checking on remote_is_async_p. If doing
8928 a blocking wait, keep waiting until an interesting event comes
8930 (remote_wait): Add `options' argument. Don't loop here if the
8931 target is in async mode, and a blocking wait has been requested.
8933 * top.c (deprecated_target_wait_hook): Add `options' argument.
8934 * linux-thread-db.c (thread_db_wait): Add `options' argument, and
8935 pass it down to the layer beneath.
8936 * inf-ptrace.c (inf_ptrace_wait): Add `options' argument.
8937 * record.c (record_beneath_to_wait): Add `options' argument.
8938 (record_wait): Add `options' argument, and pass it down to the
8940 * bsd-uthread.c (bsd_uthread_wait): Add `options' argument.
8941 * darwin-nat.c (darwin_wait): Likewise.
8942 * defs.h (deprecated_target_wait_hook): Likewise.
8943 * gnu-nat.c (gnu_wait): Add `options' argument.
8944 * go32-nat.c (go32_wait): Likewise.
8945 * hpux-thread.c (hpux_thread_wait): Add `options' argument, and
8946 pass it down to the layer beneath.
8947 * inf-ttrace.c (inf_ttrace_wait): Add `options' argument.
8948 * monitor.c (monitor_wait): Likewise.
8949 * nto-procfs.c (procfs_wait): Likewise.
8950 * remote-mips.c (mips_wait): Add `options' argument.
8951 * remote-sim.c (gdbsim_wait): Likewise.
8952 * rs6000-nat.c (rs6000_wait): Add `options' argument.
8953 * sol-thread.c (sol_thread_wait): Add `options' argument, and pass
8954 it down to the layer beneath.
8955 * spu-linux-nat.c (spu_child_wait): Add `options' argument.
8956 * windows-nat.c (windows_wait): Likewise.
8957 * tui/tui-hooks.c (tui_target_wait_hook): Likewise. Adjust.
8959 2009-05-21 Pedro Alves <pedro@codesourcery.com>
8961 * mi/mi-interp.c (mi_on_resume): Account for whole process
8964 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8966 * m2-exp.y (MAX_FUNC): Fix trailing UNOP_MAX.
8968 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8970 * dwarf2read.c (set_cu_language): Recognize also DW_LANG_C99.
8972 2009-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8974 Fix parsing DW_AT_const_value using DW_FORM_string.
8975 * dwarf2read.c (dwarf2_const_value <DW_FORM_string>): New.
8977 2009-05-20 Joel Brobecker <brobecker@adacore.com>
8979 * aix-thread.c (giter_count): Do not count the main thread.
8980 (giter_accum): Do not include the main thread.
8982 2009-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8984 Remove the PROT parameter from openp.
8985 * source.c (openp): Remove the parameter PROT. Assertion check MODE.
8986 defs.h (openp): Update the prototype.
8987 Update all the openp callers.
8989 2009-05-19 Pedro Alves <pedro@codesourcery.com>
8991 * inflow.c (kill_command): Moved to infcmd.c.
8992 (_initialize_inflow): Don't add the "kill" command or clear
8994 * infcmd.c (kill_command): Moved here from inflow.c.
8995 (_initialize_infcmd): Add the "kill" command here.
8997 2009-05-19 Pedro Alves <pedro@codesourcery.com>
8999 * fork-child.c: Don't include frame.h. Include terminal.h.
9000 (fork_inferior): Call new_tty_postfork after forking adn adding
9001 the child to the inferior list.
9002 * inferior.h (new_tty_prefork, gdb_has_a_terminal): Don't declare
9004 * inflow.c (struct terminal_info): Remove const qualifier from
9005 `run_terminal' field.
9006 (inferior_thisrun_terminal): Tweak comment.
9007 (inflow_inferior_exit): Release the `run_terminal' field.
9008 (copy_terminal_info): New function.
9009 (new_tty_postfork): New function.
9010 * terminal.h (new_tty_prefork, new_tty, new_tty_postfork,
9011 (copy_terminal_info, gdb_has_a_terminal, gdb_setpgid): Declare.
9012 * inf-ptrace.c: Include terminal.h.
9013 (inf_ptrace_follow_fork): Copy the parent's terminal info to the
9015 * linux-nat.c: Include terminal.h.
9016 (linux_child_follow_fork): Copy the parent's terminal info to the
9018 * inf-ttrace.c: Include terminal.h.
9019 (inf_ttrace_follow_fork): Copy the parent's terminal info to the
9022 2009-05-19 Pedro Alves <pedro@codesourcery.com>
9024 * breakpoint.c (insert_breakpoints, breakpoint_init_inferior)
9025 (update_global_location_list): Use gdbarch_has_global_breakpoints
9026 instead of gdbarch_has_global_solist and
9027 target_supports_multi_process.
9028 * dicos-tdep.c (dicos_init_abi): Set
9029 gdbarch_has_global_breakpoints.
9030 * gdbarch.sh (has_global_solist): Update comment.
9031 (has_global_breakpoints): New.
9032 * remote.c (remote_start_remote): Use
9033 gdbarch_has_global_breakpoints instead of
9034 gdbarch_has_global_solist.
9035 * target.c (target_detach): Use gdbarch_has_global_breakpoints
9036 instead of gdbarch_has_global_solist.
9037 * infcmd.c (attach_command): Use gdbarch_has_global_solist instead
9038 of target_supports_multi_process.
9040 2009-05-18 Paul Pluzhnikov <ppluzhnikov@google.com>
9042 * objc-lang.c (find_methods): Plug a small memory leak.
9044 2009-05-18 Pedro Alves <pedro@codesourcery.com>
9046 * solib-svr4.c: Include observer.h.
9047 (debug_base, debug_loader_offset_p, debug_loader_offset)
9048 (debug_loader_name, main_lm_addr): Move these globals...
9049 (struct svr4_info): ... into this new structure.
9050 (svr4_info_p): New typedef.
9051 (svr4_info): New global.
9052 (get_svr4_info, remove_svr4_info, solib_svr4_inferior_exit): New
9054 (locate_base, solib_svr4_r_map, solib_svr4_r_brk)
9055 (solib_svr4_r_ldsomap): Add svr4_info argument. Adjust to
9057 (open_symbol_file_object): Adjust to per-inferior svr4.
9058 (svr4_default_sos, svr4_current_sos, svr4_fetch_objfile_link_map):
9060 (enable_break): Add svr4_info argument. Adjust to per-inferior
9062 (enable_break, svr4_solib_create_inferior_hook, svr4_clear_solib):
9063 Adjust to per-inferior svr4.
9064 (_initialize_svr4_solib): Install the solib_svr4_inferior_exit
9067 2009-05-18 Pedro Alves <pedro@codesourcery.com>
9069 * linux-nat.h (linux_proc_get_tgid): Declare.
9070 * linux-nat.c (linux_proc_get_tgid): New.
9071 * linux-thread-db.c (struct thread_db_info): New field
9072 `need_stale_parent_threads_check'.
9073 (add_thread_db_info): Set it.
9074 (find_new_threads_callback): Ignore stale fork parent threads.
9075 (thread_db_resume): New.
9076 (init_thread_db_ops): Install thread_db_resume.
9078 2009-05-18 Pedro Alves <pedro@codesourcery.com>
9080 * fork-child.c (fork_inferior): Only reset the thread list if this
9081 is the first inferior.
9082 (startup_inferior): If the target support multi-process, tell it
9083 to resume only the new process.
9084 * linux-nat.c (num_lwps): Delete global.
9085 (purge_lwp_list): New function.
9086 (num_lwps): New function.
9087 (add_lwp, delete_lwp): Adjust.
9089 (iterate_over_lwps): Add filter argument. Handle it.
9090 (linux_nat_attach): Remove FIXME note.
9091 (linux_nat_detach): Adjust to iterate over threads of the inferior
9092 we're detaching from. Adjust to num_lwps being a function. Don't
9093 assume the head of the lwp list is the main thread of the process
9094 we're detaching from. Don't destroy the LWP list.
9095 (resume_callback): Add debug output.
9096 (linux_nat_resume): Handle resuming a single inferior. Allow a
9097 wildcard resume in non-stop mode.
9098 (linux_handle_extended_wait): Don't assume inferior_ptid is the
9099 correct inferior of the parent LWP.
9100 (status_callback): Also check lp->waitstatus.
9101 (select_event_lwp): Add new filter parameter. Handle it.
9102 (linux_nat_filter_event): Adjust to num_lwps being a function.
9103 (linux_nat_wait_1): When adding the first lwp of the inferior, use
9104 an is_lwp check instead of checking for the number of lwps.
9105 (linux_nat_wait_1): Handle waiting for a specific tgid. Handle
9106 pending process exit statuses.
9107 (linux_nat_mourn_inferior): Don't destroy all the LWP info.
9108 Instead delete LWPs of the inferior that we're mourning. Don't
9109 unregister from the event loop here.
9110 (linux_nat_pid_to_str): Use `num_lwps'.
9111 (linux_nat_make_corefile_notes): Adjust to walk over lwps of a
9113 (linux_nat_is_async_p): Check if async was masked out.
9114 (linux_multi_process): New global.
9115 (linux_nat_supports_multi_process): New.
9116 (linux_nat_stop_lwp): Remove LWP filtering. It is done by the
9118 (linux_nat_stop): Adjust to make iterate_over_lwps itself do the
9120 (linux_nat_close): New.
9121 (linux_nat_add_target): Register linux_nat_close and
9122 linux_nat_supports_multi_process.
9123 * linux-nat.h (iterate_over_lwps): Add filter argument.
9124 * linux-thread-db.c (thread_db_handle): Delete.
9125 (proc_handle, thread_agent, td_init_p, td_ta_new_p)
9126 (td_ta_map_id2thr_p, td_ta_map_lwp2thr_p, td_ta_thr_iter_p)
9127 (td_ta_event_addr_p, td_ta_set_event_p, td_ta_event_getmsg_p)
9128 (td_thr_validate_p, td_thr_get_info_p, td_thr_event_enable_p)
9129 (td_thr_tls_get_addr_p, td_create_bp_addr, td_death_bp_addr): No
9130 longer globals, moved to...
9131 (struct thread_db_info): ... this new structure.
9132 (thread_db_list): New.
9133 (add_thread_db_info, get_thread_db_info, delete_thread_db_info):
9135 (have_threads_callback): Filter out threads of all inferiors but
9136 the one specified by the ARGS argument.
9137 (have_threads): Add ptid argument specifying the inferior we're
9138 interested in. Handle it.
9139 (struct thread_get_info_inout): New.
9140 (thread_get_info_callback, thread_from_lwp): Adjust to use it.
9141 (thread_db_attach_lwp): Check that inferior of the passed in
9142 thread is using thread-db. Adjust.
9143 (enable_thread_event): Remove thread_agent parameter. Instead,
9144 get it from the per-inferior thread-db info.
9145 (dladdr_to_soname): Move higher up.
9146 (enable_thread_event_reporting): Adjust to use per-inferior
9148 (try_thread_db_load_1): Replace `handle' parameter by a
9149 thread_db_info parameter. Adjust to use per-inferior thread-db
9151 (try_thread_db_load): Adjust to use per-inferior thread-db info.
9152 (thread_db_load, disable_thread_event_reporting): Ditto.
9153 (check_for_thread_db): Remove conditional reporting of which
9154 libthread_db is in use.
9155 (thread_db_new_objfile): Add comment about inferior_ptid.
9156 (attach_thread): Adjust to use per-inferior thread-db info.
9157 (thread_db_detach): Adjust to use per-inferior thread-db info.
9158 Remove thread event breakpoints of the current inferior. Only
9159 unpush the thread-db target if there are no more processes using
9161 (check_event): Adjust to use per-inferior thread-db info.
9162 (thread_db_wait): Adjust to use per-inferior thread-db info. Only
9163 unpush the thread-db target if there are no more processes using
9165 (thread_db_mourn_inferior): Adjust to use per-inferior thread-db
9166 info. Mark breakpoints of the current inferior out before
9167 deleting them. Only unpush the thread-db target if there are no
9168 more processes using it.
9169 (find_new_threads_callback): Adjust to use per-inferior thread_db
9171 (thread_db_find_new_threads_1): Add new ptid argument. Adjust to
9172 use per-inferior thread-db info.
9173 (thread_db_find_new_threads): Adjust to use per-inferior thread-db
9175 (thread_db_get_thread_local_address): Adjust.
9176 (thread_db_get_ada_task_ptid): Adjust.
9177 * inf-ptrace.c (inf_ptrace_mourn_inferior): Only unpush the target
9178 if there no more processes left to debug.
9179 * thread.c (set_running, set_executing): Handle resuming all
9180 threads of a single inferior.
9181 * mi/mi-interp.c (mi_output_running_pid): New.
9182 (mi_inferior_count): New.
9183 (mi_on_resume): For backwards compatibility, if resuming all
9184 threads of an inferior, and there is only one inferior, output
9187 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
9189 * ada-lang.c (ada_find_any_type): Move check for primitive types ...
9190 (to_fixed_range_type): ... to here.
9192 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
9194 * ada-lang.c (desc_data_type): Remove, replace by ...
9195 (desc_data_target_type): ... this.
9196 (thin_data_pntr): Use desc_data_target_type instead of desc_data_type.
9197 (ada_is_array_descriptor_type): Likewise.
9198 (ada_type_of_array): Likewise.
9199 (ada_coerce_to_simple_array_type): Likewise.
9200 (ada_array_element_type): Likewise.
9202 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
9204 * ada-valprint.c (ada_val_print_1): Use val_print_string to print
9205 result of ada_vax_float_print_function inferior call.
9207 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
9209 * ada-lang.c (ada_coerce_to_simple_array_type): Reimplement to
9210 avoid creating a dummy value.
9212 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
9214 * p-valprint.c (pascal_val_print): Use extract_typed_address
9215 to extract reference value.
9217 2009-05-18 Ulrich Weigand <uweigand@de.ibm.com>
9219 * doublest.c (NAN): Remove unused define.
9220 (extract_floating_by_length, deprecated_extract_floating): Remove.
9221 (store_floating_by_length, deprecated_store_floating): Remove.
9222 (extract_typed_floating): Do not call extract_floating_by_length.
9223 (store_typed_floating): Do not call store_floating_by_length.
9224 (convert_typed_floating): Remove redundant assertions.
9225 * doublest.h (deprecated_extract_floating): Remove.
9226 (deprecated_store_floating): Remove.
9227 * sh64-tdep.c (sh64_register_convert_to_raw): Call
9228 extract_typed_floating instead of deprecated_extract_floating.
9230 2009-05-18 Jon Beniston <jon@beniston.com>
9232 * MAINTAINERS: Add lm32 target.
9233 * Makefile.in: Add lm32 dependencies.
9234 * NEWS: Indicate lm32 is a new target.
9235 * configure.tgt: Add lm32 targets.
9236 * lm32-tdep.c: New file.
9238 2009-05-18 Pedro Alves <pedro@codesourcery.com>
9240 * corelow.c (core_open): Flush the register cache before doing
9241 anything with registers.
9243 2009-05-18 Pedro Alves <pedro@codesourcery.com>
9245 * inflow.h (our_process_group): Remove declaration.
9246 (inferior_process_group): Delete global variable declaration.
9247 (inferior_process_group): New function declaration.
9248 * inflow.c: Include observer.h.
9249 (inferior_ttystate, our_ttystate, tflags_inferior, tflags_ours):
9251 (struct terminal_info): New struct.
9252 (our_terminal_info): New global.
9253 (inferior_process_group): New function.
9254 (inferior_thisrun_terminal): Extend description comment.
9255 (gdb_has_a_terminal): Adjust to write to our_terminal_info fields
9257 (terminal_init_inferior_with_pgrp): Adjust to per-inferior
9259 (terminal_inferior): Ditto.
9260 (terminal_ours_1): Ditto.
9261 (inflow_new_inferior, inflow_inferior_exit): New functions.
9262 (child_terminal_info): Adjust to per-inferior terminal settings.
9263 (osig_set): New global.
9264 (set_sigint_trap): Adjust to per-inferior terminal settings. Set
9265 or clear `osig_set' accordingly.
9266 (clear_sigint_trap): Check `osig_set' to decide wheater to restore
9267 SIGINT handler, instead of checking the current inferior (which
9269 (_initialize_inflow): Attach inflow_new_inferior and
9270 inflow_inferior_exit to the "new_inferior" and "inferior_exit"
9271 notifications, respectively.
9272 * inferior.h (struct terminal_info): Forward declare.
9273 (struct inferior): Add `terminal_info' field.
9274 * inferior.c (delete_inferior_1): Notify the inferior_exit
9275 observers before removing the inferior from the lists and deleting
9277 * inf-ptrace.c (inf_ptrace_stop): `inferior_process_group' is now
9278 a function instead of a variable. Adjust.
9279 * procfs.c (procfs_stop): Ditto.
9281 2009-05-17 Pedro Alves <pedro@codesourcery.com>
9283 * infrun.c (handle_inferior_event): When handling a
9284 TARGET_WAITKIND_FORKED, detach breakpoints from the fork child
9286 * linux-nat.c (linux_child_follow_fork): Only detach breakpoints
9287 from the child if vforking.
9288 * inf-ptrace.c (inf_ptrace_follow_fork): No need to detach
9289 breakpoints from the child here.
9291 2009-05-17 Pedro Alves <pedro@codesourcery.com>
9293 * infrun.c (pending_follow): Remove execd_pathname member.
9294 (resume): No longer handle TARGET_WAITKIND_EXECD pending follow.
9295 (handle_inferior_event): When handling a TARGET_WAITKIND_EXECD
9296 event, don't copy `execd_pathname' to pending_follow, use the
9297 event copy instead. Release `execd_pathname' once done with
9300 * infrun.c (pending_follow): Remove mention of exec events.
9302 2009-05-17 Hui Zhu <teawater@gmail.com>
9304 * i386-tdep.c (i386_process_record): Make it extern.
9305 (i386_gdbarch_init): Don't call set_gdbarch_process_record
9307 * i386-tdep.h (i386_process_record): Declare.
9308 * i386-linux-tdep.c (i386_linux_init_abi): Call
9309 set_gdbarch_process_record.
9311 2009-05-17 Vladimir Prus <vladimir@codesourcery.com>
9313 Always report varobj as changed when in_scope attribute changes.
9315 * varobj.c (install_new_value): If non-NULL-ness of value
9318 2009-05-15 Paul Pluzhnikov <ppluzhnikov@google.com>
9320 * NEWS: Mention set/show libthread-db-search-path.
9321 * gdb_thread_db.h (LIBTHREAD_DB_SEARCH_PATH): New define.
9322 (LIBTHREAD_DB_SO): Moved from linux-thread-db.c
9323 * linux-thread-db.c (libthread_db_search_path): New setting.
9324 (thread_db_handle): New variable (replaces using_thread_db).
9325 (try_thread_db_load_1): New function.
9326 (try_thread_db_load, thread_db_load_search): Likewise.
9327 (dladdr_to_soname): Likewise.
9328 (thread_db_load): Iterate over possibly multiple libthread_db's.
9329 (check_for_thread_db): Attempt to load new libthread_db.
9330 (thread_db_detach, thread_db_wait): Unload libthread_db.
9331 (thread_db_mourn_inferior): Likewise.
9332 (_initialize_thread_db): Add new libthread-db-search-path option.
9333 Defer loading of libthread_db to check_for_thread_db.
9334 * solib.c (libpthread_name_p): New function.
9335 (libpthread_solib_p): Call it.
9336 * solib.h (libpthread_name_p): New prototype.
9338 2009-05-15 Pierre Muller <muller@ics.u-strasbg.fr>
9340 * MAINTAINERS: Update my email address.
9342 2009-05-14 Paul Pluzhnikov <ppluzhnikov@google.com>
9344 * breakpoint.h: Add breakpoint_re_set_objfile prototype.
9345 * breakpoint.c (create_overlay_event_breakpoint): Renamed
9346 from create_overlay_event_breakpoint_1, old
9347 create_overlay_event_breakpoint deleted.
9348 (breakpoint_re_set_objfile): Don't rescan all objfiles
9350 (breakpoint_re_set): New function.
9351 * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile
9352 instead of breakpoint_re_set.
9353 * objfiles.c (objfile_relocate): Likewise.
9355 2009-05-14 Joel Brobecker <brobecker@adacore.com>
9357 * gdbarch.sh: Add comment documenting the target_gdbarch global.
9358 gdbarch.h does NOT need to be regenerated as the corresponding
9359 change has already been made in a previous commit.
9361 2009-05-14 Pierre Muller <muller@ics.u-strasbg.fr>
9363 Remove all i386 debug register low level macros in config nm files.
9364 (I386_DR_LOW_SET_ADDR, I386_DR_LOW_RESET_ADDR): Remove.
9365 (I386_DR_LOW_GET_STATUS, I386_DR_LOW_SET_CONTROL): Remove.
9366 (I386_USE_GENERIC_WATCHPOIINTS): Remove.
9368 * i386-nat.h: New file (adapted from config/i386/nm-i386.h).
9369 (struct i386_dr_low_type): New type.
9370 (i386_dr_low): New global variable.
9371 * i386-nat.c (TARGET_HAS_DR_LEN_8): Update macro.
9372 (i386_insert_aligned_watchpoint): Replace i386 dr low macros by
9373 i386_dr_low struct variable fields.
9374 (i386_remove_aligned_watchpoint): Likewise.
9375 (i386_stopped_data_address): Likewise.
9376 (i386_stopped_by_hwbp): Likewise.
9377 (show_debug_regs_command_added): New static variable.
9378 (add_show_debug_regs_command): New static function.
9379 (i386_use_watchpoints): Call add_show_debug_regs_command if not done.
9380 (i386_set_debug_register_length): New function.
9381 (_initialize_i386_nat): Delete.
9383 * amd64-linux-nat.c: Include "i386-nat.h".
9384 (amd64_linux_dr_set_control): Change to static.
9385 (amd64_linux_dr_get_status): Change to static.
9386 (amd64_linux_dr_set_addr,amd64_linux_dr_reset_addr): Likewise.
9387 (_initialize_amd64_linux_nat): Set i386_dr_low variable fields.
9389 * go32-nat.c: Include "i386-nat.h".
9390 (go32_set_addr): Change to static.
9391 (go32_set_dr7): Change to static. Change arg type to unisgned long.
9392 (go32_get_dr6): Change to static. Change return type to unisnged long.
9393 (init_go32_ops): Set i386_dr_low variable fields.
9394 * i386-linux-nat.c: Include "i386-nat.h".
9395 (i386_linux_dr_set_control, i386_linux_dr_get_status): Change to static.
9396 (i386_linux_dr_set_addr, i386_linux_dr_reset_addr): Idem.
9397 (_initialize_i386_linux_nat): Set i386_dr_low variable fields.
9398 * i386bsd-nat.h: Declare functions used for
9399 i386_dr_low fields in i386fbsd-nat.c.
9400 * i386fbsd-nat.c: Include "i386-nat.h".
9401 (_initialize_i386fbsd_nat): Set i386_dr_low variable fields.
9402 * windows-nat.c: Include "i386-nat.h".
9403 (cygwin_set_dr, cygwin_get_dr6, cygwin_set_dr7): Add prototypes.
9405 (cygwin_get_dr6): Change return type to unisnged long.
9406 (cygwin_set_dr7): Change arg type to unisgned long.
9407 (init_windows_ops): Set i386_dr_low function fields.
9409 * amd64-windows-nat.c (_initialize_amd64_windows_nat): Call
9410 i386_set_debug_register_length.
9411 * i386-windows-nat.c (_initialize_i386_windows_nat): Likewise.
9413 * config/i386/nm-cygwin.h: Remove all I386_* macros.
9414 * config/i386/nm-cygwin64.h: Likewise.
9415 * config/i386/nm-fbsd.h: Likewise.
9416 * config/i386/nm-linux.h: Likewise.
9417 * config/i386/nm-i386.h: Remove completely.
9418 * config/i386/nm-go32.h: Remove completely.
9419 * config/i386/nm-linux64.h: Remove completely.
9420 * config/i386/go32.mh (NAT_FILE): Remove entry.
9421 * config/i386/linux64.h (NAT_FILE): Change to config/nm-linux.h.
9423 2009-05-14 Jon Beniston <jon@beniston.com>
9425 * MAINTAINERS: Add Jon Beniston to write after approval list.
9427 2009-05-13 Paul Pluzhnikov <ppluzhnikov@google.com>
9429 * objc-lang.c (objc_objfile_data): New variable.
9430 (find_methods): Skip objfiles without Obj-C methods.
9431 (_initialize_objc_lang): New function.
9433 2009-05-13 Joel Brobecker <brobecker@adacore.com>
9435 * c-lang.c (print_wchar): Remove unnecessary cast.
9437 2009-05-12 Jim Blandy <jimb@red-bean.com>
9439 * MAINTAINERS: Remove self as m32c target maintainer.
9441 2009-05-12 Pedro Alves <pedro@codesourcery.com>
9443 * cli/cli-decode.c (deprecated_add_set_cmd): Delete.
9444 * command.h (deprecated_add_set_cmd): Delete declaration.
9445 * gnu-nat.c (_initialize_gnu_nat): Replace 'maint gnu-debug' with
9446 'set debug gnu-nat' and 'show debug gnu-nat'.
9447 * i386-nat.c (_initialize_i386_nat): Replace 'maint
9448 show-debug-registers' with 'maint set show-debug-registers' and
9449 'maint show show-debug-registers'.
9450 * mips-linux-nat.c (_initialize_mips_linux_nat): Replace 'maint
9451 show-debug-registers' with 'maint set show-debug-registers' and
9452 'maint show show-debug-registers'.
9454 2009-05-12 Joel Brobecker <brobecker@adacore.com>
9456 * c-lang.c (print_wchar): Convert w into a gdb_wchar_t before
9457 pushing it on the output obstack.
9459 2009-05-11 Joel Brobecker <brobecker@adacore.com>
9461 Fix internal error on breaking at a multi-locations caller source line.
9462 * breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
9463 command with no parameters.
9465 2009-05-11 Pedro Alves <pedro@codesourcery.com>
9467 * linux-nat.c (enum sigchld_state): Delete.
9468 (linux_nat_async_events_state): Delete.
9469 (struct waitpid_result): Delete.
9470 (waitpid_queue): Delete.
9471 (queued_waitpid_1): Delete.
9472 (async_file_flush): New.
9473 (queued_waitpid, push_waitpid): Delete.
9474 (async_file_mark): New.
9475 (drain_queued_events): Delete.
9476 (my_waitpid): Remove locally queued events handling.
9477 (linux_test_for_tracefork): Upjust.
9478 (linux_child_follow_fork): Ditto.
9479 (sync_sigchld_action): Delete.
9480 (blocked_mask): Reinstate.
9481 (async_sigchld_action): Rename to...
9482 (sigchld_action): ... this.
9483 (block_child_signals): New.
9484 (restore_child_signals_mask): New.
9485 (lin_lwp_attach_lwp): Adjust.
9486 (linux_nat_create_inferior): Ditto.
9487 (linux_nat_attach): Also use lp->status in async mode.
9488 (get_pending_status): Don't use queued_waitpid.
9489 (linux_nat_detach): Don't drain locally queued events.
9490 (linux_nat_resume): Allow pending wait statuses stored lp->status
9491 in async mode. If returning early due to a pending event,
9492 re-register the event source.
9493 (stop_wait_callback): Allow pending wait statuses stored
9494 lp->status in async mode.
9495 (pipe_to_local_event_queue, local_event_queue_to_pipe): Delete.
9496 (linux_nat_wait): Rename to ...
9497 (linux_nat_wait_1): ... this. Allow pending wait statuses stored
9498 lp->status in async mode. Always add WNOHANG to the waitpid
9499 options in async mode.
9500 (linux_nat_wait): New.
9501 (kill_callback): Don't drain locally queued events.
9502 (sigchld_handler): Rewrite.
9503 (linux_nat_is_async_p, linux_nat_can_async_p): Fix comments to
9504 refer to "set target-async".
9505 (linux_nat_async_mask): If in non-stop, and re-enabling async
9506 mode, re-register the target event source in the event loop.
9507 (linux_nat_event_pipe_pop, linux_nat_event_pipe_push)
9508 (get_pending_events, async_sigchld_handler)
9509 (linux_nat_async_events): Delete.
9510 (handle_target_event): New.
9511 (linux_nat_async_file_handler): Delete.
9512 (linux_async_pipe): New.
9513 (linux_nat_async): Only re-register in the event loop if not
9514 registered yet. Always notify the event-loop once if enabling the
9516 (linux_nat_stop_lwp): Rewrite to handle pending events stored in
9517 lp->status, not in the locally queued event list.
9518 (linux_nat_stop): Don't mask out async event handling.
9519 (linux_nat_setup_async): Delete.
9520 (_initialize_linux_nat): Adjust.
9521 (lin_thread_get_thread_signals): blocked_mask is global again.
9524 2009-05-11 Pierre Muller <muller@ics.u-strasbg.fr>
9526 Unify target macros.
9528 * target.h (STOPPED_BY_WATCHPOINT): Delete, replaced by ...
9529 (target_stoppped_by_watchpoint): New macro.
9530 (HAVE_STEPPABLE_WATCHPOINT): Delete, replaced by ...
9531 (target_have_steppable_watchpoint): New macro.
9532 (HAVE_CONTINUABLE_WATCHPOINT): Delete, replace by ...
9533 (target_have_continuable_watchpoint): New macro.
9534 (TARGET_CAN_USE_HARDWARE_WATCHPOINT):Delete, replaced by ...
9535 (target_can_use_hardware_watchpoint): New macro.
9536 (TARGET_REGION_OK_FOR_HW_WATCHPOINT):Delete, replaced by ...
9537 (target_region_ok_for_hw_watchpoint): New macro.
9539 * breakpoint.c (update_watchpoint): Use new macros.
9540 (bpstat_alloc): Likewise.
9541 (create_breakpoint): Likewise.
9542 (watch_command_1): Likewise.
9543 (can_use_hardware_watchpoint): Likewise.
9544 (do_enable_breakpoint): Likewise.
9545 * infrun.c (handle_inferior_event): Adapt to new macros.
9546 * mips-tdep.c (mips_gdbarch_init): Update comments.
9547 * procfs.c (procfs_set_watchpoint): Update comment.
9548 (procfs_insert_watchpoint): Adapt to new macros.
9549 * remote-m32r-sdi.c (m32r_stop):
9550 * remote-mips.c (mips_remove_breakpoint):
9551 * target.c (debug_to_region_ok_for_hw_watchpoint): Update to new macros.
9552 (debug_to_stopped_by_watchpoint): Likewise.
9555 2009-05-10 Pierre Muller <muller@ics.u-strasbg.fr>
9557 * src/gdb/target.h: Remove all tests for already defined
9558 macros. All macros defined here should not be set in config
9561 2009-05-08 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
9563 * ppc-linux-nat.c (have_ptrace_getsetregs): New variable.
9564 (have_ptrace_getsetfpregs): Likewise.
9565 fetch_all_gp_regs): New function.
9566 (fetch_gp_regs): New function.
9567 (fetch_all_fp_regs): Likewise.
9568 (fetch_fp_regs): New function.
9569 (fetch_ppc_registers): Using the new methods to fetch general-
9570 purpose and floating-pointer registers.
9571 (store_all_gp_regs): New function.
9572 (store_gp_regs): Likewise.
9573 (store_all_fp_regs): New function.
9574 (store_fp_regs): Likewise.
9575 (store_ppc_registers): Using the new methods to store general-
9576 purpose and floating-pointer registers.
9578 2009-05-08 Doug Evans <dje@google.com>
9580 * linux-nat.c (linux_xfer_siginfo): Delete unused locals lp, n.
9582 2009-05-07 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
9584 * MAINTAINERS (Write After Approval): Add self.
9586 2009-05-07 Joel Brobecker <brobecker@adacore.com>
9588 * gdbarch.h (target_gdbarch): Add comment documenting this global.
9590 2009-05-06 Joel Brobecker <brobecker@adacore.com>
9592 * acinclude.m4 (AM_ICONV): Prefer in-tree libiconv if present over
9594 * configure: Regenerate.
9596 2009-05-06 Joel Brobecker <brobecker@adacore.com>
9598 * utils.c: Add include of gdb_usleep.h.
9599 (defaulted_query): Detect false EOF conditions that happen
9600 on terminals opened with the O_NONBLOCK flag when there is
9603 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9605 * inferior.c (add_inferior): Move observer_notify_new_inferior
9607 (add_inferior_silent): ... here.
9609 2009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
9610 Pedro Alves <pedro@codesourcery.com>
9612 * procfs.c (procfs_insert_watchpoint, procfs_remove_watchpoint)
9613 (procfs_region_ok_for_hw_watchpoint, procfs_use_watchpoints): New
9615 (procfs_stopped_by_watchpoint): Made static, ptid argument
9617 (_initialize_procfs): Register new watchpoint related target
9619 * config/i386/nm-i386sol2.h (TARGET_CAN_USE_HARDWARE_WATCHPOINT)
9620 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT, STOPPED_BY_WATCHPOINT)
9621 (HAVE_CONTINUABLE_WATCHPOINT): Delete.
9622 (target_insert_watchpoint, target_remove_watchpoint): Delete.
9623 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
9625 * config/mips/nm-irix5.h (STOPPED_BY_WATCHPOINT)
9626 (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT): Delete.
9627 (target_insert_watchpoint, target_remove_watchpoint): Delete.
9628 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
9630 * config/sparc/nm-sol2.h (TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT)
9631 (HAVE_CONTINUABLE_WATCHPOINT, STOPPED_BY_WATCHPOINT): Delete.
9632 (target_insert_watchpoint, target_remove_watchpoint): Delete.
9633 (procfs_stopped_by_watchpoint, procfs_set_watchpoint): Delete
9636 2009-05-06 Hui Zhu <teawater@gmail.com>
9638 * i386-tdep.c (i386_process_record): Change bzero to memset.
9640 2009-05-06 Hui Zhu <teawater@gmail.com>
9642 * NEWS: Add item for process record and replay.
9644 2009-05-05 Maxim Grigoriev <maxim2405@gmail.com>
9646 * xtensa-tdep.c (xtensa_frame_cache): Use pc instead of cache->pc.
9648 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
9650 * inferior.h (read_pc, write_pc): Remove.
9651 * regcache.c (read_pc, write_pc): Remove.
9653 * infrun.c (displaced_step_fixup): Use regcache_read_pc instead
9655 (handle_inferior_event): Use regcache_read_pc instead of read_pc
9656 when determining value of stop_pc. Replace subsequent uses of
9657 read_pc by inspecting already-retrieved stop_pc value.
9658 (keep_going): Use regcache_read_pc instead of read_pc.
9660 * breakpoint.c (watchpoint_check): Use current frame architecture
9661 and PC instead of current_gdbarch and read_pc ().
9662 * tracepoint.c (set_traceframe_context): Replace PC argument
9663 with FRAME argument.
9664 (trace_start_command, finish_tfind_command): Update calls.
9665 (finish_tfind_command): Compare frame IDs to identify transitions
9667 (trace_find_pc_command): Use regcache_read_pc instead of read_pc.
9668 * rs6000-nat.c (exec_one_dummy_insn): Pass in regcache instead
9669 of gdbarch. Use regcache_read_pc and regcache_write_pc instead
9670 of read_pc and write_pc.
9671 (store_register): Make regcache argument non-const. Update call
9672 to exec_one_dummy_insn.
9674 * thread.c (switch_to_thread): Use regcache_read_pc instead of read_pc.
9675 * infcmd.c (post_create_inferior): Likewise.
9676 * solib-darwin.c (darwin_solib_create_inferior_hook): Likewise.
9677 * solib-pa64.c (pa64_solib_create_inferior_hook): Likewise.
9678 * solib-sunos.c (sunos_solib_create_inferior_hook): Likewise.
9679 * solib-svr4.c (enable_break, svr4_relocate_main_executable): Likewise.
9680 * linux-fork.c (fork_load_infrun_state): Likewise.
9681 * hppa-hpux-tdep.c (hppa_hpux_push_dummy_code): Likewise.
9682 * record.c (record_wait): Likewise.
9683 * procfs.c (procfs_wait): Likewise.
9684 * remote-mips.c (common_open, mips_wait): Likewise.
9685 * remote-m32r-sdi.c (m32r_resume): Likewise.
9687 * symfile.c (generic_load): Use regcache_write_pc instead of write_pc.
9688 * monitor.c (monitor_create_inferior, monitor_load): Likewise.
9689 * m32r-rom.c (m32r_load, m32r_upload_command): Likewise.
9690 * remote-m32r-sdi.c (m32r_create_inferior, m32r_load): Likewise.
9691 * remote-mips.c (mips_create_inferior, mips_load): Likewise.
9693 * solib-darwin.c: Include "regcache.h".
9694 * solib-pa64.c: Include "regcache.h".
9695 * solib-svr4.c: Include "regcache.h.".
9697 * symfile.c: Do not mention read_pc or write_pc in comments.
9698 * dink32-rom.c: Likewise.
9699 * m32r-rom.c: Likewise.
9700 * mips-tdep.c: Likewise.
9702 2009-05-05 Ulrich Weigand <uweigand@de.ibm.com>
9704 * fork-child.c (startup_inferior): Move setting stop_pc ...
9705 * infcmd.c (post_create_inferior): ... to here.
9707 2009-05-04 Michael Snyder <msnyder@vmware.com>
9709 * NEWS: Add item for reverse debugging commands.
9711 2009-05-04 Pedro Alves <pedro@codesourcery.com>
9713 * go32-nat.c (go32_stop): Delete.
9714 (go32_kill_inferior): Rewrite to only call go32_mourn_inferior.
9715 (go32_create_inferior): Don't call go32_stop or
9717 (go32_mourn_inferior): Inline go32_stop and go32_kill_inferior
9719 (init_go32_ops): Don't register go32_stop.
9721 2009-05-02 Eli Zaretskii <eliz@gnu.org>
9723 * dbxread.c (read_dbx_symtab): Avoid compiler warnings for
9726 * infcall.c (find_function_addr): Avoid compiler warnings for
9729 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9731 * dictionary.c (dict_hashed_vector, dict_hashed_expandable_vector)
9732 (dict_linear_vector, dict_linear_expandable_vector): Fix a comment typo.
9734 2009-05-01 Doug Evans <dje@google.com>
9736 * linux-thread-db.c (thread_db_pid_to_str): Delete unused assignment
9739 2009-05-01 Eli Zaretskii <eliz@gnu.org>
9741 * record.c (_initialize_record): Reformat and clarify doc strings
9742 for stop-at-limit and insn-number-max.
9744 * go32-nat.c: Add comments about dirty secrets of DJGPP debugging.
9746 2009-05-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9748 Make specifiable the make_function_type type memory ownership.
9749 * gdbtypes.c (make_function_type): New parameter `objfile', use it
9750 explicitely instead of TYPE-initialized removed local variable
9751 `objfile'. Describe `objfile' it in the function comment.
9752 (lookup_function_type): Update make_function_type callers.
9753 * gdbtypes.h (make_function_type): Update the prototype.
9754 * jv-lang.c (java_link_class_type): Update make_function_type callers.
9755 * dwarf2read.c (read_subroutine_type): Likewise.
9756 * stabsread.c (read_type): Likewise.
9758 2009-05-01 Eli Zaretskii <eliz@gnu.org>
9760 * go32-nat.c (go32_pid_to_str): Call normal_pid_to_str instead of
9761 printing a bogus "Thread <main>".
9762 (go32_thread_alive): Don't return 1 for null_ptid.
9764 * i386-tdep.c (i386_go32_init_abi): Override the number of
9765 registers due to non-support of SSE.
9767 2009-04-30 Anthony Green <green@moxielogic.com>
9769 * configure.tgt: Link the moxie simulator in with gdb.
9771 2009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
9773 * elfread.c (elf_symtab_read): Don't assume .data and .rodata
9776 2009-04-30 Hui Zhu <teawater@gmail.com>
9777 Michael Snyder <msnyder@vmware.com>
9779 I386 Linux process record and replay support.
9781 * i386-linux-tdep.c (i386_linux_record_tdep): New variable.
9782 This struct has the argument for the function
9783 "record_linux_system_call".
9784 (i386_linux_intx80_sysenter_record): New function. Parse the
9785 system call instruction and call function
9786 "record_linux_system_call" to record execute log.
9787 (i386_linux_init_abi): Initialize "i386_linux_record_tdep".
9788 Set "i386_linux_intx80_sysenter_record" to
9789 "i386_intx80_record" and "i386_sysenter_record".
9791 2009-04-30 Hui Zhu <teawater@gmail.com>
9792 Michael Snyder <msnyder@vmware.com>
9794 I386 architecture process record and replay support.
9796 * i386-tdep.c (PREFIX_REPZ, PREFIX_REPNZ, PREFIX_LOCK,
9797 PREFIX_DATA, PREFIX_ADDR): New macros. Help decode the i386
9799 (aflag, dflag, override, modrm, mod, reg, rm, ot,
9800 i386_record_pc): New variables. Ditto.
9801 (i386_record_modrm, i386_record_lea_modrm_addr,
9802 i386_record_lea_modrm): New functions. Ditto.
9803 (i386_process_record): New function. Parse the instruction in
9804 address "addr" and record the values of registers and memory
9805 that will be changed by this instruction.
9806 (i386_gdbarch_init): Set "i386_process_record" to GDBARCH
9807 "process_record" interface.
9808 * i386-tdep.h (gdbarch_tdep): New function pointers
9809 "i386_intx80_record" and "i386_sysenter_record" that point to
9810 the function that can record "intx80" and "sysenter" execute
9813 2009-04-30 Hui Zhu <teawater@gmail.com>
9814 Michael Snyder <msnyder@vmware.com>
9816 * infrun.c (use_displaced_stepping): Return false if process
9817 record and replay target is used.
9818 (proceed): Call function "record_not_record_set" if pocess
9819 record and replay target is used.
9821 2009-04-30 Hui Zhu <teawater@gmail.com>
9822 Michael Snyder <msnyder@vmware.com>
9824 Linux process record and replay support.
9826 * Makefile.in (ALLDEPFILES): Add linux-record.c.
9827 (ALL_TARGET_OBS): Add linux-record.o.
9828 * configure.tgt (x86_64-*-linux*): Add linux-record.o.
9829 (i[34567]86-*-linux*): Add linux-record.o.
9830 * linux-record.c, linux-record.h: New file.
9832 2009-04-30 Hui Zhu <teawater@gmail.com>
9833 Michael Snyder <msnyder@vmware.com>
9835 Process record and replay target.
9837 * Makefile.in (SFILES): Add record.c.
9838 (COMMON_OBS): Add record.o.
9839 * record.c, record.h: New file.
9841 2009-04-30 Hui Zhu <teawater@gmail.com>
9842 Michael Snyder <msnyder@vmware.com>
9844 * target.h (strata): New stratum "record_stratum".
9846 2009-04-30 Hui Zhu <teawater@gmail.com>
9847 Michael Snyder <msnyder@vmware.com>
9849 GDBARCH interface for process record and replay.
9851 * gdbarch.sh (process_record): This interface point to the
9852 function that records the inferior execute log.
9854 2009-04-29 Doug Evans <dje@google.com>
9856 * i386-nat.c (child_post_startup_inferior): Delete, unused.
9858 2009-04-29 Pedro Alves <pedro@codesourcery.com>
9860 * breakpoint.c (print_exception_catchpoint): Access `b' directly
9861 instead of `b->loc->owner'.
9862 (print_mention_exception_catchpoint): Ditto.
9864 2009-04-29 Jan Kratochvil <jan.kratochvil@redhat.com>
9866 * macrocmd.c (info_macro_command): Print -Dname=value if LINE is zero.
9868 2009-04-27 Tom Tromey <tromey@redhat.com>
9870 * c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
9872 2009-04-27 Jerome Guitton <guitton@adacore.com>
9874 * symtab.c (append_exact_match_to_sals): New function, extracted
9875 from expand_line_sal.
9876 (expand_line_sal): Use append_exact_match_to_sals to append exact
9877 matches. If none found, append all best items.
9879 2009-04-27 Jerome Guitton <guitton@adacore.com>
9881 * main.c (captured_main): Move gdbinit lookups after gdb_init.
9883 2009-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
9886 * dwarf2read.c (unsigned_int_compar, inherit_abstract_dies): New.
9887 (read_func_scope): Call inherit_abstract_dies.
9889 2009-04-25 Eli Zaretskii <eliz@gnu.org>
9891 * Makefile.in (ALLDEPFILES): Remove duplicate entries for
9892 sparc-sol2-nat.c and sparc-sol2-tdep.c.
9894 * stack.c (_initialize_stack) <disassemble-next-line>: Doc fix.
9896 2009-04-24 Pierre Muller <muller@ics.u-strasbg.fr>
9898 ARI change: Use "/* ARI: rule */" pattern.
9899 * utils.c: Update ARI patterns.
9900 * gdb_dirent.h: Likewise.
9902 2009-04-23 Anthony Green <green@moxielogic.com>
9904 * MAINTAINERS: Add moxie target.
9905 * configure.tgt: Add moxie-*-elf target.
9906 * moxie-tdep.c: New file.
9907 * moxie-tdep.h: New file.
9909 2009-04-23 Joel Brobecker <brobecker@adacore.com>
9911 * ada-lang.c: Remove an extra empty line. No code change.
9913 2009-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9915 Fix double free on error inserting the breakpoint instruction.
9916 * breakpoint.c (create_breakpoints): Move the
9917 update_global_location_list call to ...
9918 (break_command_really): ... here together with the second local call
9919 both unified after all the cleanups.
9921 2009-04-23 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
9922 Tom Tromey <tromey@redhat.com>
9924 * configure, config.in: Regenerate.
9925 * configure.ac: Support for relocatable GDB datadir. Use
9926 GDB_AC_WITH_DIR. Always define TARGET_SYSTEM_ROOT_RELOCATABLE.
9927 * acinclude.m4 (GDB_AC_WITH_DIR): New defun.
9928 * top.c (init_main): Add "set data-directory".
9929 * defs.h (gdb_datadir): Declare.
9930 * main.c (gdb_datadir): New global.
9931 (captured_main): Initialize gdb_datadir. Use relocate_directory.
9932 (relocate_path): New function.
9933 (relocate_directory): Likewise.
9934 (get_init_files): Use relocate_path.
9935 (README): Mention --with-gdb-datadir.
9937 2009-04-23 Joel Brobecker <brobecker@adacore.com>
9939 * ada-tasks (task_command_1): Call target_find_new_threads.
9941 2009-04-23 Joel Brobecker <brobecker@adacore.com>
9943 * stack.c (do_gdb_disassembly): Print the exception message if an
9944 error was thrown while trying to perform the disassembly.
9946 2009-04-22 Jan Kratochvil <jan.kratochvil@redhat.com>
9948 * varobj.c (free_variable): Replace free_current_contents by xfree.
9950 2009-04-22 Kazu Hirata <kazu@codesourcery.com>
9952 * arm-linux-nat.c (fetch_register, store_register): Use
9953 ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
9954 * arm-linux-tdep.c (arm_linux_supply_gregset,
9955 arm_linux_collect_gregset): Likewise.
9956 * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
9957 * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
9959 2009-04-22 Hui Zhu <teawater@gmail.com>
9961 * stack.c (_initialize_stack): Set the default of
9962 disassemble-next-line to off.
9964 2009-04-21 Tom Tromey <tromey@redhat.com>
9966 * acinclude.m4: Use AS_HELP_STRING, not AC_HELP_STRING.
9967 * configure.ac: Use AS_HELP_STRING, not AC_HELP_STRING.
9969 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
9971 * configure.ac: Add quotes to not lose brackets in help text.
9972 * configure: Rebuild.
9974 2009-04-21 Andreas Schwab <schwab@linux-m68k.org>
9976 * configure.ac: Don't postprocess Makefile in config.status.
9977 Substitute GDB_NM_FILE. Don't substitute nm_h.
9978 * Makefile.in (GDB_NM_FILE): Substitute.
9979 (TAGS): Use $(GDB_NM_FILE) instead of $(NAT_FILE).
9980 * configure: Regenerate.
9981 * gnulib/Makefile.in: Regenerate.
9983 2009-04-21 Joseph Myers <joseph@codesourcery.com>
9985 * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir,
9986 --with-htmldir): New.
9987 * configure: Regenerate.
9989 2009-04-21 Tom Tromey <tromey@redhat.com>
9991 * configure: Rebuild.
9992 * configure.ac: Use lower case for start of help strings. Clean
9993 up --with-sysroot help.
9995 2009-04-21 Tom Tromey <tromey@redhat.com>
9997 * configure: Rebuild.
9998 * acinclude.m4 (AM_ICONV): Use AC_HELP_STRING.
9999 * configure.ac: Use AC_HELP_STRING. Use upper case for variables
10002 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
10004 ARI fix: remove "%p".
10005 * ia64-tdep.c (ia64_frame_this_id): Use host_address_to_string function.
10006 (ia64_sigtramp_frame_this_id): Ditto.
10007 (ia64_libunwind_frame_this_id): Ditto.
10008 (ia64_libunwind_sigtramp_frame_this_id): Ditto.
10009 * symmisc.c (maintenance_info_psymtabs): Ditto.
10011 2009-04-21 Joseph Myers <joseph@codesourcery.com>
10013 * configure.ac (--with-relocated-sources): New.
10014 * configure, config.in: Regenerate.
10015 * source.c (add_substitute_path_rule): Remove static.
10016 * source.h (add_substitute_path_rule): Declare.
10017 * main.c: Include "source.h".
10018 (captured_main): Add substitution rule if RELOC_SRCDIR.
10020 2009-04-21 Pierre Muller <muller@ics.u-strasbg.fr>
10022 * gnu-nat.h (proc_debug): Add missing continuation line in macro.
10024 2009-04-20 David Daney <ddaney@caviumnetworks.com>
10026 * NEWS: Mention MIPS/Linux hardware watchpoint support.
10028 2009-04-20 David Daney <ddaney@caviumnetworks.com>
10030 * mips-linux-nat.c (command.h, gdbcmd.h, gdb_assert.h): New #includes.
10031 (maint_show_dr, super_close): New variables.
10032 (super_fetch_registers, super_store_registers): Make static.
10033 (PTRACE_GET_WATCH_REGS, PTRACE_SET_WATCH_REGS, W_BIT, R_BIT, I_BIT)
10034 (W_MASK, R_MASK, I_MASK, IRW_MASK, MAX_DEBUG_REGISTER): Define.
10035 (pt_watch_style): Define new enum.
10036 (mips32_watch_regs, mips64_watch_regs, pt_watch_regs, mips_watchpoint):
10037 Define new structs.
10038 (watch_readback_valid, watch_readback, current_watches, watch_mirror):
10040 (get_irw_mask, get_reg_mask, get_num_valid, get_watchlo)
10041 (set_watchlo, get_watchhi, set_watchhi, mips_show_dr)
10042 (mips_linux_read_watch_registers, mips_linux_can_use_hw_breakpoint)
10043 (mips_linux_stopped_by_watchpoint, mips_linux_stopped_data_address)
10044 (type_to_irw, fill_mask, try_one_watch)
10045 (mips_linux_region_ok_for_hw_watchpoint, write_watchpoint_regs)
10046 (mips_linux_new_thread, populate_regs_from_watches)
10047 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10048 (mips_linux_close): New functions.
10049 (_initialize_mips_linux_nat): Register watchpoint functions with
10050 the target_ops. Add show-debug-regs maintenance command.
10052 2009-04-20 David Daney <ddaney@caviumnetworks.com>
10054 * infrun.c (handle_inferior_event): Move gegisters_changed call down.
10056 2009-04-19 Pedro Alves <pedro@codesourcery.com>
10058 * NEWS: Mention gdbserver support for x86 Windows CE.
10060 2009-04-19 Eli Zaretskii <eliz@gnu.org>
10062 * config/djgpp/fnchange.lst: Fix typos.
10064 Set default host and target charsets in the DJGPP port.
10066 * config/djgpp/config.sed (am_cv_langinfo_codeset)
10067 (bash_cv_langinfo_codeset, ac_cv_header_nl_types_h): Set to "yes"
10068 in all configure scripts that define ac_cv_env_CPP_value.
10070 * go32-nat.c (dos_codepage, nl_langinfo): New functions.
10071 Include langinfo.h.
10073 * config/djgpp/nl_types.h: New file.
10075 * config/djgpp/langinfo.h: New file.
10077 * config/i386/go32.mh (MH_CFLAGS): Add $(srcdir)/config/djgpp.
10079 2009-04-18 Carlos O'Donell <carlos@codesourcery.com>
10081 * Makefile.in (MAKEHTML): Set to makeinfo --html.
10082 (MAKEHTMLFLAGS): Set to empty.
10084 2009-04-18 Eli Zaretskii <eliz@gnu.org>
10086 * NEWS: Mention all new set/show commands added since GDB 6.8 was
10089 * go32-nat.c (go32_sysinfo): Check if the call to
10090 __dpmi_get_capabilities fills the buffer with information, and
10091 don't use the buffer if not.
10093 2009-04-17 Tom Tromey <tromey@redhat.com>
10095 * charset.c (_initialize_charset): Add special case for "646".
10097 2009-04-17 Carlos O'Donell <carlos@codesourcery.com>
10099 * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir.
10100 * configure: Regenerate.
10101 * Makefile.in: Set datarootdir, docdir, htmldir, and pdfdir from
10102 configure substitutions.
10103 (FLAGS_TO_PASS): Add datarootdir, docdir, and htmldir.
10105 2009-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10107 ARI fix: Do not use %p, replace by call to host_address_to_string
10109 * darwin-nat.c (darwin_xfer_partial): Apply change.
10110 * gnu-nat.c (inf_continue, gnu_xfer_memory): Ditto.
10111 * gnu-nat.h (proc_debug): Ditto.
10112 * symmisc.c (maintenance_info_symtabs): Ditto.
10113 (maintenance_info_psymtabs): Ditto.
10114 * windows-nat.c (handle_load_dll): Ditto.
10115 (handle_unload_dll, info_w32_command, handle_exception): Ditto.
10116 * xtensa-tdep.c (xtensa_unwind_pc): Ditto.
10118 2009-04-17 Joseph Myers <joseph@codesourcery.com>
10120 * configure.tgt (i[34567]86-*-linux*): Use 64-bit configuration if
10121 --enable-64-bit-bfd.
10122 (sparc-*-linux*): Likewise.
10124 2009-04-17 Eli Zaretskii <eliz@gnu.org>
10126 * go32-nat.c (go32_sysinfo): Update list of Windows versions of
10129 2009-04-16 Pedro Alves <pedro@codesourcery.com>
10131 * remote.c (remote_query_attached): Fix pasto in packet_ok result
10134 2009-04-16 Joel Brobecker <brobecker@adacore.com>
10136 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
10137 Revert the previous change. Might not be correct, actually.
10139 2009-04-16 Joel Brobecker <brobecker@adacore.com>
10141 * ada-lang.h (ada_adjust_exception_stop, ada_print_exception_stop)
10142 (ada_get_current_task, ada_print_exception_breakpoint_nontask)
10143 (ada_print_exception_breakpoint_task, ada_reset_thread_registers):
10144 Remove declaration. These are non-existent functions.
10146 2009-04-16 Joel Brobecker <brobecker@adacore.com>
10148 * procfs.c (solib_mappings_callback, find_memory_regions_callback):
10149 Fix a compilation warning on mips-irix due to casting from
10150 a pointer of different size.
10152 2009-04-16 Joel Brobecker <brobecker@adacore.com>
10154 * ada-lang.c (symtab_for_sym): Delete.
10155 (user_select_syms): Use sym->symtab instead of calling symtab_for_sym.
10157 2009-04-16 Joel Brobecker <brobecker@adacore.com>
10159 * ada-lang.c (extract_string): Delete.
10160 (ada_main_name): Reimplement using target_read_string instead of
10163 2009-04-16 Andreas Schwab <schwab@linux-m68k.org>
10165 * m68klinux-nat.c: Remove obsolete comment.
10166 (fetch_register, store_register): Don't call
10167 gdbarch_cannot_fetch_register or gdbarch_cannot_store_register,
10168 which are always nops here.
10170 2009-04-14 Tom Tromey <tromey@redhat.com>
10172 * c-lang.c (c_emit_char): Use INTERMEDIATE_ENCODING.
10173 (c_printstr): Likewise.
10174 * charset.c: Include gdb_wait.h.
10175 (make_wchar_iterator): Use INTERMEDIATE_ENCODING.
10176 (find_charset_names): Use pexecute. Handle libiconv's output.
10178 (_initialize_charset): Use xstrdup.
10179 * gdb_wchar.h: Check HAVE_BTOWC. Split PHONY_ICONV and wchar
10181 (INTERMEDIATE_ENCODING): New define.
10182 * configure, config.in: Rebuild.
10183 * configure.ac: Check for btowc.
10185 2009-04-15 Tom Tromey <tromey@redhat.com>
10187 * c-lang.c (evaluate_subexp_c): Correctly handle EVAL_SKIP.
10189 2009-04-15 Eli Zaretskii <eliz@gnu.org>
10191 * utils.c (parse_escape): Initialize target_char to pacify GCC.
10193 2009-04-14 Jan Kratochvil <jan.kratochvil@redhat.com>
10195 * c-lang.c (c_get_string): Fix xfree crash on a failed string read.
10197 2009-04-14 Pierre Muller <muller@ics.u-strasbg.fr>
10199 ARI fix: sprintf rule.
10200 * ada-exp.y (convert_char_literal): Replace sprintf by xsnprintf.
10201 * ada-lang.c (add_angle_brackets): Use xstrprintf.
10202 (ada_decode): Replace sprintf by xsnprintf.
10203 (find_old_style_renaming_symbol): Ditto.
10204 (ada_to_fixed_type_1, ada_enum_name): Ditto.
10207 2009-04-14 Joel Brobecker <brobecker@adacore.com>
10209 * target.c (target_mourn_inferior): Call bfd_cache_close_all
10210 after having executed the target mourn_inferior routine.
10212 2009-04-14 Eli Zaretskii <eliz@gnu.org>
10214 * config/djgpp/djconfig.sh (DEPDIR): Define to "_deps", if
10217 2009-04-13 David Daney <ddaney@caviumnetworks.com>
10219 * infrun.c (maybe_software_singlestep): New function.
10220 (resume): Call maybe_software_singlestep.
10221 (handle_inferior_event): Same.
10223 2009-04-13 Tom Tromey <tromey@redhat.com>
10225 * python/python-frame.c (frapy_richcompare): Return
10226 Py_NotImplemented, not an error. Handle Py_NE as well.
10228 2009-04-13 Eli Zaretskii <eliz@gnu.org>
10230 * charset.c (EILSEQ): Define if not defined by system headers.
10232 2009-04-11 Eli Zaretskii <eliz@gnu.org>
10234 * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
10235 to be consistent with renaming config.intl.in into config_intl.in.
10237 * go32-nat.c (go32_attach, go32_detach): Fix prototypes to be
10238 consistent with the change from 2008-11-09.
10240 2009-04-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10242 * gdbtypes.c: Remove excessive parentheses at the return keywords.
10243 * varobj.c (varobj_invalidate): Fix indentation.
10244 * varobj.c (varobj_invalidate): Fix formatting text width.
10246 2009-04-08 Vladimir Prus <vladimir@codesourcery.com>
10248 Implement -exec-jump.
10250 * mi/mi-cmds.h (mi_cmd_exec_jump): Declare.
10251 * mi/mi-main.c (mi_cmd_exec_jump): New.
10252 * mi/mi-cmds.c (mi_cmds): Register exec-jump.
10254 2009-04-07 Doug Evans <dje@google.com>
10256 * symfile.c (symbol_file_clear): Fix indentation.
10258 2009-04-06 Mark Kettenis <kettenis@gnu.org>
10260 * sparc64nbsd-nat.c (sparc64nbsd_supply_pcb): Fix comment.
10262 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10264 * ppc-linux-nat.c (ppc_linux_target_wordsize): New function.
10265 (ppc_linux_auxv_parse): New function.
10266 (ppc_linux_read_description): Use ppc_linux_target_wordsize.
10267 (_initialize_ppc_linux_nat): Install ppc_linux_auxv_parse.
10269 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10271 * spu-linux-nat.c (spu_bfd_open): Set filename of in-memory
10272 BFD to contents of SPU name note.
10273 (spu_symbol_file_add_from_memory): Call symbol_file_add_from_bfd
10274 with "from_tty" argument 1 instead of 0.
10276 2009-04-02 Jan Kratochvil <jan.kratochvil@redhat.com>
10279 (new_symbol <DW_TAG_variable> <!DW_AT_location> <DW_AT_external>):
10280 Create the symbol in local scope.
10281 * symtab.h (cu->list_in_scope <LOC_UNRESOLVED>): New comment part.
10283 2009-04-02 Keith Seitz <keiths@redhat.com>
10285 * stabsread.c (read_member_functions): GCC may emit an extra space
10286 at the end of the names "__base_ctor" and "__base_dtor"; so ignore
10287 whitespace when looking for these functions.
10289 2009-04-01 Joel Brobecker <brobecker@adacore.com>
10291 Change the default value for "set print frame-arguments" to scalars.
10293 * stack.c (print_frame_arguments): Set initial value to "scalars".
10295 2009-04-01 Aleksandar Ristovski <aristovski@qnx.com>
10297 * mips-tdep.c (mips_numeric_register_alieses): New definition.
10298 (mips_gdbarch_init): Add user registers from
10299 mips_numeric_register_aliases.
10301 2009-04-01 Joel Brobecker <brobecker@adacore.com>
10303 * linux-nat.c (linux_nat_filter_event): Minor comment reformatting.
10305 2009-04-01 Joel Brobecker <brobecker@adacore.com>
10307 * linux-nat.c (linux_nat_filter_events): Do not delete the lwp if
10308 this is the last one.
10310 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10312 * remote.c (append_resumption): New.
10313 (remote_vcont_resume): Use it.
10315 2009-04-01 Joel Brobecker <brobecker@adacore.com>
10317 * windows-nat.c (+windows_get_ada_task_ptid): New function.
10318 (init_windows_ops): Set windows_ops.to_get_ada_task_ptid.
10320 2009-03-31 Daniel Jacobowitz <dan@codesourcery.com>
10321 Keith Seitz <keiths@redhat.com>
10322 Jan Kratochvil <jan.kratochvil@redhat.com>
10325 * Makefile.in (dbxread.o): Update.
10326 * dbxread.c (read_dbx_symtab): Use cp_canonicalize_string.
10327 * dwarf2read.c (GDB_FORM_cached_string): New.
10328 (read_partial_die): Use dwarf2_canonicalize_name.
10329 (dwarf2_linkage_name): Use dwarf2_name.
10330 (dwarf2_canonicalize_name): New.
10331 (dwarf2_name): Use dwarf2_canonicalize_name.
10332 (dwarf_form_name, dump_die): Handle GDB_FORM_cached_string.
10333 * stabsread.c (define_symbol, read_type): Use cp_canonicalize_string.
10334 * symtab.c (lookup_symbol_in_language): Canonicalize input before
10336 * cp-name-parser.y: operator() requires two parameters,
10337 according to libiberty.
10338 * minsyms.c (lookup_minimal_symbol): Canonicalize input
10342 2009-03-31 Joel Brobecker <brobecker@adacore.com>
10344 Provide support for (Ada) task-specific breakpoints.
10346 * ada-lang.h (ada_get_task_number): Add declaration.
10347 (breakpoint_ada_task_match): Delete declaration.
10348 * ada-tasks.c (ada_get_task_number): Make non-static.
10349 * breakpoint.h (struct breakpoint): Add field "task".
10350 * breakpoint.c (print_one_breakpoint_location): Add handling of
10351 task-specific breakpoints.
10352 (create_breakpoint, create_breakpoints, find_condition_and_thread):
10353 New parameter "task".
10354 (break_command_really): Update calls to find_condition_and_thread
10355 and create_breakpoints.
10356 (breakpoint_re_set_one): Update call to find_condition_and_thread.
10359 2009-03-31 Joel Brobecker <brobecker@adacore.com>
10361 * ada-tasks.c (short_task_info): Eliminate the "Running" task state.
10363 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10365 * remote.c (remote_notice_new_inferior): Use ptid_is_pid. Check
10366 if the thread's ptid without a thread id field is in the list
10367 before calling thread_change_ptid.
10368 (extended_remote_attach_1): In non-stop mode, do not rely on
10369 querying the current thread, instead, query the thread list, and
10370 select the first thread of the process.
10371 * gdbthread.h (first_thread_of_process): Declare.
10372 * thread.c (first_thread_of_process): Define.
10374 2009-03-30 Stan Shebs <stan@codesourcery.com>
10376 Make tracepoints into a type of breakpoint.
10377 * breakpoint.h (enum bptype): Add bp_tracepoint.
10378 (struct breakpoint): Add fields step_count, pass_count, actions.
10379 (get_tracepoint, get_tracepoint_by_number): Declare.
10380 (all_tracepoints): Declare.
10381 * breakpoint.c: Include tracepoint.h, readline.h.
10382 (ALL_TRACEPOINTS): Move here from tracepoint.c.
10383 (tracepoint_count): Ditto.
10384 (should_be_inserted): GDB does not insert tracepoints itself.
10385 (print_it_typical): Add tracepoint case.
10386 (bpstat_what): Ditto.
10387 (print_one_breakpoint_location): Ditto, and add printing for
10388 pass count, step count, and action list.
10389 (user_settable_breakpoint): Add tracepoint case.
10390 (allocate_bp_location): Ditto.
10391 (set_breakpoint_location_function): Ditto.
10392 (disable_breakpoints_in_shlibs): Ditto.
10394 (break_command_really): Add argument traceflag, use to choose
10395 basic breakpoint type.
10396 (break_command_1): Pass extra argument.
10397 (set_breakpoint, handle_gnu_v3_exceptions): Ditto.
10398 (breakpoint_re_set_one): Add tracepoint case.
10399 (disable_command, enable_command): Ditto.
10400 (set_tracepoint_count): Move here from tracepoint.c.
10401 (trace_command): Move here from tracepoint.c and use
10402 break_command_really.
10403 (tracepoints_info): Move here from tracepoint.c and call
10405 (enable_trace_command): Move here from tracepoint.c and call
10407 (disable_trace_command): Move here from tracepoint.c and call
10409 (delete_trace_command): Move here from tracepoint.c and call
10411 (trace_pass_command): Move here from tracepoint.c.
10412 (get_tracepoint_by_number): Ditto.
10413 (tracepoint_save_command): Ditto.
10414 (get_tracepoint): New function.
10415 (all_tracepoints): New function.
10416 (_initialize_breakpoint): Move tracepoint init from tracepoint.c,
10417 deprecate "enable trace" and "disable trace" commands.
10418 * tracepoint.h (struct tracepoint): Remove.
10419 (tracepoint_chain): Remove decl.
10420 (deprecated_create_tracepoint_hook): Remove decl.
10421 (deprecated_delete_tracepoint_hook): Remove decl.
10422 (deprecated_modify_tracepoint_hook): Remove decl.
10423 (ALL_TRACEPOINTS, ALL_TRACEPOINTS_SAFE): Remove.
10424 (free_actions): Update signature.
10425 (validate_actionline): Update signature.
10426 (end_actions_pseudocommand): Declare.
10427 (while_stepping_pseudocommand): Declare.
10428 * tracepoint.c: Include breakpoint.h.
10429 (tracepoint_chain, tracepoint_count): Remove.
10430 (free_actions, make_cleanup_free_actions): Update signature.
10431 (trace_command, set_raw_tracepoint): Remove.
10432 (trace_mention): Remove.
10433 (tracepoints_info): Remove.
10434 (tracepoint_operation, map_args_over_tracepoints): Remove.
10435 (get_tracepoint_by_number): Remove.
10436 (enable_trace_command, disable_trace_command): Remove.
10437 (delete_trace_command, trace_pass_command): Remove.
10438 (trace_actions_command, read_actions): Update signature.
10439 (validate_actionline): Update signature, use bp loc.
10440 (encode_actions): Ditto.
10441 (download_tracepoint): New function, body of trace_start_command.
10442 (trace_start_command): Call it, use all_tracepoints.
10443 (tracepoint_save_command): Remove.
10444 (tracepoint_dump_command): Use get_tracepoint.
10445 (end_actions_pseudocommand): Make globally visible.
10446 (while_stepping_pseudocommand): Ditto.
10447 (_initialize_tracepoint): Move command definitions to breakpoint.c.
10449 2009-03-30 Thiago Jung Bauermann <bauerman@br.ibm.com>
10451 Expose frames to Python.
10452 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-frame.o.
10453 (SUBDIR_PYTHON_SRCS): Add python-frame.c.
10454 (python-frame.o): New target.
10455 * python/python-frame.c: New file.
10456 * python/python-internal.h (gdbpy_frames, gdbpy_newest_frame,
10457 gdbpy_frame_stop_reason_string, gdbpy_selected_frame,
10458 gdbpy_initialize_frames): New prototypes.
10459 * python/python.c (_initialize_python): Call gdbpy_initialize_frames.
10460 (GdbMethods): Add `selected_frame' and `frame_stop_reason_string'
10462 * stack.c (find_frame_funname): New function, factored out of
10464 (print_frame): Call find_frame_funname.
10465 * stack.h (find_frame_funname): Add prototype.
10467 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
10469 Remove unused value_object attribute `owned_by_gdb'.
10470 * python/python-value.c (value_object): Remove owned_by_gdb
10472 (valpy_dealloc): Remove reference to self->owned_by_gdb.
10473 (valpy_new): Likewise.
10474 (value_to_value_object): Likewise.
10476 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com>
10478 Change gdb.Value.address from a method to an attribute.
10479 * python/python-value.c (value_object): Add `address' element.
10480 (valpy_dealloc): Decrement reference to self->address if set.
10481 (valpy_new): Initialize val_obj->address.
10482 (valpy_address): Rename to ...
10483 (valpy_get_address): ... this. Change signature from method to
10484 attribute. Update self->address if not set.
10485 (value_to_value_object): Initialize val_obj->address.
10486 (value_object_getset): Add `address' element.
10487 (value_object_methods): Remove `address' element.
10489 2009-03-29 Andreas Schwab <schwab@linux-m68k.org>
10491 * observer.sh: Set LANG/LC_ALL to C, not c.
10493 2009-03-28 Kevin Buettner <kevinb@redhat.com>
10495 * mn10300-tdep.c (mn10300_gdbarch_init): For mn10300, by default,
10496 `char' is unsigned.
10498 2009-03-28 Pedro Alves <pedro@codesourcery.com>
10500 * remote.c (remote_stop_ns): If multi-process extensions are off,
10501 and GDB is requesting the whole process to stop, sent "vCont;t",
10504 2009-03-28 Pedro Alves <pedro@codesourcery.com>
10506 * inf-loop.c (inferior_event_handler): Avoid calling is_running on
10507 null inferior_ptid.
10509 2009-03-27 Eli Zaretskii <eliz@gnu.org>
10511 * config/djgpp/fnchange.lst: Update to fix ARI-reported problems.
10513 2009-03-26 Doug Evans <dje@google.com>
10515 * thread.c (do_restore_current_thread_cleanup): Redo test for
10516 whether to restore old->inferior_ptid.
10518 2009-03-26 Tom Tromey <tromey@redhat.com>
10520 * breakpoint.c (resolve_sal_pc): Preserve original line number
10521 when skipping prologue.
10523 2009-03-26 Doug Evans <dje@google.com>
10525 * thread.c (inferior_thread) Remove "extern" in definition.
10527 2009-03-26 Thiago Jung Bauermann <bauerman@br.ibm.com>
10529 Add gdb.Value.is_optimized_out attribute.
10530 * python/python-value.c (valpy_get_is_optimized_out): New
10532 (value_object_getset): New variable.
10533 (value_object_type): Initialize tp_getset element.
10535 2009-03-26 Joel Brobecker <brobecker@adacore.com>
10537 Recognize missing DW_AT_location as <value optimized out>.
10539 (new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
10540 Call add_symbol_to_list.
10542 2009-03-25 Tom Tromey <tromey@redhat.com>
10544 * gdbtypes.h (CHECK_TYPEDEF): Don't yield a value.
10545 * stack.c (print_this_frame_argument_p): Use check_typedef.
10547 2009-03-25 Tom Tromey <tromey@redhat.com>
10549 * configure: Rebuild.
10550 * acinclude.m4 (AM_ICONV): Set am_cv_use_build_libiconv.
10551 Rearrange flags setting. Add comments.
10553 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
10555 * config/i386/nm-i386.h: Remove code within
10556 I386_WATCHPOINTS_IN_TARGET_VECTOR conditional.
10557 * config/i386/nm-cygwin.h: Remove I386_WATCHPOINTS_IN_TARGET_VECTOR
10559 * config/i386/nm-cygwin64.h: Ditto.
10560 * config/i386/nm-fbsd.h: Ditto.
10561 * config/i386/nm-go32.h: Ditto.
10562 * config/i386/nm-linux.h: Ditto.
10563 * config/i386/nm-linux64.h: Ditto.
10565 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
10567 ARI fix: "xasprintf" rule.
10568 * printcmd.c (sym_info): Replace xasprintf by xstrprintf.
10570 2009-03-25 Pedro Alves <pedro@codesourcery.com>
10572 * remote.c (remote_start_remote): In non-stop mode, call
10573 init_wait_for_inferior before adding threads and inferiors.
10575 2009-03-25 Joel Brobecker <brobecker@adacore.com>
10577 * breakpoint.c (breakpoint_thread_match): Split a large condition
10578 into several smaller conditions. No behavior change.
10580 2009-03-25 Pedro Alves <pedro@codesourcery.com>
10582 * infrun.c (infrun_thread_thread_exit): New.
10583 (_initialize_infrun): Attach it to the thread_exit observer.
10584 * thread.c (delete_thread_1): Always call the observer, passing it
10586 * mi/mi-interp.c (mi_thread_exit): Add "silent" parameter. If
10587 SILENT, return immediately.
10589 2009-03-25 Pedro Alves <pedro@codesourcery.com>
10591 * infrun.c (normal_stop): Use has_stack_frames instead of
10593 * mi/mi-main.c (mi_execute_command): Avoid calling inferior_thread
10594 when there is no thread selected.
10595 (mi_cmd_execute): Don't special case commands that can run without
10596 a valid selected thread.
10597 * top.c (execute_command): Don't special case commands that can
10598 run without a valid selected thread. Use has_stack_frames.
10599 * infcmd.c (ensure_valid_thread): New.
10600 (continue_1, step_1, jump_command, signal_command): Use it.
10601 (detach_command): Error out if there's no selected thread/inferior.
10602 * thread.c (print_thread_info): Allow having no thread selected.
10603 (switch_to_thread): Don't read the PC if there is no current thread.
10604 (do_restore_current_thread_cleanup): Don't record the current
10605 frame if there is no current thread.
10606 (make_cleanup_restore_current_thread): Don't read frame info if
10607 there is no selected thread.
10608 (_initialize_thread): Don't mark commands as
10609 "no_selected_thread_ok".
10610 * frame.c (get_current_frame): Error out if there is no valid
10612 (has_stack_frames): Return false if there is no valid
10614 * cli/cli-cmds.c (init_cli_cmds): Don't mark commands as
10615 "no_selected_thread_ok".
10616 * cli/cli-decode.c (set_cmd_no_selected_thread_ok)
10617 (get_cmd_no_selected_thread_ok): Delete.
10618 * cli/cli-decode.h (CMD_NO_SELECTED_THREAD_OK): Delete.
10619 (set_cmd_no_selected_thread_ok, get_cmd_no_selected_thread_ok):
10620 Delete declaration.
10621 * stack.c (get_selected_block): Use has_stack_frames.
10623 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10625 Fix size of FPSCR in Power 7 processors.
10626 * ppc-linux-nat.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10627 (PPC_FEATURE_HAS_DFP): New #define.
10628 (ppc_linux_read_description): Check for DFP feature instead of
10629 ISA 2.05 to decide on size of the FPSCR.
10631 2009-03-25 Kevin Buettner <kevinb@redhat.com>
10633 * mn10300-tdep.c (trad-frame.h): Don't include.
10634 (prologue-value.h): Include.
10635 (mn10300_frame_unwind_cache, set_reg_offsets): Delete.
10636 (struct mn10300_prologue): Define.
10637 (push_reg, translate_rreg, check_for_saved): New functions.
10638 (mn10300_analyze_prologue): Rewrite, using prologue-value
10639 machinery. Handle more instructions than before. Permit
10640 instructions to occur in any order.
10641 (mn10300_skip_prologue): Find the extents of the function
10642 in question; mn10300_analyze_prologue no longer does this.
10643 (mn10300_analyze_frame_prologue): New function.
10644 (mn10300_frame_base): New function.
10645 (mn10300_frame_this_id): Rewrite, no longer using trad-frame
10647 (mn10300_frame_prev_register): Likewise.
10648 (mn10300_frame_base_address, mn10300_frame_base struct): Delete.
10649 (mn10300_unwind_pc, mn10300_unwind_sp): Rename `next_frame' to
10651 (mn10300_frame_unwind_init): Don't call frame_base_set_default().
10653 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
10655 Fix completer problem for filename completion on the first try.
10657 * gdb/completer.h (gdb_completion_word_break_characters): New function.
10658 * gdb/completer.c: Include gdb_assert.h.
10659 (complete_line_internal_reason): New enum.
10660 (complete_line_internal): Change last argument type to
10661 complete_line_internal_reason.
10662 Modify function to handle the different complete_line_internal_reason
10664 (complete_line): Adapt to change in complete_line_internal.
10665 (command_completer): Ditto.
10666 (gdb_completion_word_break_characters): Implement new function.
10667 * top.c (init_main): Set rl_completion_word_break_hook to
10668 gdb_completion_word_break_characters.
10671 2009-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
10673 ARI fix: "strlen d_name" rule.
10674 * linux-nat.c (linux_nat_xfer_osdata): Use NAMELEN macro.
10677 2009-03-24 Tom Tromey <tromey@redhat.com>
10678 Pedro Alves <pedro@codesourcery.com>
10680 * configure, config.in: Rebuild.
10681 * configure.ac: Check for libiconvlist.
10682 * charset.c: Check HAVE_LIBICONVLIST.
10683 * acinclude.m4 (AM_ICONV): Don't subst LIBICONV, LIBICONV_INCLUDE,
10684 LIBICONV_LIBDIR. Update CPPFLAGS and LIBS.
10685 * Makefile.in (LIBICONV, LIBICONV_INCLUDE, LIBICONV_LIBDIR):
10687 (INTERNAL_CFLAGS_BASE): Update.
10688 (INTERNAL_LDFLAGS): Update.
10691 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10693 * configure.ac: Initialize the variable $PREFER_CURSES.
10694 * configure: Regenerated.
10696 2009-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10698 * configure.ac: Enable $PREFER_CURSES even with default $ENABLE_TUI.
10699 * configure: Regenerated.
10701 2009-03-24 Pierre Muller <muller@ics.u-strasbg.fr>
10703 ARI fix: "strerror" rule.
10704 * darwin-nat.c (darwin_ptrace): Use safe_strerror.
10705 (darwin_stop_inferior, darwin_attach, darwin_detach): Ditto.
10707 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10709 * ada-exp.y (get_symbol_field_type): Make sure to resolve typedefs
10710 before looking up the fields inside our struct type.
10712 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10714 * ada-lang.c (resolve_subexp) [UNOP_QUAL]: Resolve typedefs before
10715 trying to resolve the type qualification.
10717 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10719 * ada-lang.c (ada_evaluate_subexp) [UNOP_IN_RANGE]: make sure
10720 we try to apply the attribute on the real type, rather than
10721 its associated typedef.
10723 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10725 * ada-lang.c (ada_evaluate_subexp) [OP_ATR_MODULUS]: Use check_typdef
10726 to make sure we try to get the modulus of the actual type, not the
10727 associated typedef.
10729 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10731 * ada-lang.c (ada_evaluate_subexp): [OP_ATR_FIRST, OP_ATR_LAST]
10732 [OP_ATR_LENGTH]: When using the attribute on a type, make sure
10733 to get the real type, not the associated typedef.
10735 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10737 * ada-lang.c (ada_get_field_index): Add handling of the case
10738 when TYPE is a typedef of a struct.
10740 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10742 Add gdb_usleep as a portable version of usleep based on gdb_select.
10743 * gdb_usleep.h, gdb_usleep.c: New files.
10744 * Makefile.in (SFILES): Add gdb_usleep.c.
10745 (HFILES_NO_SRCDIR): Add gdb_usleep.h.
10746 (COMMON_OBS): Add gdb_usleep.o.
10747 * ser-unix.c (hardwire_send_break): Replace call to gdb_select
10748 by call to gdb_usleep.
10750 2009-03-23 Joel Brobecker <brobecker@adacore.com>
10752 * buildsym.c (end_symtab): If we ignore the subfiles, then
10753 unlink the associated symtabs if they were already allocated.
10755 2009-03-23 Jerome Guitton <guitton@adacore.com>
10757 Provide a way to force building of GDB with libcurses.
10758 * configure.ac: Add --with-curses.
10759 * configure: Regenerated.
10761 2009-03-23 Tom Tromey <tromey@redhat.com>
10763 * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_uninit>: Fix typo in
10766 2009-03-23 Paul Pluzhnikov <ppluzhnikov@google.com>
10768 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Use
10769 solib_contains_address_p instead of searching.
10771 2009-03-23 Tom Tromey <tromey@redhat.com>
10773 * charset.c (ICONV_CONST) <PHONY_ICONV>: Define.
10774 (iconv): Make 'inbuf' argument const.
10775 (convert_between_encodings): Use ICONV_CONST.
10776 (wchar_iterate): Likewise.
10778 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
10780 * windows-nat.c (AdjustTokenPrivileges): Implement macro wraparound for
10781 dynamically loaded function.
10782 (LookupPrivilegeValueA): Ditto.
10783 (OpenProcessToken): Ditto.
10784 (AdjustTokenPrivileges): Rename and define placeholder for address of
10785 dynamically loaded function.
10786 (LookupPrivilegeValueA): Ditto.
10787 (OpenProcessToken): Ditto.
10788 (set_process_privilege): Remove check for loaded functions.
10789 (bad_OpenProcessToken): Define.
10790 (_initialize_loadable): Load token functions from advapi here, setting
10791 OpenProcessToken function to a dummy static function which always return
10792 error if OS doesn't support this functionality.
10794 2009-03-22 Nicolas Roche <roche@adacore.com>
10795 Christopher Faylor <me+cygwin@cgf.cx>
10797 * win32-nat.c (ctrl_c_handler): New function.
10798 (win32_wait): Register ctrl_c_handler as Ctrl-C handler if the inferior
10799 is run in a separate console.
10801 2009-03-22 Christopher Faylor <me+cygwin@cgf.cx>
10803 * windows-nat.c (DebugActiveProcessStop): Implement macro wraparound
10804 for dynamically loaded function.
10805 (DebugBreakProcess): Ditto.
10806 (DebugSetProcessKillOnExit): Ditto.
10807 (EnumProcessModules): Ditto.
10808 (GetModuleFileNameExA): Ditto.
10809 (GetModuleInformation): Ditto.
10810 (DebugActiveProcessStop): Rename and define placeholder for address of
10811 dynamically loaded function.
10812 (DebugBreakProcess): Ditto.
10813 (DebugSetProcessKillOnExit): Ditto.
10814 (EnumProcessModules): Ditto.
10815 (GetModuleFileNameExA): Ditto.
10816 (GetModuleInformation): Ditto.
10817 (psapi_loaded): Delete.
10818 (get_module_name): Don't check psapi_loaded, just rely on the fact that
10819 dynamically loaded functions will return failure if they weren't
10821 (has_detach_ability): Delete.
10822 (windows_attach): Remove call to has_detach_ability (). Just rely on
10823 functions being callable.
10824 (bad_DebugActiveProcessStop): Define.
10825 (bad_DebugBreakProcess): Ditto.
10826 (bad_DebugSetProcessKillOnExit): Ditto.
10827 (bad_EnumProcessModules): Ditto.
10828 (bad_GetModuleFileNameExA): Ditto.
10829 (bad_GetModuleInformation): Ditto.
10830 (_initialize_loadable): Rename from _initialize_psapi. Initialize all
10831 dynamic storage here, setting nonexistent functions to dummy static
10832 functions which always return error.
10834 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10836 * mi/mi-interp.c (mi_interpreter_init): Attach mi_about_to_proceed
10837 to the about_to_proceed observer notification.
10838 (mi_about_to_proceed): New.
10839 (mi_on_resume): Only output ^running and the prompt here if the
10840 target was proceeded.
10841 * breakpoint.c (breakpoint_proceeded): New static.
10842 (breakpoint_about_to_proceed): New.
10843 (_initialize_breakpoints): Attach breakpoint_about_to_proceed to
10844 the about_to_proceed observer notification.
10845 * inferior.h (breakpoint_proceeded): Delete declaration.
10846 * infrun.c (clear_proceed_status): Don't set breakpoint_proceeded.
10847 Notify the about_to_proceed observers.
10848 (struct inferior_status): Delete breakpoint_proceeded member.
10849 (save_inferior_status): Don't save it.
10850 (restore_inferior_status): Don't restore it.
10851 * mi-main.h (mi_proceeded): Declare.
10852 * mi/mi-main.c (mi_cmd_execute): Clear mi_proceeded before running
10855 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10857 * gdbthread.h (struct thread_info): Add in_infcall member.
10858 * infcall.c (run_inferior_call): Save, set and restore in_infcall.
10859 Remove reverences to suppress_resume_observer. Refresh
10860 `call_thread' after returning from `proceed'.
10861 * infcmd.c (suppress_resume_observer): Delete.
10862 * inferior.h (suppress_resume_observer): Delete declaration.
10863 * mi/mi-interp.c (mi_on_resume): Suppress output while calling an
10865 * thread.c (set_running): Remove references to
10866 suppress_resume_observer.
10867 * infrun.c (struct inferior_status): Add in_infcall member.
10868 (save_inferior_status): Save it.
10869 (restore_inferior_status): Restore it.
10871 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10873 * infcall.c (run_inferior_call): Remove references to
10874 suppress_stop_observer.
10875 * infcmd.c (suppress_stop_observer): Delete.
10876 (finish_command_continuation): Remove NOTE. Don't clear
10877 suppress_stop_observer anymore.
10878 (finish_command_continuation_free_arg): Likewise.
10879 (finish_forward): Remove references to suppress_stop_observer.
10880 Call normal_stop observer if we haven't already.
10881 * inferior.h (suppress_stop_observer): Delete.
10882 * infrun.c (normal_stop): When deciding to suppress the
10883 normal_stop observer, check for proceed_to_finish instead of
10884 suppress_stop_observer.
10886 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10888 * symfile.c (symfile_relocate_debug_section): Remove check for
10891 2009-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10892 Jim Blandy <jimb@red-bean.com>
10893 Thiago Jung Bauermann <bauerman@br.ibm.com>
10894 Tom Tromey <tromey@redhat.com>
10896 Miscellaneous fixes to the Python code.
10897 * python/python-cmd.c (cmdpy_init): Accept keyword
10899 * python/python-value.c (valpy_string): Accept keyword
10901 (valpy_binop): Use `break' to exit from the TRY_CATCH block.
10902 Do not call value_to_value_object on NULL RES_VAL.
10903 (value_object_methods): Change `string' entry to also accept
10905 (convert_value_from_python): Return a copy of the value if obj is
10906 a gdb.Value object.
10907 (value_object_methods): Mark the `string' method as accepting
10908 keywords, and show method "prototype" in the doc string.
10909 * python/python.c (get_parameter): Don't return inside a
10912 2009-03-20 Tom Tromey <tromey@redhat.com>
10914 Add support for convenience functions in Python.
10915 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-function.o.
10916 (SUBDIR_PYTHON_SRCS): Add python-function.c.
10917 (python-function.o): New target.
10918 * eval.c: Include "python/python.h" and <ctype.h>.
10919 (evaluate_subexp_standard): Handle values of type
10920 TYPE_CODE_INTERNAL_FUNCTION.
10921 * gdbtypes.h (type_code): Add TYPE_CODE_INTERNAL_FUNCTION.
10922 * parse.c (write_exp_string): Remove duplicate word in comment.
10923 * python/python-function.c: New file.
10924 * python/python-internal.h (gdbpy_initialize_functions): Add
10926 * python/python.c (_initialize_python): Call
10927 gdbpy_initialize_functions.
10928 * valprint.c (value_check_printable): Handle values of type
10929 TYPE_CODE_INTERNAL_FUNCTION.
10930 * value.c: Include "cli/cli-decode.h".
10931 (internal_function): New struct.
10932 (functionlist, internal_fn_type): New static variables.
10933 (lookup_only_internalvar,
10934 lookup_internalvar): Add const qualifier to name argument.
10935 (create_internalvar): Likewise. Initialize new field.
10936 (set_internal_var): Fix typo in comment. Don't allow assignment
10937 to canonical variable.
10938 (value_create_internal_function, value_internal_function_name,
10939 call_internal_function, function_command, function_destroyer,
10940 add_internal_function): New functions.
10941 (_initialize_values): Create `function' placeholder command.
10942 Initialize internal_fn_type.
10943 * value.h (lookup_only_internalvar, create_internalvar,
10944 lookup_internalvar): Add const qualifier to name argument.
10945 (internal_function_fn, add_internal_function, call_internal_function,
10946 value_internal_function_name): Add prototypes.
10947 (struct internalvar) <canonical>: New field.
10949 2009-03-20 Tom Tromey <tromey@redhat.com>
10951 * c-lang.c (evaluate_subexp_c): Call check_typedef.
10953 2009-03-20 Tom Tromey <tromey@redhat.com>
10954 Julian Brown <julian@codesourcery.com>
10956 PR i18n/7220, PR i18n/7821, PR exp/8815, PR exp/9103,
10957 PR i18n/9401, PR exp/9613:
10959 * value.h (value_typed_string): Declare.
10960 (val_print_string): Update.
10961 * valprint.h (print_char_chars): Update.
10962 * valprint.c (print_char_chars): Add type argument. Update.
10963 (val_print_string): Likewise.
10964 * valops.c (value_typed_string): New function.
10965 * utils.c (host_char_to_target): New function.
10966 (parse_escape): Use host_char_to_target, host_hex_value. Update.
10968 (no_control_char_error): Remove.
10969 * typeprint.c (print_type_scalar): Update.
10970 * scm-valprint.c (scm_scmval_print): Update.
10971 * scm-lang.h (scm_printchar, scm_printstr): Update.
10972 * scm-lang.c (scm_printchar): Add type argument.
10973 (scm_printstr): Likewise.
10974 * printcmd.c (print_formatted): Update.
10975 (print_scalar_formatted): Update.
10976 (printf_command) <wide_string_arg, wide_char_arg>: New constants.
10977 Handle '%lc' and '%ls'.
10978 * parser-defs.h (struct typed_stoken): New type.
10979 (struct stoken_vector): Likewise.
10980 (write_exp_string_vector): Declare.
10981 * parse.c (write_exp_string_vector): New function.
10982 * p-valprint.c (pascal_val_print): Update.
10983 * p-lang.h (is_pascal_string_type, pascal_printchar,
10984 pascal_printstr): Update.
10985 * p-lang.c (is_pascal_string_type): Remove 'char_size' argument.
10986 Add 'char_type' argument.
10987 (pascal_emit_char): Add type argument.
10988 (pascal_printchar): Likewise.
10989 (pascal_printstr): Likewise.
10990 * objc-lang.c (objc_emit_char): Add type argument.
10991 (objc_printchar): Likewise.
10992 (objc_printstr): Likewise.
10993 * macroexp.c (get_character_constant): Handle unicode characters.
10994 Use c_parse_escape.
10995 (get_string_literal): Handle unicode strings. Use
10997 * m2-valprint.c (print_unpacked_pointer): Update.
10998 (m2_print_array_contents): Update.
10999 (m2_val_print): Update.
11000 * m2-lang.c (m2_emit_char): Add type argument.
11001 (m2_printchar): Likewise.
11002 (m2_printstr): Likewise.
11003 * language.h (struct language_defn) <la_printchar>: Add type
11005 <la_printstr, la_emitchar>: Likewise.
11006 (LA_PRINT_CHAR): Likewise.
11007 (LA_PRINT_STRING): Likewise.
11008 (LA_EMIT_CHAR): Likewise.
11009 * language.c (unk_lang_emit_char): Add type argument.
11010 (unk_lang_printchar): Likewise.
11011 (unk_lang_printstr): Likewise.
11012 * jv-valprint.c (java_val_print): Update.
11013 * jv-lang.c (java_emit_char): Add type argument.
11014 * f-valprint.c (f_val_print): Update.
11015 * f-lang.c (f_emit_char): Add type argument.
11016 (f_printchar): Likewise.
11017 (f_printstr): Likewise.
11018 * expprint.c (print_subexp_standard): Update.
11019 * charset.h (target_wide_charset): Declare.
11020 (c_target_char_has_backslash_escape, c_parse_backslash,
11021 host_char_print_literally, host_char_to_target,
11022 target_char_to_host, target_char_to_control_char): Remove.
11023 (enum transliterations): New type.
11024 (convert_between_encodings): Declare.
11025 (HOST_ESCAPE_CHAR): New define.
11026 (host_letter_to_control_character, host_hex_value): Declare.
11027 (enum wchar_iterate_result): New enum.
11028 (struct wchar_iterator): Declare.
11029 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
11030 wchar_push_back): Declare.
11031 * charset-list.h: New file.
11032 * c-valprint.c (textual_name): New function.
11033 (textual_element_type): Handle wide character types.
11034 (c_val_print): Pass original type to textual_element_type. Handle
11035 wide character types.
11036 (c_value_print): Use textual_element_type. Pass original type of
11037 value to val_print.
11038 * c-lang.h (enum c_string_type): New type.
11039 (c_printchar, c_printstr): Update.
11040 * c-lang.c (classify_type): New function.
11041 (print_wchar): Likewise.
11042 (c_emit_char): Add type argument. Handle wide characters.
11043 (c_printchar): Likewise.
11044 (c_printstr): Add type argument. Handle wide and multibyte
11046 (convert_ucn): New function.
11047 (emit_numeric_character): Likewise.
11048 (convert_octal): Likewise.
11049 (convert_hex): Likewise.
11050 (ADVANCE): New macro.
11051 (convert_escape): New function.
11052 (parse_one_string): Likewise.
11053 (evaluate_subexp_c): Likewise.
11054 (exp_descriptor_c): New global.
11055 (c_language_defn): Use exp_descriptor_c.
11056 (cplus_language_defn): Likewise.
11057 (asm_language_defn): Likewise.
11058 (minimal_language_defn): Likewise.
11059 (charset_for_string_type): New function.
11060 * c-exp.y (%union): Add 'svec' and 'tsval'.
11062 (exp): Add CHAR production.
11063 (string_exp): Rewrite.
11064 (exp) <string_exp>: Rewrite.
11065 (tempbuf): Now global.
11066 (tempbuf_init): New global.
11067 (parse_string_or_char): New function.
11068 (yylex) <tempbuf>: Now global.
11069 <tokptr, tempbufindex, tempbufsize, token_string, class_prefix>:
11071 Handle 'u', 'U', and 'L' prefixes. Call parse_string_or_char.
11072 (c_parse_escape): New function.
11073 * auxv.c (fprint_target_auxv): Update.
11074 * ada-valprint.c (ada_emit_char): Add type argument.
11075 (ada_printchar): Likewise.
11076 (ada_print_scalar): Update.
11077 (printstr): Add type argument. Update calls to ada_emit_char.
11078 (ada_printstr): Add type argument.
11079 (ada_val_print_array): Update.
11080 (ada_val_print_1): Likewise.
11081 * ada-lang.c (emit_char): Add type argument.
11082 * ada-lang.h (ada_emit_char, ada_printchar, ada_printstr): Add
11084 * gdb_locale.h: Include langinfo.h.
11085 * charset.c (_initialize_charset): Set default host charset from
11086 the locale. Don't register charsets. Add target-wide-charset
11087 commands. Call find_charset_names.
11088 (struct charset, struct translation): Remove.
11089 (GDB_DEFAULT_HOST_CHARSET): Remove.
11090 (GDB_DEFAULT_TARGET_WIDE_CHARSET): New define.
11091 (target_wide_charset_name): New global.
11092 (show_host_charset_name): Handle "auto".
11093 (show_target_wide_charset_name): New function.
11094 (host_charset_enum, target_charset_enum): Remove.
11095 (charset_enum): New global.
11096 (all_charsets, register_charset, lookup_charset, all_translations,
11097 register_translation, lookup_translation): Remove.
11098 (simple_charset, ascii_print_literally, ascii_to_control): Remove.
11099 (iso_8859_print_literally, iso_8859_to_control,
11100 iso_8859_family_charset): Remove.
11101 (ebcdic_print_literally, ebcdic_to_control,
11102 ebcdic_family_charset): Remove.
11103 (struct cached_iconv, check_iconv_cache, cached_iconv_convert,
11104 register_iconv_charsets): Remove.
11105 (target_wide_charset_be_name, target_wide_charset_le_name): New
11107 (identity_either_char_to_other): Remove.
11108 (set_be_le_names, validate): New functions.
11109 (backslashable, backslashed, represented): Remove.
11110 (default_c_target_char_has_backslash_escape): Remove.
11111 (default_c_parse_backslash, iconv_convert): Remove.
11112 (ascii_to_iso_8859_1_table, ascii_to_ebcdic_us_table,
11113 ascii_to_ibm1047_table, iso_8859_1_to_ascii_table,
11114 iso_8859_1_to_ebcdic_us_table, iso_8859_1_to_ibm1047_table,
11115 ebcdic_us_to_ascii_table, ebcdic_us_to_iso_8859_1_table,
11116 ebcdic_us_to_ibm1047_table, ibm1047_to_ascii_table,
11117 ibm1047_to_iso_8859_1_table, ibm1047_to_ebcdic_us_table): Remove.
11118 (table_convert_char, table_translation, simple_table_translation):
11120 (current_host_charset, current_target_charset,
11121 c_target_char_has_backslash_escape_func,
11122 c_target_char_has_backslash_escape_baton): Remove.
11123 (c_parse_backslash_func, c_parse_backslash_baton): Remove.
11124 (host_char_to_target_func, host_char_to_target_baton): Remove.
11125 (target_char_to_host_func, target_char_to_host_baton): Remove.
11126 (cached_iconv_host_to_target, cached_iconv_target_to_host):
11128 (lookup_charset_or_error, check_valid_host_charset): Remove.
11129 (set_host_and_target_charsets): Remove.
11130 (set_host_charset, set_target_charset): Remove.
11131 (set_host_charset_sfunc, set_target_charset_sfunc): Rewrite.
11132 (set_target_wide_charset_sfunc): New function.
11133 (show_charset): Print target wide character set.
11134 (host_charset, target_charset): Rewrite.
11135 (target_wide_charset): New function.
11136 (c_target_char_has_backslash_escape): Remove.
11137 (c_parse_backslash): Remove.
11138 (host_letter_to_control_character): New function.
11139 (host_char_print_literally): Remove.
11140 (host_hex_value): New function.
11141 (target_char_to_control_char): Remove.
11142 (cleanup_iconv): New function.
11143 (convert_between_encodings): New function.
11144 (target_char_to_host): Remove.
11145 (struct wchar_iterator): Define.
11146 (make_wchar_iterator, make_cleanup_wchar_iterator, wchar_iterator,
11147 wchar_push_back): New functions.
11148 (do_cleanup_iterator): New function.
11149 (char_ptr): New typedef.
11150 (charsets): New global.
11151 (add_one, find_charset_names): New functions.
11152 (default_charset_names): New global.
11153 (auto_host_charset_name): Likewise.
11154 * aclocal.m4, config.in, configure: Rebuild.
11155 * configure.ac: Call AM_LANGINFO_CODESET.
11156 (GDB_DEFAULT_HOST_CHARSET): Default to UTF-8.
11157 (AM_ICONV): Invoke earlier.
11158 * acinclude.m4: Include codeset.m4. Subst LIBICONV_INCLUDE and
11159 LIBICONV_LIBDIR. Check for libiconv in build tree.
11160 * Makefile.in (LIBICONV_LIBDIR, LIBICONV_INCLUDE): New macros.
11161 (INTERNAL_CFLAGS_BASE): Add LIBICONV_INCLUDE.
11162 (INTERNAL_LDFLAGS): Add LIBICONV_LIBDIR.
11163 * gdb_obstack.h (obstack_grow_wstr): New define.
11164 * gdb_wchar.h: New file.
11165 * defs.h: Include it.
11167 2009-03-20 Tom Tromey <tromey@redhat.com>
11168 Jan Kratochvil <jan.kratochvil@redhat.com>
11170 * dwarf2read.c (process_die): Handle DW_TAG_typedef.
11171 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Strip a single
11173 * ada-lang.c (decode_packed_array_type): Call CHECK_TYPEDEF on the
11174 SYMBOL_TYPE result.
11175 * ada-typeprint.c (print_array_type): Do the NULL check
11178 2009-03-19 Tom Tromey <tromey@redhat.com>
11180 * utils.c (do_obstack_free): New function.
11181 (make_cleanup_obstack_free): Likewise.
11182 * defs.h (make_cleanup_obstack_free): Declare.
11184 2009-03-18 Doug Evans <dje@google.com>
11186 * linux-nat.c (linux_nat_find_memory_regions): Result of PIDGET is an
11187 int, not a long long.
11188 (linux_nat_info_proc_cmd): Store pid in long instead of long long.
11190 * expprint.c (dump_raw_expression): Print note if non-NULL.
11192 * printcmd.c (display_uses_solib_p): Redo loop, scan element list
11195 2009-03-18 Nathan Sidwell <nathan@codesourcery.com>
11197 * Makefile.in: Update license to GPLv3.
11198 * ada-exp.y: Update license to GPLv3.
11199 * ada-lex.l: Update license to GPLv3.
11200 * c-exp.y: Update license to GPLv3.
11201 * cp-name-parser.y: Update license to GPLv3.
11202 * darwin-nat-info.c: Update license to GPLv3.
11203 * f-exp.y: Update license to GPLv3.
11204 * gdb_thread_db.h: Update license to GPLv3.
11205 * hppanbsd-nat.c: Update license to GPLv3.
11206 * hppanbsd-tdep.c: Update license to GPLv3.
11207 * hppaobsd-tdep.c: Update license to GPLv3.
11208 * jv-exp.y: Update license to GPLv3.
11209 * m2-exp.y: Update license to GPLv3.
11210 * objc-exp.y: Update license to GPLv3.
11211 * p-exp.y: Update license to GPLv3.
11212 * reply_mig_hack.awk: Update license to GPLv3.
11213 * reverse.c: Update license to GPLv3.
11214 * xtensa-xtregs.c: Update license to GPLv3.
11216 2009-03-18 Pedro Alves <pedro@codesourcery.com>
11218 * remote.c (remote_close): Don't call generic_mourn_inferior.
11219 (remote_mourn_1): Call generic_mourn_inferior after closing the
11222 2009-03-18 Pedro Alves <pedro@codesourcery.com>
11224 * remote.c (remote_start_remote): Add missing call to
11225 init_wait_for_inferior in non-stop mode.
11227 2009-03-18 Pedro Alves <pedro@codesourcery.com>
11229 * breakpoint.c (bpstat_should_step): Only consider software
11230 watchpoints that have a location.
11232 2009-03-17 Joel Brobecker <brobecker@adacore.com>
11234 Add a target_ops parameter to the to_kill method in struct target_ops.
11236 * target.h (struct target_ops): Add a "target_ops *" parameter to
11238 (target_kill): Remove macro. Add declaration.
11239 * target.c (debug_to_kill): Delete, no longer necessary.
11240 (target_kill): New function.
11241 (update_current_target): Stop inheriting the to_kill method.
11242 Do not de_fault it to no_process either.
11243 (setup_target_debug): Do not set current_target.to_kill.
11244 * gnu-nat.c, go32-nat.c, hpux-thread.c, inf-ptrace.c, inf-ttrace.c,
11245 linux-nat.c, monitor.c, nto-procfs.c, procfs.c, remote-m32r-sdi.c,
11246 remote-mips.c, remote-sim.c, remote.c, windows-nat.c: Update
11249 2009-03-17 Doug Evans <dje@google.com>
11251 * amd64-linux-nat.c (si_timerid,si_overrun): Provide definition for
11252 glibc 2.3.2 and earlier.
11254 2009-03-17 Joel Brobecker <brobecker@adacore.com>
11256 * frame.c (get_prev_frame_1): Do not perform the inner_frame
11257 sanity check if this_frame is not NORMAL.
11258 (frame_id_inner): Update the description of this function.
11260 2009-03-17 Hui Zhu <teawater@gmail.com>
11262 * stack.c: Change the introduce of "disassemble-next-line".
11264 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11266 * mi/mi-main.h (mi_print_timing_maybe): Add strict prototype,
11269 2009-03-17 Hui Zhu <teawater@gmail.com>
11271 * stack.c: Include valprint.h.
11272 (disassemble_next_line): New enum.
11273 (show_disassemble_next_line): New function. Show the current
11274 value of disassemble-next-line.
11275 (gdb_disassembly_stub_args): New struct for argument passing
11276 between function do_gdb_disassembly and function
11277 gdb_disassembly_stub.
11278 (gdb_disassembly_stub): New function. Helper for
11280 (do_gdb_disassembly): New function. Use TRY_CATCH to catch
11281 the exception from the gdb_disassembly because it will be
11282 broken by filter sometime.
11283 (print_frame_info): If disassemble-next-line is set to auto
11284 or on and doesn't have the line debug messages for $pc,
11285 output the next instruction.
11286 If disassemble-next-line is set to on and there is line debug
11287 messages, output assembly codes for next line.
11288 (_initialize_stack): Make the "set disassemble-next-line"
11289 command an auto-boolean command. Change its class to
11290 class_stack. Place it in the top level set list. Extend help
11291 to describe the auto mode.
11293 2009-03-17 Pedro Alves <pedro@codesourcery.com>
11295 * infrun.c (normal_stop): Don't overwrite old_chain.
11297 2009-03-16 Joel Brobecker <brobecker@adacore.com>
11299 * remote-mips.c (mips_load): Replace call to regcache_set_valid_p,
11300 which is undefined, by call to regcache_invalidate, which should
11301 do what the original author wanted to do.
11303 2009-03-16 Joel Brobecker <brobecker@adacore.com>
11305 * remote-mips.c (mips_mourn_inferior): Add missing ops parameter.
11306 (mips_create_inferior): Likewise.
11308 2009-03-16 Joel Brobecker <brobecker@adacore.com>
11310 * go32-nat.c (go32_create_inferior): Add missing ops parameter.
11312 2009-03-16 Joel Brobecker <brobecker@adacore.com>
11314 * darwin-nat.c (darwin_resume): Fix a compiler warning when
11315 building on x86_64-darwin.
11317 2009-03-16 Tristan Gingold <gingold@adacore.com>
11319 * configure.tgt: Add handling for x86_64-darwin.
11321 2009-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
11323 * auxv.c (fprint_target_auxv): New TAG for AT_RANDOM.
11325 2009-03-15 Joel Brobecker <brobecker@adacore.com>
11327 * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
11328 Use the ops parameter to get to the target beneath, rather than
11329 using the current_target global. Using the current_target global
11330 was an unintended accident.
11332 2009-03-15 Joel Brobecker <brobecker@adacore.com>
11334 Fix an error happening while loading symbols from a core file
11337 * rs6000-nat.c (xcoff_relocate_symtab): Use target_has_execution
11338 to detect whether we're debugging a core file or not.
11340 2009-03-15 Joel Brobecker <brobecker@adacore.com>
11342 Modernize the aix-thread later by getting rid of the base_target
11343 global. This brings back to life the AIX port which was otherwise
11344 crashing all the time.
11346 * aix-thread.c (base_target): Delete.
11347 (pd_enable): Do not set base_target.
11348 (aix_thread_attach): Use find_target_beneath instead of base_target.
11349 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
11350 (aix_thread_fetch_registers, aix_thread_store_registers),
11351 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
11352 (aix_thread_thread_alive, aix_thread_pid_to_str): Likewise.
11353 (aix_thread_kill): Delete. Does not seem necessary.
11354 (init_aix_thread_ops): Do not set aix_thread_ops.to_kill.
11356 2009-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11358 * stack.c (return_command <retval_exp>): New variables retval_expr
11359 and old_chain. Inline parse_and_eval to initialize retval_expr. Check
11360 RETVAL_EXPR for UNOP_CAST and set RETURN_TYPE to the RETURN_VALUE type
11361 if RETURN_TYPE is NULL.
11363 2009-03-14 Pedro Alves <pedro@codesourcery.com>
11365 * remote.c (PACKET_qAttached): New.
11366 (remote_query_attached): New.
11367 (remote_add_inferior): Add new `attached' argument. Handle it.
11368 (remote_notice_new_inferior, remote_start_remote): Adjust to pass
11369 -1 to remote_add_inferior in new parameter.
11370 (extended_remote_attach_1): Adjust to pass 1 to
11371 remote_add_inferior in the new parameter.
11372 (extended_remote_create_inferior_1): Adjust to pass 0 to
11373 remote_add_inferior in the new parameter.
11374 (_initialize_remote): Add "set/show remote query-attached-packet"
11377 2009-03-13 Tom Tromey <tromey@redhat.com>
11379 * symtab.c (lookup_symbol_in_language): Use a cleanup.
11381 2009-03-13 Doug Evans <dje@google.com>
11383 * exceptions.h: Clean up some comments on catch_exceptions usage.
11384 * exceptions.c: Ditto. Plus mark catch_errors as superseded by
11387 2009-02-17 Joel Brobecker <brobecker@adacore.com>
11389 The following patch helps getting rid of a warning inside solib-som.c.
11391 * source.c (source_full_path_of): Constify parameter filename.
11392 * defs.h (source_full_path_of): Update declaration accordingly.
11394 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11396 * ada-lang.c (ada_evaluate_subexp): Merge case BINOP_REM and
11397 BINOP_MOD cases with the handling of case BINOP_DIV and BINOP_MUL.
11398 Remove useless op value checks when EVAL_AVOID_SIDE_EFFECTS.
11400 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11402 * ada-lang.c (ada_evaluate_subexp) <BINOP_DIV>: make sure to
11403 promote the operands when noside is EVAL_AVOID_SIDE_EFFECTS.
11405 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11407 * ada-tasks.c (ada_task_is_alive): Move up and make static.
11408 * ada-lang.h (ada_task_is_alive): Remove declaration.
11410 2009-03-12 Jerome Guitton <guitton@adacore.com>
11412 * ada-lang.c (ada_delta): Change the type of numerators and
11413 denominators to DOUBLEST, as they may not fit into a long.
11414 (scaling_factor): Ditto.
11416 2009-03-12 Jerome Guitton <guitton@adacore.com>
11418 * language.c (lang_bool_type): Set lai->bool_type_symbol to NULL.
11420 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11422 * ada-lang.c (ada_evaluate_subexp) [OP_VAR_VALUE]: For tagged
11423 types, if we are unable to determine the actual symbol type
11424 from its tag, then use the static approximation instead.
11426 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11428 Fix crash printing packed record with packed array.
11430 * ada-lang.c (ada_modulus_from_name): New function.
11431 (ada_modulus): In the case where the type length is bigger than
11432 the size of the type used to hold the bounds, try determining
11433 the modulus from the type name.
11434 (ada_value_primitive_packed_val): Fix bug in the computation of
11435 ntarg causing an out-of-buffer invalid access.
11437 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11439 Fix segfault when printing short_integer'last.
11441 * ada-lang.c (ada_find_any_type): Search in the primitive types
11442 if a symbol could not be found.
11444 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11446 * ada-tasks.c (task_states,long_task_states): Add new states
11447 Activating and Acceptor_Delay_Sleep. Update the description
11448 of state Acceptor_Sleep.
11450 2009-03-12 Jonas Maebe <jonas.maebe@elis.ugent.be> (obvious change)
11452 Fix a build failure on Darwin following some changes in
11453 the profile of some target_ops methods.
11455 * darwin-nat.c (darwin_kill_inferior): Add target_ops parameter
11457 (darwin_stop_inferior, darwin_detach): Likewise.
11459 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
11461 Include token in ^running notification for CLI commands.
11463 * mi/mi-main.c (mi_execute_command): Set current_token here.
11464 (mi_cmd_execute): Do not set current_token here.
11466 2009-03-12 Vladimir Prus <vladimir@codesourcery.com>
11470 * mi/mi-main.c (mi_print_timing_maybe): New.
11471 (captured_mi_execute_command): Simplify. Output timings to
11473 (mi_execute_async_cli_command): Do not print timings.
11474 * mi/mi-main.h (mi_print_timing_maybe): Declare.
11475 * mi/mi-interp.c (mi_on_normal_stop): Call mi_print_timing_maybe.
11477 2009-03-12 Jerome Guitton <guitton@adacore.com>
11479 * xcoffread.c (process_linenos): Check if the line in the
11480 include table refers to the main source file and, if so,
11481 add them to the main subfile.
11483 2009-03-12 Joel Brobecker <brobecker@adacore.com>
11485 Fix a build failure on AIX introduced after a change in the profile
11486 of some of the "methods" in the target_ops structure.
11487 * aix-thread.c: Add missing target_ops parameter throughout.
11489 Implement Ada task switching on AIX.
11490 * aix-thread.c (aix_thread_get_ada_task_ptid): New function.
11491 (init_aix_thread_ops): Set aix_thread_ops.to_get_ada_task_ptid.
11493 2009-03-11 Daniel Jacobowitz <dan@codesourcery.com>
11495 * breakpoint.c (bpstat_check_breakpoint_conditions): Use
11496 value_mark and value_free_to_mark.
11497 * objfiles.c (free_objfile): Call objfile_free_data before
11500 2009-03-10 Hui Zhu <teawater@gmail.com>
11502 * disasm.c (gdb_disassembly): Remove unused argument
11504 * disasm.h (gdb_disassembly): Ditto.
11505 * cli/cli-cmds.c (print_disassembly): Ditto.
11506 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Ditto.
11508 2009-03-09 Paul Pluzhnikov <ppluzhnikov@google.com>
11510 * solib.c (solib_contains_address_p): New function.
11511 (solib_name_from_address): Use it.
11512 * printcmd.c (display_uses_solib_p): Use it.
11513 * solib.h (solib_contains_address_p): Declare it.
11515 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11517 * varobj.c (free_variable): Call value_free.
11519 2009-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11522 * dwarf2read.c (dwarf_decode_macros): New variable `at_commandline'.
11523 Move the variable `macinfo_type' out of the loop. Create a new
11524 processing pass before the current one to pre-create `current_file'.
11525 New complaint on misplaced zero/non-zero definitions/includes.
11526 Skip first DW_MACINFO_start_file with `at_commandline' set.
11528 2008-03-09 Vladimir Prus <vladimir@codesourcery.com>
11530 * solib.c (reload_shared_libraries): Give
11531 inferior a chance to reset solib breakpoint.
11532 Reinit frame cache.
11534 2009-03-08 Christopher Faylor <me+cygwin@cgf.cx>
11536 * windows-nat.c (dr): Redefine to use largest possible integer which
11538 (cygwin_set_dr): Avoid coercion.
11540 2009-03-08 Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
11542 * windows-nat.c (windows_create_inferior): Implement --tty handling on
11545 2009-03-06 Paul Pluzhnikov <ppluzhnikov@google.com>
11547 Rename solib_address to solib_name_from_address.
11548 * breakpoint.c (insert_bp_location, disable_breakpoints_in_shlibs)
11549 (disable_breakpoints_in_unloaded_shlib): Update.
11550 * printcmd.c (display_uses_solib_p): Likewise.
11551 * stack.c (print_frame): Likewise.
11555 2009-03-05 Paul Pluzhnikov <ppluzhnikov@google.com>
11557 * printcmd.c (do_one_display): Reparse exp_string.
11558 (display_uses_solib_p): New function.
11559 (clear_dangling_display_expressions): New function.
11560 (_initialize_printcmd): Add observer.
11561 * solib.c (no_shared_libraries): Swap order of calls to
11562 clear_solib and objfile_purge_solibs.
11564 2009-03-05 Joel Brobecker <brobecker@adacore.com>
11566 Implement the target-specific part of Ada tasking support
11569 * dec-thread.c (dec_thread_get_ada_task_ptid): New function.
11570 (init_dec_thread_ops): Set the to_get_ada_task_ptid method.
11572 2009-03-05 Joel Brobecker <brobecker@adacore.com>
11574 Get rid of the global "base_target" and use "find_target_beneath"
11575 to find the underlying target.
11576 * dec-thread.c (base_target): Delete.
11577 (enable_dec_thread): Remove assignement to base_target.
11578 (dec_thread_detach, dec_thread_wait, dec_thread_wait)
11579 (dec_thread_fetch_registers, dec_thread_store_registers)
11580 (dec_thread_mourn_inferior, dec_thread_pid_to_str):
11581 Update the function profile if necessary.
11582 Use find_target_beneath to call the same method but from
11583 the underlying target, removing the need for "base_target".
11585 * dec-thread.c (dec_thread_get_regsets, dec_thread_set_regsets):
11586 Fix a copy/paste error in a few debug traces...
11588 * solib-osf.c (init_so): Use a simpler method for computing
11589 the size of lm_info structure. This also gets rid of warning
11590 emitted by the compiler.
11592 2009-03-05 Pedro Alves <pedro@codesourcery.com>
11594 * breakpoint.c (check_duplicates_for): Skip permanent breakpoints
11595 duplicates of permanent breakpoints.
11597 2009-03-04 Pedro Alves <pedro@codesourcery.com>
11599 * inferior.h (notice_new_inferior): Declare.
11600 * infcmd.c (notice_new_inferior): New.
11601 * remote.c (remote_add_inferior, remote_add_thread): New.
11602 (notice_new_inferiors): Rename to...
11603 (remote_notice_new_inferior): ... this. Add RUNNING argument.
11604 Use remote_add_thread instead of add_thread, passing it the
11605 RUNNING argument. Add an inferior with remote_add_inferior. If
11606 we just learned about an inferior, call notice_new_inferior.
11607 (record_currthread): Adjust.
11608 (remote_threads_info): Adjust to use remote_notice_new_inferior.
11609 (remote_start_remote, extended_remote_attach_1): Use
11610 remote_add_inferior.
11611 (process_stop_reply): Adjust. Call remote_notice_new_inferior
11612 after handling expedited registers and watchpoint state.
11613 (extended_remote_create_inferior_1): Use remote_add_inferior.
11615 2009-03-04 Aleksandar Ristovski <aristovski@qnx.com>
11617 * infcmd.c (registers_info): Remove register number case.
11619 2009-03-03 Pedro Alves <pedro@codesourcery.com>
11621 * top.c (quit_target): Check for target_has_execution before
11622 killing or detaching from inferiors.
11624 2009-03-02 Joel Brobecker <brobecker@adacore.com>
11626 Remove some unused routines.
11628 * ada-lang.c (is_suppressed_name, ada_suppress_symbol_printing):
11630 * ada-lang.c (ada_task_list_iterator_ftype)
11631 (iterate_over_live_ada_tasks): Delete.
11632 * ada-tasks.c (ada_get_environment_task, iterate_over_live_ada_tasks):
11635 2009-03-01 Doug Evans <dje@google.com>
11637 * symtab.c: Remove trailing whitespace throughout the file.
11638 (expand_line_sal): Fix some typos and whitespace.
11640 * Makefile.in (clean): rm -f $(DEPDIR)/*.
11642 * Makefile.in (GDB_CFLAGS): Add -I$(srcdir)/common.
11643 (init.c): signals/ -> common/.
11644 (signals.o): Update.
11645 * target.h (target_signal_to_string,target_signal_to_string)
11646 (target_signal_from_name,target_signal_to_host_p)
11647 (target_signal_from_host,target_signal_to_host): Move to ...
11648 * common/gdb_signals.h: ... here. New file.
11649 * common/signals.c: Moved here from signals/signals.c.
11650 #include gdb_signals.h, remove #include of target.h in gdb case.
11651 (target_signal_from_command,default_target_signal_to_host)
11652 (default_target_signal_from_host): Move inside #ifndef GDBSERVER.
11654 Include thread ID in target_wait debugging output.
11655 * infrun.c (print_target_wait_results): New function.
11656 (wait_for_inferior,fetch_inferior_event): Call it.
11658 2009-02-27 Pedro Alves <pedro@codesourcery.com>
11660 * gdb_proc_service.h (struct ps_prochandle): Replace pid_t field
11661 with a ptid_t field.
11662 * linux-thread-db.c (thread_get_info_callback): Build the ptid
11663 using the pid stored in proc_handle.ptid.
11664 (thread_from_lwp, thread_db_attach_lwp, enable_thread_event)
11665 (check_for_thread_db, thread_db_detach, check_event)
11666 (thread_db_mourn_inferior, find_new_threads_callback)
11667 (thread_db_find_new_threads_1): Adjust.
11668 * proc-service.c (ps_xfer_memory, ps_lgetregs, ps_lsetregs)
11669 (ps_lgetfpregs, ps_lsetfpregs, ps_getpid): Adjust.
11671 2009-02-27 Phil Muldoon <pmuldoon@redhat.com>
11673 * valprint.c (read_string): Rework clean-up logic. Use
11674 free_current_contents to clean-up buffer.
11676 2009-02-27 Andreas Schwab <schwab@linux-m68k.org>
11678 * MAINTAINERS: Update e-mail address.
11680 2009-02-26 Phil Muldoon <pmuldoon@redhat.com>
11682 * python/python-utils.c (python_string_to_unicode): Always return
11684 (python_string_to_target_string): Decrement transient python
11686 (python_string_to_host_string): Likewise.
11688 2007-02-26 Pedro Alves <pedro@codesourcery.com>
11690 * mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
11691 call to super_fetch_registers.
11692 (mips64_linux_store_registers): Pass `ops' to call to
11693 super_store_registers.
11695 2009-02-25 Doug Evans <dje@google.com>
11697 * breakpoint.c (insert_bp_location): Add \n to overlay breakpoint
11700 * breakpoint.c (disable_breakpoints_in_shlibs): Delete local
11701 disabled_shlib_breaks, unused.
11703 * printcmd.c (build_address_symbolic): Fix comment.
11705 2009-02-25 Hui Zhu <teawater@gmail.com>
11707 * cli/cli-script.c (define_command): Add _() to query.
11708 * gnu-nat.c (inf_validate_task_sc): Ditto.
11709 * infcmd.c (kill_if_already_running): Ditto.
11710 (jump_command): Ditto.
11711 (attach_command): Ditto.
11712 * inflow.c (kill_command): Ditto.
11713 * infrun.c (handle_command): Ditto.
11714 * maint.c (maintenance_dump_me): Ditto.
11715 * memattr.c (mem_delete_command): Ditto.
11716 * monitor.c (monitor_interrupt_query): Ditto.
11717 * nto-procfs.c (interrupt_query): Ditto.
11718 * printcmd.c (undisplay_command): Ditto.
11719 * remote-mips.c (mips_kill): Ditto.
11720 * remote.c (interrupt_query): Ditto.
11721 * solib-irix.c (irix_open_symbol_file_object): Ditto.
11722 * solib-osf.c (osf_open_symbol_file_object): Ditto.
11723 * solib-pa64.c (pa64_open_symbol_file_object): Ditto.
11724 * solib-som.c (som_open_symbol_file_object): Ditto.
11725 * solib-svr4.c (open_symbol_file_object): Ditto.
11726 * symfile.c (symbol_file_add_with_addrs_or_offsets): Ditto.
11727 * target.c (kill_or_be_killed): Ditto.
11728 * tracepoint.c (delete_trace_command): Ditto.
11729 * top.c (quit_confirm): Add _() to s that will be used
11732 2009-02-24 Pierre Muller <muller@ics.u-strasbg.fr>
11734 Fix windows-nat.c compilation failure.
11736 * windows-nat.c (windows_thread_alive): Fix forward declaration.
11737 (get_windows_debug_event): Add ops parameter to call to windows_resume.
11739 2009-02-23 Pedro Alves <pedro@codesourcery.com>
11741 * remote-sim.c (gdbsim_resume): Add target_ops* argument.
11743 2009-02-23 Jay Krell <jay.krell@cornell.edu> (tiny change)
11745 * symtab.c (find_line_symtab): Initialize exact to avoid
11746 a compiler warning.
11748 2009-02-23 Pedro Alves <pedro@codesourcery.com>
11750 * i386-linux-nat.c (i386_linux_fetch_inferior_registers): Pass
11751 `ops' to recursive call.
11753 2009-02-23 Pedro Alves <pedro@codesourcery.com>
11755 * corelow.c (get_core_registers): Adjust.
11756 (core_file_thread_alive): Rename to...
11757 (core_thread_alive): ... this.
11758 (core_pid_to_str): Try gdbarch_core_pid_to_str first.
11759 (init_core_ops): Adjust.
11760 (coreops_suppress_target): Delete.
11761 (_initialize_corelow): Unconditionally add core_ops.
11762 * procfs.c: Include "inf-child.h".
11763 (procfs_ops): Delete.
11764 (init_procfs_ops): Delete. Reimplement as...
11765 (procfs_target): ... this, inheriting from inf-child.
11766 (procfs_attach, procfs_detach, procfs_fetch_registers): Adjust.
11767 (procfs_prepare_to_store): Delete.
11768 (procfs_store_registers, procfs_resume): Adjust.
11769 (procfs_open): Delete.
11770 (procfs_suppress_run): Delete.
11771 (procfs_can_run): Delete.
11772 (procfs_mourn_inferior): Adjust.
11773 (procfs_init_inferior): Add target_ops parameter. Adjust.
11774 (procfs_create_inferior): Don't pass procfs_init_inferior to
11775 fork_inferior. Instead call it after fork_inferior returns.
11776 (procfs_find_new_threads): Adjust.
11777 (_initialize_procfs): Adjust to use procfs_target instead of
11779 * sol-thread.c (orig_core_ops, sol_core_ops): Delete.
11780 (lwp_to_thread): Use target_thread_alive.
11781 (sol_thread_open): Delete.
11782 (sol_thread_attach): Delete.
11783 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
11784 (sol_thread_fetch_registers, sol_thread_store_registers): Adjust
11785 to use find_target_beneath.
11786 (sol_thread_prepare_to_store, sol_thread_xfer_memory): Delete.
11787 (sol_thread_xfer_partial): Adjust to use find_target_beneath.
11788 (sol_thread_files_info, sol_thread_kill_inferior): Delete.
11789 (check_for_thread_db): New.
11790 (sol_thread_notice_signals, sol_thread_create_inferior): Delete.
11791 (sol_thread_new_objfile): Call check_for_thread_db.
11792 (sol_thread_mourn_inferior): Adjust to use find_target_beneath.
11793 (sol_thread_can_run): Delete.
11794 (sol_thread_alive): Adjust to use find_target_beneath.
11795 (sol_thread_stop): Delete.
11796 (rw_common): Use target_write_memory or target_read_memory.
11797 (ps_lgetregs, ps_lgetfpregs): Use target_fetch_registers.
11798 (ps_lsetregs, ps_lsetfpregs): Use target_store_registers.
11799 (solaris_pid_to_str): Remove check for libthread_db initialization
11801 (sol_find_new_threads): Remove check for libthread_db
11802 initialization failing, or for an invalid inferior_ptid. Adjust
11803 to use find_target_beneath.
11804 (sol_core_open, sol_core_close, sol_core_detach,
11805 sol_core_files_info, sol_find_memory_regions,
11806 sol_make_note_section, ignore): Delete.
11807 (init_sol_thread_ops): Make it a thread_stratum target. Remove
11808 unneeded callback settings.
11809 (init_sol_core_ops): Delete.
11810 (_initialize_sol_thread): No longer call init_sol_core_ops, set
11811 procfs_suppress_run, or hack with core_ops.
11813 * target.h (struct target_ops): Add a target_ops * parameter to
11814 to_resume, to_fetch_registers, to_store_registers, to_thread_alive
11815 and to_find_new_threads.
11816 (target_fetch_registers, target_store_registers)
11817 (target_thread_alive, target_find_new_threads): Redeclare as
11820 * target.c (update_current_target): Do not inherit or de_fault
11821 to_resume, to_fetch_registers, to_store_registers,
11822 to_thread_alive, to_find_new_threads.
11823 (target_resume): Adjust.
11824 (target_thread_alive, target_find_new_threads): New.
11825 (debug_to_resume, debug_to_fetch_registers): Delete.
11826 (target_fetch_registers): New.
11827 (debug_to_store_registers): Delete.
11828 (target_store_registers): New.
11829 (debug_to_thread_alive, debug_to_find_new_threads): Delete.
11830 (setup_target_debug): Adjust.
11832 * gdbcore.h (core_ops): Delete declaration.
11834 * inf-ptrace.c, linux-nat.c, remote.c, amd64-linux-nat.c,
11835 inf-child.c, linux-thread-db.c, bsd-uthread.c, inf-ttrace.c,
11836 i386-sol2-tdep.c, darwin-nat.c, gnu-nat.c, go32-nat.c,
11837 hpux-thread.c, i386-linux-nat.c, i386fbsd-nat.c, monitor.c,
11838 nto-procfs.c, remote-m32r-sdi.c, remote-mips.c, windows-nat.c,
11839 alphabsd-nat.c, amd64bsd-nat.c, arm-linux-nat.c, armnbsd-nat.c,
11840 bsd-kvm.c, hppa-hpux-nat.c, hppa-linux-nat.c, hppabsd-nat.c,
11841 hppanbsd-nat.c, i386-darwin-nat.c, i386bsd-nat.c,
11842 ia64-linux-nat.c, m32r-linux-nat.c, m68kbsd-nat.c,
11843 m68klinux-nat.c, m88kbsd-nat.c, mips-linux-nat.c,
11844 mips64obsd-nat.c, mipsnbsd-nat.c, ppc-linux-nat.c, ppcnbsd-nat.c,
11845 ppcobsd-nat.c, remote-sim.c, rs6000-nat.c, s390-nat.c,
11846 shnbsd-nat.c, sparc-nat.c, sparc-nat.h, spu-linux-nat.c,
11847 vaxbsd-nat.c, xtensa-linux-nat.c: Adjust to target_ops changes.
11849 * gdbarch.sh (core_pid_to_str): New gdbarch callback.
11850 * gdbarch.h, gdbarch.c: Regenerate.
11852 * sol2-tdep.c: Include "inferior.h".
11853 (sol2_core_pid_to_str): New.
11854 * sol2-tdep.h (sol2_core_pid_to_str): Declare.
11856 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
11857 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
11858 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
11859 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
11861 2009-02-22 Doug Evans <dje@google.com>
11863 * exec.c (exec_file_attach): Fix comment.
11865 2009-02-22 Pedro Alves <pedro@codesourcery.com>
11867 Silence a few -Wmissing-prototypes warnings.
11870 * alpha-linux-tdep.c (alpha_linux_regset_from_core_section): Make
11872 * alpha-osf1-tdep.c (_initialize_alpha_osf1_tdep): Declare.
11873 * amd64fbsd-tdep.c (amd64fbsd_init_abi): Make it static.
11874 * amd64nbsd-tdep.c (_initialize_amd64nbsd_ndep): Rename to ...
11875 (_initialize_amd64nbsd_tdep): ... this.
11876 * arm-linux-tdep.c (arm_linux_software_single_step): Make it static.
11877 (_initialize_arm_linux_tdep): Declare.
11878 * armbsd-tdep.c (armbsd_fpreg_offset): Make it static.
11879 * armnbsd-tdep.c (_initialize_arm_netbsd_tdep): Declare.
11880 * armobsd-tdep.c (_initialize_armobsd_tdep): Declare.
11881 * avr-tdep.c (avr_return_value): Make it static.
11882 (avr_frame_unwind_cache): Ditto.
11883 * bsd-uthread.c (bsd_uthread_inferior_created): Ditto.
11884 (bsd_uthread_solib_loaded): Ditto.
11885 (bsd_uthread_solib_unloaded): Ditto.
11886 (bsd_uthread_target): Ditto.
11887 (_initialize_bsd_uthread): Declare.
11888 * cris-tdep.c (crisv32_single_step_through_delay): Make it static.
11889 (cris_frame_unwind_cache): Ditto.
11890 * frv-tdep.c (frv_return_value): Ditto.
11891 * h8300-tdep.c (h8300_use_struct_convention): Ditto.
11892 (h8300h_use_struct_convention): Ditto.
11893 * hppa-tdep.c (hppa_sign_extend, hppa_low_hppa_sign_extend):
11895 * hppa-tdep.h (hppa_low_sign_extend, hppa_sign_extend): Delete
11897 * hppabsd-tdep.c: Include hppabsd-tdep.h.
11898 (hppabsd_find_global_pointer): Make it static.
11899 * hppabsd-tdep.h: New.
11900 * hppanbsd-tdep.c: Include hppabsd-tdep.h.
11901 (hppabsd_init_abi): Remove declaration.
11902 (_initialize_hppabsd_tdep): Remove declaration.
11903 (_initialize_hppanbsd_tdep): Declare.
11904 * hppaobsd-tdep.c: Include hppabsd-tdep.h.
11905 (hppabsd_init_abi): Delete declaration.
11906 (hppaobsd_init_abi): Make it static.
11907 * i386-nto-tdep.c (_initialize_i386nto_tdep): Declare.
11908 * i386nbsd-tdep.c (_initialize_i386nbsd_tdep): Declare.
11909 * ia64-linux-tdep.c (_initialize_ia64_linux_tdep): Declare.
11910 * ia64-tdep.c (ia64_register_reggroup_p): Make it static.
11911 * iq2000-tdep.c (_initialize_iq2000_tdep): Declare.
11912 * m32c-tdep.c (m32c_register_reggroup_p): Make it static.
11913 (m32c_analyze_prologue, m32c_virtual_frame_pointer): Ditto.
11914 (_initialize_m32c_tdep): Declare.
11915 * m32r-rom.c (_initialize_m32r_rom): Declare.
11916 * m32r-tdep.c (m32r_skip_prologue): Make it static.
11917 (m32r_return_value): Ditto.
11918 * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Make it static.
11919 (m68hc11_return_value): Ditto.
11920 * m68klinux-tdep.c (_initialize_m68k_linux_tdep): Declare.
11921 * m88k-tdep.c (m88k_frame_cache): Make it static.
11922 * mep-tdep.c (mep_gdb_print_insn): Ditto.
11923 (mep_return_value): Ditto.
11924 (_initialize_mep_tdep): Declare.
11925 * mips-irix-tdep.c (_initialize_mips_irix_tdep): Declare.
11926 * mips-linux-tdep.c (supply_64bit_reg): Make it static.
11927 (mips_linux_syscall_next_pc): Ditto.
11928 (_initialize_mips_linux_tdep): Declare.
11929 * mips-tdep.c (mips_single_step_through_delay): Make it static.
11930 * mipsnbsd-tdep.c (_initialize_mipsnbsd_tdep): Declare.
11931 * mn10300-linux-tdep.c (_initialize_mn10300_linux_tdep): Declare.
11932 * mn10300-tdep.c (_initialize_mn10300_tdep): Declare.
11933 * mt-tdep.c (_initialize_mt_tdep): Declare.
11934 * nbsd-tdep.c: Include nbsd-tdep.h.
11935 * nto-tdep.c (find_load_phdr): Make it static.
11936 (_initialize_nto_tdep): Declare.
11937 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Make it
11939 (_initialize_ppc_linux_tdep): Declare.
11940 * remote-m32r-sdi.c (m32r_can_use_hw_watchpoint)
11941 (m32r_insert_watchpoint, m32r_remove_watchpoint)
11942 (m32r_stopped_data_address, m32r_stopped_by_watchpoint): Make
11944 * rs6000-aix-tdep.c (_initialize_rs6000_aix_tdep): Declare.
11945 * rs6000-nat.c: Include xcoffread.h.
11946 (find_toc_address): Don't extern declare get_toc_offset. Adjust
11947 to call xcoff_get_to_offset.
11948 * rs6000-tdep.c (ppc_vsx_support_p, ppc_displaced_step_fixup)
11949 (rs6000_skip_main_prologue, rs6000_in_solib_return_trampoline)
11950 (rs6000_skip_trampoline_code): Make static.
11951 * s390-tdep.c (s390_regset_from_core_section): Ditto.
11952 * sh-tdep.c (sh_register_reggroup_p): Ditto.
11953 * shnbsd-tdep.c (shnbsd_regset_from_core_section): Ditto.
11954 (_initialize_shnbsd_tdep): Declare.
11955 * solib-frv.c (displacement_from_map): Make static.
11956 (_initialize_frv_solib): Declare.
11957 * solib-irix.c (fetch_lm_info): Make static.
11958 (_initialize_irix_solib): Declare.
11959 * solib-som.c: Include solib-som.h.
11960 (som_solib_select): Line break.
11961 * sparc-tdep.c (sparc_regset_from_core_section): Make static.
11962 * sparcnbsd-tdep.c (_initialize_sparnbsd_tdep): Rename to ...
11963 (_initialize_sparcnbsd_tdep): ... this.
11964 * spu-tdep.c (spu_software_single_step): Make it static.
11965 (_initialize_spu_tdep): Declare.
11966 * vax-tdep.c (vax_frame_cache): Make it static.
11967 * xcoffread.c: Include xcoffread.h.
11968 (get_toc_offset): Rename to ...
11969 (xcoff_get_toc_offset): ... this.
11970 (_initialize_xcoffread): Declare.
11971 * xcoffread.h: New.
11972 * xtensa-linux-tdep.c (_initialize_xtensa_linux_tdep): Declare.
11973 * xtensa-tdep.c (xtensa_skip_prologue, xtensa_derive_tdep): Make
11975 (_initialize_xtensa_tdep): Declare.
11977 2008-02-21 Pedro Alves <pedro@codesorcery.com>
11979 Silence a few -Wmissing-prototypes warnings.
11982 * amd64-nat.c: Include "amd64-nat.h".
11983 * fork-child.c (_initialize_fork_child): Ditto.
11984 * gcore.c (_initialize_gcore): Ditto.
11985 * inf-ptrace.c: Include "inf-ptrace.h".
11986 (inf_ptrace_store_registers): Make it static.
11987 * linux-nat.c (linux_nat_terminal_ours): Make it static.
11988 (_initialize_linux_nat): Declare before definition.
11989 * linux-tdep.c: Include "linux-tdep.h".
11990 * linux-thread-db.c (_initialize_thread_db): Declare before
11992 * proc-service.c (_initialize_proc_service): Ditto.
11993 * remote.c (remote_send_printf): Make it static.
11994 * solib.c: Include "solib.h".
11995 * symfile-mem.c (_initialize_symfile_mem): Declare before
11997 * ada-lang.c (ada_la_decode, ada_match_name)
11998 (ada_suppress_symbol_printing, ada_is_array_type)
11999 (ada_value_ptr_subscript, ada_array_length)
12000 (ada_to_static_fixed_value): Make them static.
12001 (_initialize_ada_language): Declare before definition.
12002 * ada-tasks.c (ada_get_task_number, ada_get_environment_task)
12003 (ada_task_list_changed, ada_new_objfile_observer): Make them
12005 (_initialize_tasks): Declare before definition.
12006 * addrmap.c (_initialize_addrmap): Declare before definition.
12007 * auxv.c (default_auxv_parse): Make it static.
12008 * bfd-target.c (target_bfd_xfer_partial, target_bfd_xclose): Make
12010 * breakpoint.c (remove_sal): Add line break.
12011 (expand_line_sal_maybe): Make it static.
12012 * cp-name-parser.y: Include "cp-support.h".
12013 * cp-valprint.c (cp_find_class_member): Make it static.
12014 * eval.c (value_f90_subarray): Ditto.
12015 * exceptions.c (print_any_exception): Ditto.
12016 * findcmd.c (_initialize_mem_search): Declare before definition.
12017 * frame.c (frame_observer_target_changed): Make it static.
12018 * gnu-v3-abi.c (gnuv3_find_method_in): Make it static.
12019 * inf-child.c: Include "inf-child.h".
12020 * inferior.h (valid_inferior_id): Rename to ...
12021 (valid_gdb_inferior_id): ... this.
12022 * infrun.c (infrun_thread_stop_requested, siginfo_make_value):
12024 * jv-lang.c (java_language_arch_info): Make it static.
12025 * m2-typeprint.c (m2_get_discrete_bounds): Ditto.
12026 * osdata.c (info_osdata_command): Make it static.
12027 * regcache.c (regcache_observer_target_changed): Make it static.
12028 * reverse.c (_initialize_reverse): Declare before definition.
12029 * stabsread.c (cleanup_undefined_types_noname)
12030 (cleanup_undefined_types_1): Make them static.
12031 * symfile.c (place_section): Make it static.
12032 * symtab.c (find_pc_sect_psymtab_closer): Make it static.
12033 * target-descriptions.c (_initialize_target_descriptions): Declare
12035 * target.c (default_get_ada_task_ptid, find_default_can_async_p)
12036 (find_default_is_async_p, find_default_supports_non_stop): Make
12038 (target_supports_non_stop): Add prototype.
12039 (dummy_pid_to_str): Make it static.
12040 * utils.c (_initialize_utils): Declare before definition.
12041 * ada-exp.y (_initialize_ada_exp): Declare before definition.
12042 * solib-svr4.c (HAS_LM_DYNAMIC_FROM_LINK_MAP): Add a prototype.
12043 * target.h (struct target_ops): Add a prototype to the
12044 to_can_execute_reverse callback.
12045 * macroscope.c (_initialize_macroscope): Declare before definition.
12046 * cp-namespace.c (_initialize_cp_namespace): Declare before definition.
12047 * python/python.c (_initialize_python): Declare before definition.
12048 * tui/tui-command.c: Include "tui/tui-command.h".
12049 * tui/tui-data.c (init_content_element, init_win_info): Make them
12051 * tui/tui-disasm.c: Include "tui/tui-disasm.h".
12052 * tui/tui-interp.c (_initialize_tui_interp): Declare before
12054 * tui/tui-layout.c: Include "tui/tui-layout.h".
12055 (_initialize_tui_layout): Declare before definition.
12056 * tui/tui-regs.c: Include "tui/tui-regs.h".
12057 (tui_display_reg_element_at_line): Make it static.
12058 (_initialize_tui_regs): Declare before definition.
12059 * tui/tui-stack.c (_initialize_tui_stack): Declare before
12061 * tui/tui-win.c: Include "tui/tui-win.h".
12062 (_initialize_tui_win): Declare before definition.
12063 (tui_sigwinch_handler): Make it static. Wrap in ifdef SIGWINCH.
12064 * tui/tui-win.h (tui_sigwinch_handler): Delete declaration.
12065 (tui_get_cmd_list): Add a prototype.
12066 * tui/tui-windata.c: Include tui-windata.h.
12067 * tui/tui-wingeneral.c (box_win): Make it static.
12068 * cli/cli-logging.c (show_logging_command): Make it static.
12069 (_initialize_cli_logging): Declare before definition.
12070 * mi/mi-common.c (_initialize_gdb_mi_common): Declare before
12073 2009-02-20 Pierre Muller <muller@ics.u-strasbg.fr>
12075 Extend use of i386_use_watchpoints to all i386 native files
12076 using hardware watchpoints.
12077 * go32-nat.c (init_go32_ops): Call i386_use_watchpoints.
12078 * i386fbsd-nat.c (_initialize_i386fbsd_nat): Ditto.
12079 * windows-nat.c (init_windows_ops): Ditto.
12080 * config/i386/nm-cygwin.h: Define I386_WATCHPOINTS_IN_TARGET_VECTOR.
12081 * config/i386/nm-cygwin64.h: Ditto.
12082 * config/i386/nm-fbsd.h: Ditto.
12083 * config/i386/nm-go32.h: Ditto.
12085 2009-02-19 Joel Brobecker <brobecker@adacore.com>
12087 * ada-typeprint.c (ada_typedef_print): Remove. Unused.
12089 2009-02-18 Vladimir Prus <vladimir@codesourcery.com>
12091 * mi/mi-interp.c (mi_solib_loaded, mi_solib_unloaded): New.
12092 (mi_interpreter_init): Register the above.
12093 * solib.c (clear_solib): Notify solib unload.
12094 * breakpoint.c (disable_breakpoints_in_unloaded_shlib): Do not
12095 disable breakpoints on a.out targets.
12097 2009-02-17 Vladimir Prus <vladimir@codesourcery.com>
12099 * observer.c (observer_test_first_notification_function)
12100 (observer_test_second_notification_function)
12101 (observer_test_third_notification_function): Adjust prototype.
12103 2009-02-17 Pedro Alves <pedro@codesourcery.com>
12105 * Makefile.in (ALL_64_TARGET_OBS): Add amd64-dicos-tdep.o.
12106 (ALL_TARGET_OBS): Add dicos-tdep.o.
12107 (ALLDEPFILES): Add amd64-dicos-tdep.c and dicos-tdep.c.
12108 * configure.tgt (i[34567]86-*-dicos*): Add dicos-tdep.o to
12110 (x86_64-*-dicos*): Add dicos-tdep.o and amd64-dicos-tdep.o to
12112 * dicos-tdep.h, dicos-tdep.c: New.
12113 * amd64-dicos-tdep.c: New.
12114 * i386-dicos-tdep.c: Don't include solib.h, solib-target.h or
12115 inferior.h. Include dicos-tdep.h.
12116 (i386_dicos_init_abi): Call dicos_init_abi.
12117 (i386_dicos_bfd_has_symbol_p): Delete.
12118 (i386_dicos_osabi_sniffer): Use dicos_load_module_p.
12120 * NEWS: Mention x86-64 DICOS target support.
12122 2009-02-16 Doug Evans <dje@google.com>
12124 * amd64-tdep.c (amd64_skip_prefixes): Renamed from skip_prefixes.
12125 All callers updated.
12126 (amd64_get_insn_details): Handle more 3-byte opcode insns.
12127 (amd64_breakpoint_p): Delete.
12128 (amd64_displaced_step_fixup): When fixing up after stepping an int3,
12129 don't back up pc to the start of the int3.
12130 * i386-tdep.c: #include opcode/i386.h.
12131 (i386_skip_prefixes): New function.
12132 (i386_absolute_jmp_p): Constify argument.
12133 (i386_absolute_call_p,i386_ret_p,i386_call_p,i386_syscall_p): Ditto.
12134 (i386_breakpoint_p): Delete.
12135 (i386_displaced_step_fixup): Handle unnecessary or redundant prefixes.
12136 When fixing up after stepping an int3, don't back up pc to the start
12139 2009-02-16 Pedro Alves <pedro@codesourcery.com>
12141 * corelow.c (core_close): Don't hardcode the core's pid.
12142 (core_open): Find core threads before calling
12143 post_create_inferior.
12144 (add_to_thread_list, get_core_register_section): Take into account
12145 systems where the regset section names encode the pid of the
12148 * gdbarch.sh (core_reg_section_encodes_pid): New gdbarch setting.
12149 * gdbarch.h, gdbarch.c: Regenerate.
12151 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Set it.
12152 * i386-sol2-tdep.c (i386_sol2_init_abi): Set it.
12153 * sparc-sol2-tdep.c (sparc32_sol2_init_abi): Set it.
12154 * sparc64-sol2-tdep.c (sparc64_sol2_init_abi): Set it.
12156 2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
12158 Include frame information for *stopped due to CLI commands.
12160 * ada-tasks.c (ada_normal_stop_observer): Adjust prototype.
12161 * infcmd.c (finish_command_continuation): Pass '1' for
12162 'print_frame' parameter to the observer.
12163 * infrun.c (normal_stop): Don't print mi-specific information
12164 here. Pass 'stop_print_frame' to the 'print_frame' parameter
12166 * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype.
12167 If we need to print frame, and current uiout is not the MI one,
12170 2009-02-13 Pierre Muller <muller@ics.u-strasbg.fr>
12172 * xtensa-tdep.c (call0_analyze_prologue): Delete BSZ macro.
12173 Replace BSZ macro uses by XTENSA_ISA_BSZ macro.
12175 2009-02-12 Jan Kratochvil <jan.kratochvil@redhat.com>
12178 * dwarf2read.c (process_die <DW_TAG_module>, read_module)
12179 (scan_partial_symbols <DW_TAG_module>, add_partial_module): New.
12181 2009-02-11 Pierre Muller <muller@ics.u-strasbg.fr>
12183 * dwarf2read.c (read_base_type): Set code to TYPE_CODE_CHAR
12184 for DW_ATE_signed_char and DW_ATE_unsigned_char
12185 for pascal language.
12187 2009-02-11 Jim Meyering <meyering@redhat.com>
12188 Jan Kratochvil <jan.kratochvil@redhat.com>
12190 Avoid NULL dereference.
12191 * stack.c (return_command): Guard use of SYMBOL_TYPE (thisfun).
12192 New variable func_type.
12194 2009-02-11 Pedro Alves <pedro@codesourcery.com>
12196 * gdbarch.c: Regenerate.
12198 2009-02-10 Pierre Muller <muller@ics.u-strasbg.fr>
12200 * p-lang.c (is_pascal_string_type): Fix comment.
12201 Determine exact size of char elements for GPC
12203 (pascal_printstr): Handle char width of 2 or 4.
12204 * p-valprint.c (pascal_val_print): Handle char
12207 2009-02-07 Daniel Jacobowitz <dan@codesourcery.com>
12209 * dwarf2read.c (dwarf2_build_psymtabs_hard): Move lowpc and highpc
12210 inside the loop. Only call addrmap_set_empty if the compilation unit
12211 had DW_AT_high_pc and DW_AT_low_pc. Update call to
12212 scan_partial_symbols.
12213 (scan_partial_symbols): Take NEED_PC argument and pass it along with
12215 (add_partial_namespace): Take NEED_PC argument and pass it through.
12216 (add_partial_subprogram): Take NEED_PC argument. Update the addrmap
12219 2009-02-07 Pedro Alves <pedro@codesourcery.com>
12221 * NEWS: Mention inspecting extra signal information, $_siginfo,
12222 and the qXfer:siginfo:read and qXfer:siginfo:write packets.
12224 2009-02-07 Pedro Alves <pedro@codesourcery.com>
12226 * linux-nat.c (PTRACE_SETSIGINFO): Define if PTRACE_GETSIGINFO
12229 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12231 * amd64-linux-nat.c (compat_int_t, compat_uptr_t, compat_time_t)
12232 (compat_timer_t, compat_clock_t, struct compat_timeval)
12233 (compat_sigval_t, compat_siginfo_t): New types.
12234 (cpt_si_pid, cpt_si_uid, cpt_si_timerid, cpt_si_overrun)
12235 (cpt_si_status, cpt_si_utime, cpt_si_stime, cpt_si_ptr)
12236 (cpt_si_addr, cpt_si_band, cpt_si_fd): New defines.
12237 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
12238 (amd64_linux_siginfo_fixup): New.
12239 * linux-nat.c (linux_nat_siginfo_fixup): New.
12240 (siginfo_fixup): New.
12241 (linux_xfer_siginfo): Use siginfo_fixup to convert between the
12242 siginfo layout expected by ptrace and the siginfo layout of the
12244 (linux_nat_set_siginfo_fixup): New.
12245 * linux-nat.h (linux_nat_set_siginfo_fixup): Declare.
12247 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12249 * target.h (enum target_object): Add new TARGET_OBJECT_SIGNAL_INFO.
12250 * infrun.c (siginfo_value_read, siginfo_value_write): New.
12251 (siginfo_value_funcs): New.
12252 (siginfo_make_value): New.
12253 (_initialize_infrun): Create the $_siginfo convenience variable.
12254 * gdbtypes.h (append_composite_type_field_aligned): Declare.
12255 * gdbtypes.c (append_composite_type_field): Rename to...
12256 (append_composite_type_field_aligned): ... this. Add ALIGNMENT
12257 argument. Handle it.
12258 (append_composite_type_field): Rewrite on top of
12259 append_composite_type_field_aligned.
12260 * value.h (internalvar_make_value): New typedef.
12261 (struct internalvar) <make_value>: New field.
12262 (create_internalvar_type_lazy): Declare.
12263 * value.c (create_internalvar): Clear make_value.
12264 (create_internalvar_type_lazy): New.
12265 (value_of_internalvar): If make_value is set use it.
12266 (preserve_values): Skip internal variables that don't have a
12268 * gdbarch.sh (get_siginfo_type): New.
12269 * gdbarch.h, gdbarch.c: Regenerate.
12271 * linux-tdep.h, linux-tdep.c: New.
12272 * amd64-linux-tdep.c: Include "linux-tdep.h".
12273 (amd64_linux_init_abi): Register linux_get_siginfo_type and
12274 linux_get_siginfo_mapper.
12275 * i386-linux-tdep.c: Include "linux-tdep.h".
12276 (i386_linux_init_abi): Register linux_get_siginfo_type and
12277 linux_get_siginfo_mapper.
12278 * arm-linux-tdep.c: Include "linux-tdep.h".
12279 (i386_linux_init_abi): Register linux_get_siginfo_type and
12280 linux_get_siginfo_mapper.
12282 * linux-nat.c (linux_xfer_siginfo): New.
12283 (linux_nat_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
12284 * remote.c (PACKET_qXfer_siginfo_read)
12285 (PACKET_qXfer_siginfo_write): New.
12286 (feature remote_protocol_features): Add "qXfer:siginfo:read" and
12287 "qXfer:siginfo:write" features.
12288 (remote_xfer_partial): Handle TARGET_OBJECT_SIGNAL_INFO.
12289 (_initialize_remote): Add "set/show remote read-siginfo-object"
12290 and "set/show remote write-siginfo-object" commands.
12292 * Makefile.in (ALL_TARGET_OBS): Add linux-tdep.o.
12293 (HFILES_NO_SRCDIR): Add linux-tdep.h.
12294 (ALLDEPFILES): Add linux-tdep.c.
12296 * configure.tgt (arm*-*-linux* | arm*-*-uclinux*)
12297 (i[34567]86-*-linux*, x86_64-*-linux*): Add linux-tdep.o to
12300 2009-02-06 Jim Blandy <jimb@codesourcery.com>
12301 Daniel Jacobowitz <dan@codesourcery.com>
12302 Vladimir Prus <vladimir@codesourcery.com>
12303 Pedro Alves <pedro@codesourcery.com>
12305 * defs.h (enum lval_type): New value: lval_computed.
12306 * value.h (struct lval_funcs): New type.
12307 (allocate_computed_value, value_computed_funcs)
12308 (value_computed_closure): New declarations.
12309 * value.c (struct value): Add a structure to the location union
12310 for computed lvalues, containing 'funcs' and 'closure' members.
12311 (allocate_computed_value, value_computed_funcs)
12312 (value_computed_closure): New functions.
12313 (value_free): For computed lvalues, call the closure's
12314 'free_closure' function before freeing the value itself.
12315 (value_copy): If we're copying an lval_computed value, call the
12316 closure's 'copy_closure' function.
12317 (set_value_component_location): If the original value is a
12318 computed lvalue, then call the closure's 'copy_closure' function.
12319 (value_of_internalvar): If an internal variable's value is a
12320 computed lvalue, make retrieving its value produce an equivalent
12322 * valops.c (value_fetch_lazy): Unlazy computed lvalues by calling
12323 their read function.
12324 (value_assign): Assign to computed lvalues by calling their write
12327 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12329 * linux-nat.c (linux_nat_wait): Adjust.
12330 (linux_nat_pid_to_str): Adjust. Remove call to thread_db_init.
12331 * linux-nat.h (thread_db_init): Delete declaration.
12332 * linux-thread-db.c (target_beneath): Delete.
12333 (thread_db_init): Delete.
12334 (thread_db_detach): Use find_target_beneath.
12335 (thread_db_wait): Adjust interface. Use find_target_beneath.
12336 (thread_db_mourn_inferior): Use find_target_beneath.
12337 (thread_db_can_async_p, thread_db_is_async_p, thread_db_async)
12338 (thread_db_async_mask): Delete.
12339 (thread_db_pid_to_str): Adjust interface. Use
12340 find_target_beneath.
12341 (thread_db_get_thread_local_address): Adjust interface. Use
12342 find_target_beneath.
12343 (init_thread_db_ops): Delete references to delete functions.
12344 * target.c (update_current_target): Don't inherit or default
12345 to_wait. Don't inherit to_pid_to_str and
12346 to_get_thread_local_address.
12347 (target_translate_tls_address): Look for a pushed target that
12348 implements to_get_thread_local_address, and use it instead of
12349 checking for target_get_thread_local_address_p.
12350 (target_wait, target_pid_to_str): Reimplement as functions.
12351 (dummy_pid_to_str): New.
12352 (init_dummy_target): Register it.
12353 (debug_to_wait): Delete.
12354 * target.h (struct target_ops): Make to_wait, to_pid_to_str and
12355 to_get_thread_local_address accept a pointer to struct target_ops.
12356 (target_wait): Delete macro, and declare as function.
12357 (target_pid_to_str): Likewise.
12358 (target_get_thread_local_address)
12359 (target_get_thread_local_address_p): Delete.
12360 (noprocess): Add NORETURN and ATTR_NORETURN tags.
12361 * inf-ptrace.c (inf_ptrace_wait): Adjust.
12362 (inf_ptrace_pid_to_str): New.
12363 (inf_ptrace_target): Use inf_ptrace_pid_to_str.
12364 * aix-thread.c (aix_thread_wait, aix_thread_pid_to_str): Adjust.
12365 * bsd-kvm.c (bsd_kvm_pid_to_str): Adjust.
12366 * bsd-uthread.c (bsd_uthread_wait, bsd_uthread_pid_to_str):
12368 * corelow.c (core_pid_to_str): Adjust.
12369 * darwin-nat.c (darwin_wait, darwin_pid_to_str): Adjust.
12370 * dec-thread.c (dec_thread_wait, dec_thread_pid_to_str): Adjust.
12371 * gnu-nat.c (gnu_wait, gnu_pid_to_str): Adjust.
12372 * go32-nat.c (go32_wait, go32_pid_to_str): Adjust.
12373 * hpux-thread.c (hpux_thread_wait): Adjust.
12374 * inf-ttrace.c (inf_ttrace_wait, inf_ttrace_pid_to_str): Adjust.
12375 * monitor.c (monitor_wait, monitor_pid_to_str): Adjust.
12376 * nto-procfs.c (procfs_wait, procfs_pid_to_str): Adjust.
12377 * procfs.c (procfs_pid_to_str): Adjust.
12378 * remote-m32r-sdi.c (m32r_wait, m32r_pid_to_str): Adjust.
12379 * remote-mips.c (mips_wait): Adjust.
12380 * remote-sim.c (gdbsim_wait, gdbsim_pid_to_str): Adjust.
12381 * remote.c (remote_wait, remote_pid_to_str)
12382 (remote_get_thread_local_address): Adjust.
12383 * rs6000-nat.c (rs6000_wait): Adjust.
12384 * sol-thread.c (procfs_pid_to_str): Adjust declaration.
12385 (sol_thread_wait, solaris_pid_to_str): Adjust.
12386 * spu-linux-nat.c (spu_child_wait): Adjust.
12387 * windows-nat.c (windows_wait, windows_pid_to_str): Adjust.
12389 2009-02-06 Tom Tromey <tromey@redhat.com>
12391 * Makefile.in (SUBDIR_PYTHON_OBS): Add python-cmd.o.
12392 (SUBDIR_PYTHON_SRCS): Add python-cmd.c.
12393 (python-cmd.o): New target.
12394 * cli/cli-decode.c (set_cmd_completer): Add self parameter to
12395 completer prototype.
12396 (add_cmd): Initialize destroyer member of cmd_list_element. Use
12397 make_symbol_completion_list_fn as completer.
12398 (delete_cmd): Call destroyer if one is set.
12399 * cli/cli-decode.h (cmd_list_element): Add cmd parameter to
12400 completer member. Add destroyer member.
12401 (set_cmd_completer): Add self parameter to
12402 completer prototype.
12403 * command.h (set_cmd_completer): Add cmd parameter to
12404 completer prototype.
12405 * completer.c (noop_completer, filename_completer,
12406 location_completer, expression_completer, command_completer): Adapt
12407 to new completer prototype.
12408 (complete_line_internal): Pass new parameter to completer function.
12409 * completer.h (noop_completer, filename_completer,
12410 location_completer, expression_completer, command_completer): Adapt
12411 prototypes to new completer prototype.
12412 * interps.c (interpreter_completer): Adapt to new completer
12414 * python/python-cmd.c: New file.
12415 * python/python-internal.h (gdbpy_initialize_commands): Add
12417 (gdbpy_doc_cst): Add forward declaration.
12418 * python/python.c (gdbpy_doc_cst): Declare.
12419 (_initialize_python): Call gdbpy_initialize_commands. Initialize
12421 * symtab.c (make_symbol_completion_list_fn): New function.
12422 * symtab.h (make_symbol_completion_list_fn): Add prototype.
12424 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12426 * target.c (target_get_osdata): Check for equal or higher than
12427 process_stratum, not dummy_stratum.
12429 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12431 * remote.c (extended_remote_can_run): Delete.
12432 (init_remote_ops): Don't register it.
12433 * target.c (target_get_osdata): Don't check for target_can_run.
12434 Instead any target that has already been pushed, otherwise
12435 fallback to the default run target.
12437 2009-02-06 Pedro Alves <pedro@codesourcery.com>
12439 * target.c (target_create_inferior, target_detach)
12440 (target_mourn_inferior, target_attach, target_close): Do target
12442 (debug_to_attach, debug_to_detach, debug_to_create_inferior)
12443 (debug_to_mourn_inferior, debug_to_close): Delete.
12444 (setup_target_debug): Adjust.
12446 2009-02-05 Pedro Alves <pedro@codesourcery.com>
12448 * target.h (target_stopped_data_address_p): Delete declaration,
12449 and don't define as macro.
12450 * target.c (target_stopped_data_address_p): Delete.
12452 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
12453 Tom Tromey <tromey@redhat.com>
12455 * python/python-utils.c (target_string_to_unicode): New function.
12456 * python/python-internal.h (target_string_to_unicode): New prototype.
12457 * python/python-value.c (valpy_string): New function.
12458 (value_object_methods): Add `string' entry.
12460 2009-02-05 Pedro Alves <pedro@codesourcery.com>
12462 * target.h (target_tid_to_str): Delete.
12463 * thread.c (print_thread_info, thread_apply_all_command)
12464 (thread_apply_command, thread_command, do_captured_thread_select):
12465 Use target_pid_to_str instead of target_tid_to_str.
12466 * linux-fork.c (delete_fork_command): Likewise.
12468 2009-02-05 Pedro Alves <pedro@codesourcery.com>
12470 * frame.c (has_stack_frames): Make public.
12471 (get_prev_frame): Don't allow a NULL this_frame anymore.
12472 * frame.h (has_stack_frames): Declare.
12473 * varobj.c (find_frame_addr_in_frame_chain): Don't ever pass NULL
12474 to get_prev_frame, instead start at get_current_frame.
12475 (varobj_create): Check has_stack_frames before getting any frame;
12476 eliminate one usage of deprecated_safe_get_selected_frame.
12478 2009-02-05 Tom Tromey <tromey@redhat.com>
12479 Thiago Jung Bauermann <bauerman@br.ibm.com>
12481 * python/python.c (GdbMethods): Move to bottom of file.
12482 (get_parameter, execute_gdb_command, gdbpy_write,
12483 gdbpy_flush): Remove forward declarations.
12484 (eval_python_from_control_command): Fix error checking of function
12485 PyRun_SimpleString. Fix error string.
12486 (python_command): Likewise.
12487 (execute_gdb_command): Added from_tty argument.
12489 2009-02-05 Thiago Jung Bauermann <bauerman@br.ibm.com>
12491 * language.h (language_dfn): Add la_get_string member.
12492 (LA_GET_STRING): New macro.
12493 (default_get_string): New prototype.
12494 * language.c (default_get_string): New function.
12495 (unknown_language_defn, auto_language_defn, local_language_defn): Use
12496 default_get_string for la_get_string.
12497 * c-lang.c (c_get_string): New function.
12498 (c_language_defn, cplus_language_defn, asm_language_defn): Use
12499 c_get_string for la_get_string.
12500 (minimal_language_defn): Likewise
12501 * ada-lang.c (ada_language_defn): Likewise.
12502 * f-lang.c (f_language_defn): Use default_get_string for
12504 * jv-lang.c (java_language_defn): Likewise.
12505 * m2-lang.c (m2_language_defn): Likewise.
12506 * objc-lang.c (objc_language_defn): Likewise.
12507 * p-lang.c (p_language_defn): Likewise.
12508 * scm-lang.c (scm_language_defn): Likewise.
12509 * typeprint.c (type_to_string): New function.
12510 * value.h (type_to_string): New prototype.
12511 * valprint.c (val_print_string): Factor out code for reading string
12512 from the inferior into its own function. Put 2 spaces after period
12514 (read_string): New function.
12515 * valprint.h (read_string): New prototype.
12517 2009-01-07 Pierre Muller <muller@ics.u-strasbg.fr>
12518 Tom Tromey <tromey@redhat.com>
12520 PR breakpoints/8079:
12521 * breakpoint.c (print_one_breakpoint): Use exp_string field
12522 to display expression of watchpoints.
12523 (mention): Likewise.
12524 (watch_command_1): Remove trailing whitespace from expression.
12525 * printcmd.c (struct display) <exp_string>: New field.
12526 (display_command): Set exp_string.
12527 (free_display): Free exp_string.
12528 (clear_displays): Use free_display.
12529 (do_one_display): Print exp_string.
12530 (display_info): Likewise.
12532 2009-02-04 Tom Tromey <tromey@redhat.com>
12533 Thiago Jung Bauermann <bauerman@br.ibm.com>
12534 Phil Muldoon <pmuldoon@redhat.com>
12536 * python/python-internal.h (gdbpy_get_value_from_history): Rename
12537 prototype to gdbpy_history.
12538 (gdbpy_is_string): Declare.
12539 (python_string_to_host_string): Declare.
12540 * python/python-utils.c (gdbpy_is_string): New function.
12541 (unicode_to_encoded_string): New function.
12542 (unicode_to_target_string): Use it.
12543 (python_string_to_host_string): New function.
12544 * python/python-value.c (valpy_address): New function.
12545 (convert_value_from_python): Use gdbpy_is_string. Change to throw
12546 Python exception instead of a GDB exception on error. Properly check
12548 (valpy_getitem): Convert field name to host string. Handle array
12549 accesses. Adapt to new behaviour of convert_value_from_python.
12550 (valpy_new): Adapt to new behaviour of convert_value_from_python.
12551 (enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
12552 VALPY_BITXOR, VALPY_BITOR>: New constants.
12553 (valpy_binop): Update. Adapt to new behaviour of
12554 convert_value_from_python.
12555 (valpy_invert): New function.
12556 (valpy_lsh): Likewise.
12557 (valpy_rsh): Likewise.
12558 (valpy_and): Likewise.
12559 (valpy_or): Likewise.
12560 (valpy_xor): Likewise.
12561 (valpy_richcompare): Call convert_value_from_python instead of doing
12562 conversions itself.
12563 (is_intlike, valpy_int, valpy_long, valpy_float): New functions.
12564 (gdbpy_get_value_from_history): Rename
12565 function to gdbpy_history.
12566 (gdbpy_initialize_values): Don't set tp_new.
12567 (value_object_type): Add valpy_new.
12568 (value_object_methods): Add `address' entry.
12569 (value_object_as_number): Update for new methods.
12570 * python/python.c (GdbMethods): Rename entry from
12571 `get_value_from_history' to `history'.
12573 2009-02-04 Jerome Guitton <guitton@adacore.com>
12575 * ada-lang.c (ada_template_to_fixed_record_type_1): Check size
12576 of type to guard against a crash.
12578 2009-02-04 Jerome Guitton <guitton@adacore.com>
12580 * value.c (value_from_contents_and_address): Always return
12581 a lval_memory value, even if address is null.
12583 2009-02-04 Tristan Gingold <gingold@adacore.com>
12585 * i386-darwin-tdep.c (i386_darwin_sigcontext_addr): New function.
12586 (amd64_darwin_sigcontext_addr): Ditto.
12587 (darwin_dwarf_signal_frame_p): Ditto.
12588 (i386_darwin_init_abi): Handle signal frames, use the const for
12590 (x86_darwin_init_abi_64): Ditto.
12592 2009-02-04 Tristan Gingold <gingold@adacore.com>
12594 * i386-tdep.c (i386_sigtramp_p): Make it public.
12595 * i386-tdep.h (i386_sigtramp_p): Declare.
12597 2009-02-04 Tristan Gingold <gingold@adacore.com>
12599 * machoread.c (macho_symfile_read): Read minsymtab also from
12601 (macho_symfile_read): Try to read dwarf2 frame info from main
12602 object file, but not from OSO files.
12603 (macho_symfile_offsets): Update section names for latest BFD
12605 * i386-darwin-tdep.c (i386_darwin_init_abi): Call set_solib_ops.
12606 (x86_darwin_init_abi_64): Ditto.
12607 * solib-darwin.c: New file.
12608 * solib-darwin.h: New file.
12609 * configure.tgt: Add solib.o solib-darwin.o for Darwin.
12611 2009-02-04 Tristan Gingold <gingold@adacore.com>
12613 * solist.h (struct target_so_ops): Comment fallback behavior for
12616 2009-02-03 Tom Tromey <tromey@redhat.com>
12618 * completer.c (add_struct_fields): Check type_name against NULL
12621 2009-02-03 Joel Brobecker <brobecker@adacore.com>
12623 * MAINTAINERS: Update Elena's email address.
12625 2009-02-02 Joel Brobecker <brobecker@adacore.com>
12627 * breakpoint (update_watchpoint): Minor comment adjustment.
12629 2009-02-02 Tom Tromey <tromey@redhat.com>
12632 * completer.c (count_struct_fields): Count method names.
12633 (add_struct_fields): Add matching method names.
12635 2009-02-02 Doug Evans <dje@google.com>
12637 * configure.ac (gdbkt): Check both no_tcl/no_tk first, before
12638 doing any further tcl/tk configury. Don't configure gdbtk if
12639 tcl or tk check fails.
12640 * aclocal.m4: Regenerate.
12641 * configure: Regenerate.
12643 2009-02-02 Tom Tromey <tromey@redhat.com>
12646 * valops.c (find_overload_match): Follow typedefs before taking
12647 address of object argument.
12649 2009-02-01 Doug Evans <dje@google.com>
12651 * target.h (target_waitstatus_to_string): Declare.
12652 * target.c (target_waitstatus_to_string): New function. Copied from
12653 debug_to_wait. Add missing entries for TARGET_WAITKIND_SYSCALL_ENTRY,
12654 TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_IGNORE,
12655 TARGET_WAITKIND_NO_HISTORY.
12656 (debug_to_wait): Call it.
12657 * infrun.c (wait_for_inferior): If debug_infrun, print result of
12659 (fetch_inferior_event): Ditto.
12661 2009-01-30 Tom Tromey <tromey@redhat.com>
12663 * Makefile.in (HFILES_NO_SRCDIR): Remove i386-cygwin-tdep.h.
12665 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
12668 * thread.c (do_captured_list_thread_ids): Report the current
12671 2009-01-30 Vladimir Prus <vladimir@codesourcery.com>
12673 * breakpoint.c (create_breakpoint, create_breakpoints)
12674 (break_command_really, set_breakpoint): New parameter enabled.
12675 (create_breakpoint, break_command_really): Make breakpoint
12676 disabled if so requested.
12677 * breakpoint.h (set_breakpoint): New parameter enabled.
12678 * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle the -d option.
12680 2009-01-28 Doug Evans <dje@google.com>
12682 * amd64-tdep.h (amd64_displaced_step_copy_insn): Declare.
12683 (amd64_displaced_step_fixup): Declare.
12684 * amd64-tdep.c: #include opcode/i386.h, dis-asm.h.
12685 (amd64_arch_regmap): Move out of amd64_analyze_stack_align
12686 and make static global.
12687 (amd64_arch_regmap_len): New static global.
12688 (amd64_arch_reg_to_regnum): New function.
12689 (struct amd64_insn): New struct.
12690 (struct displaced_step_closure): New struct.
12691 (onebyte_has_modrm,twobyte_has_modrm): New static globals.
12692 (rex_prefix_p,skip_prefixes)
12693 (amd64_insn_length_fprintf,amd64_insn_length_init_dis)
12694 (amd64_insn_length,amd64_get_unused_input_int_reg)
12695 (amd64_get_insn_details,fixup_riprel,fixup_displaced_copy)
12696 (amd64_displaced_step_copy_insn)
12697 (amd64_absolute_jmp_p,amd64_absolute_call_p,amd64_ret_p)
12698 (amd64_call_p,amd64_breakpoint_p,amd64_syscall_p)
12699 (amd64_displaced_step_fixup): New functions.
12700 * amd64-linux-tdep.c: #include arch-utils.h.
12701 (amd64_linux_init_abi): Install displaced stepping support.
12703 2009-01-28 Daniel Jacobowitz <dan@codesourcery.com>
12704 Jerome Guitton <guitton@adacore.com>
12706 * configure, config.in: Regenerated.
12707 * configure.ac: Add --with-system-gdbinit.
12708 * main.c (get_init_files): New.
12709 (captured_main): Use get_init_files. Load system gdbinit before
12711 (print_gdb_help): Print location of init files.
12713 2009-01-28 Pedro Alves <pedro@codesourcery.com>
12715 * corefile.c (generic_search): Delete disabled code.
12716 * gdbcore.h (generic_search): Delete declaration.
12718 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12720 * linux-nat.c (linux_child_follow_fork): Copy attach_flag from the
12721 parent to the child.
12722 * inf-ttrace.c (inf_ttrace_follow_fork): Likewise.
12723 * inf-ptrace.c (inf_ptrace_follow_fork): Likewise. Use
12724 remove_breakpoints to remove breakpoints from the parent.
12726 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12728 PR backtrace/9458, PR backtrace/8864:
12729 * frame.c (create_new_frame): Update the frame's cached PC before
12730 finding its unwinder. Use frame_id_build to build the new frame's
12732 * stack.c (parse_frame_specification_1): Correct setting ``addrs''
12733 array values from the ``args'' array values.
12735 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12737 * gdbtypes.c (alloc_type, alloc_type_instance, create_range_type)
12738 (create_array_type, create_set_type, init_flags_type)
12739 (copy_type_recursive): Replace pairs of calls to XALLOC and memset
12740 with a call to XZALLOC or XCALLOC, and pairs of calls to
12741 obstack_alloc and memset with a call to OBSTACK_ZALLOC.
12743 2009-01-26 Pedro Alves <pedro@codesourcery.com>
12745 Add "maint set|show internal-error|internal-warning quit|corefile
12746 ask|yes|no" commands.
12749 * utils.c (internal_problem_ask, internal_problem_yes)
12750 (internal_problem_no, internal_problem_modes): New.
12751 (struct internal_problem): Remove FIXME. Make should_quit and
12752 should_dump_core types to char *.
12753 (internal_vproblem, internal_error_problem)
12754 (internal_warning_problem): Adjust.
12755 (set_internal_problem_cmd, show_internal_problem_cmd): New dummy
12757 (add_internal_problem_command): New.
12758 (_initialize_utils): New.
12760 2009-01-25 Pedro Alves <pedro@codesourcery.com>
12762 * infcmd.c (program_info): Use paddress instead of casting stop_pc
12765 2009-01-24 Pedro Alves <pedro@codesourcery.com>
12767 * infrun.c (normal_stop): Don't call
12768 deprecated_update_frame_pc_hack.
12769 * frame.c (deprecated_update_frame_pc_hack)
12770 (deprecated_update_frame_base_hack): Delete, and ...
12771 (create_new_frame): ... inline here.
12772 * frame.h (deprecated_update_frame_pc_hack)
12773 (deprecated_update_frame_base_hack): Delete declarations.
12775 2009-01-23 Pedro Alves <pedro@codesourcery.com>
12777 * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
12778 * cli/cli-setshow.c (do_setshow_command): Handle it.
12779 * command.h (enum var_types): Add var_zuinteger.
12780 (add_setshow_zuinteger_cmd): Declare.
12782 * valprint.c (_initialize_valprint): Change the set input-radix
12783 and set output-radix commands to zuinteger type.
12785 2009-01-23 Pedro Alves <pedro@codesourcery.com>
12788 * infrun.c (normal_stop): Tag threads as stopped, and run the
12789 hook-stop before printing the stack frame.
12791 2009-01-22 Pedro Alves <pedro@codesourcery.com>
12794 * gnu-v3-abi.c (gnuv3_baseclass_offset): Call check_typedef on
12797 2009-01-20 Kazu Hirata <kazu@codesourcery.com>
12799 * gdb/procfs.c (info_mappings_callback): Cast map->pr_size to
12802 2009-01-20 Daniel Jacobowitz <dan@codesourcery.com>
12805 * infcmd.c (signal_command): Do not specify a resume PC.
12807 2009-01-19 Doug Evans <dje@google.com>
12809 * dummy-frame.c (dummy_frame): Replace regcache member with
12811 (dummy_frame_push): Replace caller_regcache arg with caller_state.
12812 All callers updated.
12813 (remove_dummy_frame,pop_dummy_frame,lookup_dummy_frame): New fns.
12814 (dummy_frame_pop): Rewrite. Verify requested frame is in the
12815 dummy frame stack. Restore program state.
12816 (cleanup_dummy_frames): Rewrite.
12817 (dummy_frame_sniffer): Update. Make static.
12818 * dummy-frame.h (regcache,frame_info): Delete forward decls.
12819 (inferior_thread_state): New forward decl.
12820 (dummy_frame_push): Update prototype.
12821 * frame.c (frame_pop): dummy_frame_pop now does all the work for
12823 * infcall.c (breakpoint_auto_delete_contents): Delete.
12824 (get_function_name,run_inferior_call): New fns.
12825 (call_function_by_hand): Simplify by moving some code to
12826 get_function_name, run_inferior_call. Inferior function call wrapped
12827 in TRY_CATCH so there's less need for cleanups and all exits from
12828 proceed are handled similarily. Detect program exit.
12829 Detect program stopping in a different thread.
12830 Make error messages more consistent.
12831 * inferior.h (inferior_thread_state): Declare (opaque type).
12832 (save_inferior_thread_state,restore_inferior_thread_state,
12833 make_cleanup_restore_inferior_thread_state,
12834 discard_inferior_thread_state, get_inferior_thread_state_regcache):
12836 (save_inferior_status): Update prototype.
12837 * infrun.c: (normal_stop): When stopped for the completion of an
12838 inferior function call, verify the expected stack frame kind.
12839 (inferior_thread_state): New struct.
12840 (save_inferior_thread_state,restore_inferior_thread_state,
12841 do_restore_inferior_thread_state_cleanup,
12842 make_cleanup_restore_inferior_thread_state,
12843 discard_inferior_thread_state,
12844 get_inferior_thread_state_regcache): New functions.
12845 (inferior_status): Move stop_signal, stop_pc, registers to
12846 inferior_thread_state. Remove restore_stack_info.
12847 (save_inferior_status): Remove arg restore_stack_info.
12848 All callers updated. Remove saving of state now saved by
12849 save_inferior_thread_state.
12850 (restore_inferior_status): Remove restoration of state now done by
12851 restore_inferior_thread_state.
12852 (discard_inferior_status): Remove freeing of registers, now done by
12853 discard_inferior_thread_state.
12855 2009-01-18 Pedro Alves <pedro@codesourcery.com>
12857 * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line
12858 at a time, times NUM_TO_SCROLL.
12859 * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to
12860 fetch the selected frame if there is no stack.
12862 2009-01-18 Pedro Alves <pedro@codesourcery.com>
12865 * gdbthread.h (finish_thread_state, finish_thread_state_cleanup):
12867 * thread.c (finish_thread_state, finish_thread_state_cleanup): New.
12868 * infrun.c (wait_for_inferior, fetch_inferior_event): If an error
12869 is thrown while handling an event, finish the thread state.
12870 (normal_stop): Use finish_thread_state cleanup.
12871 * infcmd.c (run_command_1): If an error is thrown while starting
12872 the inferior, finish the thread state.
12874 2009-01-18 Pedro Alves <pedro@codesourcery.com>
12876 * tui/tui-winsource.c (tui_update_breakpoint_info): In asm layout,
12877 skip breakpoints without a location (pending breakpoints).
12879 2009-01-18 Pedro Alves <pedro@codesourcery.com>
12882 * hppa-hpux-tdep.c (hppa_hpux_write_pc): Remove 'return'.
12884 2009-01-18 Nick Roberts <nickrob@snap.net.nz>
12886 * thread.c (thread_command): Move call to annotate_thread_changed
12888 (do_captured_thread_select): ... here, to avoid printing an
12889 annotation if the thread change generates an exception.
12891 2009-01-16 Joel Brobecker <brobecker@adacore.com>
12893 * NEWS: Document x86_64/MinGW as a new native configuration.
12895 2009-01-16 Joel Brobecker <brobecker@adacore.com>
12897 * NEWS: Move the documentation of "info os processes" to
12898 the appropriate section (documenting the new commands).
12900 2009-01-15 Doug Evans <dje@google.com>
12902 * target.h (target_signal_to_string): Make return type const char *.
12903 (target_signal_to_name): Ditto.
12904 (target_signal_from_name): Make arg const char *.
12905 * infrun.c (sig_print_info): Update.
12906 * signals/signals.c (signals): Make array and struct members const.
12907 (target_signal_to_string): Make return type const char *.
12908 (target_signal_to_name): Ditto.
12909 (target_signal_from_name): Make arg const char *.
12911 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
12912 Tristan Gingold <gingold@adacore.com>
12914 * solist.h (struct target_so_ops): New member bfd_open.
12915 (solib_find): Add prototype.
12916 (solib_bfd_fopen): Add prototype.
12917 * solib.c (solib_find, solib_bfd_fopen): New functions, extracted
12918 from solib_bfd_open.
12919 (solib_bfd_open): Use ops->bfd_open override if present. Call
12920 solib_find and solib_bfd_open otherwise.
12922 * objfiles.h (OBJF_KEEPBFD): New define.
12923 * objfiles.c (free_objfile): Do not close BFD if OBJF_KEEPBFD
12924 objfile flag is set.
12925 * solib.c (symbol_add_stub): Do not allocate second BFD for
12926 shared library; use OBJF_KEEPBFD flag on solib objfile.
12928 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
12930 * frame.c (get_frame_arch): Abort if called with NULL this_frame.
12932 2009-01-15 Ulrich Weigand <uweigand@de.ibm.com>
12934 * value.h (address_of_variable): Add prototype.
12935 (locate_var_value): Remove prototype.
12937 * findvar.c (read_var_value): Do not attempt to default frame
12939 (locate_var_value): Remove function.
12940 * valops.c (value_of_variable): Retrieve selected frame for
12941 symbols that require a frame when called with NULL block.
12942 * valops.c (address_of_variable): New function.
12944 * eval.c (evaluate_subexp_for_address): Call address_of_variable
12945 instead of calling locate_var_value.
12946 (evaluate_subexp_with_coercion): Likewise.
12948 2009-01-14 Daniel Jacobowitz <dan@codesourcery.com>
12950 * NEWS: Document "define" for prefixed commands.
12951 * cli/cli-cmds.c (show_user): Update calls to show_user_1. Call
12952 show_user_1 for prefix commands.
12953 * cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
12954 * cli/cli-script.c (validate_comname): Rewrite to handle prefix
12955 commands. Return the containing command list.
12956 (define_command, document_command): Update to handle prefix commands.
12957 (show_user_1): Add prefix and name arguments. Handle prefix
12959 * cli/cli-script.h (show_user_1): Update prototype.
12961 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
12963 * ser-mingw.c (console_select_thread): Add return to make
12965 (pipe_select_thread): Likewise.
12966 (file_select_thread): Likewise.
12968 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12970 * mi/mi-main.c (mi_cmd_execute): Clean up parenthesis mess from
12973 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12975 * remote.c (extended_remote_mourn_1): Invalidate our notion of
12976 current general thread.
12978 2009-01-14 Pedro Alves <pedro@codesourcery.com>
12980 * mi/mi-main.c (mi_cmd_execute): Also allow -list-thread-groups
12981 without a live selected thread.
12983 2009-01-14 Joel Brobecker <brobecker@adacore.com>
12985 Update the copyright notice of some of the files I missed
12986 in the previous copyright update.
12988 2009-01-14 Joel Brobecker <brobecker@adacore.com>
12990 * windows-nat.c (handle_unload_dll): Use %p to print the DLL
12991 base address instead of casting it to DWORD.
12993 2009-01-13 Ulrich Weigand <uweigand@de.ibm.com>
12995 * dwarf2loc.c (dwarf2_evaluate_loc_desc): Do not call get_frame_arch
12996 for NULL frame pointers.
12998 2009-01-13 Mark Kettenis <kettenis@gnu.org>
13000 * utils.c (host_address_to_string): Reimplement in a way that
13001 avoids the cast of the address to long.
13003 2009-01-13 Joel Brobecker <brobecker@adacore.com>
13005 * mdebugread.c (parse_symbol): Save the symbol private data
13006 using SYMBOL_VALUE_BYTES instead of SYMBOL_VALUE.
13007 (psymtab_to_symtab_1): Likewise.
13008 (parse_procedure): Declare variable "e" only in the scope
13009 where it is used. Extract the symbol private data using
13010 SYMBOL_VALUE_BYTES.
13012 2009-01-13 Jim Blandy <jimb@codesourcery.com>
13014 Abstract out common code for copying value locations.
13016 * value.h (set_value_component_location): New declaration.
13017 * value.c (set_value_component_location): New function.
13018 (value_primitive_field): Use it.
13019 * valarith.c (value_subscript, value_subscripted_rvalue): Same.
13020 * valops.c (search_struct_field, value_slice): Same.
13021 * ada-lang.c (coerce_unspec_val_to_type)
13022 (ada_value_primitive_packed_val): Same.
13024 2009-01-13 Joel Brobecker <brobecker@adacore.com>
13026 * MAINTAINERS (GLOBAL MAINTAINERS): Add Tom Tromey.
13028 2009-01-12 Christopher Faylor <me+cygwin@cgf.cx>
13030 * amd64-windows-nat.c Rename gdb-specific win32_* to windows_*
13032 * i386-cygwin-tdep.c: Ditto.
13033 * i386-windows-nat.c: Ditto.
13034 * windows-nat.h: Ditto.
13035 * windows-tdep.c: Ditto.
13036 * windows-tdep.h: Ditto.
13037 * windows-nat.c: Ditto.
13038 (cygwin_load_start): Redefine as CORE_ADDR.
13039 (cygwin_load_end): Ditto.
13040 (windows_make_so): Coerce result of address arithmetic to uintptr_t
13041 before coercing to CORE_ADDR to avoid a compiler warning.
13042 (handle_exception): Define addr as CORE_ADDR and coerce
13043 ExceptionAddress to uintptr_t before assigining to avoid a compiler
13045 * config/djgpp/fnchange.lst: Add mappings for recently renamed windows
13048 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
13050 Fix linking with --enable-targets=all:
13051 * Makefile.in (ALL_TARGET_OBS): Add windows-tdep.o.
13052 (HFILES_NO_SRCDIR): Add windows-tdep.h.
13053 (ALLDEPFILES): Add windows-tdep.c.
13055 2009-01-11 Chris Faylor <me.gdb@cgf.cx>
13057 * win32-nat.h: Delete.
13058 * windows-nat.h: Rename from win32-nat.h.
13059 * win32-nat.c: Delete.
13060 * windows-nat.c: Rename from win32-nat.c.
13061 * win32-termcap.c: Delete.
13062 * windows-termcap.c: Rename from win32-termcap.c.
13063 * amd64-windows-nat.c: Handle rename from win32-nat.h -> windows-nat.h.
13064 * configure.ac: Handle rename from win32-termcap.c ->
13066 * configure: Regenerate.
13067 * gdb_curses.h: Change comment to reflect rename from win32-termcap.c
13068 -> windows-termcap.c.
13069 * i386-cygwin-tdep.c: Handle rename from win32-tdep.h ->
13071 * i386-windows-nat.c: Refect rename from win32-nat.h -> windows-nat.h.
13072 * windows-nat.c: Ditto. Also reflect rename from from win32-tdep.h ->
13074 (win32_make_so): Handle cygwin compiler warning due to change of
13075 load_addr from DWORD to LPVOID.
13076 (handle_load_dll): Use %p in format string to properly print address
13077 and avoid a compiler warning.
13078 (DEBUG_EXCEPTION_SIMPLE): Ditto.
13079 (handle_exception): Ditto.
13080 * windows-tdep.c: Handle rename from win32-tdep.h -> windows-tdep.h.
13081 * config/i386/cygwin.mh: Handle rename from win32-nat.o ->
13083 * config/i386/mingw.mh: Ditto.
13084 * config/i386/mingw64.mh: Ditto.
13086 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
13088 * f-typeprint.c (f_type_print_varspec_suffix): Convert the autovariable
13089 arrayprint_recurse_level to a parameter. Update all the callers. New
13090 comment at autovariables.
13092 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
13094 * gdbtypes.c (make_qualified_type, replace_type): Reformat to the GNU
13097 2009-01-11 Joel Brobecker <brobecker@adacore.com>
13099 * target.c (target_xfer_partial): Use host_address_to_string to
13100 print the address of readbuf and writebuf. Cast the address of
13101 elements inside the myaddr buffer into intptr_t.
13102 (deprecated_debug_xfer_memory): Use paddress to print memaddr.
13103 Cast the address of elements inside the myaddr buffer into
13106 2009-01-11 Joel Brobecker <brobecker@adacore.com>
13108 * amd64-windows-nat.c, amd64-windows-tdep.c: New files.
13109 * config/i386/mingw64.mh, config/i386/nm-cygwin64.h: New files.
13110 * configure.host, configure.tgt: Add handling for x86_64/windows.
13111 * config/djgpp/fnchange.lst: Add entries for amd64-windows-nat.c
13112 and amd64-windows-tdep.c.
13114 2009-01-11 Joel Brobecker <brobecker@adacore.com>
13116 * win32-tdep.h, win32-tdep.c: New files.
13117 * i386-cygwin-tdep.h: Delete.
13118 * i386-cygwin-tdep.c: Include win32-tdep.h instead of
13119 i386-cygwin-tdep.h.
13120 (win32_xfer_shared_library): Delete. Moved to win32-tdep.c.
13121 * win32-nat.c: Likewise.
13122 * configure.tgt: Add win32-tdep.o to the list of target object
13123 files for i386-cygwin and i386-mingw targets.
13125 2009-01-11 Joel Brobecker <brobecker@adacore.com>
13127 * win32-nat.h: New file.
13128 * win32-nat.c (mappings): Initialize to NULL.
13129 (win32_set_context_register_offsets): New function.
13130 * i386-windows-nat.c: New file.
13131 (mappings): Moved here from win32-nat.c.
13132 (_initialize_i386_windows_nat): New function.
13133 * config/i386/mingw.mh (NATDEPFILES): Add i386-windows-nat.o.
13134 * config/i386/cygwin.mh (NATDEPFILES): Likewise.
13136 2009-01-09 Andreas Schwab <schwab@suse.de>
13138 * Makefile.in (init.c): Set LANG/LC_ALL to C, not c.
13140 2009-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13142 * gdbtypes.c (append_composite_type_field): Correct the location of
13145 2009-01-09 Pedro Alves <pedro@codesourcery.com>
13147 * defs.h (deprecated_error_hook): Delete declaration.
13148 * interps.c (clear_interpreter_hooks): Adjust.
13149 * remote-sim.c (gdb_os_error): Don't try to call
13150 deprecated_error_hook. No need to call exit anymore.
13151 * top.c (deprecated_error_hook): Delete.
13153 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13155 * arch-utils.c (gdbarch_update_p): Use host_address_to_string
13156 to print the address of the gdbarch pointer.
13158 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13160 * gdbarch.sh: Fix all the compilation errors on amd64-windows
13161 due to casting a pointer to a long when printing a function
13162 address. Instead, use host_address_to_string to convert our
13163 address to a string.
13164 * gdbarch.c: Regenerate.
13166 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13168 * event-top.c (async_disconnect, async_stop_sig): use "raise"
13169 instead of "kill" to raise a signal.
13171 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13173 * win32-nat.c (get_module_name): Change the type of parameter
13174 "base_address" to LPVOID. Remove unnecessary cast.
13175 (struct lm_info): Change type of load_addr to LPVOID.
13176 (win32_make_so): Change the type of parameter "load_addr"
13177 to LPVOID. Remove some unnecessary casts.
13178 (handle_unload_dll): Change the type of "lpBaseOfDll" to LPVOID.
13179 (win32_xfer_shared_libraries): Add missing cast.
13181 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13183 * win32-nat.c (has_detach_ability, set_process_privilege):
13184 Cast the result of GetProcAddress to (void *) to avoid
13185 a compilation warning.
13187 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13189 * win32-nat.c (CONTEXT_EXTENDED_REGISTERS): Define to 0 if not
13192 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13194 * win32-nat.c (get_image_name, win32_xfer_memory): Fix type
13195 definition of local variable "done".
13196 (info_w32_command, handle_exception): Remove unnecessary cast.
13198 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13200 * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
13201 DebugSetProcessKillOnExit. Update all uses in this file.
13202 (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
13203 Update all uses in this file.
13205 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13207 * win32-nat.c (do_initial_win32_stuff): Add new ops parameter,
13208 and use it when pushing the target.
13209 (win32_attach, win32_create_inferior): Update call to
13210 do_initial_win32_stuff.
13211 (win32_detach, win32_mourn_inferior): Use our ops parameter
13212 instead of the global win32_ops to unpush the target.
13214 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13216 * ser-mingw.c (ser_windows_open): Use proper type when casting
13217 in call to _open_osfhandle.
13219 2009-01-09 Kai Tietz <kai.tietz@onevision.com>
13221 * coff-pe-read.c (read_pe_exported_syms): Fix typo.
13223 2009-01-09 Joel Brobecker <brobecker@adacore.com>
13225 * CONTRIBUTE: Minor reformatting.
13227 2009-01-08 Kai Tietz <kai.tietz@onevision.com>
13229 * MAINTAINERS: Add myself to Write After Approval.
13230 * coff-pe-read.c (read_pe_exported_syms): Enable read of PE+
13233 2009-01-08 Nathan Froyd <froydnj@codesourcery.com>
13235 * remote-sim.c (gdb_os_error): Mark as a noreturn function.
13236 Call exit to make it obvious to GCC.
13238 2009-01-08 Tom Tromey <tromey@redhat.com>
13240 PR breakpoints/9350:
13241 * varobj.c (varobj_invalidate): Unconditionally free
13243 * symfile.c (syms_from_objfile): Free local_addr when returning
13245 * exec.c (exec_file_attach): Do cleanups before returning.
13246 (exec_file_command): Likewise.
13247 * corefile.c (reopen_exec_file): Do cleanups before returning.
13248 * breakpoint.c (insert_breakpoint_locations): Do cleanups before
13250 (do_vec_free): New function.
13251 (update_global_location_list): Make a cleanup for old_locations.
13252 Do cleanups before returning. Remove unused variable 'e'.
13253 (find_condition_and_thread): Free result of parsing the
13255 (print_it_typical): Do cleanups before returning.
13256 (breakpoint_re_set_one): Always free sals.sals.
13258 2009-01-08 Joel Brobecker <brobecker@adacore.com>
13259 Emi Suzuki <emi-suzuki@tjsys.co.jp>
13261 * breakpoint.c (do_enable_breakpoint): Use update_watchpoint for
13264 2009-01-07 Doug Evans <dje@google.com>
13266 * top.c (gdb_prompt_string): Delete, unused.
13268 2009-01-07 Pedro Alves <pedro@codesourcery.com>
13270 Delete ONE_PROCESS_WRITETEXT leftovers.
13272 * breakpoint.c (insert_bp_location): Delete process_warning
13274 (insert_breakpoint_locations): Adjust.
13275 (reattach_breakpoints): Adjust.
13276 * infrun.c (normal_stop): Drop "It might be running in another
13279 2009-01-07 Stan Shebs <stan@codesourcery.com>
13281 * config/pa/linux.mh (XDEPFILES): Remove.
13283 2009-01-07 Doug Evans <dje@google.com>
13285 * cli/cli-cmds.c (set_debug): Fix cut-n-paste error.
13287 2009-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13289 * f-typeprint.c (f_type_print_base <TYPE_CODE_STRUCT>): Fix output
13290 spacing, a regression from 2008-04-22.
13292 2009-01-07 Joel Brobecker <brobecker@adacore.com>
13294 * utils.c (gdb_print_host_address): Adjust implementation to
13295 reuse host_address_to_string. Move comment explaining the conversion
13296 from host address to string from here...
13297 (host_address_to_string): ... to there.
13299 2009-01-07 Emi Suzuki <emi-suzuki@tjsys.co.jp>
13301 * MAINTAINERS: Add myself for write after approval privileges.
13303 2009-01-06 Tom Tromey <tromey@redhat.com>
13305 * value.c (set_internalvar): Use value_free, not xfree.
13307 2009-01-06 Jim Blandy <jimb@red-bean.com>
13309 Check return values of functions declared with warn_unused_result
13310 attribute in GLIBC 2.8.
13311 * cli/cli-cmds.c (pwd_command): Check return value from getcwd.
13312 * inflow.c (check_syscall): New function.
13313 (new_tty): Use check_syscall to check return values from open and dup.
13314 * linux-nat.c (linux_nat_info_proc_cmd): Check return value from fgets.
13315 * main.c (captured_main): Call cwd after setting up gdb_stderr;
13316 check for errors from getcwd.
13317 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Check return value from getcwd.
13318 * ui-file.c (stdio_file_write): Ignore return value from fwrite.
13319 (stdio_file_fputs): Same.
13320 * utils.c (internal_vproblem): abort if last-ditch error message
13323 * top.c (gdb_init): Don't set the current directory here; that's
13324 already been done in captured_main.
13326 2009-01-06 Sandra Loosemore <sandra@codesourcery.com>
13328 * ser-tcp.c: Adjust includes.
13329 (tcp_set_cmdlist, tcp_show_cmdlist): Declare.
13330 (tcp_auto_retry, tcp_retry_limit): Declare.
13331 (TIMEOUT): Remove, in favor of tcp_retry_limit.
13332 (POLL_INTERVAL): Increase to 5, in favor of backoff logic.
13333 (wait_for_connect): New function.
13334 (net_open): Use it. Add auto-retry logic.
13335 (set_tcp_cmd, show_tcp_cmd): New functions.
13336 (_initialize_ser_tcp): Initialize new "set/show tcp auto-retry"
13337 and "set/show tcp connect-timeout" commands.
13338 * NEWS: Document new commands.
13340 2009-01-05 Tom Tromey <tromey@redhat.com>
13342 * python/python-internal.h (Py_ssize_t): Define as int.
13344 2009-01-05 Jim Blandy <jimb@red-bean.com>
13346 * MAINTAINERS: Fix my e-mail address as steering committee member.
13348 2009-01-03 Joel Brobecker <brobecker@adacore.com>
13350 Updated copyright notices for most files.
13352 2009-01-03 Joel Brobecker <brobecker@adacore.com>
13354 * top.c (print_gdb_version): Update copyright year.
13356 2009-01-03 Joel Brobecker <brobecker@adacore.com>
13358 * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.
13360 2009-01-01 Pedro Alves <pedro@codesourcery.com>
13362 PR breakpoints/9681:
13363 * exceptions.h (enum errors): New error type, MEMORY_ERROR.
13364 * corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
13365 * breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
13366 retrow all other exceptions.
13368 For older changes see ChangeLog-2008.
13374 version-control: never