blob: b88226f5443060ea537978f5c60a0c6d5a2a0648 [file] [log] [blame]
2012-08-17 Joel Brobecker <>
* Update GDB version number to 7.5.
2012-08-16 Tom Tromey <>
PR python/14386:
* varobj.c (update_dynamic_varobj_children): Don't call
2012-08-06 Tom Tromey <>
* dwarf2-frame.c (clear_pointer_cleanup): New function.
(dwarf2_frame_cache): Use it.
* frame-unwind.h (frame_sniffer_ftype): Document prologue
cache initialization constraint.
2012-08-06 Tom Tromey <>
PR cli/14392:
* cli/cli-cmds.c (list_command): Filter 'sals_end'.
2012-08-03 Tom Tromey <>
* dwarf2-frame.c (dwarf2_frame_cache): Call do_cleanups before
2012-08-02 Ulrich Weigand <>
* inf-child.c (inf_child_fileio_pwrite): If pwrite fails, fall back
to attempting lseek/write.
(inf_child_fileio_pread): Likewise for pread.
2012-08-01 Richard Henderson <>
* configure.tgt (m32c-*-*) [gdb_target_obs]: Remove prologue-value.o.
(mep-*-*) [gdb_target_obs]: Likewise.
2012-08-01 Ulrich Weigand <>
* arm-linux-nat.c (arm_linux_hw_breakpoint_initialize): Do not
attempt to 4-byte-align HW breakpoint addresses for Thumb.
2012-07-31 Andreas Schwab <>
* ppc-linux-tdep.c (ppc_linux_init_abi): Register
2012-07-31 Jan Kratochvil <>
* infcall.c (call_function_by_hand): Move BP_ADDR comment to
(call_function_by_hand) <ON_STACK>: Call write_memory with
gdbarch_breakpoint_from_pc, if possible.
(call_function_by_hand) <AT_ENTRY_POINT>: The BP_ADDR comment is moved
2012-07-30 Keith Seitz <>
* linespec.c (linespec_lexer_lex_number): A number followed
by quotes is a valid number, too.
2012-07-26 Keith Seitz <>
* linespec.c (linespec_lexer_lex_number): The input
is also a valid number if the next character is a comma
or colon.
2012-07-25 Ralf Cors├ępius <>
* configure.tgt: Add v850*-*-rtems*.
2012-07-25 Hui Zhu <>
* linespec.c (linespec_lexer_lex_number): Update comments,
change the return and add check to make sure the input is
the decimal numbers.
(linespec_lexer_lex_one): If linespec_lexer_lex_number return
false, call linespec_lexer_lex_string.
2012-07-24 Marc Khouzam <>
* breakpoint.c (create_breakpoint): Store condition for pending
2012-07-23 Keith Seitz <>
* linespec.c (convert_linespec_to_sal): Don't add
any symbols to the result vector if symbol_to_sal
returns zero.
2012-07-20 Doug Evans <>
* NEWS: Document new options "set/show use-deprecated-index-sections",
and delete reference to --use-deprecated-index-sections.
* symfile.h (use_deprecated_index_sections): Delete.
* dwarf2read.c (use_deprecated_index_sections): Make static.
(read_index_from_section): Update wording of how to load
deprecated index sections.
(_initialize_dwarf2_read): New options
"set/show use-deprecated-index-sections".
* main.c (captured_main): Delete --use-deprecated-index-sections.
2012-07-18 Joel Brobecker <>
* Set version to
2012-07-18 Joel Brobecker <>
GDB 7.4.91 released.
2012-07-18 Joel Brobecker <>
* NEWS: Replace "Changes since GDB 7.4" with "Changes in GDB 7.5".
2012-07-18 Joel Brobecker <>
* Update GDB version number to 7.4.91.
2012-07-18 Joel Brobecker <>
* (development): Set to false.
* configure: Regenerate.
2012-07-18 Joel Brobecker <>
GDB 7.5 branch created (branch timestamp: 2012-07-18 03:22 UTC)
* Bump version to
2012-07-16 Jan Kratochvil <>
PR 11914
* f-valprint.c (info_common_command): New variable frame_id.
Reinitialize FI form FRAME_ID after each print_variable_and_value.
* printcmd.c (print_variable_and_value): Extend function comment.
Add comment for invalidated FRAME.
* stack.c (backtrace_command_1): New variable frame_id. Reinitialize
FI form FRAME_ID after each print_frame_local_vars.
(struct print_variable_and_value_data): Change frame to frame_id.
(do_print_variable_and_value): New variable frame, initialize it from
p->frame_id. Add comment for invalidated FRAME.
(print_frame_local_vars, print_frame_arg_vars): New function comment.
Update CB_DATA.FRAME to CB_DATA.FRAME_ID initialization. Add comment
for invalidated FRAME.
2012-07-16 Marc Khouzam <>
Pedro Alves <>
* linux-nat.c (linux_nat_detach): Don't unregister from the event
2012-07-16 Tom Tromey <>
* jv-typeprint.c (c_type_print_varspec_suffix): Don't declare.
2012-07-15 Doug Evans <>
* dwarf2read.c (stmt_list_hash): New struct.
(type_unit_group): Embed "per_cu" member, remove pointer.
New union member "t", move member "tus" into it, all uses updated.
New member "hash", replaces member "line_offset, all uses updated.
(quick_file_names): Replace member "offset" with "hash", all uses
(hash_stmt_list_entry, eq_stmt_list_entry): New functions.
(hash_file_name_entry, eq_file_name_entry): Call them.
(hash_type_unit_group, eq_type_unit_group): Ditto.
(dw2_get_cu, dw2_get_primary_cu): Replace assert with a better one.
(dw2_get_file_names_reader): Fix file name table calculation for TUs.
(dw2_get_file_names): Update.
(create_type_unit_group): Replace "per_cu" arg with "cu".
All callers updated. Fix "quick" (.gdb_index) handling.
(get_type_unit_group): Replace "per_cu" arg with "cu".
All callers updated.
(build_type_unit_groups): Don't reset tu_stats.
* symtab.c (filename_seen_cache): Delete members "tab_alloc_size",
"tab_cur_size". Change member "tab" to be a htab_t.
(create_filename_seen_cache): Update.
(clear_filename_seen_cache, delete_filename_seen_cache): Update.
(filename_seen): Update.
2012-07-13 Doug Evans <>
* symtab.c (filename_seen): Update comment.
2012-07-13 Jan Kratochvil <>
Doug Evans <>
* buildsym.c (end_symtab_1): Split it to ...
(end_symtab_get_static_block): ... this ...
(end_symtab_from_static_block): ... and this function.
(end_symtab, end_expandable_symtab): Call them.
* buildsym.h (end_symtab_get_static_block)
(end_symtab_from_static_block): New declarations.
* dwarf2read.c (process_full_comp_unit): New variable static_block.
Set its valid CU ranges.
2012-07-13 Jan Kratochvil <>
* dwarf2loc.c (disassemble_dwarf_expression): Handle
2012-07-13 Jan Kratochvil <>
* dwarf2read.c (read_call_site_scope): Do not gdb_assert for invalid
2012-07-13 Doug Evans <>
* symtab.c (output_source_filename): Delete unnecessary forward decl.
(filename_seen_cache): New struct.
(create_filename_seen_cache): New function.
(clear_filename_seen_cache, delete_filename_seen_cache): New functions.
(filename_seen): Delete arg "first". New arg "cache". All callers
(output_source_filename_data): New struct.
(output_source_filename): Delete arg "first". New arg "data".
All callers updated.
(sources_info): Delete local "first". New locals "data", "cleanups".
Rewrite to use filename_seen_cache.
(add_partial_filename_data): Delete member "first". New member
"filename_seen_cache". All uses updated.
(make_source_files_completion_list): Rewrite to use
2012-07-12 Doug Evans <>
* psymtab.c (map_symbol_filenames_psymtab): Skip shared psymtabs.
2012-07-10 Doug Evans <>
PR gdb/13498
* dwarf2read.c (dwarf2_per_objfile): New members n_type_unit_groups,
all_type_unit_groups, type_unit_groups, tu_stats.
(dwarf2_per_cu_data): Move "imported_symtabs" into new union "s".
All uses updated. Add type_unit_group to union "s".
(type_unit_group): New struct.
(IS_TYPE_UNIT_GROUP): New macro.
(abbrev_table): Delete unused member "section".
(dw2_do_instantiate_symtab): Early exit if type_unit_group.
(dw2_get_cu): Assert not used with type_unit_group.
(dw2_get_primary_cu): New function.
(dw2_build_type_unit_groups_reader): New function.
(dw2_build_type_unit_groups): New function.
(dw2_get_file_names): Assert not called on type units.
(dw2_map_symtabs_matching_filename): Call dw2_build_type_unit_groups.
Redo loop to iterate over type unit groups instead of type units.
(dw2_expand_symtabs_matching, dw2_map_symbol_filenames): Ditto.
(read_abbrev_offset): New function.
(init_cutu_and_read_dies): New arg "abbrev_table". All callers
(create_partial_symtab): New function.
(process_psymtab_comp_unit_reader): Assert not used with type units.
Call create_partial_symtab.
(process_psymtab_type_unit): Delete.
(hash_type_unit_group, eq_type_unit_group): New functions.
(allocate_type_unit_groups_table): New function.
(create_type_unit_group, get_type_unit_group): New functions.
(tu_abbrev_offset): New struct.
(sort_tu_by_abbrev_offset): New function.
(add_type_unit_group_to_table): New function.
(build_type_unit_groups): New function.
(build_type_psymtabs_reader): New function.
(build_type_psymtab_dependencies): New function.
(build_type_psymtabs): Rewrite.
(scan_partial_symbols): Flag an error if a DW_TAG_imported_unit
is seen in a type unit.
(process_queue): Move symtab expansion debugging printfs here.
Call process_full_type_unit for type units.
(compute_symtab_includes): Assert not called for type units.
(process_cu_includes): Don't call compute_symtab_includes for
type units.
(process_full_type_unit): New function.
(process_imported_unit_die): Flag an error if called for type units.
(handle_DW_AT_stmt_list): Delete arg "want_line_info". All callers
updated. Assert not called for type units.
(read_file_scope): Call dwarf2_start_symtab.
(setup_type_unit_groups): New function.
(read_type_unit_scope): Rewrite.
(abbrev_table_read_table): Initialize abbrev_table->offset.
(abbrev_table_free_cleanup): New function.
(dwarf2_start_symtab): New function.
(load_full_type_unit): Assert not called for type unit groups.
* buildsym.c (finish_block_internal): New arg "expandable".
All callers updated.
(start_symtab): Move most contents to ...
(restart_symtab): ... here. New function.
(reset_symtab_globals): New function.
(end_symtab_1): Renamed from end_symtab. New arg "expandable".
Call reset_symtab_globals.
(end_symtab, end_expandable_symtab): New functions.
(set_missing_symtab, augment_type_symtab): New functions.
* buildsym.h (end_expandable_symtab): Declare.
(augment_type_symtab, restart_symtab): Declare.
* psympriv.h (struct partial_symtab): New member "anonymous".
* psymtab.c (partial_map_symtabs_matching_filename): Ignore
anonymous psymtabs.
(read_psymtabs_with_filename): Ditto.
(map_symbol_filenames_psymtab, psymtab_to_fullname): Ditto.
(expand_symtabs_matching_via_partial): Ditto.
(dump_psymtab): Update.
* dictionary.c (dict_add_pending): New function.
* dictionary.h (dict_add_pending): Declare.
2012-07-09 Doug Evans <>
* buildsym.c (start_subfile): Remove unnecessary check for
name == NULL.
* psymtab.c (allocate_psymtab): Use host_address_to_string.
* dwarf2read.c (load_full_type_unit): Simplify.
* dwarf2read.c (dwarf2_per_objfile): Change type of all_type_units
to struct signatured_type **. All uses updated.
* dwarf2read.c (dwarf2_attr_no_follow): Delete unused arg "cu".
All callers updated.
2012-07-09 Tom Tromey <>
* c-exp.y (check_parameter_typelist): New function.
(parameter_typelist): Call it.
* eval.c (make_params): Handle '(void)' case.
* gdbtypes.c (lookup_function_type_with_arguments): Handle
'(void)' case.
2012-07-07 Jan Kratochvil <>
* common/linux-ptrace.c: Include gdb_assert.h.
<__i386__> (linux_ptrace_test_ret_to_nx_instr): New declaration.
<__i386__>: Include sys/reg.h, sys/mman.h, signal.h, sys/wait.h and
(linux_ptrace_test_ret_to_nx, linux_ptrace_init_warnings): New
* common/linux-ptrace.h (linux_ptrace_init_warnings): New declarations.
* linux-nat.c (linux_child_post_attach)
(linux_child_post_startup_inferior): Call linux_ptrace_init_warnings.
2012-07-07 Jan Kratochvil <>
* linux-thread-db.c (thread_db_find_new_threads_silently): Do not apply
nptl <2.7 bug workaround for core files.
2012-07-06 Jan Kratochvil <>
* linux-nat.c (resume_lwp, linux_nat_resume): Remove LP->SIGINFO
(save_siginfo): Remove.
(stop_wait_callback, linux_nat_filter_event): Remove the save_siginfo
(resume_stopped_resumed_lwps): Remove LP->SIGINFO clearing.
(linux_nat_get_siginfo): Use PTRACE_GETSIGINFO.
* linux-nat.h (struct lwp_info): Remove field siginfo.
2012-07-06 Jan Kratochvil <>
Code cleanup for the next patch.
* arm-linux-nat.c (arm_linux_stopped_data_address): Change variable
siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo
call for it.
* ia64-linux-nat.c (ia64_linux_stopped_data_address): Likewise.
* linux-nat.c (linux_nat_get_siginfo): Add parameter siginfo, change
the return value.
* linux-nat.h (linux_nat_get_siginfo): Likewise.
* ppc-linux-nat.c (ppc_linux_stopped_data_address): Change variable
siginfo_p to siginfo, update its users incl. the linux_nat_get_siginfo
call for it.
2012-07-06 Jan Kratochvil <>
PR 14321
* findcmd.c (parse_find_args): New variable pattern_buf_size_need.
Increase buffer sizes to 2x we need, not just 2x of the previous size.
2012-07-06 Tom Tromey <>
* c-exp.y (DOTDOTDOT): New token.
(func_mod, exp): Use parameter_typelist.
(parameter_typelist): New production.
(tokentab3): Add "..." token.
* eval.c (make_params): Handle varargs.
* gdbtypes.c (lookup_function_type_with_arguments): Handle
2012-07-06 Tom Tromey <>
PR exp/9608:
* c-exp.y (%union) <tvec>: Change type.
(func_mod): Now uses <tvec> type.
(exp): Update for tvec change.
(direct_abs_decl): Push the typelist.
(func_mod): Return a typelist.
(nonempty_typelist): Update for tvec change.
* gdbtypes.c (lookup_function_type_with_arguments): New function.
* gdbtypes.h (lookup_function_type_with_arguments): Declare.
* parse.c (pop_type_list): New function.
(push_typelist): New function.
(follow_types): Handle tp_function_with_arguments.
* parser-defs.h (type_ptr): New typedef. Define a VEC.
(enum type_pieces) <tp_function_with_arguments>: New constant.
(union type_stack_elt) <typelist_val>: New field.
(push_typelist): Declare.
2012-07-06 Tom Tromey <>
* c-exp.y (%union) <type_stack>: New field.
(abs_decl, direct_abs_decl): Use <type_stack> type. Update.
(ptr_operator_ts): New production.
(ptype): Update.
* parse.c (type_stack_reserve): New function.
(check_type_stack_depth): Use it.
(pop_type_stack, append_type_stack, push_type_stack)
(get_type_stack, type_stack_cleanup): New functions.
(follow_types): Handle tp_type_stack.
(_initialize_parse): Simplify initialization.
* parser-defs.h (enum type_pieces) <tp_type_stack>: New
(union type_stack_elt) <stack_val>: New field.
(get_type_stack, append_type_stack, push_type_stack)
(type_stack_cleanup): Declare.
2012-07-06 Tom Tromey <>
* parser-defs.h (type_stack, type_stack_size, type_stack_depth):
(struct type_stack): New.
* parse.c (type_stack, type_stack_size, type_stack_depth):
(type_stack): New global.
(parse_exp_in_context, check_type_stack_depth)
(insert_into_type_stack, insert_type, push_type, push_type_int)
(insert_type_address_space, pop_type, pop_type_int)
(_initialize_parse): Update.
2012-07-06 Tom Tromey <>
* c-exp.y (func_mod, direct_abs_decl, abs_decl, ptr_operator):
Remove %type.
2012-07-06 Siddhesh Poyarekar <>
* c-lang.c (c_printstr): Remove ununsed variable WIDTH.
2012-07-06 Siddhesh Poyarekar <>
Jan Kratochvil <>
* cp-valprint.c (cp_print_value): Replace potentially unsafe
alloca with xmalloc/xfree.
2012-07-06 Siddhesh Poyarekar <>
* MAINTAINERS (Write After Approval): Add myself to the list.
2012-07-05 Doug Evans <>
* dwarf2read.c (dw2_expand_symtabs_matching): Fix typo.
2012-07-05 Hui Zhu <>
* ax-gdb.c (cli/cli-utils.h): New include.
(linespec.h): Ditto.
(agent_eval_command_one): New function.
(agent_command_1): Ditto.
(agent_command): Call function agent_command_1.
(agent_eval_command): Ditto.
(_initialize_ax_gdb): Change help for "maint agent"
and "maint agent-eval".
2012-07-05 Hui Zhu <>
* breakpoint.c (check_for_argument): Move to file cli/cli-utils.c.
* cli/cli-utils.c (check_for_argument): New function.
* cli/cli-utils.h (check_for_argument): Ditto.
2012-07-04 H.J. Lu <>
* NEWS: Mention x32 ABI support.
2012-07-04 H.J. Lu <>
* amd64-tdep.c (amd64_x32_init_abi): Set sp_regnum_from_eax to
AMD64_RSP_REGNUM and pc_regnum_from_eax to AMD64_RIP_REGNUM.
* i386-tdep.c (i386_gdbarch_init): Initialize sp_regnum_from_eax
and pc_regnum_from_eax to -1. Update SP regnum from
sp_regnum_from_eax and PC regnum from pc_regnum_from_eax if
* i386-tdep.h (gdbarch_tdep): Add sp_regnum_from_eax and
2012-07-03 Jan Kratochvil <>
Fix 'warning: parameter has incomplete type' with gcc-3.4.6.
* dwarf2expr.h: Include gdbtypes.h.
(enum call_site_parameter_kind, union call_site_parameter_u): Remove
these forward declarations.
(cu_offset, sect_offset): Move these ...
* gdbtypes.h: Remove include dwarf2expr.h.
(cu_offset, sect_offset): ... here.
2012-07-03 H.J. Lu <>
* amd64-linux-tdep.c (linux_sigtramp_code): Renamed to ...
(amd64_linux_sigtramp_code): This.
(amd64_x32_linux_sigtramp_code): New.
(amd64_linux_sigtramp_start): Check x32 sigtramp.
2012-07-02 Jan Kratochvil <>
* linux-thread-db.c (thread_db_new_objfile): Fix comment typos.
2012-07-02 Jan Kratochvil <>
* Regenerate.
* configure: Regenerate.
* Remove check for gnu/libc-version.h.
* linux-thread-db.c <HAVE_GNU_LIBC_VERSION_H>: Remove include of
(enable_thread_event_reporting) <HAVE_GNU_LIBC_VERSION_H>: Remove
variables libc_version, libc_major and libc_minor. Replace sscanf by
inferior_has_bug. Extend the comment.
2012-07-02 Jan Kratochvil <>
* linux-thread-db.c (inferior_has_bug): New function.
(thread_db_find_new_threads_silently): Return boolean as checked by
inferior_has_bug, describe it in the comments.
(try_thread_db_load_1): Move call to thread_db_find_new_threads_silently
earlier. Abort the initialization if it returned non-zero.
(thread_db_new_objfile): Exclude debug files.
(thread_db_find_new_threads_2): Preinitialize ERR. Check errors also
2012-07-02 Doug Evans <>
* dwarf2read.c (maybe_queue_comp_unit): Move definition next to others
related to queue management.
* dwarf2read.c (create_debug_types_hash_table): Use "debug dwarf2-read"
instead of "debug dwarf2-die" in debugging printfs.
(create_debug_info_hash_table_reader): Ditto.
(create_debug_info_hash_table): Ditto.
(init_dwo_file): Ditto.
(init_cutu_and_read_dies): Add debugging printf.
(init_cutu_and_read_dies_no_follow): Ditto.
(process_psymtab_comp_unit_reader): Ditto.
2012-07-02 Stan Shebs <>
Add target-side support for dynamic printf.
* NEWS: Mention the additional style.
* breakpoint.h (struct bp_target_info): New fields tcommands, persist.
(struct bp_location): New field cmd_bytecode.
* breakpoint.c: Include format.h.
(disconnected_dprintf): New global.
(parse_cmd_to_aexpr): New function.
(build_target_command_list): New function.
(insert_bp_location): Call it.
(remove_breakpoints_pid): Skip dprintf breakpoints.
(print_one_breakpoint_location): Ditto.
(dprintf_style_agent): New global.
(dprintf_style_enums): Add dprintf_style_agent.
(update_dprintf_command_list): Add agent case.
(agent_printf_command): New function.
(_initialize_breakpoint): Add new commands.
* common/ax.def (printf): New bytecode.
* ax.h (ax_string): Declare.
* ax-gdb.h (gen_printf): Declare.
* ax-gdb.c: Include cli-utils.h, format.h.
(gen_printf): New function.
(maint_agent_print_command): New function.
(_initialize_ax_gdb): Add maint agent-printf command.
* ax-general.c (ax_string): New function.
(ax_print): Add printf disassembly.
* (SFILES): Add format.c
(COMMON_OBS): Add format.o.
* common/format.h: New file.
* common/format.c: New file.
* printcmd.c: Include format.h.
(ui_printf): Call parse_format_string.
* remote.c (remote_state): New field breakpoint_commands.
(PACKET_BreakpointCommands): New enum.
(remote_breakpoint_commands_feature): New function.
(remote_protocol_features): Add new BreakpointCommands entry.
(remote_can_run_breakpoint_commands): New function.
(remote_add_target_side_commands): New function.
(remote_insert_breakpoint): Call it.
(remote_insert_hw_breakpoint): Ditto.
(_initialize_remote): Add new packet configuration for
target-side breakpoint commands.
* target.h (struct target_ops): New field
(target_can_run_breakpoint_commands): New macro.
* target.c (update_current_target): Handle
2012-07-02 Jan Kratochvil <>
Execute -ix and -iex only after system and user gdbinit files.
* main.c (captured_main): Move CMDARG_INIT_FILE and CMDARG_INIT_COMMAND
processing down after gdbinit files.
2012-07-02 Jan Kratochvil <>
Add fnmatch-gnu module.
* gnulib/ (aclocal_m4_deps): Add new files and remove one.
* gnulib/ (AC_INIT): Use now import/memmem.c.
* gnulib/aclocal.m4: Regenerate.
* gnulib/ Regenerate.
* gnulib/configure: Regenerate.
* gnulib/import/dummy.c: Remove.
* gnulib/import/ Regenerate.
* gnulib/import/ Likewise.
* gnulib/import/m4/gnulib-cache.m4: Likewise.
* gnulib/import/m4/gnulib-comp.m4: Likewise.
* gnulib/import/alloca.c: New file.
* gnulib/import/ Likewise.
* gnulib/import/config.charset: Likewise.
* gnulib/import/fnmatch.c: Likewise.
* gnulib/import/ Likewise.
* gnulib/import/fnmatch_loop.c: Likewise.
* gnulib/import/localcharset.c: Likewise.
* gnulib/import/localcharset.h: Likewise.
* gnulib/import/m4/alloca.m4: Likewise.
* gnulib/import/m4/codeset.m4: Likewise.
* gnulib/import/m4/configmake.m4: Likewise.
* gnulib/import/m4/fcntl-o.m4: Likewise.
* gnulib/import/m4/fnmatch.m4: Likewise.
* gnulib/import/m4/glibc21.m4: Likewise.
* gnulib/import/m4/localcharset.m4: Likewise.
* gnulib/import/m4/locale-fr.m4: Likewise.
* gnulib/import/m4/locale-ja.m4: Likewise.
* gnulib/import/m4/locale-zh.m4: Likewise.
* gnulib/import/m4/mbrtowc.m4: Likewise.
* gnulib/import/m4/mbsinit.m4: Likewise.
* gnulib/import/m4/mbsrtowcs.m4: Likewise.
* gnulib/import/m4/mbstate_t.m4: Likewise.
* gnulib/import/m4/stdbool.m4: Likewise.
* gnulib/import/m4/wchar_h.m4: Likewise.
* gnulib/import/m4/wctype_h.m4: Likewise.
* gnulib/import/m4/wint_t.m4: Likewise.
* gnulib/import/mbrtowc.c: Likewise.
* gnulib/import/mbsinit.c: Likewise.
* gnulib/import/mbsrtowcs-impl.h: Likewise.
* gnulib/import/mbsrtowcs-state.c: Likewise.
* gnulib/import/mbsrtowcs.c: Likewise.
* gnulib/import/ref-add.sin: Likewise.
* gnulib/import/ref-del.sin: Likewise.
* gnulib/import/ Likewise.
* gnulib/import/streq.h: Likewise.
* gnulib/import/strnlen1.c: Likewise.
* gnulib/import/strnlen1.h: Likewise.
* gnulib/import/verify.h: Likewise.
* gnulib/import/ Likewise.
* gnulib/import/ Likewise.
2012-07-02 Jan Kratochvil <>
Support shell wildcards for 'set auto-load safe-path'.
* auto-load.c: Include fnmatch.h.
(filename_is_in_dir): Rename to ...
(filename_is_in_pattern_1, filename_is_in_pattern): ... here and split
it. Update function comment. Rename dir_len to pattern_len. New
variables filename_len, pattern and filename. Add more DEBUG_AUTO_LOAD
messages. Use gdb_filename_fnmatch.
(filename_is_in_auto_load_safe_path_vec): Rename variable dir to
(_initialize_auto_load): Extend the "set auto-load safe-path" help text.
* defs.h (gdb_filename_fnmatch): New declaration.
* utils.c: Include fnmatch.h.
(gdb_filename_fnmatch): New function.
2012-07-02 Sergio Durigan Junior <>
* breakpoint.c (BREAK_ARGS_HELP): Include help message for the new
`-probe' and `-probe-stap' options.
2012-07-01 Yao Qi <>
* breakpoint.c: Removed always_inserted_auto, always_inserted_on,
always_inserted_off, and always_inserted_enums.
Change always_inserted_mode's type to 'enum auto_boolean'.
(show_always_inserted_mode, breakpoint_always_inserted_mode): Update
(_initialize_breakpoint): Call add_setshow_auto_boolean_cmd instead
of add_setshow_enum_cmd.
* infrun.c: Remove can_use_displaced_stepping_auto,
can_use_displaced_stepping_on, can_use_displaced_stepping_off, and
Change can_use_displaced_stepping's type to 'enum auto_boolean'.
(show_can_use_displaced_stepping, use_displaced_stepping): Update callers.
(_initialize_infrun): Call add_setshow_auto_boolean_cmd instead of
2012-06-30 Doug Evans <>
* dwarf2read.c (signatured_type): Make "per_cu" member first.
(init_cutu_and_read_dies): Handle rereading a DWO CU while it's
currently being read. Propagate DW_AT_comp_dir to DWO DIE.
2012-06-29 Doug Evans <>
* linespec.c: #include "stack.h".
(decode_line_with_current_source): Moved here from symtab.c and
renamed from decode_line_spec. All callers updated.
(decode_line_with_last_displayed): Moved here from breakpoint.c and
renamed from decode_line_spec_1. All callers updated.
* linespec.h (decode_line_with_current_source): Move declaration here
from symtab.h and renamed from decode_line_spec.
(decode_line_with_last_displayed): Move declaration here from symtab.h
and renamed from decode_line_spec_1.
* macrocmd.c: #include "linespec.h".
* symtab.c: Remove #include "linespec.h".
2012-06-28 Doug Evans <>
* dwarf2read.c (get_cu_length): New function.
(offset_in_cu_p, error_check_comp_unit_head): Call it.
(create_debug_types_hash_table): Ditto.
(init_cutu_and_read_dies): Ditto.
(init_cutu_and_read_dies_no_follow): Ditto.
* dwarf2read.c (dwarf2_find_base_address): Move definition.
* dwarf2read.c (ABBREV_HASH_SIZE): Remove enclosing #ifndef/#endif.
(struct abbrev_table): Define.
(dwarf2_cu): Replace members dwarf2_abbrevs, abbrev_obstack with
(init_cutu_and_read_dies): Update.
(abbrev_table_alloc_abbrev): New function. Replaces
dwarf_alloc_abbrev. All callers updated.
(abbrev_table_add_abbrev): New function.
(abbrev_table_lookup_abbrev): New function. Replaces
dwarf2_lookup_abbrev. All callers updated.
(abbrev_table_read_table): New function. Contents moved here from
(dwarf2_read_abbrevs): Call it.
(abbrev_table_free): New function.
(dwarf2_free_abbrev_table): Call it.
2012-06-28 Stan Shebs <>
* osdata.c (info_osdata_command): Filter out "Title" columns
from non-MI uses.
* common/linux-osdata.c (struct osdata_type): Add title field.
(osdata_table): Add titles to each entry.
(linux_command_xfer_osdata): Add a column for title data.
2012-06-28 Stan Shebs <>
Make logging work for MI.
* NEWS: Mention it.
* interps.h (interp_set_logging_ftype): New typedef.
(struct interp_procs): New field set_logging_proc.
(current_interp_set_logging): Declare.
* interps.c (current_interp_set_logging): New function.
* cli/cli-logging.c: Include interps.h.
(set_logging_redirect): Call current_interp_set_logging.
(pop_output_files): Ditto.
(handle_redirections): Ditto, plus skip ui-out redirect if MI.
* mi/mi-console.h (mi_console_set_raw): Declare.
* mi/mi-console.c (mi_console_set_raw): New function.
* mi/mi-interp.c (saved_raw_stdout): New global.
(mi_set_logging): New function.
(_initialize_mi_interp): Add it to interp procs.
2012-06-28 Doug Evans <>
* symtab.c (lookup_symbol_aux_objfile): Use
* gdbtypes.c (lookup_typename): Rename local variable "tmp" to "type".
2012-06-28 Jan Kratochvil <>
* common/buffer.c: Include inttypes.h and stdint.h.
(buffer_xml_printf): Use PRId64, PRIu64, PRIx64 and PRIo64.
2012-06-28 Jan Kratochvil <>
Pedro Alves <>
* gdbthread.h (ALL_THREADS): New macro.
(thread_list): Declare.
* infrun.c (handle_inferior_event) <spurious signal>: Don't keep
going, but instead fall through to the stepping handling.
* linux-nat.c (resume_lwp): New parameter 'signo'. Resume with
the passed in signal. Adjust debug output.
(resume_callback): Rename to ...
(linux_nat_resume_callback): ... this. Pass the thread's last
stop signal, if in "pass" state.
(linux_nat_resume): Adjust to rename.
(stop_wait_callback): New assertion. Don't respawn signals;
instead let the LWP remain with SIGNALLED set.
(linux_nat_wait_1): Remove flushing of pending SIGSTOPs.
* remote.c (append_pending_thread_resumptions): New.
(remote_vcont_resume): Call it.
* target.h (target_resume): Extend comment.
2012-06-28 Iain Sandoe <>
* auxv.c (fprint_target_auxv): Handle extended cache data tags.
2012-06-27 Doug Evans <>
* dwarf2read.c (dwarf2_cu): Add ranges_base.
Delete have_addr_base, unused. All uses updated.
(init_cutu_and_read_dies): Process DW_AT_GNU_ranges_base.
(dwarf2_get_pc_bounds): Add ranges_base.
(dwarf2_record_block_ranges): Ditto.
2012-06-27 Tom Tromey <>
PR macros/7961:
* varobj.c (varobj_create): Update.
(varobj_set_value): Update.
* tracepoint.c (validate_actionline): Update.
(encode_actions_1): Update.
* parse.c (parse_exp_1): Add 'pc' argument.
(parse_exp_in_context): Add 'pc' argument. Change how
expression_context_pc is set.
(parse_expression): Update.
(parse_field_expression): Update.
* expression.h (parse_exp_1): Update.
* eval.c (parse_to_comma_and_eval): Update.
* breakpoint.c (set_breakpoint_condition): Update.
(update_watchpoint): Update.
(init_breakpoint_sal): Update
(find_condition_and_thread): Update.
(watch_command_1): Update.
(update_breakpoint_locations): Update.
* ada-lang.c (ada_read_renaming_var_value): Update.
(create_excep_cond_exprs): Update.
2012-06-27 Doug Evans <>
* dwarf2read.c (per_cu_header_read_in): Simplify, and handle
type units.
2012-06-26 Doug Evans <>
* dwarf2read.c (read_and_check_comp_unit_head): Delete unnecessary
(error_check_comp_unit_head): New arg abbrev_section. All callers
(read_and_check_comp_unit_head): Ditto.
(read_and_check_type_unit_head): Ditto.
2012-06-26 Siva Chandra Reddy <>
New attribute 'last' for gdb.Symtab_and_line.
* NEWS (Python Scripting): Add entry about the new attribute.
* python/py-symtab.c (salpy_get_last): New function which
implements the get method for the 'last' attribute of
(sal_object_getset): Add entry for the 'last' attribute.
2012-06-26 Doug Evans <>
* dwarf2read.c (dwo_section_names): Add macinfo_dwo, macro_dwo.
(dwo_sections): Add macinfo, macro.
(dwarf2_locate_dwo_sections): Watch for macro sections.
(dwarf_decode_macros): Remove args lh, abfd, section, section_name.
All callers updated. Handle DWO files.
* NEWS: Mention new options "set debug dwarf2-read" and
"set debug symtab-create".
* dwarf2read.c (dwarf2_read_debug): New static global.
(dwarf2_build_psymtabs_hard): Add debugging printfs.
(process_queue): Ditto.
(process_full_comp_unit): Ditto.
(_initialize_dwarf2_read): Add new option "set debug dwarf2-read".
* elfread.c (elf_symfile_read): Add debugging printf.
* minsyms.c (install_minimal_symbols): Ditto.
* psymtab.c (allocate_psymtab): Ditto.
* symfile.c (allocate_symtab): Ditto.
* symtab.c (symtab_create_debug): New global.
(_initialize_symtab): Add new option "set debug symtab-create".
* symtab.h (symtab_create_debug): Declare.
* dwarf2read.c (lookup_dwo_comp_unit): Enhance comment.
(lookup_dwo_type_unit): Ditto.
2012-06-26 Roland McGrath <>
H.J. Lu <>
* amd64-linux-nat.c: Include <sys/user.h>.
(ps_get_thread_area): Use PTRACE_PEEKUSER to get fs_base/gs_base
* Check if the fs_base and gs_base members of
`struct user_regs_struct' exist.
* Regenerated.
* configure: Likewise.
2012-06-25 Michael Eager <>
PR python/14291
* python/python.c (gdbpy_write): Check for interrupted output.
2012-06-25 Greta Yorsh <>
* arm-tdep.c (arm_in_function_epilogue_p): Recognize POP with a single
register as a stack alignment in ARM mode.
2012-06-24 Jan Kratochvil <>
Update gnulib to GIT commit a39f53ccb70a613e647e1019fb4c63645220267e.
* gnulib/ Regenerate.
* gnulib/configure: Likewise.
* gnulib/import/m4/extensions.m4: Update it.
* gnulib/import/m4/gnulib-common.m4: Likewise.
* gnulib/import/m4/memmem.m4: Likewise.
* gnulib/import/m4/mmap-anon.m4: Likewise.
* gnulib/import/m4/multiarch.m4: Likewise.
* gnulib/import/ Likewise.
2012-06-24 Yao Qi <>
* corefile.c (write_memory_with_notification): New.
* gdbcore.h: Declare write_memory_with_notification.
* ada-lang.c (ada_value_assign): Replace 'write_memory' and
'observer_notify_memory_changed' with 'write_memory_with_notification'.
* valops.c (value_assign): Likewise.
* python/py-inferior.c (infpy_write_memory): Call
2012-06-24 Jan Kratochvil <>
* Use also -ex "set auto-load no".
2012-06-23 Doug Evans <>
PR 14125
* NEWS: Document additions to .gdb_index.
* dwarf2read.c: #include "gdb/gdb-index.h".
(dwarf2_read_index): Recognize version 7.
(dw2_do_expand_symtabs_matching): New args want_specific_block,
block_kind, domain): All callers updated.
(dw2_find_symbol_file): Handle new index CU values.
(dw2_expand_symtabs_matching): Match symbol kind if requested.
(add_index_entry): New args is_static, kind. All callers updated.
(offset_type_compare, uniquify_cu_indices): New functions
(symbol_kind): New function.
(write_psymtabs_to_index): Remove duplicate CU values.
(write_psymtabs_to_index): Write .gdb_index version 7.
2012-06-22 Joel Brobecker <>
* (build_warnings): Add -Wdeclaration-after-statement.
* configure: Regenerate.
2012-06-20 Yao Qi <>
* python/py-inferior.c: Update comments of infpy_read_memory
and infpy_write_memory.
2012-06-19 Tom Tromey <>
PR exp/9514:
* parser-defs.h (insert_type, insert_type_address_space): Declare.
(push_type_address_space): Remove.
* parse.c (insert_into_type_stack): New function.
(insert_type): Likewise.
(insert_type_address_space): Rename from push_type_address_space.
Insert tp_space_identifier.
* c-exp.y (ptr_operator): New production.
(abs_decl): Use ptr_operator.
(space_identifier): Call insert_type_address_space.
(ptype): Don't use const_or_volatile_or_space_identifier.
(const_or_volatile_noopt): Call insert_type.
(conversion_type_id, conversion_declarator): New productions.
(operator): Use conversion_type_id.
2012-06-18 Doug Evans <>
* symtab.h (minimal_symbol): New member created_by_gdb.
* elfread.c (elf_symtab_read): Set created_by_gdb for @plt minsym
created by gdb.
* symtab.c (lookup_symbol_in_objfile_from_linkage_name): New function.
(search_symbols): Call it instead of lookup_symbol.
Skip symbols created by gdb. Only scan minsyms if nfiles == 0.
* dwarf2expr.c (execute_stack_op): Handle DW_OP_GNU_const_index.
Adjust address for DW_OP_GNU_addr_index.
* dwarf2expr.h (dwarf_expr_context): Update comment.
* dwarf2loc.c (locexpr_describe_location_piece): New arg per_cu,
all callers updated. Handle TLS vars described with
(disassemble_dwarf_expression): Handle DW_OP_GNU_addr_index
and DW_OP_GNU_const_index.
* dwarf2read.c (decode_locdesc): Handle DW_OP_GNU_addr_index.
* block.c (find_block_in_blockvector): Make explicit the fact that we
2012-06-18 Tom Tromey <>
* c-exp.y (operator): Remove trailing space after "delete" and
2012-06-18 Mark Kettenis <>
Jan Kratochvil <>
Switch i386 and derived targets to ON_STACK.
* amd64-dicos-tdep.c (amd64_dicos_push_dummy_code): Remove.
(amd64_dicos_init_abi): Remove its installment.
* dicos-tdep.c (dicos_init_abi): Remove the
set_gdbarch_call_dummy_location call. Update the comment here.
* i386-dicos-tdep.c (i386_dicos_push_dummy_code): Remove.
(i386_dicos_init_abi): Remove its installment.
* i386-tdep.c (i386_push_dummy_code): New function.
(i386_gdbarch_init): Call set_gdbarch_call_dummy_location, install
2012-06-18 Jan Kratochvil <>
Remove stale dummy frames.
* breakpoint.c: Include dummy-frame.h.
(longjmp_breakpoint_ops): New variable.
(update_breakpoints_after_exec, breakpoint_init_inferior): Delete also
(bpstat_what, bptype_string, print_one_breakpoint_location)
(init_bp_location): Support bp_longjmp_call_dummy.
(set_longjmp_breakpoint): Use longjmp_breakpoint_ops. Comment why.
(check_longjmp_breakpoint_for_call_dummy, longjmp_bkpt_dtor): New
(initialize_breakpoint_ops): Initialize longjmp_breakpoint_ops.
* breakpoint.h (enum bptype): New item bp_longjmp_call_dummy. Delete
FIXME comment and extend the other comment for bp_call_dummy.
(check_longjmp_breakpoint_for_call_dummy): New declarations.
* dummy-frame.c: Include gdbthread.h.
(pop_dummy_frame_bpt): New function.
(pop_dummy_frame): Call pop_dummy_frame_bpt.
(dummy_frame_discard): New function.
(cleanup_dummy_frames): Update the comment about longjmps.
* dummy-frame.h (dummy_frame_discard): New declaration.
* gdbthread.h (struct thread_info): Extend initiating_frame comment.
* infcall.c (call_function_by_hand): New variable longjmp_b. Call
set_longjmp_breakpoint_for_call_dummy. Chain its breakpoints with BPT.
* infrun.c (handle_inferior_event) <BPSTAT_WHAT_CLEAR_LONGJMP_RESUME>:
Add case 4 comment. Call check_longjmp_breakpoint_for_call_dummy and
keep_going if IS_LONGJMP and there is no other reason to stop.
2012-06-18 Greta Yorsh <>
* remote-sim.c (sim_command_completer): Initialize
variable 'result'.
2012-06-17 Jan Kratochvil <>
* dwarf2expr.c (execute_stack_op): Support DW_OP_GNU_parameter_ref.
* dwarf2loc.c (call_site_parameter_matches): Support
(needs_dwarf_reg_entry_value): Push stub value.
* dwarf2read.c (read_call_site_scope): New variable origin. Support
* gdbtypes.h (enum call_site_parameter_kind): New item
(struct call_site.parameter.u): New field param_offset.
2012-06-17 Jan Kratochvil <>
Code cleanup: Generalize call_site.parameter key.
* dwarf2expr.c (execute_stack_op) <DW_OP_GNU_entry_value>: Remove
variable dwarf_reg. New variable kind_u. Update parameters to
(ctx_no_push_dwarf_reg_entry_value): Update parameters.
* dwarf2expr.h (enum call_site_parameter_kind)
(union call_site_parameter_u): Forward declarations.
(struct dwarf_expr_context_funcs): Update parameters and their
description for push_dwarf_reg_entry_value.
(ctx_no_push_dwarf_reg_entry_value): Update parameters.
* dwarf2loc.c (call_site_parameter_matches): New function.
(dwarf_expr_reg_to_entry_parameter): Update parameters and their
description. Use call_site_parameter_matches.
(dwarf_expr_push_dwarf_reg_entry_value, value_of_dwarf_reg_entry):
Update parameters and their description.
(value_of_dwarf_block_entry): Remove variables dwarf_reg and fb_offset.
New variable kind_u. Adjust the caller for updated parameters.
(needs_dwarf_reg_entry_value): Update parameters.
* dwarf2read.c (read_call_site_scope): New variable loc. Use it
instead of attr. Update for the changed fields of struct
* gdbtypes.h: Include dwarf2expr.h.
(enum call_site_parameter_kind): New.
(struct call_site.parameter): New field kind. Wrap dwarf_reg and
fb_offset into new union u.
2012-06-16 H.J. Lu <>
* amd64-tdep.c (amd64_x32_analyze_stack_align): New function.
(amd64_analyze_prologue): Call amd64_x32_analyze_stack_align
for x32.
2012-06-16 H.J. Lu <>
* amd64-linux-nat.c (compat_x32_clock_t): New.
(compat_x32_siginfo_t): Likewise.
(compat_x32_siginfo_from_siginfo): Likewise.
(siginfo_from_compat_x32_siginfo): Likewise.
(amd64_linux_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
and siginfo_from_compat_x32_siginfo for x32.
2012-06-15 Hui Zhu <>
* tracepoint.c (tfile_xfer_partial): Add a lseek.
2012-06-15 H.J. Lu <>
* amd64-linux-nat.c (ps_get_thread_area): Check bits_per_word
instead of gdbarch_ptr_bit.
* amd64-nat.c (amd64_native_gregset_reg_offset): Likewise.
(amd64_supply_native_gregset): Likewise.
(amd64_collect_native_gregset): Likewise.
* amd64-tdep.c (amd64_supply_fxsave): Likewise.
(amd64_supply_xsave): Likewise.
(amd64_collect_fxsave): Likewise.
(amd64_collect_xsave): Likewise.
2012-06-15 H.J. Lu <>
* amd64-linux-nat.c (AMD64_LINUX_X32_DS): New.
(amd64_linux_read_description): Check DS segment register for
x32 process.
2012-06-15 Tom Tromey <>
* dwarf2read.c (dw2_find_symbol_file): Unconditionally use
2012-06-15 Iain Sandoe <>
* MAINTAINERS (Write After Approval): Add myself to the list.
2012-06-15 Tom Tromey <>
* valops.c (value_find_oload_method_list): Now static.
* value.h (value_find_oload_method_list): Don't declare.
2012-06-15 Tom Tromey <>
* valops.c (find_overload_match): Use value_ind.
2012-06-15 Maciej W. Rozycki <>
* infrun.c (handle_inferior_event): Correct indentation.
2012-06-14 Doug Evans <>
* dwarf2loc.c (debug_loc_kind): Add DEBUG_LOC_START_LENGTH.
All uses updated.
(decode_debug_loc_dwo_addresses): New arg "byte_order". All callers
(dwarf2_find_location_expression): Handle DEBUG_LOC_START_LENGTH.
(loclist_describe_location): Ditto.
2012-06-14 Maciej W. Rozycki <>
PR backtrace/13866
* infrun.c (handle_inferior_event): Re-fetch frame and gdbarch
after hiding inline functions.
2012-06-13 Joel Brobecker <>
* inf-ttrace.c (_initialize_hppa_hpux_nat): Rename into
2012-06-13 Joel Brobecker <>
* ia64-hpux-nat.c (_initialize_ia64_hpux_nat): Renames
2012-06-13 Joel Brobecker <>
* remote-sim.c (sim_command_completer): Change type of return
value to "VEC (char_ptr) *". Adjust implementation accordingly.
2012-06-13 Mark Kettenis <>
Jan Kratochvil <>
PR tdep/14222
* i386-tdep.c (i386_push_dummy_call): Unconditionally align the
stack on a 16-byte boundary.
2012-06-13 Kaushik Srenevasan <>
* jit.c (finalize_symtab): Set function's return type to 'void' by
2012-06-13 Mark Kettenis <>
H.J. Lu <>
* amd64-linux-tdep.c (amd64_linux_init_abi_common): New function.
Move bits common to both the classic LP64 and the new x32 ILP32
ABI here.
(amd64_linux_init_abi): Call amd64_linux_init_abi_common.
(amd64_x32_linux_init_abi): New function.
(_initialize_amd64_linux_tdep): Register osabi for bfd_mach_x64_32
* i386-tdep.h (i386_pseudo_register_name): New prototype.
* i386-tdep.c (i386_pseudo_register_name): Make public.
* amd64-tdep.h (amd64_x32_init_abi): New prototype.
* amd64-tdep.c (amd64_dword_names): Add "eip".
(amd64_x32_pseudo_register_type): New function
(amd64_x32_init_abi): New function.
2012-06-13 Jan Kratochvil <>
PR build/14003
* inferior.h (struct inferior_suspend_state): Comment out.
(struct inferior): Comment out the field suspend.
* infrun.c (struct infcall_suspend_state): Comment out the field
(save_infcall_suspend_state, restore_infcall_suspend_state): Comment
out its assignment.
2012-06-13 Jan Kratochvil <>
PR c++/14177 - Fix parsing TYPENAME:: in parentheses.
* c-exp.y (classify_inner_name): Remove caller assumptions in the
function comment. Return ERROR for unresolved cases. Implement
returning proper NAME.
(yylex): Accept also NAME from classify_inner_name.
* cp-namespace.c (cp_lookup_nested_type): Rename to ...
(cp_lookup_nested_symbol): ... here. Return any found symbol, not just
* cp-support.h (cp_lookup_nested_type): Update its declaration.
2012-06-13 Tom Tromey <>
* breakpoint.c (condition_completer): New function.
(_initialize_breakpoint): Use it.
* value.c (complete_internalvar): New function.
* value.h (complete_internalvar): Declare.
2012-06-13 Tom Tromey <>
* ada-lang.c (ada_make_symbol_completion_list): Return a VEC.
* breakpoint.c (catch_syscall_completer): Return a VEC.
* cli/cli-cmds.c (complete_command): Update.
* cli/cli-decode.c (complete_on_cmdlist): Return a VEC.
(complete_on_enum): Likewise.
* command.h: Include gdb_vecs.h.
(completer_ftype): Change return type.
(complete_on_cmdlist, complete_on_enum): Likewise.
* completer.c (noop_completer, filename_completer)
(location_completer): Return a VEC.
(add_struct_fields): Remove 'nextp' argument. Change 'output'
to a VEC.
(expression_completer, complete_line_internal, complete_line)
(command_completer): Return a VEC.
(gdb_completion_word_break_characters, line_completion_function):
* completer.h: Include gdb_vecs.h.
(complete_line, noop_completer, filename_completer)
(expression_completer, location_completer, command_completer):
* f-lang.c (f_word_break_characters): Return a VEC.
* interps.c (interpreter_completer): Return a VEC.
* language.h (struct language_defn)
<la_make_symbol_completion_list>: Return a VEC.
* python/py-cmd.c (cmdpy_completer): Return a VEC.
* symtab.c (free_completion_list): Take a VEC.
(return_val_size, return_val_index): Remove.
(return_val): Now a VEC.
(completion_list_add_name): Update.
(default_make_symbol_completion_list, make_symbol_completion_list)
(make_symbol_completion_list_fn, make_file_symbol_completion_list):
Return a VEC.
(add_filename_to_list): Update.
(struct add_partial_filename_data) <list_used, list_alloced>: Remove.
<list>: Now a VEC.
(maybe_add_partial_symtab_filename): Update.
(make_source_files_completion_list): Return a VEC.
* symtab.h (default_make_symbol_completion_list_break_on)
(default_make_symbol_completion_list, make_symbol_completion_list)
(make_symbol_completion_list_fn, make_file_symbol_completion_list)
(make_source_files_completion_list): Update.
2012-06-13 Tom Tromey <>
* breakpoint.c (add_catch_command): Use completer_ftype.
* breakpoint.h: Include command.h.
(add_catch_command): Use completer_ftype.
* cli/cli-decode.c (set_cmd_completer): Use completer_ftype.
* cli/cli-decode.h (struct cmd_list_element) <completer>:
Use completer_ftype.
* command.h (completer_ftype): New typedef.
(set_cmd_completer): Use it.
* python/py-cmd.c (struct cmdpy_completer) <completer>: Use
2012-06-13 Pedro Alves <>
Partial revert of previous change.
* serial.c (scb_base): New global.
(serial_for_fd): New.
(serial_open, serial_fdopen_ops): Link new serial in open serials
(do_serial_close): Unlink serial from the open serials chain.
2012-06-12 Pedro Alves <>
* infrun.c (infrun_thread_stop_requested_callback): Don't switch
threads here.
(prepare_for_detach): No longer context switch here in non-stop
(fetch_inferior_event): Ditto.
(handle_inferior_event) <STOP_QUIETLY || NO_STOP_QUIETLY>: Switch
to the event thread before removing breakpoints. Switch to the
event thread before inserting breakpoints and resuming.
(handle_inferior_event) <TARGET_WAITKIND_SPURIOUS>: Switch to the
event thread before resuming.
(handle_inferior_event) <stepping_past_singlestep_breakpoint>:
Switch to the event thread before removing breakpoints.
2012-06-12 Eli Zaretskii <>
* infcmd.c (construct_inferior_arguments) [__MINGW32__]: Quote
special characters correctly for the Windows shells. See for the bug
[!__MINGW32__]: Remove extra double quote character from special
2012-06-11 Stan Shebs <>
* ui-out.h: Remove #if 0 declarations.
* ui-out.c: Remove #if 0 functions.
2012-06-11 Pedro Alves <>
* ser-base.c (run_async_handler_and_reschedule): New.
(fd_event, push_event): Use it.
* serial.c (serial_open, serial_fdopen_ops): Set the initial
reference count to 1.
(do_serial_close): Set the bufp field to NULL. Use serial_unref
instead of xfree.
(serial_is_open, serial_ref, serial_unref): New.
* serial.h (serial_open): Adjust comment.
(serial_is_open): Declare.
(serial_close): Adjust comment.
(serial_ref, serial_unref) Declare.
(struct serial): New field 'refcnt'.
2012-06-11 Pedro Alves <>
Remove #if 0'd "connect" command, and unnecessary associated
refcounting and serial reuse bits.
* serial.h (struct serial): Remove fields 'next' and 'refcnt'.
* serial.c (last_serial_opened): Delete.
(scb_base): Delete.
(serial_open): Adjust.
(serial_for_fd): Delete.
(serial_fdopen_ops, do_serial_close): Adjust.
(serial_fdopen_ops): Adjust.
2012-06-11 Pedro Alves <>
* serial.c (do_serial_close): Remove early return when SCB is
2012-06-11 Tom Tromey <>
* dwarf2read.c (dw2_get_file_names_reader): Ignore partial units.
2012-06-11 Jan Kratochvil <>
Fix regression by the "ambiguous linespec" series.
* breakpoint.c (parse_breakpoint_sals): New variable cursal. Use
get_last_displayed_symtab and get_last_displayed_line and depending
2012-06-11 Tom Tromey <>
* dwarf2read.c (dw2_get_primary_filename_reader): New function.
(dw2_find_symbol_file): Use it.
2012-06-11 Michael Eager <>
* mips-linux-tdep.c (mips_gdb_signal_from_target): New
* mips-linux-tdep.h (mips_signals): New
2012-06-11 Tom Tromey <>
* infrun.c (handle_inferior_event)
<BPSTAT_WHAT_SET_LONGJMP_RESUME>: Don't delete the step-resume
<BPSTAT_WHAT_CLEAR_LONGJMP_RESUME>: Remove longjmp logic; use
exception logic in all cases. Update comments.
(insert_longjmp_resume_breakpoint): Set the exception resume
2012-06-11 Maciej W. Rozycki <>
* mips-tdep.c (mips_push_dummy_code): Handle microMIPS code.
2012-06-09 Siva Chandra Reddy <>
* valarith.c (binop_types_user_defined_p): Fix a typo.
2012-06-08 Yao Qi <>
Chung-Lin Tang <>
* arch-utils.c (default_return_in_first_hidden_param_p): New.
* arch-utils.h: Declare.
* Add return_in_first_hidden_param_p.
* gdbarch.c, gdbarch.h: Regenerated.
* infcall.c (call_function_by_hand): Call
gdbarch_return_in_first_hidden_param_p instead of
* m68k-tdep.c (m68k_return_in_first_hidden_param_p): New.
(m68k_gdbarch_init): Install m68k_return_in_first_hidden_param_p.
* sh-tdep.c (sh_return_in_first_hidden_param_p): New.
(sh_gdbarch_init): Install sh_return_in_first_hidden_param_p.
* tic6x-tdep.c (tic6x_push_dummy_call): Remove local variable
(tic6x_return_value): Handle language cplusplus.
(tic6x_return_in_first_hidden_param_p): New.
(tic6x_gdbarch_init): Install tic6x_return_in_first_hidden_param_p.
2012-06-07 Doug Evans <>
* dwarf2read.c (dwarf2_cu): Add comment.
2012-06-06 Maciej W. Rozycki <>
* mips-tdep.c (mips_pseudo_register_type): Remove tdep local
(mips_eabi_push_dummy_call): Likewise.
(mips_n32n64_push_dummy_call): Likewise.
(mips_o32_push_dummy_call): Likewise.
(mips_o64_push_dummy_call): Likewise.
2012-06-06 Maciej W. Rozycki <>
* mips-tdep.c (mips_convert_register_p): Correct coding style.
2012-06-06 Maciej W. Rozycki <>
* mips-tdep.c (mips_pseudo_register_type): Use
2012-06-06 Pedro Alves <>
* infrun.c (handle_inferior_event): Remove calls to
reinit_frame_cache that follow a context_switch call.
2012-06-06 Pedro Alves <>
* infrun.c (handle_inferior_event) <deferred_step_ptid>: Use
context_switch and remove stale comment.
2012-06-06 Pedro Alves <>
* infrun.c (struct execution_control_state): Remove
`new_thread_event' field.
(handle_inferior_event): Simplify new threads handling; don't
resume the inferior if we find a new thread.
2012-06-06 Thomas Schwinge <>
* NEWS: Document the deprecation of SH's 'regs' command.
* inferior.h (all_registers_info): Add function declaration.
* sh-tdep.c (sh_show_regs): Remove variable.
(sh_generic_show_regs, sh3_show_regs, sh2e_show_regs, sh2a_show_regs)
(sh2a_nofpu_show_regs, sh3e_show_regs, sh3_dsp_show_regs)
(sh4_show_regs, sh4_nofpu_show_regs, sh_dsp_show_regs)
(sh_show_regs_command): Remove functions.
(sh_gdbarch_init): Don't set sh_show_regs.
(_initialize_sh_tdep): Make the 'regs' command an deprecated alias to
'info all-registers'.
* sh64-tdep.c (sh64_show_media_regs, sh64_show_compact_regs)
(sh64_show_regs): Remove functions.
* sh64-tdep.h (sh64_show_regs): Remove function declaration.
2012-06-06 Jan Kratochvil <>
* Move development=true below AC_INIT.
* configure: Regenerate.
2012-06-05 Stan Shebs <>
* mi/mi-interp.c (mi_interpreter_init): Set raw_stdout from
2012-06-05 Siddhesh Poyarekar <>
* corefile.c (read_memory, read_stack, write_memory): Accept LEN
argument as ssize_t.
* gdbcore.h (read_memory, read_stack, write_memory): Likewise.
* remote.c (remote_write_bytes_aux, remote_write_bytes): Likewise.
* target.c (target_read_stack, target_write_memory)
(target_write_raw_memory): Likewise.
* target.h (target_read_stack, target_write_memory)
(target_write_raw_memory): Likewise.
2012-06-05 Jan Kratochvil <>
* symfile-mem.c: Change gdb_static_assert to ssize_t.
(target_read_memory_bfd): Cast gdb_assert LEN to ssize_t.
* target.c (target_read_memory): Change LEN to ssize_t.
* target.h (target_read_memory): Change LEN to ssize_t.
2012-06-05 Pedro Alves <>
PR backtrace/13866
* breakpoint.c (until_break_command): Only fetch the selected
frame after decode_line_1.
2012-06-05 Joakim Tjernlund <>
* solib-svr4.c (enable_break): Don't fallback to setting the solib
event breakpoint at _start, __start or main if a program
interpreter is not found.
2012-06-05 Joel Brobecker <>
* windows-tdep.h (windows_iterate_over_objfiles_in_search_order):
Add declaration.
* windows-tdep.c: #include "objfiles.h".
(windows_iterate_over_objfiles_in_search_order): New function.
* amd64-windows-tdep.c (amd64_windows_init_abi): Set
iterate_over_objfiles_in_search_order gdbarch method to
* i386-cygwin-tdep.c (i386_cygwin_init_abi): Likewise.
2012-06-05 Joel Brobecker <>
* Add generation of
"iterate_over_objfiles_in_search_order_cb_ftype" typedef in
gdbarch.h. Add include of "objfiles.h" in gdbarch.c.
(iterate_over_objfiles_in_search_order): New gdbarch method.
* gdbarch.h, gdbarch.c: Regenerate.
* objfiles.h (default_iterate_over_objfiles_in_search_order):
Add declaration.
* objfiles.c (default_iterate_over_objfiles_in_search_order):
New function.
* symtab.c (lookup_symbol_aux_objfile): New function, extracted
out of lookup_symbol_aux_symtabs.
(lookup_symbol_aux_symtabs): Replace extracted-out code by
call to lookup_symbol_aux_objfile.
(struct global_sym_lookup_data): New type.
(lookup_symbol_global_iterator_cb): New function.
(lookup_symbol_global): Search for symbol using
gdbarch_iterate_over_objfiles_in_search_order and
* findvar.c (struct minsym_lookup_data): New type.
(minsym_lookup_iterator_cb): New function.
(default_read_var_value) [case LOC_UNRESOLVED]: Resolve the
symbol's address via gdbarch_iterate_over_objfiles_in_search_order
and minsym_lookup_iterator_cb.
2012-06-05 Joel Brobecker <>
Revert the following patch:
* findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols,
try locating the symbol in the symbol's own objfile first, before
extending the search to all objfiles.
* symtab.c (lookup_symbol_aux_objfile): New function, extracted
out of lookup_symbol_aux_symtabs.
(lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile".
Replace extracted-out code by call to lookup_symbol_aux_objfile.
Do not search EXCLUDE_OBJFILE.
(lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs.
(lookup_symbol_global): Search for matches in the block's objfile
first, before searching all other objfiles.
2012-06-05 Joel Brobecker <>
* breakpoint.c (find_condition_and_thread): Stop parsing
as soon as the first invalid keyword is found.
2012-06-05 Joel Brobecker <>
* (EXCLUDE_LIST): Add 'gdb/CONTRIBUTE' to list.
2012-06-05 Joel Brobecker <>
* config/djgpp/ Add copyright header.
2012-06-05 Joel Brobecker <>
* (update_files, main): Fix path to update-copyright
2012-06-05 Joel Brobecker <>
(main): Add MULTIPLE_COPYRIGHT_HEADERS to the list of files
for which a reminder to update by hand is printed.
2012-06-04 Doug Evans <>
* buildsym.c (make_blockvector): Add comment.
2012-06-04 Pedro Alves <>
* arch-utils.c (default_gdb_signal_from_target): Delete.
* arch-utils.h (default_gdb_signal_from_target): Delete.
* corelow.c (core_open) <signal mapping>: Extended comment. Check
* (gdb_signal_from_target): Make it an M method (with
* gdbarch.h: Regenerate.
* gdbarch.c: Regenerate.
2012-06-04 Pedro Alves <>
* (gdb_signal_from_target): Mention that the
implementation of the method must be host independent.
* gdbarch.h: Regenerate.
2012-06-04 Jan Kratochvil <>
* symfile-mem.c: 3 new gdb_static_assert for target_read_memory_bfd
(target_read_memory_bfd): New function.
(symbol_file_add_from_memory): Use it.
2012-06-03 Doug Evans <>
* symtab.c (lookup_global_symbol_from_objfile): Only scan blockvector
of primary symtab.
(basic_lookup_transparent_type): Ditto.
* objfiles.h (ALL_OBJFILE_PRIMARY_SYMTABS): New macro.
* dwarf2read.c (dw2_find_symbol_file): Ditto.
* linespec.c (iterate_over_all_matching_symtabs): Ditto.
* symtab.c (lookup_symbol_aux_objfile): Ditto.
(basic_lookup_transparent_type): Ditto.
2012-06-02 Sergio Durigan Junior <>
* symtab.c (symbol_demangled_name): New variable `dem_name'. Use
it to optimize resolution of demangled name.
2012-06-01 Jan Kratochvil <>
* (development): Define new variable.
Call AC_CHECK_LIB for mcheck if $development.
(ERROR_ON_WARNING): Enable it by default only if $development.
* Regenerate.
* configure: Regenerate.
2012-06-01 Siddhesh Poyarekar <>
* target.c (target_read_memory): Make LEN argument as size_t.
* target.h (target_read_memory): Likewise.
2012-06-01 Jan Kratochvil <>
* tilegx-linux-tdep.c (tilegx_l): Use ULL for 64-bit values.
2012-05-31 Edjunior Machado <>
* ppc-linux-nat.c (have_ptrace_booke_interface): Disable ptrace
BookE interface for PowerPC server processors if not available
in the Linux Kernel.
2012-05-31 Keith Seitz <>
* linespec.c (decode_objc): Add cleanup to free
(find_linespec_symbols): Add cleanup to free CLASSES.
* symfile.c (find_separate_debug_file_by_debuglink): Add
cleanup to free DEBUGLINK.
* ui-out.c (clear_header_list): No need to check if
2012-05-31 Matthew Gretton-Dann <>
* ada-lang.c (standard_lookup): Prevent uninitialized variable
2012-05-30 Jeff Kenton <>
* (gdb_host_cpu): Handle tilegx*.
(gdb_host): Handle tilegx-*-linux*.
* tilegx-linux-nat.c: New file.
* config/tilegx/ New file.
2012-05-30 Jeff Kenton <>
* (ALL_TARGET_OBJS): Add tilegx-tdep.o and
(ALLDEPFILES): Add tilegx-linux-nat.c, tilegx-tdep.c and
* configure.tgt: Handle tilegx-*-linux*.
* tilegx-tdep.h: New file.
* tilegx-tdep.c: New file.
* tilegx-linux-tdep.c: New file.
* regformats/reg-tilegx.dat: New file.
2012-05-30 Edjunior Machado <>
* ppc-linux-nat.c (ppc_linux_can_use_hw_breakpoint): fix
accounting of hw watchpoints on ppc.
2012-05-30 Thiago Jung Bauermann <>
* source.c (openp): Expand tilde in path entries.
2012-05-29 Doug Evans <>
* buildsym.c (block_compar): Fix comment.
(end_symtab): Fix and clarify some comments.
* stabsread.h (cleanup_undefined_stabs_types): Renamed from
* stabsread.c (cleanup_undefined_stabs_types): Ditto.
All callers updated.
2012-05-29 Tom Tromey <>
* symfile.c (symfile_bfd_open): Don't close desc if bfd_fopen
* solib.c (solib_bfd_fopen): Don't close fd if bfd_fopen fails.
* exec.c (exec_file_attach): Don't close scratch_chan if bfd_fopen
* dwarf2read.c (try_open_dwo_file): Don't close fd if bfd_fopen
2012-05-29 Tristan Gingold <>
* solib-darwin.c (dyld_all_image_addr, dyld_all_image): Move into...
(struct darwin_info): ... New struct.
(solib_darwin_pspace_data): New variable.
(darwin_pspace_data_cleanup): New function.
(get_darwin_info): Likewise.
(darwin_dyld_version_ok, darwin_load_image_infos)
(darwin_solib_read_all_image_info_addr): Add info argument.
Adjust code.
(darwin_current_sos): Use per pspace structure.
(darwin_solib_create_inferior_hook): Likewise.
(darwin_clear_solib): Likewise.
(_initialize_darwin_solib): Initialize solib_darwin_pspace_data.
2012-05-28 Pedro Alves <>
* infrun.c (wait_for_inferior): Move ecss and ecs locals to the
block that uses them. Clear ecss before handling each event.
2012-05-28 Jan Kratochvil <>
* solib-svr4.c (svr4_current_sos): New comment on
svr4_current_sos_via_xfer_libraries fall back.
2012-05-24 Jan Kratochvil <>
* psymtab.c (lookup_symbol_aux_psymtabs): New variable stab_best. Use
it as a fallback for TYPE_IS_OPAQUE.
* symfile.h (struct quick_symbol_functions): Mention TYPE_OPAQUE
symbols for lookup_symbol.
2012-05-24 John Steele Scott <>
PR symtab/13277: Resolving opaque structures in ICC generated binaries.
* dwarf2read.c (struct dwarf2_cu) <producer_is_icc>: New field.
(producer_is_gxx_lt_4_6): Move the checking and caching to...
(check_producer): ... this new function, which also checks for ICC
and caches the result.
(producer_is_icc): New function.
(read_structure_type): Don't set TYPE_STUB_SUPPORTED if the
producer was ICC.
2012-05-24 Pedro Alves <>
PR gdb/7205
* arch-utils.c (default_gdb_signal_to_host): Rename to ...
(default_gdb_signal_to_target): ... this. Add comment.
(default_gdb_signal_from_host): Rename to ...
(default_gdb_signal_from_target): ... this. Add comment.
* arch-utils.h (default_gdb_signal_to_host): Rename to ...
(default_gdb_signal_to_target): ... this.
(default_gdb_signal_from_host): Rename to ...
(default_gdb_signal_from_target): ... this.
* corelow.c (core_open): Adjust to naming change. Replace comment.
* (gdb_signal_from_host): Rename to ...
(gdb_signal_from_target): ... this. Adjust to
default_gdb_signal_from_host naming change. Extend comment.
(gdb_signal_to_host): Rename to ...
(gdb_signal_to_target): ... this. Adjust to
default_gdb_signal_to_host naming change.
* gdbarch.h, gdbarch.c: Renegerate.
2012-05-24 Pedro Alves <>
PR gdb/7205
Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
2012-05-24 Pedro Alves <>
PR gdb/7205
Replace target_signal with gdb_signal throughout.
2012-05-24 Pedro Alves <>
PR tui/14159
* tui/tui-hooks.c (tui_query_hook): Pre-compute the question
string, instead of reusing the va_list argument.
2012-05-24 Tom Tromey <>
* cp-support.h (cp_finalize_namespace, cp_initialize_namespace):
2012-05-23 Doug Evans <>
* symtab.c (search_symbols): Formatting fixes.
(print_symbol_info): Formatting fixes.
* dwarf2-frame.c (execute_cfa_program): Update to handle long long ->
int64_t change to leb128 API.
(read_encoded_value, decode_frame_entry_1): Ditto.
* dwarf2expr.c (safe_read_uleb128, safe_read_sleb128): Ditto.
(dwarf_block_to_dwarf_reg, dwarf_block_to_dwarf_reg_deref): Ditto.
(dwarf_block_to_fb_offset, dwarf_block_to_sp_offset): Ditto.
(execute_stack_op): Ditto.
* dwarf2expr.h (gdb_read_uleb128, gdb_read_sleb128): Ditto.
(safe_read_uleb128, safe_read_sleb128): Ditto.
* dwarf2loc.c (decode_debug_loc_dwo_addresses): Ditto.
(dwarf2_compile_expr_to_ax): Ditto.
(locexpr_describe_location_piece): Ditto.
(disassemble_dwarf_expression): Ditto.
(locexpr_describe_location_1): Ditto.
2012-05-23 Stan Shebs <>
Kwok Cheung Yeung <>
* (SUBDIR_MI_OBS): Add mi-cmd-info.o.
(SUBDIR_MI_SRCS): Add mi-cmd-info.c.
(mi-cmd-info.o): New rule.
* osdata.h (info_osdata_command): New declaration.
* osdata.c (info_osdata_command): Change to non-static.
* mi/mi-cmds.h (mi_cmd_info_os): New declaration.
* mi/mi-cmds.c (mi_cmds): Add -info-os MI command.
* mi/mi-cmd-info.c: New file.
2012-05-23 Doug Evans <>
* symtab.c (search_symbols): Pass NULL for file_matcher to
expand_symtabs_matching if there are no files to match.
* gdbtypes.c (lookup_typename): Simplify.
2012-05-23 Pedro Alves <>
* arch-utils.h (default_target_signal_to_host): Delete.
* arch-utils.c (default_target_signal_to_host): Delete.
* (target_signal_to_host): Remove.
* gdbarch.h, gdbarch.c: Regenerate.
2012-05-22 Doug Evans <>
* dwarf2-frame.c (struct dwarf2_cie): Make initial_instructions, end
"const gdb_byte *".
(struct dwarf2_fde): Make instructions, end "const gdb_byte *".
(execute_cfa_program): Update to match API of leb128 functions.
(read_1_byte, read_4_bytes, read_8_bytes): Make buf parameter
"const gdb_byte *".
(read_unsigned_leb128, read_signed_leb128): Delete.
(read_initial_length): Change type of buf argument to
"const gdb_byte *".
(read_encoded_value): Update to match API of leb128 functions.
(decode_frame_entry): Change result to "const gdb_byte *", and
similarly for "start" parameter.
(decode_frame_entry_1): Ditto. Use new leb128 reader functions.
(dwarf2_build_frame_info): Change local frame_ptr to
"const gdb_byte *".
* dwarf2expr.c (safe_read_uleb128, safe_read_sleb128): Replaces
read_uleb128, read_sleb128. All callers updated.
(safe_skip_leb128): New function.
(dwarf_block_to_dwarf_reg): Update to match API of leb128 functions.
Call gdb_read_uleb128, gdb_skip_leb128 instead of read_uleb128.
(dwarf_block_to_dwarf_reg_deref): Update to match API of leb128
functions. Call gdb_read_uleb128, gdb_read_sleb128 instead of
read_uleb128, read_sleb128.
(dwarf_block_to_fb_offset, dwarf_block_to_sp_offset): Ditto.
(execute_stack_op): Update to match API of leb128 functions.
* dwarf2expr.h: #include "leb128.h".
(read_uleb128, read_sleb128): Delete.
(gdb_read_uleb128, gdb_read_sleb128, gdb_skip_leb128): New functions.
(safe_read_uleb128, safe_read_sleb128, safe_skip_leb128): Declare.
* dwarf2loc.c (debug_loc_kind): New enum.
(decode_debug_loc_addresses): New function.
(decode_debug_loc_dwo_addresses): New function.
(dwarf2_find_location_expression): Rewrite.
(dwarf2_compile_expr_to_ax): Update to match API of leb128 functions.
(locexpr_describe_location_piece): Ditto.
(disassemble_dwarf_expression): Ditto.
(locexpr_describe_location_1): Ditto.
(loclist_describe_location): Rewrite.
* dwarf2loc.h (dwarf2_loclist_baton): New member "from_dwo".
* dwarf2read.c (die_reader_specs): New member "buffer_end".
(dwarf2_section_buffer_overflow_complaint): Renamed from
dwarf2_macros_too_long_complaint. All callers updated.
(skip_leb128): Delete.
(init_cu_die_reader): Initialize reader->buffer_end.
(skip_one_die): Replace call to skip_leb128 with safe_skip_leb128.
(skip_form_bytes): New arg buffer_end. All callers updated.
Replace call to skip_leb128 with gdb_skip_leb128.
(skip_unknown_opcode): New arg mac_end. All callers updated.
(fill_in_loclist_baton): Initialize baton->from_dwo.
2012-05-22 Maciej W. Rozycki <>
* mips-linux-nat.c (mips_linux_read_description): Use a more
verbose error message.
2012-05-22 Maciej W. Rozycki <>
* NEWS: Add MIPS/Linux DSP support.
* mips-linux-tdep.c: Document post-2.6.12 o32 sigcontext layout.
(N64_SIGCONTEXT_HI3): Likewise.
(N64_SIGCONTEXT_LO3): Likewise.
(N64_SIGCONTEXT_FPCSR): Clarify definition.
(mips_linux_o32_sigframe_init): Handle DSP registers.
(mips_linux_n32n64_sigframe_init): Likewise.
2012-05-22 Pierre Muller <>
* common/buffer.c (buffer_grow): ARI fix: Remove unneeded
call to abort.
2012-05-22 Pedro Alves <>
* target.h (store_waitstatus): Move declaration ...
* inf-child.h (store_waitstatus): ... here.
* target.c: Move inclusion of gdb_wait.h, and ...
(store_waitstatus): ... this ...
* inf-child.c: ... here.
* linux-nat.c: Include inf-child.h.
* rs6000-nat.c: Include inf-child.h.
* spu-linux-nat.c: Include inf-child.h.
2012-05-22 Pierre Muller <>
* tracepoint.c (start_tracing): Add missing i18n markup.
(stop_tracing, set_trace_user): Ditto.
(set_trace_notes, set_trace_stop_notes): Ditto.
2012-05-21 Tom Tromey <>
PR c++/7173:
* gnu-v3-abi.c (gnuv3_baseclass_offset): Return early for Java
* value.h (value_cast_pointers): Update.
* valops.c (value_cast_pointers): Add 'subclass_check' argument.
(value_cast): Update.
(update_search_result): New function.
(do_search_struct_field): New, from search_struct_field. Check
for ambiguous results.
(search_struct_field): Rewrite.
* infcall.c (value_arg_coerce): Update.
* eval.c (evaluate_subexp_standard) <STRUCTOP_MEMBER>: Use
* ada-lang.c (ada_convert_actual): Update.
2012-05-21 Tom Tromey <>
* macroexp.c (macro_stringify): Terminate the string.
2012-05-20 Jan Kratochvil <>
* NEWS (--with-auto-load-dir): Prepend $debugdir to the default path.
Describe it.
* auto-load.c (auto_load_expand_dir_vars): New function.
(auto_load_safe_path_vec_update): Use it, remove the
substitute_path_component call thanks to it.
(auto_load_objfile_script): Remove the debug_file_directory processing.
Use auto_load_expand_dir_vars, remove the substitute_path_component
call thanks to it.
* configure: Regenerate.
* (--with-auto-load-dir): Prepend $debugdir to the default
path. Escape $ also for $debugdir.
(--with_auto_load_safe_path): Escape $ also for $debugdir.
* utils.c (substitute_path_component): Accept also DIRNAME_SEPARATOR.
2012-05-20 Doug Evans <>
* dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s"
before use. Check for symtab->includes == NULL before scanning it.
2012-05-18 Maciej W. Rozycki <>
* mips-tdep.c (mips_reg3_to_reg): Optimize storage.
2012-05-18 Maciej W. Rozycki <>
* NEWS: Add microMIPS support and "set mips compression",
"show mips compression" commands.
* mips-tdep.h (mips_isa): New enum.
(gdbarch_tdep): Add mips_isa.
(mips_pc_is_mips16): Update prototype.
(mips_pc_is_mips, mips_pc_is_micromips): New prototypes.
* mips-tdep.c (mips_compression_mips16): New variable.
(mips_compression_micromips): Likewise.
(mips_compression_strings): Likewise.
(mips_compression_string): Likewise.
(is_mips16_isa, is_micromips_isa): New functions.
(is_mips16_addr): Rename to...
(is_compact_addr): ... this.
(unmake_mips16_addr): Likewise to...
(unmake_compact_addr): ... this.
(make_mips16_addr): Likewise to...
(make_compact_addr): ... this.
(is_mips_addr, is_mips16_addr, is_micromips_addr): New
(mips_elf_make_msymbol_special): Handle microMIPS code.
(msymbol_is_special): Rename to...
(msymbol_is_mips16): ... this.
(mips_make_symbol_special, mips_pc_is_mips16): Update
(msymbol_is_mips, msymbol_is_micromips): New functions.
(mips16_to_32_reg): Rename to...
(mips_reg3_to_reg): ... this.
(mips_pc_is_mips, mips_pc_is_micromips): New functions.
(mips_pc_isa): Likewise.
(mips_read_pc, mips_unwind_pc, mips_write_pc): Handle microMIPS
(mips_fetch_instruction): Pass return status instead of printing
an error message if requested. Handle microMIPS code. Bail out
on an invalid ISA.
(micromips_op): New macro.
(b0s4_imm, b0s5_imm, b0s5_reg, b0s7_imm, b0s10_imm): Likewise.
(b1s9_imm, b2s3_cc, b4s2_regl, b5s5_op, b5s5_reg): Likewise.
(b6s4_op, b7s3_reg): Likewise.
(b0s6_op, b0s11_op, b0s12_imm, b0s16_imm, b0s26_imm): Likewise.
(b6s10_ext, b11s5_reg, b12s4_op): Likewise.
(mips_insn_size): New function.
(mips32_next_pc): Update mips_fetch_instruction call.
(micromips_relative_offset7): New function.
(micromips_relative_offset10): Likewise.
(micromips_relative_offset16): Likewise.
(micromips_pc_insn_size): Likewise.
(micromips_bc1_pc): Likewise.
(micromips_next_pc): Likewise.
(unpack_mips16): Update mips_fetch_instruction call.
(extended_mips16_next_pc): Update according to change to
(mips_next_pc): Update mips_pc_is_mips16 call. Handle microMIPS
(mips16_scan_prologue): Update mips_fetch_instruction call.
Update according to change to mips16_to_32_reg.
(mips_insn16_frame_sniffer): Update mips_pc_is_mips16 call.
(mips_insn16_frame_base_sniffer): Likewise.
(micromips_decode_imm9): New function.
(micromips_scan_prologue): Likewise.
(mips_micro_frame_cache): Likewise.
(mips_micro_frame_this_id): Likewise.
(mips_micro_frame_prev_register): Likewise.
(mips_micro_frame_sniffer): Likewise.
(mips_micro_frame_unwind): New variable.
(mips_micro_frame_base_address): New function.
(mips_micro_frame_base): New variable.
(mips_micro_frame_base_sniffer): New function.
(mips32_scan_prologue): Update mips_fetch_instruction call.
(mips_insn32_frame_sniffer): Check for the standard MIPS ISA
rather than for MIPS16.
(mips_insn32_frame_base_sniffer): Likewise.
(mips_addr_bits_remove): Handle microMIPS code.
(deal_with_atomic_sequence): Rename to...
(mips_deal_with_atomic_sequence): ... this. Update the type
of the variable used to hold an instruction. Remove the ISA bit
check. Update mips_fetch_instruction call.
(micromips_deal_with_atomic_sequence): New function.
(deal_with_atomic_sequence): Likewise.
(mips_about_to_return): Handle microMIPS code. Update
mips_fetch_instruction call.
(heuristic_proc_start): Check for the standard MIPS ISA rather
than for MIPS16. Update mips_pc_is_mips16 and
mips_fetch_instruction calls. Handle microMIPS code.
(mips_push_dummy_code): Handle microMIPS code.
(mips_eabi_push_dummy_call): Likewise.
(mips_o32_return_value): Update mips_pc_is_mips16 call.
(mips_o64_push_dummy_call): Handle microMIPS code.
(mips_o64_return_value): Update mips_pc_is_mips16 call.
(is_delayed): Remove function.
(mips_single_step_through_delay): Replace the call to is_delayed
with mips32_instruction_has_delay_slot. Correct MIPS16 handling.
Handle microMIPS code.
(mips_skip_prologue): Update mips_pc_is_mips16 call. Handle
microMIPS code.
(mips32_in_function_epilogue_p): Update mips_fetch_instruction
(micromips_in_function_epilogue_p): New function.
(mips16_in_function_epilogue_p): Update mips_fetch_instruction
(mips_in_function_epilogue_p): Update mips_pc_is_mips16 call.
Handle microMIPS.
(gdb_print_insn_mips): Likewise.
(mips_breakpoint_from_pc): Likewise.
(mips_remote_breakpoint_from_pc): New function.
(mips32_instruction_has_delay_slot): Simplify making use of the
updated mips_fetch_instruction interface.
(micromips_instruction_has_delay_slot): New function.
(mips16_instruction_has_delay_slot): Simplify making use of the
updated mips_fetch_instruction interface.
(mips_adjust_breakpoint_address): Check for the standard MIPS
ISA rather than for MIPS16 ISA. Update for unmake_compact_addr
calls. Handle microMIPS code.
(mips_get_mips16_fn_stub_pc): Update mips_fetch_instruction call.
(mips_skip_trampoline_code): Handle microMIPS code.
(global_mips_compression): New function.
(mips_gdbarch_init): Handle the compressed ISA setting from ELF
file flags. Register the microMIPS remote breakpoint handler
and heuristic frame unwinder.
(show_mips_compression): New function.
(_initialize_mips_tdep): Add the "set mips compression" and
"show mips compression" commands.
2012-05-18 Sergio Durigan Junior <>
* ada-lang.c:
* ada-tasks.c:
* ada-varobj.c:
* amd64-darwin-tdep.c:
* arm-symbian-tdep.c:
* arm-tdep.c:
* avr-tdep.c:
* ax-gdb.c:
* bfin-linux-tdep.c:
* breakpoint.c:
* c-valprint.c:
* cli/cli-cmds.c:
* coffread.c:
* cp-support.c:
* cris-tdep.c:
* dwarf2-frame-tailcall.c:
* dwarf2-frame.c:
* dwarf2expr.c:
* dwarf2loc.c:
* dwarf2read.c:
* elfread.c:
* eval.c:
* expprint.c:
* f-valprint.c:
* frv-tdep.c:
* h8300-tdep.c:
* hppa-hpux-tdep.c:
* hppa-tdep.c:
* hppanbsd-tdep.c:
* i386-nto-tdep.c:
* i386-tdep.c:
* i387-tdep.c:
* ia64-tdep.c:
* jit.c:
* linespec.c:
* linux-tdep.c:
* lm32-tdep.c:
* m2-valprint.c:
* m32c-tdep.c:
* m32r-rom.c:
* m32r-tdep.c:
* m68k-tdep.c:
* m68klinux-tdep.c:
* mi/mi-main.c:
* microblaze-tdep.c:
* mips-linux-tdep.c:
* mips-tdep.c:
* mn10300-tdep.c:
* p-valprint.c:
* parse.c:
* ppc-linux-tdep.c:
* ppc-sysv-tdep.c:
* printcmd.c:
* python/py-finishbreakpoint.c:
* python/py-inferior.c:
* python/py-infthread.c:
* python/py-type.c:
* python/python.c:
* remote-fileio.c:
* remote-m32r-sdi.c:
* remote-mips.c:
* reverse.c:
* rl78-tdep.c:
* rs6000-aix-tdep.c:
* rs6000-tdep.c:
* s390-tdep.c:
* score-tdep.c:
* sh64-tdep.c:
* skip.c:
* solib-darwin.c:
* solib-dsbt.c:
* solib-frv.c:
* sparc-tdep.c:
* spu-multiarch.c:
* spu-tdep.c:
* stack.c:
* symfile.c:
* symtab.c:
* tic6x-tdep.c:
* tracepoint.c:
* v850-tdep.c:
* valarith.c:
* valprint.c:
* value.c:
* xcoffread.c:
* xtensa-tdep.c:
* ada-lang.c:
* ada-tasks.c:
* ada-varobj.c:
* amd64-darwin-tdep.c:
* arm-symbian-tdep.c:
* arm-tdep.c: Delete unused variables.
2012-05-18 Jan Kratochvil <>
Rename $ddir to $datadir.
* NEWS (--with-auto-load-dir): Rename $ddir to $datadir.
* auto-load.c (auto_load_safe_path_vec_update)
(auto_load_gdb_datadir_changed, auto_load_objfile_script): Likewise.
* configure: Regenerate.
* (--with-auto-load-dir, --with-auto-load-safe-path):
Likewise. Remove the 'use $ddir' help string.
2012-05-18 Jan Kratochvil <>
* auto-load.c (show_auto_load_safe_path): Accept any combination of
2012-05-18 Tom Tromey <>
PR exp/13907:
* valprint.h (struct value_print_options) <symbol_print>: New
* valprint.c (user_print_options): Add default for symbol_print.
(show_symbol_print): New function.
(generic_val_print): Respect symbol_print.
(_initialize_valprint): Add "print symbol" setting.
* f-valprint.c (f_val_print): Respect symbol_print.
* c-valprint.c (c_val_print): Respect symbol_print.
* NEWS: Update.
* printcmd.c (print_address_symbolic): Return int. Ignore some
zero-size symbols.
(print_address_demangle): Return int.
* defs.h: (print_address_symbolic): Return int.
* value.h (print_address_demangle): Return int.
2012-05-18 Tom Tromey <>
* valprint.c (val_print_string): Don't print leading space.
* p-valprint.c (pascal_val_print) <TYPE_CODE_PTR>: Optionally
print space before string or vtbl.
* m2-valprint.c (print_unpacked_pointer): Optionally print space
before string.
* jv-valprint.c (java_value_print): Print space before string.
* go-valprint.c (print_go_string): Print space before string.
* f-valprint.c (f_val_print) <TYPE_CODE_PTR>: Optionally print
space before string.
* c-valprint.c (c_val_print) <TYPE_CODE_PTR>: Optionally print
space before string or vtbl.
* auxv.c (fprint_target_auxv): Print space after address.
2012-05-18 Tom Tromey <>
* printcmd.c (print_address_demangle): Remove special case for 0.
2012-05-18 Tom Tromey <>
* printcmd.c (print_address_demangle): Add 'opts' argument.
* p-valprint.c (pascal_val_print): Update.
* jv-valprint.c (java_val_print): Update.
* value.h: Update.
* valprint.c (generic_val_print): Update.
(print_function_pointer_address): Add 'options' argument. Remove
'addressprint' argument. Update.
* m2-valprint.c (print_unpacked_pointer): Update.
* gnu-v3-abi.c (print_one_vtable): Update.
(gnuv3_print_method_ptr): Update.
* f-valprint.c (f_val_print): Update.
* cp-valprint.c (cp_print_value_fields): Update.
* valprint.h (print_function_pointer_address): Update.
* c-valprint.c (c_val_print): Update.
2012-05-18 Tom Tromey <>
* psymtab.c (find_pc_sect_symtab_from_partial): Return the symtab
directly corresponding to the found psymtab.
* dwarf2read.c (recursively_find_pc_sect_symtab): New function.
(dw2_find_pc_sect_symtab): Use it.
* block.h (blockvector_contains_pc): Declare.
* block.c (find_block_in_blockvector): New function.
(blockvector_for_pc_sect): Use it.
(blockvector_contains_pc): New function.
2012-05-18 Maciej W. Rozycki <>
* mips-tdep.h (mips_write_pc): New prototype.
* mips-tdep.c (mips_write_pc): Make external, add description.
* mips-linux-tdep.c (mips_linux_write_pc): Use mips_write_pc,
add description.
2012-05-18 Maciej W. Rozycki <>
* mips-tdep.c (mips_read_pc): Use gdbarch_pc_regnum instead of
(mips_unwind_pc, mips_write_pc): Likewise.
(mips_gdbarch_init): Remove a comment on gdbarch_pc_regnum and
2012-05-17 Joel Brobecker <>
* procfs.c (procfs_find_new_threads, procfs_pid_to_str,
proc_warn, proc_error, proc_get_status, proc_flags,
proc_why, proc_what, proc_nsysarg, proc_sysargs,
proc_set_run_on_last_close, proc_unset_run_on_last_close,
proc_unset_inherit_on_fork, proc_set_async, proc_unset_async,
proc_stop_process, proc_wait_for_stop, proc_run_process,
proc_set_traced_signals, proc_set_traced_faults,
proc_set_traced_sysentry, proc_set_traced_sysexit,
proc_set_held_signals, proc_get_held_signals,
proc_get_traced_signals, proc_get_traced_faults,
proc_get_traced_sysentry, proc_get_traced_sysexit,
proc_clear_current_fault, proc_set_current_signal,
proc_clear_current_signal, proc_get_gregs, proc_get_fpregs,
proc_set_gregs, proc_set_fpregs, proc_kill, proc_parent_pid,
proc_get_nthreads, proc_get_nthreads, proc_get_nthreads,
proc_get_current_thread, proc_get_current_thread,
proc_get_current_thread, proc_update_threads,
proc_update_threads, proc_update_threads, proc_update_threads,
proc_iterate_over_threads, procfs_find_new_threads,
procfs_pid_to_str): Make static. Remove advance declaration.
(proc_cursig): Make static. Conditionalized defintion on
(proc_syscall, proc_set_kill_on_last_close,
proc_unset_kill_on_last_close, proc_set_inherit_on_fork,
proc_get_pending_signals, proc_get_signal_actions,
proc_trace_signal, proc_ignore_signal): Delete.
2012-05-16 Sergio Durigan Junior <>
* coffread.c (cs_section_address): Passing proper argument for
* dwarf2read.c (dwarf2_locate_sections): Likewise, for
* remote.c (remote_trace_set_readonly_regions): Likewise, for
2012-05-16 Tom Tromey <>
PR macros/13205:
* macrotab.h: (macro_define_special): Declare.
(enum macro_special_kind): New.
(struct macro_definition) <argc, replacement>: Update comments.
* macrotab.c (new_macro_definition): Unconditionally set 'argc'.
(macro_define_object_internal): New function.
(macro_define_object): Use it.
(macro_define_special): New function.
(fixup_definition): New function.
(macro_lookup_definition, foreach_macro_in_scope)
(foreach_macro): Use fixup_definition.
* macroexp.h (macro_stringify): Declare.
* macroexp.c (free_buffer_return_text): New function.
(stringify): Constify "arg".
(macro_stringify): New function.
* dwarf2read.c (macro_start_file): Call macro_define_special.
2012-05-16 Maciej W. Rozycki <>
Maciej W. Rozycki <>
* breakpoint.h (bp_location): Add related_address member.
* inferior.h (get_return_value): Take a pointer to struct value
instead of struct type for the function requested.
* value.h (using_struct_return): Likewise.
* (return_value): Take a pointer to struct value
instead of struct type for the function requested.
* breakpoint.c (set_breakpoint_location_function): Initialize
related_address for bp_gnu_ifunc_resolver breakpoints.
* elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the
requested function's address to gdbarch_return_value.
* eval.c (evaluate_subexp_standard): Pass the requested
function's address to using_struct_return.
* infcall.c (call_function_by_hand): Pass the requested
function's address to using_struct_return and
* infcmd.c (get_return_value): Take a pointer to struct value
instead of struct type for the function requested.
(print_return_value): Update accordingly.
(finish_command_continuation): Likewise.
* stack.c (return_command): Pass the requested function's
address to using_struct_return and gdbarch_return_value.
* value.c (using_struct_return): Take a pointer to struct value
instead of struct type for the function requested. Pass the
requested function's address to gdbarch_return_value.
* python/py-finishbreakpoint.c (finish_breakpoint_object):
New function_value member, replacing function_type.
(bpfinishpy_dealloc): Update accordingly.
(bpfinishpy_pre_stop_hook): Likewise.
(bpfinishpy_init): Likewise. Record the requested function's
* mips-tdep.c (mips_fval_reg): New enum.
(mips_o32_push_dummy_call): For MIPS16 FP doubles do not swap
words put in GP registers.
(mips_o64_push_dummy_call): Update a comment.
(mips_o32_return_value): Take a pointer to struct value instead
of struct type for the function requested and use it to check if
using the MIPS16 calling convention. Return the designated
general purpose registers for floating-point values returned in
MIPS16 mode.
(mips_o64_return_value): Likewise.
* ppc-tdep.h (ppc_sysv_abi_return_value): Update prototype.
(ppc_sysv_abi_broken_return_value): Likewise.
(ppc64_sysv_abi_return_value): Likewise.
* alpha-tdep.c (alpha_return_value): Take a pointer to struct
value instead of struct type for the function requested.
* amd64-tdep.c (amd64_return_value): Likewise.
* amd64-windows-tdep.c (amd64_windows_return_value): Likewise.
* arm-tdep.c (arm_return_value): Likewise.
* avr-tdep.c (avr_return_value): Likewise.
* bfin-tdep.c (bfin_return_value): Likewise.
* cris-tdep.c (cris_return_value): Likewise.
* frv-tdep.c (frv_return_value): Likewise.
* h8300-tdep.c (h8300_return_value): Likewise.
(h8300h_return_value): Likewise.
* hppa-tdep.c (hppa32_return_value): Likewise.
(hppa64_return_value): Likewise.
* i386-tdep.c (i386_return_value): Likewise.
* ia64-tdep.c (ia64_return_value): Likewise.
* iq2000-tdep.c (iq2000_return_value): Likewise.
* lm32-tdep.c (lm32_return_value): Likewise.
* m32c-tdep.c (m32c_return_value): Likewise.
* m32r-tdep.c (m32r_return_value): Likewise.
* m68hc11-tdep.c (m68hc11_return_value): Likewise.
* m68k-tdep.c (m68k_return_value): Likewise.
(m68k_svr4_return_value): Likewise.
* m88k-tdep.c (m88k_return_value): Likewise.
* mep-tdep.c (mep_return_value): Likewise.
* microblaze-tdep.c (microblaze_return_value): Likewise.
* mn10300-tdep.c (mn10300_return_value): Likewise.
* moxie-tdep.c (moxie_return_value): Likewise.
* mt-tdep.c (mt_return_value): Likewise.
* ppc-linux-tdep.c (ppc_linux_return_value): Likewise.
* ppc-sysv-tdep.c (ppc_sysv_abi_return_value): Likewise.
(ppc_sysv_abi_broken_return_value): Likewise.
(ppc64_sysv_abi_return_value): Likewise.
* ppcnbsd-tdep.c (ppcnbsd_return_value): Likewise.
* rl78-tdep.c (rl78_return_value): Likewise.
* rs6000-aix-tdep.c (rs6000_return_value): Likewise.
* rx-tdep.c (rx_return_value): Likewise.
* s390-tdep.c (s390_return_value): Likewise.
* score-tdep.c (score_return_value): Likewise.
* sh-tdep.c (sh_return_value_nofpu): Likewise.
(sh_return_value_fpu): Likewise.
* sh64-tdep.c (sh64_return_value): Likewise.
* sparc-tdep.c (sparc32_return_value): Likewise.
* sparc64-tdep.c (sparc64_return_value): Likewise.
* spu-tdep.c (spu_return_value): Likewise.
* tic6x-tdep.c (tic6x_return_value): Likewise.
* v850-tdep.c (v850_return_value): Likewise.
* vax-tdep.c (vax_return_value): Likewise.
* xstormy16-tdep.c (xstormy16_return_value): Likewise.
* xtensa-tdep.c (xtensa_return_value): Likewise.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
2012-05-15 Tom Tromey <>
* python/python.c (gdbpy_find_pc_line): Use gdb_py_ulongest.
2012-05-15 Joel Brobecker <>
* breakpoint.c (init_breakpoint_sal): Add quotes around part
of command in two error message.
2012-05-15 Joel Brobecker <>
* breakpoint.c (init_breakpoint_sal): Remove trailing spaces.
2012-05-15 Joel Brobecker <>
* breakpoint.c (find_condition_and_thread): Minor reformatting.
2012-05-15 Jan Kratochvil <>
* NEWS (show auto-load scripts-directory): Add forgotten command.
2012-05-15 Jan Kratochvil <>
* spu-tdep.c (spu_catch_start): Update create_breakpoint caller
2012-05-14 H.J. Lu <>
* amd64-tdep.c: Include features/i386/x32.c and
(_initialize_amd64_tdep): Call initialize_tdesc_x32 and
2012-05-14 Stan Shebs <>
Add dynamic printf.
* breakpoint.h (enum bptype): New type bp_dprintf.
(struct breakpoint): New field extra_string.
(struct breakpoint_ops): Add arg to create_breakpoints_sal.
(create_breakpoint): Add extra_string arg.
* breakpoint.c (dprintf_breakpoint_ops): New.
(is_breakpoint): Add bp_dprintf.
(bpstat_what): Add dprintf case.
(bptype_string): Ditto.
(print_one_breakpoint_location): Ditto.
(init_bp_location): Ditto.
(bkpt_print_mention): Ditto.
(dprintf_style_enums): New array.
(dprintf_style): New global.
(dprintf_function): New global.
(dprintf_channel): New global.
(update_dprintf_command_list): New function.
(update_dprintf_commands): New function.
(init_breakpoint_sal): Add extra_string argument, handle it.
(create_breakpoint_sal): Add extra_string argument.
(create_breakpoints_sal): Add extra_string argument, update callers.
(find_condition_and_thread): Add extra argument.
(create_breakpoint): Add extra_string argument, record it.
(dprintf_command): New function.
(break_command_1): Add arg to create_breakpoint call.
(handle_gnu_v3_exceptions): Ditto.
(trace_command): Ditto.
(ftrace_command): Ditto.
(strace_command): Ditto.
(bkpt_print_mention): Add dprintf case.
(create_breakpoint_sal_default): Add extra_string argument.
(_initialize_breakpoint): Add new commands.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Add arg to call.
* python/py-breakpoint.c (bppy_init): Ditto.
* python/py-finishbreakpoint.c (bpfinishpy_init): Ditto.
2012-05-14 Maciej W. Rozycki <>
* mips-tdep.c (mips_push_dummy_code): Correct description typo.
2012-05-14 Siva Chandra Reddy <>
* python/python.c (gdbpy_find_pc_line): Use ULONGEST instead of
unsigned long long.
2012-05-13 Siva Chandra Reddy <>
Add a new function gdb.find_pc_line to the Python API.
* NEWS (Python Scripting): Add entry about the new function.
* python/python.c (gdbpy_find_pc_line): New function which
implements gdb.find_pc_line.
(GdbMethods): Add entry for the new function.
2012-05-12 Pedro Alves <>
* amd64-linux-tdep.c (_initialize_amd64_linux_tdep): Call
initialize_tdesc_x32_linux and initialize_tdesc_x32_avx_linux.
2012-05-12 Eli Zaretskii <>
* inferior.c: Include completer.h
(initialize_inferiors): Set completer of add-inferior to
2012-05-11 H.J. Lu <>
* amd64-linux-tdep.c (amd64_linux_core_read_description): Check
gdbarch_ptr_bit for x32 core dump.
2012-05-11 H.J. Lu <>
* amd64-linux-tdep.c: Include features/i386/x32-linux.c
and features/i386/x32-avx-linux.c.
2012-05-11 Stan Shebs <>
Kwok Cheung Yeung <>
* NEWS: Describe new info os commands.
* common/linux-osdata.c (PID_T, TIME_T): Define.
(linux_common_core_of_thread): Add comment. Change to use PID_T and
(command_from_pid): Add comment. Change to use PID_T.
(commandline_from_pid): Change to use PID_T.
(user_from_pid): Add comment.
(get_process_owner): Add comment. Change to use PID_T and
(get_number_of_cpu_cores): Add comment.
(get_cores_used_by_process): Add comment. Change to use PID_T and
(linux_xfer_osdata_processes): Change to use PID_T and
(compare_processes): New function.
(linux_xfer_osdata_processgroups): New function.
(linux_xfer_osdata_threads): Change to use PID_T.
(linux_xfer_osdata_fds): New function.
(format_socket_state, print_sockets): New functions.
(union socket_addr): New union.
(linux_xfer_osdata_isockets): New function.
(time_from_time_t, group_from_gid): New functions.
(linux_xfer_osdata_shm): New function.
(linux_xfer_osdata_sem): New function.
(linux_xfer_osdata_msg): New function.
(linux_xfer_osdata_modules): New function.
(osdata_table): Add new entries.
* common/buffer.c (buffer_xml_printf): Add support for long and
long long format specifiers.
2012-05-11 H.J. Lu <>
* amd64-linux-tdep.h (tdesc_x32_linux): New.
(tdesc_x32_avx_linux): Likewise.
2012-05-11 Jan Kratochvil <>
Implement multi-component --with-auto-load-dir.
* NEWS (set auto-load scripts-directory, --with-auto-load-dir): New
(--with-auto-load-safe-path): Update the default value description.
* auto-load.c (auto_load_dir, set_auto_load_dir, show_auto_load_dir):
(auto_load_objfile_script): Add DEBUG_AUTO_LOAD output. Remove
GDB_DATADIR NULL check. Replace GDB_DATADIR/auto-load by
AUTO_LOAD_DIR. Support $ddir and multiple components in it.
(_initialize_auto_load): Initialize also auto_load_dir. Install new
"set auto-load scripts-directory".
* Regenerate.
* configure: Regenerate.
* (--with-auto-load-dir): New configure option.
(--auto-load-safe-path): Change the default to --with-auto-load-dir.
2012-05-11 Jan Kratochvil <>
Provide $ddir substitution for --with-auto-load-safe-path.
* NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New
* auto-load.c: Include observer.h.
(auto_load_safe_path_vec_update): Call substitute_path_component for
each component. New variable ddir_subst.
(auto_load_gdb_datadir_changed): New function.
(set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
(_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to
AUTO_LOAD_SAFE_PATH. Install auto_load_gdb_datadir_changed.
* Regenerate.
* configure: Regenerate.
* (--auto-load-safe-path): Rename
* defs.h (substitute_path_component): New declaration.
* top.c: Include observer.h.
(set_gdb_datadir): New function.
(init_main): Install it for "set data-directory".
* utils.c (substitute_path_component): New function.
2012-05-11 Jan Kratochvil <>
Make auto-load handle multiple components of DEBUG_FILE_DIRECTORY.
* auto-load.c (auto_load_objfile_script): Remove check for NULL
DEBUG_FILE_DIRECTORY. Handle multiple components of
2012-05-10 Tom Tromey <>
* dwarf2read.c (recursively_write_psymbols): New function.
(write_psymtabs_to_index): Use it.
* dwarf2read.c (struct dwarf2_queue_item) <pretend_language>: New
(load_cu, dw2_do_instantiate_symtab, process_psymtab_comp_unit)
(load_partial_comp_unit): Update.
(queue_comp_unit): Add argument 'pretend_language'.
(process_queue): Update.
(psymtab_to_symtab_1): Skip dependencies that have a user.
(load_partial_comp_unit_reader): Give meaning to the 'data'
(load_full_comp_unit): Add 'pretend_language' argument.
(process_full_comp_unit): Add 'pretend_language' argument. Set
language on CU.
(process_imported_unit_die, read_file_scope, read_type_unit_scope):
(maybe_queue_comp_unit): Add 'pretend_language' argument.
(follow_die_offset, follow_die_sig, read_signatured_type_reader):
(prepare_one_comp_unit): Add 'pretend_language' argument.
* dwarf2read.c: (dwarf2_per_cu_ptr): New typedef.
(struct dwarf2_per_objfile) <just_read_cus>: New field.
(struct dwarf2_per_cu_data) <imported_symtabs>: New field.
(dw2_do_instantiate_symtab): Check whether symtab was read in
before queueing.
(dw2_instantiate_symtab): Add assertion. Call
(process_psymtab_comp_unit): Compute 'dependencies' for psymtab.
(partial_symtab_p): New typedef.
(set_partial_user): New function.
(dwarf2_build_psymtabs_hard): Use set_partial_user.
(scan_partial_symbols): Add imported CU to imported_symtabs.
(dwarf2_psymtab_to_symtab): Call process_cu_includes.
(psymtab_to_symtab_1): Do nothing if psymtab is readin.
(get_symtab, recursively_compute_inclusions)
(compute_symtab_includes, process_cu_includes)
(process_imported_unit_die): New functions.
(process_die) <DW_TAG_imported_unit>: New case.
(dwarf2_per_objfile_free): Free 'imported_symtabs'.
* dwarf2read.c (struct dwarf2_per_cu_data) <psymtab>: Update
(struct partial_die_info) <locdesc>: Remove.
<d>: New field.
(process_psymtab_comp_unit): Add 'read_partial' argument.
(process_type_comp_unit, dwarf2_build_psymtabs_hard): Update.
(scan_partial_symbols): Handle DW_TAG_imported_unit.
(add_partial_symbol): Update.
(process_die): Handle DW_TAG_partial_unit.
(read_file_scope): Update comment.
(load_partial_dies): Handle DW_TAG_imported_unit.
(read_partial_die): Handle DW_TAG_partial_unit, DW_AT_import.
(determine_prefix, dwarf2_name): Handle DW_TAG_partial_unit.
2012-05-10 Tom Tromey <>
* New file.
2012-05-10 Tom Tromey <>
* symtab.h (struct symtab) <includes, user>: New fields.
* block.h (struct block_iterator) <d, idx, which>: New fields.
* block.c (initialize_block_iterator, find_iterator_symtab)
(block_iterator_step, block_iter_name_step)
(block_iter_match_step): New functions.
(block_iterator_first, block_iterator_next)
(block_iter_name_first, block_iter_name_next)
(block_iter_match_first, block_iter_match_next): Rewrite.
(get_block_symtab): New function.
2012-05-10 Tom Tromey <>
* jv-lang.c (get_java_class_symtab): Use allocate_global_block,
* jit.c (finalize_symtab): Use allocate_global_block,
* buildsym.c (finish_block_internal): New function, from old
(finish_block): Rewrite.
(end_symtab): Use finish_block_internal, set_block_symtab.
* block.h (struct global_block): New.
(allocate_global_block, set_block_symtab): Declare.
* block.c (allocate_global_block, set_block_symtab): New
2012-05-10 Tom Tromey <>
* psymtab.c (partial_map_expand_apply): Add assertion.
(partial_map_symtabs_matching_filename): Skip included psymtabs.
(psymtab_to_symtab): Find unshared psymtab.
(dump_psymtab): Print including psymtabs.
(recursively_search_psymtabs): New function.
(expand_symtabs_matching_via_partial): Use it.
* psympriv.h (struct partial_symtab) <user, searched_flag>: New
(enum psymtab_search_status): New.
2012-05-10 Tom Tromey <>
* tracepoint.c (scope_info): Update.
* symtab.c (lookup_block_symbol, iterate_over_symbols)
(find_pc_sect_symtab, search_symbols)
(make_file_symbol_completion_list): Update.
* symmisc.c (dump_symtab_1): Update.
* stack.c (print_frame_args, iterate_over_block_locals)
(print_frame_labels, iterate_over_block_arg_vars): Update.
* python/py-block.c (block_object) <dict>: Remove.
<block>: New field.
<iter>: Change type.
(blpy_iter): Update.
(blpy_block_syms_iternext): Update.
* psymtab.c (map_block): Use block iterators.
* objfiles.c (objfile_relocate1): Use ALL_DICT_SYMBOLS.
* mi/mi-cmd-stack.c (list_args_or_locals): Update.
* mdebugread.c (parse_symbol, mylookup_symbol): Update.
* infrun.c (check_exception_resume): Update.
* cp-support.c (make_symbol_overload_list_block): Update.
* coffread.c (patch_opaque_types): Update.
* buildsym.c (finish_block, end_symtab): Use ALL_DICT_SYMBOLS.
* block.h (struct block_iterator): New.
(block_iterator_first, block_iterator_next, block_iter_name_first)
(block_iter_name_next, block_iter_match_first)
(block_iter_match_next): Declare.
* block.c (block_iterator_first, block_iterator_next)
(block_iter_name_first, block_iter_name_next)
(block_iter_match_first, block_iter_match_next): New functions.
* ada-lang.c (ada_add_block_symbols)
(ada_make_symbol_completion_list): Use block iterator.
2012-05-10 Tom Tromey <>
* psymtab.c (PSYMTAB_TO_SYMTAB): Remove.
(find_pc_sect_symtab_from_partial, lookup_symbol_aux_psymtabs)
(lookup_partial_symbol, find_last_source_symtab_from_partial)
(read_psymtabs_with_filename, map_matching_symbols_psymtab)
(expand_symtabs_matching_via_partial, maintenance_check_symtabs):
2012-05-10 Joel Brobecker <>
* config/djgpp/fnchange.lst: Add entries for print-file-var-lib1.c,
print-file-var-lib2.c, print-file-var-main.c and
print-file-var.exp (located in gdb/testsuite/gdb.base).
2012-05-10 Joel Brobecker <>
* findvar.c (default_read_var_value): For LOC_UNRESOLVED symbols,
try locating the symbol in the symbol's own objfile first, before
extending the search to all objfiles.
* symtab.c (lookup_symbol_aux_objfile): New function, extracted
out of lookup_symbol_aux_symtabs.
(lookup_symbol_aux_symtabs): Add new parameter "exclude_objfile".
Replace extracted-out code by call to lookup_symbol_aux_objfile.
Do not search EXCLUDE_OBJFILE.
(lookup_static_symbol_aux): Update call to lookup_symbol_aux_symtabs.
(lookup_symbol_global): Search for matches in the block's objfile
first, before searching all other objfiles.
2012-05-10 Tristan Gingold <>
* printcmd.c (set_command): Add pre/post inc/dec.
2012-05-09 Frank Ch. Eigler <>
* gdb.1: Document -ex option.
2012-05-09 Joel Brobecker <>
* infcall.c (call_function_by_hand): Remove AT_SYMBOL handling.
* inferior.h (AT_SYMBOL): Delete.
2012-05-09 Joel Brobecker <>
* mips-tdep.c (mips_push_dummy_code): New function.
(mips_gdbarch_init): Set the gdbarch call_dummy_location to
ON_STACK and install mips_push_dummy_code as our gdbarch
push_dummy_code routine.
2012-05-09 Pedro Alves <>
* target.c (set_maintenance_target_async_permitted): Rename to ...
(set_target_async_command): ... this.
(show_maintenance_target_async_permitted): Rename to ...
(show_target_async_command): ... this.
(initialize_targets): Adjust.
2012-05-08 Doug Evans <>
* go-exp.y (classify_name): Add missing assignment of fields of
2012-05-08 Eli Zaretskii <>
Display the ">" prompt in interactive mode while reading canned
commands, even when the current interpreter is MI.
* interps.c (interp_set_temp): New function.
* interps.h (interp_set_temp): Add prototype.
* cli/cli-script.c (restore_interp): New cleanup function.
(read_command_lines): Temporarily override the current interpreter
with CLI and arrange for restoring the original one.
2012-05-12 Joel Sherrill <>
* microblaze-rom.c (_initialize_picobug_rom): Add prototype.
2012-05-07 Sergio Durigan Junior <>
* probe.c (parse_probes): Move conditional to check for
debuginfo files from here...
* stap-probe.c (stap_get_probes): ... to here.
2012-05-07 Mark Kettenis <>
H.J. Lu <>
* amd64-tdep.c (amd64_analyze_prologue): Additionally check for
`movl %esp, %ebp' for the X32 ABI.
2012-05-07 Tom Tromey <>
* dwarf2read.c (dwarf_tag_name): Return const char *. Use
(dwarf_attr_name): Return const char *. Use get_DW_AT_name.
(dwarf_form_name): Return const char *. Use get_DW_FORM_name.
(dwarf_stack_op_name): Remove.
(dwarf_cfi_name): Return const char *. Use get_DW_ATE_name.
(decode_locdesc): Use get_DW_OP_name.
* dwarf2loc.c (unimplemented): Use get_DW_OP_name.
(dwarf2_compile_expr_to_ax): Likewise.
(disassemble_dwarf_expression): Likewise.
* dwarf2expr.h: (dwarf_stack_op_name): Remove.
2012-05-07 Chung-Lin Tang <>
* sh-linux-tdep.c: Include trad-frame.h and tramp-frame.h.
(sh_linux_sigtramp_cache): New function.
(sh_linux_sigreturn_init): New function.
(sh_linux_rt_sigreturn_init): New function.
(SH_MOVW,SH_TRAP,SH_OR_R0_R0): New symbols for instruction
(SH_NR_SIGRETURN,SH_NR_RT_SIGRETURN): New symbols for sigreturn
syscall codes.
(sh_linux_sigreturn_tramp_frame): New tramp_frame definition.
(sh_linux_rt_sigreturn_tramp_frame): Likewise.
(sh_linux_init_abi): Add init calls to register new tramp_frame
definitions under 32-bit SH, update comments.
2012-05-07 Pedro Alves <>
PR gdb/10952
* amd64-linux-tdep.c: Include glibc-tdep.h.
(amd64_linux_init_abi): Install glibc_skip_solib_resolver as
gdbarch_skip_solib_resolver callback.
2012-05-06 Jan Kratochvil <>
* auto-load.c (set_auto_load_safe_path): Reset AUTO_LOAD_SAFE_PATH
back to DEFAULT_AUTO_LOAD_SAFE_PATH if it is being set to "".
(show_auto_load_safe_path): Check any-directory by comparison with "/".
(add_auto_load_safe_path): Change the error message.
(_initialize_auto_load): Change the "safe-path" help text.
* configure: Regenerate
* (--without-auto-load-safe-path): Set
2012-05-05 Sergio Durigan Junior <>
* stap-probe.h: Do not include unecessary `probe.h'.
2012-05-05 Alan Modra <>
* elfread.c (elf_symtab_read): Use bfd_abs_section_ptr and
* machoread.c (macho_symtab_add_minsym): Use bfd_abs_section_ptr
and bfd_com_section_ptr.
2012-05-04 Joel Brobecker <>
* MAINTAINERS (Past Maintainers): Add Chris Faylor.
2012-05-04 Joel Brobecker <>
* windows-nat.h (segment_register_p_ftype): New typedef.
(windows_set_segment_register_p): Add declaration.
* windows-nat.c (segment_register_p): New static global.
(windows_set_segment_register_p): New function.
(do_windows_fetch_inferior_registers): Add special handling
for segment registers.
* amd64-windows-nat.c: #include "amd64-tdep.h".
(amd64_windows_segment_register_p): New function.
(_initialize_amd64_windows_nat): Call windows_set_segment_register_p.
* i386-windows-nat.c: #include "i386-tdep.h".
(i386_windows_segment_register_p): New function.
(_initialize_i386_windows_nat): Call windows_set_segment_register_p.
2012-05-04 Tristan Gingold <>
* printcmd.c (set_command): Emit a warning if the expression is not
an assignment.
2012-05-03 Joel Brobecker <>
* nto-procfs.c (procfs_find_new_threads, procfs_pid_to_str):
Make static.
2012-05-03 Sergio Durigan Junior <>
* stap-probe.c (stap_is_operator): Change declaration.
(stap_get_opcode): Change return value.
(stap_parse_argument_1): Update calls to `stap_get_opcode' and
2012-05-03 Pedro Alves <>
* infrun.c (displaced_step_fixup): Add "displaced:" prefix to
debug log.
2012-05-03 Siva Chandra Reddy <>
Add two new methods global_block and static_block to gdb.Symtab
* NEWS (Python scripting): Add entry about the new methods.
* python/py-symtab.c (stpy_global_block): New function which
implements the gdb.Symtab.global_block() method.
(stpy_static_block): New function which implements the
gdb.Symtab.static_block() method.
(symtab_object_methods): Add entries for the two new methods.
2012-05-03 Doug Evans <>
* dwarf2read.c (dw2_find_symbol_file): Don't crash if there are no
2012-05-03 Yao Qi <>
* i386-tdep.c (i386_fetch_pointer_argument): Remove extra
(i386_process_record): Ditto.
2012-05-02 Joel Brobecker <>
* infcall.c (unwind_on_signal_p): Make static.
2012-05-02 Joel Brobecker <>
* sol-thread.c (solaris_pid_to_str): Make static.
(_initialize_sol_thread): Add prototype.
2012-05-02 Joel Brobecker <>
* sol-thread.c (procfs_pid_to_str): Delete extern declaration.
2012-05-02 Christopher Faylor <>
* MAINTAINERS: Remove myself.
2012-05-02 Jan Kratochvil <>
Fix --without-auto-load-safe-path for MS-Windows host platform.
* auto-load.c (filename_is_in_dir): Return 1 for DIR_LEN 0.
2012-05-02 Eli Zaretskii <>
* gdb_curses.h: Undefine KEY_EVENT before including curses
headers. Move "#undef MOUSE_MOVED" before any curses header
2012-05-02 Sergio Durigan Junior <>
* features/i386/i386-mmx-linux.c: Regenerate.
* features/rs6000/powerpc-32.c: Likewise.
* features/rs6000/powerpc-32l.c: Likewise.
* features/rs6000/powerpc-403.c: Likewise.
* features/rs6000/powerpc-403gc.c: Likewise.
* features/rs6000/powerpc-405.c: Likewise.
* features/rs6000/powerpc-505.c: Likewise.
* features/rs6000/powerpc-601.c: Likewise.
* features/rs6000/powerpc-602.c: Likewise.
* features/rs6000/powerpc-603.c: Likewise.
* features/rs6000/powerpc-604.c: Likewise.
* features/rs6000/powerpc-64.c: Likewise.
* features/rs6000/powerpc-64l.c: Likewise.
* features/rs6000/powerpc-750.c: Likewise.
* features/rs6000/powerpc-860.c: Likewise.
* features/rs6000/powerpc-e500.c: Likewise.
* features/rs6000/powerpc-e500l.c: Likewise.
* features/rs6000/powerpc-isa205-32l.c: Likewise.
* features/rs6000/powerpc-isa205-64l.c: Likewise.
* features/rs6000/rs6000.c: Likewise.
2012-05-02 Sergio Durigan Junior <>
* i386-tdep.c (i386_stap_parse_special_token) <s>: Remove unused
* stap-probe.c (stap_parse_single_operand) <reg_suffix,
reg_ind_suffix, reg_suffix_len, reg_ind_suffix_len>: Likewise.
(stap_parse_argument) <e>: Likewise.
(handle_stap_probe) <byte_order>: Likewise.
2012-04-30 Doug Evans <>
* dwarf2read.c (init_cutu_and_read_dies): Renamed from
init_and_read_dies_worker. All callers updated.
(init_cu_and_read_dies, init_tu_and_read_dies): Delete. All calls
replaced with init_cutu_and_read_dies.
(load_partial_comp_unit): Pass 1 for use_existing_cu.
(find_partial_die): Remove FIXME. Don't free current CU.
2012-04-30 Sterling Augustine <>
* contrib: New directory.
* contrib/ New file.
2012-04-30 Doug Evans <>
* dwarf2read.c (dwarf_decode_macros): New arg section_name.
All callers updated.
(init_cu_die_reader): Verify the section is non-empty.
(dwarf_decode_line_header): Don't dereference section->asection
until we know the section is present.
2012-04-29 Sergio Durigan Junior <>
* tracepoint.c (start_tracing, stop_tracing): Checking for NULL
2012-04-29 Yao Qi <>
* gdb-code-style.el: New hook gdb-markup-hook
and gdb-comment-hook.
2012-04-28 Doug Evans <>
Initial support for Fission.
* symfile.c (default_symfile_relocate): Use sectp->owner instead of
* symfile.h (dwarf2_debug_sections): New member addr.
* dwarf2expr.c (execute_stack_op): New case DW_OP_GNU_addr_index.
(ctx_no_get_addr_index): New function.
* dwarf2expr.h (dwarf_expr_context_funcs): New member get_addr_index.
(ctx_no_get_addr_index): Declare.
* dwarf2-frame.c (dwarf2_frame_ctx_funcs): Update.
* dwarf2loc.c (dwarf_expr_get_addr_index): New function.
(dwarf_expr_ctx_funcs): Update.
(needs_get_addr_index): New function.
(needs_frame_ctx_funcs): Update.
* dwarf2loc.h (dwarf2_read_addr_index): Declare.
* dwarf2read.c: #include "gdbcore.h".
(dwarf2_per_objfile): New members addr, dwo_files.
(dwarf2_elf_names): Add entry for addr.
(struct dwo_section_names): New type.
(dwo_section_names): New static global.
(dwarf2_cu): New members dwo_unit, addr_base, have_addr_base.
(dwarf2_per_cu_data): New member is_debug_types, all boolean uses of
old debug_types_section member updated to use this.
Rename member debug_types_section to info_or_types_section,
all uses updated.
(signatured_type): Rename member type_offset to type_offset_in_tu,
all uses updated. New member type_offset_in_section.
(struct dwo_sections): New type.
(struct dwo_unit): New type.
(struct dwo_file): New type.
(die_reader_specs): New member dwo_file.
(dwarf2_locate_sections): Watch for .debug_addr.
(zlib_decompress_section): Use sectp->owner instead of objfile->obfd.
(dwarf2_read_section): Get bfd of section from bfd's asection,
instead of objfile.
(create_cus_from_index): Initialize the_cu->info_or_types_section.
(create_signatured_type_table_from_index): Initialize
(dw2_get_file_names): Statement lists for type units with DWO files
live in the DWO file.
(create_debug_types_hash_table): New function.
(create_all_type_units): Rewrite.
(init_cu_die_reader): New arg dwo_file, all callers updated.
(init_and_read_dies_worker): Get section from
this_cu->info_or_types_section. Set sig_type->type_offset_in_section.
Watch for DW_AT_GNU_dwo_name and if present lookup the file and
continue reading the CU/TU from there.
(init_cutu_and_read_dies_no_follow): New arg dwo_file, all callers
updated. Get section from this_cu->info_or_types_section.
(create_all_comp_units): Initialize this_cu->info_or_types_section.
(skip_one_die): New cases DW_FORM_GNU_addr_index,
(hash_dwo_file, eq_dwo_file): New functions.
(allocate_dwo_file_hash_table): New function.
(hash_dwo_unit, eq_dwo_unit): New functions.
(allocate_dwo_unit_table): New function.
(dwarf2_locate_dwo_sections): New function.
(struct create_dwo_info_table_data): New type.
(create_debug_info_hash_table_reader): New function.
(create_debug_info_hash_table): New function.
(try_open_dwo_file, open_dwo_file, init_dwo_file): New function.
(lookup_dwo_file): New function.
(lookup_dwo_comp_unit, lookup_dwo_type_unit): New functions.
(free_dwo_file, free_dwo_file_cleanup): New functions.
(free_dwo_file_from_slot, free_dwo_files): New functions.
(dwarf2_get_pc_bounds): Handle DW_FORM_GNU_addr_index.
(dwarf2_record_block_ranges): Ditto.
(read_partial_die): Ditto.
(process_enumeration_scope): Update to use type_offset_in_section.
(read_full_die_1): New function.
(read_full_die): Rewrite.
(read_attribute_value): New cases DW_FORM_GNU_addr_index,
(read_addr_index_1, read_addr_index): New functions.
(read_addr_index_from_leb128): New function.
(struct dwarf2_read_addr_index_data): New type.
(dwarf2_read_addr_index_reader): New function.
(dwarf2_read_addr_index): New function.
(read_str_index): New function.
(leb128_size): New function.
(dwarf_decode_line_header): Delete arg abfd, all callers updated.
If processing a type unit from a DWO file, get the line section
from the DWO file.
(var_decode_location): Watch for DW_OP_GNU_addr_index.
(dwarf2_const_value_attr): New cases DW_FORM_GNU_addr_index,
(lookup_die_type): Check whether section offset of type's die is
known before looking it up. Remove assert. Condition can
legimately happen for inter-cu type references.
(dwarf_attr_name): Handle Fission attributes.
(dwarf_form_name): Handle Fission forms.
(dump_die_shallow): New cases DW_FORM_GNU_addr_index,
(follow_die_sig): Update to use type_offset_in_section.
(decode_locdesc): New case DW_OP_GNU_addr_index.
(skip_form_bytes): New cases DW_FORM_GNU_addr_index,
(cu_debug_loc_section): New function.
(fill_in_loclist_baton, dwarf2_symbol_mark_computed): Call it.
(dwarf2_per_objfile_free): Unmap .debug_addr section.
Free DWO files if present.
* xcoffread.c (dwarf2_xcoff_names): Add .debug_addr.
Refactor DIE reading.
* dwarf2read.c (dwarf2_per_objfile): Replace members
debug_info_type_hash and debug_types_type_hash with die_type_hash.
(die_reader_specs): New member "die_section". Temporarily make
member "buffer" non-const, pending constifying all info_ptr uses.
(die_reader_func_ftype): New typedef.
(dw2_get_file_names_reader): New function.
(dw2_get_file_names): Rewrite.
(read_and_check_type_unit_head): Rename arg type_offset to
(create_all_type_units): Improve debugging message.
Improve dummy type unit check.
(init_cu_die_reader): New arg "section". All callers updated.
(init_and_read_dies_worker): New function.
(init_cu_and_read_dies, init_tu_and_read_dies): New functions.
(init_cutu_and_read_dies_no_follow): New function.
(init_cutu_and_read_dies_simple): New function.
(process_psymtab_comp_unit_reader): New function.
(process_psymtab_comp_unit): Delete args section,
is_debug_types_section. Rewrite. All callers updated.
(process_psymtab_type_unit): Renamed from process_type_comp_unit.
All callers updated. Rewrite.
(load_partial_comp_unit_reader): New function.
(load_partial_comp_unit): Rewrite.
(skip_children): New arg reader. Delete args buffer, cu.
All callers updated.
(skip_one_die): New arg reader. Delete args buffer, cu.
All callers updated.
(locate_pdi_sibling): New arg reader. Delete args buffer, abfd, cu.
All callers updated.
(load_full_comp_unit_reader): New function.
(load_full_comp_unit): Rewrite.
(read_comp_unit): Delete.
(read_die_and_children_1): Delete, contents moved ...
(read_die_and_children): ... here.
(dwarf2_read_abbrevs): New arg abbrev_section. All callers updated.
(load_partial_dies): New arg reader. Delete args abfd, buffer, cu.
All callers updated.
(read_partial_die): New arg reader. Delete args abfd, buffer, cu.
All callers updated.
(find_partial_die): Rewrite load_all_dies support.
(read_attribute_value): New arg reader. Delete args abfd, cu.
All callers updated.
(read_attribute): New arg reader. Delete args abfd, cu.
All callers updated.
(load_full_type_unit): Add assert.
(read_signatured_type_reader): New function.
(read_signatured_type): Rewrite.
(free_stack_comp_unit): Remove call to age_cached_comp_units.
(free_one_cached_comp_unit): Change target_cu arg to target_per_cu.
All callers updated. Set per_cu->cu = NULL after freeing it.
(dwarf2_per_cu_offset_and_type): Renamed from dwarf2_offset_and_type.
(per_cu_offset_and_type_hash): Renamed from offset_and_type_hash.
(per_cu_offset_and_type_eq): Renamed from offset_and_type_eq.
(set_die_type): Update.
(get_die_type_at_offset): Update.
(read_file_scope): Call prepare_one_comp_unit.
(read_type_unit_scope): Ditto.
(prepare_one_comp_unit): Set producer if present.
2012-04-28 Sergio Durigan Junior <>
* probe.c (compile_rx_or_error): Silence ARI warning about missing
gettext function on `error'.
2012-04-27 Doug Evans <>
* dwarf2read.c (dwarf2_read_index): Don't use index if symbol table
is empty.
2012-04-27 Sergio Durigan Junior <>
Tom Tromey <>
* breakpoint.c (struct breakpoint_objfile_data)
<exception_probes>: New fields.
(free_breakpoint_probes): New function.
(create_longjmp_master_breakpoint): Prefer SystemTap probe over
(create_exception_master_breakpoint): Likewise.
(_initialize_breakpoint): Registering cleanup for SystemTap probes.
* infrun.c: Including necessary header files for handling SystemTap
(handle_inferior_event): Handling longjmp breakpoint and exceptions
via SystemTap probes.
(check_exception_resume): Remove `func' argument. Handle exception
unwinding breakpoint set via a SystemTap probe.
(insert_exception_resume_from_probe): New function.
2012-04-27 Sergio Durigan Junior <>
Tom Tromey <>
Jan Kratochvil <>
* (SFILES): Add `probe' and `stap-probe'.
(COMMON_OBS): Likewise.
(HFILES_NO_SRCDIR): Add `probe'.
* NEWS: Mention support for static and SystemTap probes.
* amd64-tdep.c (amd64_init_abi): Initializing proper fields used by
SystemTap probes' arguments parser.
* arm-linux-tdep.c: Including headers needed to perform the parsing
of SystemTap probes' arguments.
(arm_stap_is_single_operand): New function.
(arm_stap_parse_special_token): Likewise.
(arm_linux_init_abi): Initializing proper fields used by SystemTap
probes' arguments parser.
* ax-gdb.c (require_rvalue): Removing static declaration.
(gen_expr): Likewise.
* ax-gdb.h (gen_expr): Declaring function.
(require_rvalue): Likewise.
* breakpoint.c: Include `gdb_regex.h' and `probe.h'.
(bkpt_probe_breakpoint_ops): New variable.
(momentary_breakpoint_from_master): Set the `probe' value.
(add_location_to_breakpoint): Likewise.
(break_command_1): Using proper breakpoint_ops according to the
argument passed by the user in the command line.
(bkpt_probe_insert_location): New function.
(bkpt_probe_remove_location): Likewise.
(bkpt_probe_create_sals_from_address): Likewise.
(bkpt_probe_decode_linespec): Likewise.
(tracepoint_probe_create_sals_from_address): Likewise.
(tracepoint_probe_decode_linespec): Likewise.
(tracepoint_probe_breakpoint_ops): New variable.
(trace_command): Using proper breakpoint_ops according to the
argument passed by the user in the command line.
(initialize_breakpoint_ops): Initializing breakpoint_ops for
static probes on breakpoints and tracepoints.
* breakpoint.h (struct bp_location) <probe>: New field.
* cli-utils.c (skip_spaces_const): New function.
(extract_arg): Likewise.
* cli-utils.h (skip_spaces_const): Likewise.
(extract_arg): Likewise.
* coffread.c (coff_sym_fns): Add `sym_probe_fns' value.
* Append `stap-probe.o' to be generated when ELF
support is present.
* configure: Regenerate.
* dbxread.c (aout_sym_fns): Add `sym_probe_fns' value.
* elfread.c: Include `probe.h' and `arch-utils.h'.
(probe_key): New variable.
(elf_get_probes): New function.
(elf_get_probe_argument_count): Likewise.
(elf_evaluate_probe_argument): Likewise.
(elf_compile_to_ax): Likewise.
(elf_symfile_relocate_probe): Likewise.
(stap_probe_key_free): Likewise.
(elf_probe_fns): New variable.
(elf_sym_fns): Add `sym_probe_fns' value.
(elf_sym_fns_lazy_psyms): Likewise.
(elf_sym_fns_gdb_index): Likewise.
(_initialize_elfread): Initialize objfile cache for static
* gdb_vecs.h (struct probe): New forward declaration.
(probe_p): New VEC declaration.
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
* (stap_integer_prefix): New variable.
(stap_integer_suffix): Likewise.
(stap_register_prefix): Likewise.
(stap_register_suffix): Likewise.
(stap_register_indirection_prefix): Likewise.
(stap_register_indirection_suffix): Likewise.
(stap_gdb_register_prefix): Likewise.
(stap_gdb_register_suffix): Likewise.
(stap_is_single_operand): New function.
(stap_parse_special_token): Likewise.
(struct stap_parse_info): Forward declaration.
* i386-tdep.c: Including headers needed to perform the parsing
of SystemTap probes' arguments.
(i386_stap_is_single_operand): New function.
(i386_stap_parse_special_token): Likewise.
(i386_elf_init_abi): Initializing proper fields used by SystemTap
probes' arguments parser.
* i386-tdep.h (i386_stap_is_single_operand): New function.
(i386_stap_parse_special_token): Likewise.
* machoread.c (macho_sym_fns): Add `sym_probe_fns' value.
* mipsread.c (ecoff_sym_fns): Likewise.
* objfiles.c (objfile_relocate1): Support relocation for static
* parse.c (prefixify_expression): Remove static declaration.
(initialize_expout): Likewise.
(reallocate_expout): Likewise.
* parser-defs.h (initialize_expout): Declare function.
(reallocate_expout): Likewise.
(prefixify_expression): Likewise.
* ppc-linux-tdep.c: Including headers needed to perform the parsing
of SystemTap probes' arguments.
(ppc_stap_is_single_operand): New function.
(ppc_stap_parse_special_token): Likewise.
(ppc_linux_init_abi): Initializing proper fields used by SystemTap
probes' arguments parser.
* probe.c: New file, for generic statically defined probe support.
* probe.h: Likewise.
* s390-tdep.c: Including headers needed to perform the parsing of
SystemTap probes' arguments.
(s390_stap_is_single_operand): New function.
(s390_gdbarch_init): Initializing proper fields used by SystemTap
probes' arguments parser.
* somread.c (som_sym_fns): Add `sym_probe_fns' value.
* stap-probe.c: New file, for SystemTap probe support.
* stap-probe.h: Likewise.
* symfile.h: Include `gdb_vecs.h'.
(struct sym_probe_fns): New struct.
(struct sym_fns) <sym_probe_fns>: New field.
* symtab.c (init_sal): Initialize `probe' field.
* symtab.h (struct probe): Forward declaration.
(struct symtab_and_line) <probe>: New field.
* tracepoint.c (start_tracing): Adjust semaphore on breakpoints
(stop_tracing): Likewise.
* xcoffread.c (xcoff_sym_fns): Add `sym_probe_fns' value.
2012-04-27 Sergio Durigan Junior <>
Tom Tromey <>
* ax-gdb.c (gen_expr): Clean up code to handle internal variables
and to compile agent expressions.
* infrun.c (siginfo_make_value): New argument `ignore'.
(siginfo_funcs): New struct.
(_initialize_infrun): New argument when calling
* thread.c (thread_id_make_value): New argument `ignore'.
(thread_funcs): New struct.
(_initialize_thread): New argument when calling
* tracepoint.c (sdata_make_value): New argument `ignore'.
(sdata_funcs): New struct.
(_initialize_tracepoint): New argument when calling
* value.c (make_value): New struct.
(create_internalvar_type_lazy): New argument `data'.
(compile_internalvar_to_ax): New function.
(value_of_internalvar): Properly handling `make_value' case.
(clear_internalvar): Likewise.
(show_convenience): Adding `TRY_CATCH' block.
* value.h (internalvar_make_value): Delete, replace by...
(struct internalvar_funcs): ... this.
(create_internalvar_type_lazy) <fun>: Delete argument.
(create_internalvar_type_lazy) <funcs>, <data>: New arguments.
(compile_internalvar_to_ax): New function.
* windows-tdep.c (tlb_make_value): New argument `ignore'.
(tlb_funcs): New struct.
(_initialize_windows_tdep): New argument when calling
2012-04-27 Mark Wielaard <>
* dwarf2read.c (dwarf2_get_pc_bounds): Check DW_AT_high_pc form to
see whether it is an address or a constant offset from DW_AT_low_pc.
(dwarf2_record_block_ranges): Likewise.
(read_partial_die): Likewise.
2012-04-26 Mark Wielaard <>
* MAINTAINERS (Write After Approval): Add myself to the list.
2012-04-26 Maciej W. Rozycki <>
* proc-utils.h (proc_prettyprint_signalset): New prototype.
(proc_prettyprint_signal): Likewise.
(proc_prettyprint_faultset): Likewise.
(proc_prettyprint_fault): Likewise.
(proc_prettyprint_actionset): Likewise.
(proc_prettyprint_flags): Move to new proc-flags.c section.
(proc_prettyfprint_flags): New prototype.
* procfs.c (proc_nsysarg, proc_sysargs): Add prototypes.
(proc_syscall, proc_cursig): Likewise.
(proc_set_kill_on_last_close): Likewise.
(proc_unset_kill_on_last_close): Likewise.
(proc_set_watchpoint): Make static.
(proc_delete_dead_threads): Likewise.
(procfs_set_watchpoint): Likewise.
(_initialize_procfs): Add prototype.
* proc-events.c: Include proc-utils.h.
(init_syscall_table): Make static.
* proc-api.c (_initialize_proc_api): Add prototype.
* proc-flags.c: Include proc-utils.h.
2012-04-26 Maciej W. Rozycki <>
* configure: Regenerate.
2012-04-26 Jan Kratochvil <>
Fix DW_AT_lower_bound defaults for DWARF-4+.
* dwarf2read.c (read_subrange_type): Remove initialization of low and
high. New variable low_default_is_valid. Implement DWARF-4+
DW_AT_lower_bound defaults. Print complaint for DW_AT_lower_bound with
no default by the DWARF standard.
2012-04-26 Maciej W. Rozycki <>
Maciej W. Rozycki <>
* infrun.c (handle_inferior_event): Move the check for return
trampolines ahead of the check for function trampolines.
* mips-tdep.h (MIPS_S2_REGNUM, MIPS_GP_REGNUM): New macros.
* mips-tdep.c (mips_str_mips16_call_stub): New variable.
(mips_str_mips16_ret_stub): Likewise.
(mips_str_call_fp_stub): Likewise.
(mips_str_call_stub): Likewise.
(mips_str_fn_stub): Likewise.
(mips_str_pic): Likewise.
(mips_in_frame_stub): New function.
(mips_unwind_pc): Return the return address rather than the PC
if the PC of an intermediate frame is inside a call thunk.
(mips_is_stub_suffix): New function.
(mips_is_stub_mode): Likewise.
(mips_get_mips16_fn_stub_pc): Likewise.
(mips_skip_mips16_trampoline_code): Update to handle all the
currently generated stub types. Don't recurse into __fn_stub
thunks. Remove heuristics to handle stubs beyond etext/_etext.
Use cooked register accesses.
(mips_in_return_stub): Reintroduce function.
(mips_skip_trampoline_code): Traverse trampolines recursively.
(mips_gdbarch_init): Handle MIPS16 return trampolines.
2012-04-26 Joel Brobecker <>
GDB 7.4.1 released.
2012-04-26 Jonathan Larmour <>
* arm-tdep.h (VFP_REGISTER_SIZE): Define.
* features/arm-with-m-vfp-d16.xml: New file. Describes
Cortex-M with VFPv4-sp-d16 FPU register layout.
* features/Makefile (WHICH): Add arm-with-m-vfp-d16.
* features/arm-with-m-vfp-d16.c: New. Generated from above.
* arm-tdep.c: Include arm-with-m-vfp-d16.c.
(arm-register_g_packet_guesses): Add vfp-d16 guess.
(_initialise_arm_tdep): Initialize arm-with-m-vfp-d16 tdesc.
2012-04-25 Doug Evans <>
* cli/cli-decode.c (print_doc_line): Use stream instead of
2012-04-25 Sergio Durigan Junior <>
* features/arm-with-iwmmxt.c: Regenerate.
* features/arm-with-m-fpa-layout.c: Likewise.
* features/arm-with-m.c: Likewise.
* features/arm-with-neon.c: Likewise.
* features/arm-with-vfpv2.c: Likewise.
* features/arm-with-vfpv3.c: Likewise.
* features/mips-dsp-linux.c: Likewise.
* features/mips-linux.c: Likewise.
* features/mips64-dsp-linux.c: Likewise.
* features/mips64-linux.c: Likewise.
* features/s390-linux32.c: Likewise.
* features/s390-linux32v1.c: Likewise.
* features/s390-linux32v2.c: Likewise.
* features/s390-linux64.c: Likewise.
* features/s390-linux64v1.c: Likewise.
* features/s390-linux64v2.c: Likewise.
* features/s390x-linux64.c: Likewise.
* features/s390x-linux64v1.c: Likewise.
* features/s390x-linux64v2.c: Likewise.
* features/tic6x-c62x-linux.c: Likewise.
* features/tic6x-c62x.c: Likewise.
* features/tic6x-c64x-linux.c: Likewise.
* features/tic6x-c64x.c: Likewise.
* features/tic6x-c64xp-linux.c: Likewise.
* features/tic6x-c64xp.c: Likewise.
* target-descriptions.c: Only generate `field_type' and `type'
variables when needed.
2012-04-25 Fredrik Hederstierna <>
* cli/cli-cmds.c (cd_command): Use memmove instead of strcpy.
2012-04-25 Doug Evans <>
Initial pass at Go language support.
* NEWS: Mention Go.
* (SFILES): Add go-exp.y, go-lang.c, go-typeprint.c,
(COMMON_OBS): Add go-lang.o, go-val.print.o, go-typeprint.o.
(YYFILES): Add go-exp.c.
(YYOBJ): Add go-exp.o.
(local-maintainer-clean): Delete go-exp.c.
* defs.h (enum language): Add language_go.
* dwarf2read.c: #include "go-lang.h".
(fixup_go_packaging): New function.
(process_full_comp_unit): Call it when processing Go CUs.
(dwarf2_physname): Add Go support.
(read_file_scope): Handle missing language spec for GNU Go.
(set_cu_language): Handle DW_LANG_Go.
* go-exp.y: New file.
* go-lang.h: New file.
* go-lang.c: New file.
* go-typeprint.c: New file.
* go-valprint.c: New file.
* symtab.c: #include "go-lang.h".
(symbol_set_language): Handle language_go.
(symbol_find_demangled_name, symbol_set_names): Ditto.
(symbol_natural_name, demangle_for_lookup, find_main_name): Ditto.
2012-04-24 Jim Meyering <>
avoid a few strncpy-induced buffer overruns
* procfs.c (procfs_make_note_section): Be sure to NUL-terminate
fname and psargs before trying to concatenate.
* tui/tui-stack.c (tui_get_function_from_frame): NUL-terminate
"name" before applying strchr.
2012-04-25 Siva Chandra Reddy <>
* CONTRIBUTE: Use unified diff instead of context diff when
generating patches.
2012-04-24 Maciej W. Rozycki <>
* mips-tdep.c (mips_about_to_return): Remove dead MIPS16 support
code. Handle JR.HB correctly.
2012-04-24 Maciej W. Rozycki <>
* mips-tdep.c
(is_mips16_addr, unmake_mips16_addr, make_mips16_addr): Group
with the other MIPS16 helpers.
2012-04-24 Sergio Durigan Junior <>
* Conditionally declare `args', thus cleaning up
unused instances of this variable.
2012-04-24 Yao Qi <>
Revert this patch to allow breakpoint always-inserted
in record target.
2011-12-05 Pedro Alves <>
* breakpoint.c: Include record.h.
(breakpoints_always_inserted_mode): Return false when the record
target is in use.
* breakpoint.c (iterate_over_bp_locations): New.
* breakpoint.h: Declare.
New typedef walk_bp_location_callback.
* record.c (record_open): Call record_init_record_breakpoints.
(record_sync_record_breakpoints): New.
(record_init_record_breakpoints): New.
* NEWS: Mention supporting breakpoint always-inserted mode in
record target.
2012-04-24 Marc Khouzam <>
* mi/mi-main.c (mi_cmd_execute): Choose a live thread not just
any thread.
2012-04-24 Yao Qi <>
* breakpoint.c (ep_is_catchpoint): Renamed to ...
(is_catchpoint): ... it.
(print_one_breakpoint_location): Caller update.
* breakpoint.h: Update declaration.
2012-04-23 David S. Miller <>
* configure.tgt (sparc-*-linux*): Set build_gdbserver to yes.
2012-04-23 Tom Tromey <>
* buildsym.c (add_free_pendings): Remove.
* buildsym.h (add_free_pendings): Remove.
2012-04-23 Doug Evans <>
* dwarf2read.c (partial_die_full_name): Record DW_FORM_ref_addr in
attr.u.unsnd instead of attr.u.addr.
(read_attribute_value) Ditto for cases DW_FORM_ref_addr,
DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_reg8,
(dump_die_shallow): Update cases DW_FORM_ref_addr,
DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4. Add cases DW_FORM_ref8,
(dwarf2_get_ref_die_offset): Use DW_UNSND for reference attributes.
2012-04-23 Maciej W. Rozycki <>
* mips-tdep.c (mips_n32n64_return_value): Fix coding style.
(mips_o32_return_value): Likewise.
(mips_o64_return_value): Likewise.
2012-04-21 Paul Hilfinger <>
* ada-lang.c (ada_evaluate_subexp): Add cases for
their treatment in eval.c.
2012-04-21 David S. Miller <>
* sparc-tdep.c (X_DISP10): Define.
(sparc_analyze_control_transfer): Handle compare-and-branch.
2012-04-21 Jonathan Larmour <>
* features/Makefile (WHICH): Add arm-with-m and arm-with-m-fpa-layout.
* arm-tdep.c (arm_register_g_packet_guesses): Fix comment.
2012-04-20 Nigel Stephens <>
Maciej W. Rozycki <>
* mips-tdep.c (mips_float_register_p): New function.
(mips_convert_register_float_case_p): Use mips_float_register_p.
(mips_register_type): Likewise.
(mips_print_register): Likewise.
(print_gp_register_row): Likewise.
(mips_print_registers_info): Likewise.
2012-04-20 Shun-Yen Lu <>
* mips-tdep.c (mips_elf_make_msymbol_special): Fix identification
of mips16 symbols.
2012-04-20 Andrew Pinski <>
* MAINTAINERS (Write After Approval): Add myself to the list.
2012-04-20 Sergio Durigan Junior <>
* MAINTAINERS: Update my e-mail address.
2012-04-20 Pedro Alves <>
* acx_configure_dir.m4 (ACX_CONFIGURE_DIR): Handle absolute
* configure: Regenerate.
2012-04-20 Sergio Durigan Junior <>
* cp-support.h: Include `gdb_vecs.h'. Delete `const_char_ptr' VEC
* gdb_vecs.h: Declare `const_char_ptr' VEC.
2012-04-20 Jan Kratochvil <>
Fix compilation compatibility with python-2.4
* python/py-type.c (convert_field): Cast ADDRSTRING for
PyObject_SetAttrString as non-const. New comment.
2012-04-19 Tom Tromey <>
* top.c (quit_target): Use all_cleanups.
* main.c (captured_command_loop): Use all_cleanups.
* exceptions.c (throw_exception): Use all_cleanups.
2012-04-19 Pedro Alves <>
(CLEANDIRS). Remove gnulib/import.
(REQUIRED_SUBDIRS): Replace gnulib/import with $(GNULIB_BUILDDIR).
(all-lib): Ditto.
(distclean): Remove the $(GNULIB_BUILDDIR) directory.
(gnulib/import/Makefile): Replace gnulib/import with
$(GNULIB_BUILDDIR). Set CONFIG_FILES to just Makefile.
(ACLOCAL_AMFLAGS): Remove '-I gnulib/import/m4'.
(aclocal_m4_deps): Remove the gnulib dependencies. Add
* acinclude.m4: Include acx_configure_dir.m4.
* acx_configure_dir.m4: New file.
* aclocal.m4: Regenerate.
calls. Configure gnulib using ACX_CONFIGURE_DIR.
(GNULIB): New variable.
(AC_OUTPUT): Don't output gnulib/Makefile.
* gdb/defs.h: Include build-gnulib/config.h.
* aclocal.m4: Regenerate.
* Regenerate.
* configure: Regenerate.
* gnulib/ New file.
* gnulib/ New file.
* gnulib/aclocal.m4: New file.
* gnulib/ New file.
* gnulib/configure: New file.
* gnulib/: Re-run gnulib-tool to adjust.
2012-04-19 Doug Evans <>
* cleanups.h (struct cleanup): Move to cleanups.c.
(make_cleanup_dtor_ftype): New typedef.
(make_cleanup_dtor): Use it.
(ALL_CLEANUPS): Replace with ...
(all_cleanups): ... this. Declare. All uses updated.
* cleanups.c: #include "gdb_assert.h".
(sentinel_cleanup): New static global.
(cleanup_chain, final_cleanup_chain): Initialize to SENTINEL_CLEANUP.
(make_my_cleanup2): Assert result is non-NULL.
(all_cleanups): New function.
(save_my_cleanups): Initialize new chain to SENTINEL_CLEANUP instead
of NULL.
2012-04-19 Pedro Alves <>
* (HFILES_NO_SRCDIR): Remove gnulib/
Adjust paths to gnulib imported files.
2012-04-19 Pedro Alves <>
* gnulib/: Move whole directory ...
* gnulib/import/: ... here, and re-rerun gnulib-tool to adjust.
(REQUIRED_SUBDIRS, all-lib, gnulib/Makefile, ACLOCAL_AMFLAGS)
(aclocal_m4_deps): Adjust.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Adjust AC_OUTPUT output.
2012-04-19 Yao Qi <>
* (SFILES): Add common/vec.c and remove vec.c.
(vec.o): New rule.
* vec.c: Move it ...
* common/vec.c: ... here.
* vec.h: Move it ...
* common/vec.h: ... here.
2012-04-19 Yao Qi <>
* gdb-code-style.el: New.
2012-04-18 Pedro Alves <>
Update gnulib from latest git.
* gnulib/ Update.
* gnulib/dummy.c: Update.
* gnulib/extra/arg-nonnull.h: Update.
* gnulib/extra/c++defs.h: Update.
* gnulib/extra/update-copyright: Update.
* gnulib/extra/warn-on-use.h: Update.
* gnulib/ Update.
* gnulib/m4/00gnulib.m4: Update.
* gnulib/m4/extensions.m4: Update.
* gnulib/m4/gnulib-cache.m4: Update.
* gnulib/m4/gnulib-common.m4: Update.
* gnulib/m4/gnulib-comp.m4: Update.
* gnulib/m4/gnulib-tool.m4: Update.
* gnulib/m4/include_next.m4: Update.
* gnulib/m4/inttypes-pri.m4: Update.
* gnulib/m4/inttypes.m4: Update.
* gnulib/m4/longlong.m4: Update.
* gnulib/m4/memchr.m4: Update.
* gnulib/m4/memmem.m4: Update.
* gnulib/m4/mmap-anon.m4: Update.
* gnulib/m4/multiarch.m4: Update.
* gnulib/m4/onceonly.m4: Update.
* gnulib/m4/stddef_h.m4: Update.
* gnulib/m4/stdint.m4: Update.
* gnulib/m4/string_h.m4: Update.
* gnulib/m4/warn-on-use.m4: Update.
* gnulib/m4/wchar_h.m4: Update.
* gnulib/m4/wchar_t.m4: Update.
* gnulib/m4/wint_t.m4: Update.
* gnulib/memchr.c: Update.
* gnulib/memmem.c: Update.
* gnulib/ Update.
* gnulib/ Update.
* gnulib/str-two-way.h: Update.
* gnulib/ Update.
* gnulib/ Update.
* gnulib/extra/arg-nonnull.h: Delete.
* gnulib/extra/c++defs.h: Delete.
* gnulib/extra/warn-on-use.h: Delete.
* gnulib/m4/wchar_h.m4: Delete.
* gnulib/m4/wint_t.m4: Delete.
* gnulib/ Delete.
* gnulib/extra/snippets/arg-nonnull.h: New.
* gnulib/extra/snippets/c++defs.h: New.
* gnulib/extra/snippets/warn-on-use.h: New.
* aclocal.m4: Regenerate.
* Regenerate.
* configure: Regenerate.
* gnulib/ Regenerate.
2012-04-18 Pedro Alves <>
Reimport the update-copyright module from gnulib
* configure: Regenerate.
* gnulib/ Update.
* gnulib/ Regenerate.
* gnulib/extra/update-copyright: Update.
* gnulib/m4/gnulib-cache.m4: Update.
* gnulib/m4/gnulib-comp.m4: Update.
2012-04-18 Tristan Gingold <>
* (aix): Put -lpthread into libs.
* configure: Regenerate.
2012-04-18 Tom Tromey <>
* linespec.c (convert_linespec_to_sals): Don't use
(compare_msymbols): Arguments are minsym_and_objfile, not
minimal_symbol*. Don't use SYMBOL_OBJ_SECTION.
2012-04-18 Pedro Alves <>
Revert gnulib/ part of:
2011-01-01 Joel Brobecker <>
Copyright year update in most files (performed by
2012-04-18 Jan Kratochvil <>
Fix 64-bit constants on 32-bit hosts.
* dwarf2read.c (read_unsigned_leb128): Change declaration return type
from unsigned long to ULONGEST.
(read_signed_leb128): Change declaration return type from long to
(dwarf2_const_value_attr): Change declaration parameter value from long
(dwarf2_compute_name): Change variable value from long to LONGEST.
(read_unsigned_leb128): Change return type, variable result and some
casts from unsigned long to ULONGEST.
(read_signed_leb128): Change return type, variable result and some
casts from long to LONGEST.
(dwarf2_const_value_data, dwarf2_const_value_attr): Change parameter
value from long to LONGEST.
(dwarf2_const_value): Change variable value from long to LONGEST.
* symmisc.c (print_symbol): Change SYMBOL_VALUE format strings to use
plongest and hex_string.
* symtab.h (struct general_symbol_info): Change ivalue from long to
LONGEST, remove the comment.
* tracepoint.c (validate_actionline, collect_symbol, scope_info):
Change SYMBOL_VALUE format strings to use plongest and hex_string.
2012-04-18 Siddhesh Poyarekar <>
PR symtab/7259:
* ada-exp.y (convert_char_literal): Use TYPE_FIELD_ENUMVAL.
* ada-lang.c (ada_discrete_type_high_bound)
(ada_discrete_type_low_bound): Fix function comment. Use
(ada_identical_enum_types_p): Use TYPE_FIELD_ENUMVAL.
(pos_atr, value_val_atr): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
* ada-typeprint.c (print_enum_type): Change variable lastval to LONGEST.
* ada-valprint.c (print_optional_low_bound, ada_print_scalar)
(ada_val_print_1): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
* c-typeprint.c (c_type_print_base): Move variable lastval to inner
block, change it to LONGEST. Use TYPE_FIELD_ENUMVAL for
* coffread.c (coff_read_enum_type): Use SET_FIELD_ENUMVAL.
* dwarf2read.c (process_enumeration_scope): Likewise.
* (TypeFlagsPrinter): Use field.enumval instead of
(class StructMainTypePrettyPrinter): Support also
* gdbtypes.c (get_discrete_bounds): Use TYPE_FIELD_ENUMVAL for
(recursive_dump_type): Use TYPE_FIELD_ENUMVAL for TYPE_CODE_ENUM.
(copy_type_recursive): Support also FIELD_LOC_KIND_ENUMVAL.
* gdbtypes.h (enum field_loc_kind): New FIELD_LOC_KIND_ENUMVAL.
(struct main_type.flds_bnds.fields.loc): Adjust bitpos comment. New
field enumval.
(struct main_type.flds_bnds.bields): Adjust loc_kind and bitsize to
accommodate enumval.
(struct call_site): Adjust loc_kind to accommodate enumval.
* m2-typeprint.c (m2_enum): Use TYPE_FIELD_ENUMVAL.
* mdebugread.c (parse_symbol): Use TYPE_FIELD_ENUMVAL for
* p-typeprint.c (pascal_type_print_base): Likewise.
* python/lib/gdb/ (class FlagEnumerationPrinter): Use
* python/lib/gdb/ (make_enum_dict): Likewise.
* python/py-type.c (convert_field): New variable addrstring. Use
(check_types_equal): Support also FIELD_LOC_KIND_ENUMVAL.
* stabsread.c (read_enum_type): Use SET_FIELD_ENUMVAL.
* typepint.c (print_type_scalar): Use TYPE_FIELD_ENUMVAL for
* valprint.c (generic_val_print): Likewise.
2012-04-17 Doug Evans <>
* dwarf2read.c (lookup_signatured_type): Return NULL instead of 0.
* dwarf2read.c: Whitespace fixes.
(lookup_signatured_type): Tweak comment.
(get_die_type_at_offset): Fix comment.
2012-04-17 Joel Brobecker <>
* xcoffread.c (xcoff_secnum_to_sections): New function.
(secnum_to_section, secnum_to_bfd_section): Reimplement
using xcoff_secnum_to_sections. Rename "secnum" parameter
into "n_scnum".
(record_minimal_symbol): New function.
(scan_xcoff_symtab): Replace uses of RECORD_MINIMAL_SYMBOL
by call to record_minimal_symbol and set misc_func_recorded
to 1. Set last_csect_sec to the XCOFF section index instead
of GDB's section_offset index. Update calls to
prim_record_minimal_symbol_and_info to pass the BFD section
as well.
2012-04-17 Joel Brobecker <>
* xcoffread.c (read_xcoff_symtab): Delete variables
last_csect_val and last_csect_sec and associated code.
2012-04-17 Doug Evans <>
* cleanups.c (make_my_cleanup,make_my_cleanup2): Make static.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
* cleanups.h (make_my_cleanup,make_my_cleanup2): Delete
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Delete.
* cleanups.h: New file.
* cleanups.c: New file.
* (SFILES): Add cleanups.c.
(HFILES_NO_SRCDIR): Add cleanups.h.
(COMMON_OBS): Add cleanups.o.
* defs.h (struct cleanup): Moved to cleanups.h.
(do_cleanups,do_final_cleanups): Ditto.
(discard_cleanups,discard_final_cleanups): Ditto
(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
(save_cleanups,save_final_cleanups): Ditto.
(restore_cleanups,restore_final_cleanups): Ditto.
(null_cleanup): Ditto.
(make_my_cleanup,make_my_cleanup2): Ditto.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
* utils.c (cleanup_chain,final_cleanup_chain): Moved to cleanups.c.
(do_cleanups,do_final_cleanups): Ditto.
(discard_cleanups,discard_final_cleanups): Ditto
(make_cleanup,make_cleanup_dtor,make_final_cleanup): Ditto.
(save_cleanups,save_final_cleanups): Ditto.
(restore_cleanups,restore_final_cleanups): Ditto.
(null_cleanup): Ditto.
(make_my_cleanup,make_my_cleanup2): Ditto.
(discard_my_cleanups,save_my_cleanups,restore_my_cleanups): Ditto.
* utils.c (make_cleanup_freeargv): Use make_cleanup instead of
(make_cleanup_dyn_string_delete): Ditto.
(make_cleanup_ui_file_delete): Ditto.
(make_cleanup_ui_out_redirect_pop): Ditto.
(make_cleanup_free_section_addr_info): Ditto.
(make_cleanup_restore_integer): Ditto.
(make_cleanup_unpush_target): Ditto.
(make_cleanup_value_free_to_mark): Ditto.
(make_cleanup_value_free): Ditto.
(make_cleanup_free_so): Ditto.
2012-04-17 Jan Kratochvil <>
New option "set debug auto-load".
* NEWS: New commands "set debug auto-load" and "show debug auto-load".
* auto-load.c (debug_auto_load, show_debug_auto_load: New.
(filename_is_in_auto_load_safe_path_vec): Call fprintf_unfiltered
(file_is_auto_load_safe): New parameters debug_fmt and ....
Call fprintf_unfiltered if DEBUG_AUTO_LOAD.
(source_gdb_script_for_objfile): Extend the file_is_auto_load_safe
caller by explanatory string.
(_initialize_auto_load): Register "set debug auto-load".
* auto-load.h (file_is_auto_load_safe): New parameters debug_fmt
and ....
* linux-thread-db.c (try_thread_db_load_from_pdir_1)
(try_thread_db_load_from_dir): Extend the file_is_auto_load_safe caller
by explanatory string.
* main.c (captured_main): Likewise.
* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile)
(source_section_scripts): Likewise.
2012-04-17 Jan Kratochvil <>
New option "set auto-load safe-path".
* NEWS: New commands "set auto-load safe-path"
and "show auto-load safe-path".
* auto-load.c: Include gdb_vecs.h, readline/tilde.h and completer.h.
(auto_load_safe_path, auto_load_safe_path_vec)
(auto_load_safe_path_vec_update, set_auto_load_safe_path)
(show_auto_load_safe_path, add_auto_load_safe_path, filename_is_in_dir)
(filename_is_in_auto_load_safe_path_vec, file_is_auto_load_safe): New.
(source_gdb_script_for_objfile): New variable is_safe. Call
file_is_auto_load_safe. Return if it is not.
(struct loaded_script): New field loaded.
(maybe_add_script): Add parameter loaded. Initialize SLOT with it.
(print_script): Use LOADED indicator instead of FULL_PATH. Change
output "Missing" to "No".
(_initialize_auto_load): New variable cmd. Initialize
auto_load_safe_path. Register "set auto-load safe-path",
"show auto-load safe-path" and "add-auto-load-safe-path".
* auto-load.h (maybe_add_script): Add parameter loaded.
(file_is_auto_load_safe): New declaration.
* Regenerate.
* configure: Regenerate.
* New parameters --with-auto-load-safe-path
and --without-auto-load-safe-path.
* linux-thread-db.c (try_thread_db_load_from_pdir_1)
(try_thread_db_load_from_dir): Check file_is_auto_load_safe first.
* main.c (captured_main): Check file_is_auto_load_safe for
* python/py-auto-load.c (gdbpy_load_auto_script_for_objfile): New
variable is_safe. Call file_is_auto_load_safe. Return if it is not.
(source_section_scripts): Call file_is_auto_load_safe. Return if it is
2012-04-17 Jan Kratochvil <>
auto-load: Implementation.
* NEWS: New descriptions for "info auto-load",
"info auto-load gdb-scripts", "info auto-load python-scripts",
"info auto-load local-gdbinit" and "info auto-load libthread-db".
Deprecate "info auto-load-scripts", "set auto-load-scripts on|off"
and "show auto-load-scripts". New description for "set auto-load",
"show auto-load", "set auto-load gdb-scripts",
"show auto-load gdb-scripts", "set auto-load python-scripts",
"show auto-load python-scripts", "set auto-load local-gdbinit",
"show auto-load local-gdbinit", "set auto-load libthread-db" and
"show auto-load libthread-db".
* auto-load.c: Remove include python/python-internal.h. Add includes
exceptions.h, cli/cli-script.h, gdbcmd.h, cli/cli-decode.h and
(GDB_AUTO_FILE_NAME, source_gdb_script_for_objfile)
(auto_load_gdb_scripts, show_auto_load_gdb_scripts): New.
(gdbpy_global_auto_load): Rename to ...
(global_auto_load): ... here.
(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
(auto_load_local_gdbinit_loaded, show_auto_load_local_gdbinit)
(script_language_gdb, source_gdb_script_for_objfile): New.
(struct loaded_script): New field language.
(hash_loaded_script_entry, eq_loaded_script_entry): Calculate also
(maybe_add_script): Add parameter language. Drop redundant
entry.full_path initialization. Initialize entry.language and
(auto_load_objfile_script): Change parameter suffix to language.
Remove the call of maybe_add_script.
Call language->source_script_for_objfile.
(load_auto_scripts_for_objfile, struct collect_matching_scripts_data):
(collect_matching_scripts): Adjust it for
struct collect_matching_scripts_data.
(auto_load_info_scripts_pattern_nl): New variable.
(info_auto_load_scripts): Rename to ...
(auto_load_info_scripts): ... here, add parameter language. Adjust it
for struct collect_matching_scripts_data.
(info_auto_load_gdb_scripts, info_auto_load_local_gdbinit)
(set_auto_load_cmd, auto_load_set_cmdlist_get, show_auto_load_cmd)
(auto_load_show_cmdlist_get, info_auto_load_cmd)
(auto_load_info_cmdlist_get): New.
(_initialize_auto_load): Move add_info of "auto-load-scripts" to
python/py-auto-load.c. New installment for "set auto-load gdb-scripts",
"info auto-load gdb-scripts", "set auto-load local-gdbinit" and
"info auto-load local-gdbinit".
* auto-load.h (struct script_language): New.
(gdbpy_global_auto_load): Rename to ...
(global_auto_load): ... here.
(auto_load_local_gdbinit, auto_load_local_gdbinit_pathname)
(auto_load_local_gdbinit_loaded): New declarations.
(maybe_add_script): New parameter language.
(auto_load_objfile_script): Change parameter suffix to language.
(load_auto_scripts_for_objfile, auto_load_info_scripts_pattern_nl)
(auto_load_info_scripts, auto_load_set_cmdlist_get)
(auto_load_show_cmdlist_get, auto_load_info_cmdlist_get): New
* linux-thread-db.c: Include auto-load.h and ctype.h.
(auto_load_thread_db, show_auto_load_thread_db): New.
(struct thread_db_info): New field filename.
(delete_thread_db_info): Call xfree for FILENAME.
(try_thread_db_load): Initialize FILENAME.
(try_thread_db_load_from_pdir, try_thread_db_load_from_dir): Return
(info_auto_load_libthread_db_compare, info_auto_load_libthread_db): New.
(_initialize_thread_db): Install auto_load_thread_db
as "set auto-load libthread-db" and install info_auto_load_libthread_db
as "info auto-load libthread-db".
* main.c (captured_main): Rename gdbpy_global_auto_load to
global_auto_load. Initialize AUTO_LOAD_LOCAL_GDBINIT_PATHNAME and
(print_gdb_help): Extend the help for 'local init file'.
* python/py-auto-load.c: Remove a comment about gdb scripts extension.
(GDBPY_AUTO_SECTION_NAME): Extend the comment it is Python specific.
(auto_load_scripts): Rename to ...
(auto_load_python_scripts): ... here, update the comment.
(gdbpy_load_auto_script_for_objfile): New declaration.