aboutsummaryrefslogtreecommitdiff
path: root/gdb
AgeCommit message (Collapse)AuthorFilesLines
2011-07-01handle character-based enumeration typedefsJoel Brobecker7-1/+114
Consider the following type: type Char_Enum_Type is ('A', 'B', 'C', 'D'); If the compiler generates a Char_Enum_Type typedef in the debugging information, the debugger fails in the following case: (gdb) p Char_Enum_Type'('B') $1 = 66 For our type, the underlying value of 'B' is actually 1, not 66 (ASCII 'B'). We are failing this case because we were not handling typedef to enum types before. This patch fixes this. gdb/ChangeLog: * ada-exp.y (convert_char_literal): Handle typedef types. gdb/testsuite/ChangeLog: * gdb.ada/char_enum: New testcase.
2011-07-01Document ada_remove_trailing_digits moreJoel Brobecker2-1/+8
gdb/ChangeLog: * ada-lang.c (ada_remove_trailing_digits): Expand documentation.
2011-07-012011-07-02 Yao Qi <yao@codesourcery.com>Yao Qi2-105/+119
* gdb.base/dump.exp (capture_pointer_with_type): New. Get value from address instead of name. Start GDB once, and do `dump' and `restore' tests together.
2011-07-01gdb: tests: set remotetimeout to gdb_load_timeout for remote targetsMike Frysinger3-1/+54
Rather than relying on the default remotetimeout value (which might be too small for some slower devices), use the existing gdb_load_timeout config option to set it. This adds two new helpers for getting/setting the remotetimout to keep the new logic simple. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-01*** empty log message ***gdbadmin1-1/+1
2011-06-30 * varobj.c (varobj_create): Call do_cleanups on early exit path.Tom Tromey4-0/+10
* valops.c (find_overload_match): Call do_cleanups on early exit path. * solib.c (solib_find): Call do_cleanups on early exit path.
2011-06-30 * symfile-mem.c (symbol_file_add_from_memory): Call do_cleanups.Tom Tromey4-9/+31
* solib-svr4.c (open_symbol_file_object): Call do_cleanups on all return paths. Defer final do_cleanups until last return. * arm-tdep.c (arm_exidx_new_objfile): Make null cleanup after early return.
2011-06-30 * Makefile.in (SUBDIR_MI_CFLAGS): Don't add -DMI_OUT=1.Tom Tromey2-2/+5
2011-06-30http://sourceware.org/ml/gdb-patches/2011-06/msg00444.htmlAndrew Burgess2-0/+5
Add myself to the write after approval list.
2011-06-30http://sourceware.org/ml/gdb-patches/2011-06/msg00442.htmlAndrew Burgess2-0/+7
Don't compile c++ tests for platforms that don't support c++.
2011-06-30*** empty log message ***gdbadmin1-1/+1
2011-06-29gdb/Jan Kratochvil5-0/+29
Disable epilogue unwinders on recent GCCs. * amd64-tdep.c (amd64_in_function_epilogue_p): New variable symtab, initialize it, return 0 on EPILOGUE_UNWIND_VALID. * dwarf2read.c (process_full_comp_unit): Initialize EPILOGUE_UNWIND_VALID. * i386-tdep.c (i386_in_function_epilogue_p): New variable symtab, initialize it, return 0 on EPILOGUE_UNWIND_VALID. * symtab.h (struct symtab): New field epilogue_unwind_valid.
2011-06-29gdb/Jan Kratochvil2-7/+23
Code cleanup - reformatting. * dwarf2read.c (producer_is_gcc_ge_4_0): Rename to ... (producer_is_gcc_ge_4): ... here, change the return value. (process_full_comp_unit): New variable gcc_4_minor, adjust the value interpretation.
2011-06-29gdb/Jan Kratochvil8-7/+159
Fix non-only rename list for Fortran modules import. * cp-namespace.c (cp_scan_for_anonymous_namespaces): Adjust the cp_add_using_directive caller. (cp_add_using_directive): New parameter excludes, describe it. New variables ix and param. Compare if also excludes match. Allocate NEW with variable size, initialize EXCLUDES there. (cp_lookup_symbol_imports): New variable excludep, test current->EXCLUDES with it. * cp-support.h: Include vec.h. (struct using_direct): New field excludes, describe it. (DEF_VEC_P (const_char_ptr)): New. (cp_add_using_directive): New parameter excludes. * defs.h (const_char_ptr): New typedef. * dwarf2read.c (read_import_statement): New variables child_die, excludes and cleanups, read in excludes. (read_namespace): Adjust the cp_add_using_directive caller. gdb/testsuite/ Fix non-only rename list for Fortran modules import. * gdb.fortran/module.exp (print var_x, print var_y, print var_z): New tests. * gdb.fortran/module.f90 (module moduse): New. (program module): use moduse, test var_x, var_y and var_z.
2011-06-29gdb/Jan Kratochvil2-9/+23
Code cleanup. * cp-namespace.c (cp_add_using_directive): Turn positive comparison to negative comparisons.
2011-06-29 PR testsuite/12040:Tom Tromey9-10/+22
* gdb.fortran/array-element.exp: Use f90, not f77. * gdb.fortran/complex.exp: Use f90, not f77. * gdb.fortran/derived-type.exp: Use f90, not f77. * gdb.fortran/library-module.exp: Use f90, not f77. * gdb.fortran/logical.exp: Use f90, not f77. * gdb.fortran/module.exp: Use f90, not f77. * gdb.fortran/multi-dim.exp: Use f90, not f77. * gdb.fortran/subarray.exp: Use f90, not f77.
2011-06-29gdbTom Tromey4-0/+14
2011-06-29 André Pönitz <andre.poenitz@nokia.com> * mi/mi-main.c (mi_cmd_list_features): Emit breakpoint-notifications. gdb/doc * gdb.texinfo (GDB/MI Miscellaneous Commands): Document breakpoint-notifications feature.
2011-06-29 * gdb.texinfo (Target Description): Remove warning aboutUlrich Weigand2-4/+5
possibly unstable format.
2011-06-29gdbTom Tromey11-528/+616
PR fortran/10036: * valprint.h (generic_emit_char, generic_printstr): Declare. * valprint.c (wchar_printable, append_string_as_wide) (print_wchar): Move from c-lang.c. (generic_emit_char): New function; mostly taken from c_emit_char. (generic_printstr): New function; mostly taken from c_printstr. * f-valprint.c (f_val_print) <TYPE_CODE_ARRAY>: Handle strings represented as arrays. <TYPE_CODE_CHAR>: Treat as TYPE_CODE_INT; recognize as character type. * f-typeprint.c (f_type_print_base) <TYPE_CODE_CHAR>: Treat identically to TYPE_CODE_INT. * f-lang.c (f_get_encoding): New function. (f_emit_char): Use generic_emit_char. (f_printchar): Replace comment. (f_printstr): Use generic_printstr. * dwarf2read.c (read_base_type) <DW_ATE_unsigned>: Handle Fortran "character" types specially. <DW_ATE_signed_char, DW_ATE_unsigned_char>: Make TYPE_CODE_CHAR for Fortran. * c-lang.c (wchar_printable, append_string_as_wide, print_wchar): Move to valprint.c (c_emit_char): Call generic_emit_char. (c_printstr): Call generic_printstr. gdb/testsuite * gdb.fortran/charset.exp: New file. * gdb.fortran/charset.f90: New file.
2011-06-29gdb/Gary Benson2-2/+4
* breakpoint.c (bpstat_what): Removed duplicated case.
2011-06-29 PR testsuite/12040:Tom Tromey4-390/+451
* lib/future.exp: New file, mostly extracted from ada.exp. Rewrote compatibility code to use rename. (gdb_find_gfortran): New proc. (gdb_default_target_compile): Refresh from dejagnu; plus a pending gfortran patch. * lib/ada.exp (gdb_find_gnatmake, gdb_default_target_compile): Move to future.exp. * lib/gdb.exp: Always load future.exp.
2011-06-29*** empty log message ***gdbadmin1-1/+1
2011-06-28 * python/python-internal.h (PY_SSIZE_T_CLEAN): Define.Tom Tromey2-0/+7
2011-06-282011-06-28 Yao Qi <yao@codesourcery.com>Yao Qi3-7/+27
* gdb.cp/exception.cc: Don't include iostream. (bar): Remove print statement. (catcher): New. (main): Remove print statements. Call function catcher. * gdb.cp/exception.exp : Don't match inferior's output in regexp. Set breakpoint on catcher, and check the value of parameter.
2011-06-28*** empty log message ***gdbadmin1-1/+1
2011-06-27 * valops.c (find_overload_match): Call do_cleanups before earlyTom Tromey10-23/+46
return. * top.c (execute_command): Call do_cleanups before early return. (command_loop): Likewise. * stack.c (backtrace_command): Make a null cleanup early. Don't conditionally call do_cleanups. * python/py-value.c (TRY_CATCH): Move cleanup handling into TRY_CATCH. * python/py-breakpoint.c (gdbpy_breakpoint_has_py_cond): Rearrange so cleanups are always run. * mi/mi-cmd-var.c (mi_cmd_var_delete): Reset old_cleanups. * findcmd.c (parse_find_args): Call do_cleanups on early return path. * dbxread.c (elfstab_build_psymtabs): Make a null cleanup early. Don't conditionally call do_cleanups. * cli/cli-script.c (execute_user_command): Initialize 'old_chain' later.
2011-06-27 * MAINTAINERS (Write After Approval): Use default email address.Eric Botcazou2-1/+5
2011-06-27Add Eric Botcazou to the list of `Write After Approval' contributorsJoel Brobecker2-0/+5
* MAINTAINERS (Write After Approval): Add Eric Botcazou.
2011-06-27Add support for single register window model on SPARCJoel Brobecker10-38/+198
2011-06-27 Eric Botcazou <ebotcazou@adacore.com> * sparc-tdep.h (struct sparc_frame_cache): Add frame_offset, saved_regs_mask and copied_regs_mask fields. (sparc_record_save_insn): New prototype. * sparc-tdep.c (sparc_alloc_frame_cache): Initialize the new fields. (sparc_record_save_insn): New function. (sparc_analyze_prologue): Add head comment. Recognize store insns of call-saved registers. Use OFFSET consistently. Recognize flat frames and cache their settings. (sparc32_skip_prologue): Handle flat frames. (sparc_frame_cache): Add frame_offset to the base address. (sparc32_frame_cache): Adjust to new frame description. (sparc32_frame_prev_register): Likewise. * sparc64-tdep.c (sparc64_frame_prev_register): Likewise. * sparc-sol2-tdep.c (sparc32_sol2_sigtramp_frame_cache): Likewise. * sparc64-sol2-tdep.c (sparc64_sol2_sigtramp_frame_cache): Likewise. * sparcnbsd-tdep.c (sparc32nbsd_sigcontext_frame_cache): Force the frame by calling sparc_record_save_insn. * sparc64nbsd-tdep.c (sparc64nbsd_sigcontext_frame_cache): Likewise. * sparcobsd-tdep.c (sparc32obsd_sigtramp_frame_cache): Likewise. * sparc64obsd-tdep.c (sparc64obsd_frame_cache): Likewise.
2011-06-272011-06-27 Tristan Gingold <gingold@adacore.com>Tristan Gingold2-15/+21
* dwarf2read.c (struct dwarf2_section_info): Replace was_mmapped field by map_addr and map_len. (dwarf2_read_section): Adjust for the new bfd_mmap api. (munmap_section_buffer): Likewise.
2011-06-27*** empty log message ***gdbadmin1-1/+1
2011-06-26*** empty log message ***gdbadmin1-1/+1
2011-06-25*** empty log message ***gdbadmin1-1/+1
2011-06-24 * varobj.c (update_dynamic_varobj_children): Make 'name' const.Tom Tromey13-35/+82
* symtab.h (lookup_struct, lookup_union, lookup_enum): Update. * python/python.c (gdbpy_parameter): Make 'arg' const. (execute_gdb_command): Likewise. (gdbpy_decode_line): Likewise. Copy it. (gdbpy_parse_and_eval): Make 'expr_string' const. Copy it. (gdbpy_write): Make 'arg' const. * python/py-type.c (typy_lookup_typename): Make 'type_name' const. (gdbpy_lookup_type): Likewise. * python/py-prettyprint.c (print_children): Make 'name' const. * python/py-param.c (parmpy_init): Make 'name' const. Copy it. * python/py-inferior.c (infpy_write_memory): Make 'buf_len' a Py_ssize_t. * python/py-function.c (fnpy_init): Make 'name' const. * python/py-cmd.c (cmdpy_init): Make 'name' const. Copy it. (gdbpy_string_to_argv): Make 'input' const. * python/py-breakpoint.c (bppy_init): Make 'spec' const. Copy it. * gdbtypes.h (lookup_typename): Update. * gdbtypes.c (lookup_typename): Make 'name' const. (lookup_struct): Likewise. (lookup_union): Likewise. (lookup_enum): Likewise.
2011-06-24 * Makefile.in (HFILES_NO_SRCDIR): Add "common/" toTom Tromey2-4/+13
gdb_thread_db.h. Move all common/ entries to be together. (TAGS): Don't depend on DEPFILES.
2011-06-24*** empty log message ***gdbadmin1-1/+1
2011-06-232011-06-23 Yao Qi <yao@codesourcery.com>Yao Qi4-1/+19
* infrun.c (start_remote): Move call init_wait_for_inferior to ... * remote.c (remote_start_remote): ... here. * monitor.c (monitor_open): ... here.
2011-06-232011-06-23 Yao Qi <yao@codesourcery.com>Yao Qi2-1/+18
* gdb.cp/mb-inline.exp: Parse the output of `info break' to check breakpoint 1.2 is disabled. KFAIL for uclinux.
2011-06-23http://sourceware.org/ml/gdb-patches/2011-06/msg00136.htmlAndrew Burgess2-3/+11
2011-06-23 Andrew Burgess <aburgess@broadcom.com> * gdbtypes.c (append_composite_type_field_aligned): Fix calculation of bit position based on alignment.
2011-06-23Fix races in mi2-var-display.exp.Marek Polacek2-7/+8
2011-06-23Fix races in mi2-return.exp.Marek Polacek2-16/+16
2011-06-23Fix races in mi2-console.exp.Marek Polacek2-5/+6
2011-06-23Fix races in mi2-basics.exp.Marek Polacek2-37/+25
2011-06-23 gdb/testsuite/Yao Qi3-0/+24
* gdb.base/moribund-step.exp: Skip test if displaced stepping is not supported. * lib/gdb.exp (support_displaced_stepping): New.
2011-06-232011-06-23 Yao Qi <yao@codesourcery.com>Yao Qi2-0/+7
* gdb.threads/execl.exp: Skip on remote target.
2011-06-23*** empty log message ***gdbadmin1-1/+1
2011-06-222011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves5-192/+621
* breakpoint.c (bpstat_stop_status): Call the check_status breakpoint_ops method. (print_one_breakpoint_location): Also print the condition for Ada exception catchpoints. (allocate_bp_location): New, factored out from allocate_bp_location. (allocate_bp_location): Adjust. Call the owner breakpoint's allocate_location method, if there is one. (free_bp_location): Call the locations's dtor method, if there is one. (init_raw_breakpoint_without_location): New breakpoint_ops parameter. Use it. (set_raw_breakpoint_without_location): Adjust. (init_raw_breakpoint): New breakpoint_ops parameter. Pass it down. (set_raw_breakpoint): Adjust. (catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops) (catch_syscall_breakpoint_ops): Install NULL allocate_location, re_set and check_status methods. (init_catchpoint): Don't memset, initialize thread, addr_string and enable_state. Pass the ops down to init_raw_breakpoint. (install_catchpoint): Rename to ... (install_breakpoint): ... this, and make extern. (create_fork_vfork_event_catchpoint): Adjust. (catch_exec_breakpoint_ops): Install NULL allocate_location, re_set and check_status methods. (create_syscall_event_catchpoint): Adjust. (ranged_breakpoint_ops, watchpoint_breakpoint_ops) (masked_watchpoint_breakpoint_ops): Install NULL allocate_location, re_set and check_status methods. (catch_exec_command_1): Adjust. (gnu_v3_exception_catchpoint_ops): Install NULL allocate_location, re_set and check_status methods. (create_ada_exception_breakpoint): Rename to ... (init_ada_exception_breakpoint): ... this. Add a struct breakpoint parameter, and delete the exp_string, cond_string and cond parameters. Use init_raw_breakpoint, and don't install or mention the breakpoint yet. Don't clear breakpoint fields that init_raw_breakpoint already clears. (re_set_breakpoint): Delete, split into ... (breakpoint_re_set_default, prepare_re_set_context): ... these new functions. (breakpoint_re_set_one): Call the breakpoint's breakpoint_ops->re_set implementation, if there's one. Adjust. * breakpoint.h: Forward declare struct bpstats and struct bp_location. (struct bp_location_ops): New type. (struct bp_location): New field `ops'. (struct breakpoint_ops): New `allocate_location', `re_set' and `check_status' fields. Make `breakpoint_hit''s description match reality. (init_bp_location): Declare. (breakpoint_re_set_default): Declare. (create_ada_exception_breakpoint): Rename to ... (init_ada_exception_breakpoint): ... this. Add a struct breakpoint parameter, and delete the exp_string, cond_string and cond parameters. (install_breakpoint): Declare. * ada-lang.c: Include exceptions.h. <Ada exceptions description>: Update. (struct ada_catchpoint_location): New type. (ada_catchpoint_location_dtor): New function. (ada_catchpoint_location_ops): New global. (ada_catchpoint): New type. (create_excep_cond_exprs): New function. (dtor_exception, allocate_location_exception, re_set_exception) (should_stop_exception, check_status_exception): New functions. (print_one_exception, print_mention_exception) (print_recreate_exception): Adjust. (dtor_catch_exception, allocate_location_catch_exception) (re_set_catch_exception, check_status_catch_exception): New functions. (catch_exception_breakpoint_ops): Install them. (dtor_catch_exception_unhandled) (allocate_location_catch_exception_unhandled) (re_set_catch_exception_unhandled) (check_status_catch_exception_unhandled): New functions. (catch_exception_unhandled_breakpoint_ops): Install them. (dtor_catch_assert, allocate_location_catch_assert) (re_set_catch_assert, check_status_catch_assert): New functions. (catch_assert_breakpoint_ops): Install them. (ada_exception_catchpoint_p): Delete. (catch_ada_exception_command_split) (ada_exception_catchpoint_cond_string): Rename exp_string parameter to excep_string. Adjust. (ada_parse_catchpoint_condition): Delete. (ada_exception_sal): Rename the exp_string parameter to excep_string. Delete the cond_string and cond parameters. Adjust. (ada_decode_exception_location): Rename the exp_string parameter to excep_string. Delete the cond_string and cond parameters. Adjust. (create_ada_exception_catchpoint): New function. (catch_ada_exception_command, ada_decode_assert_location) (catch_assert_command): Adjust. * ada-lang.h (ada_exception_catchpoint_p): Delete declaration.
2011-06-222011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves5-84/+119
* ada-lang.c: Include arch-utils.h. (ada_decode_exception_location): Make static. (catch_ada_exception_command): Moved here from breakpoint.c. (ada_decode_assert_location): Make static. (catch_assert_command): Moved here from breakpoint.c. (_initialize_ada_lang): Install the exception and assert catchpoint commands here. * ada-lang.h (ada_decode_exception_location) (ada_decode_assert_location): Delete declarations. * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): Moved to breakpoint.h. (create_ada_exception_breakpoint): Make extern. (catch_ada_exception_command, catch_assert_command): Moved to ada-lang.c. (add_catch_command): Make extern. (_initilize_breakpoint): Don't install the exception and assert catchpoint commands here. * breakpoint.h (CATCH_PERMANENT, CATCH_TEMPORARY): Moved from breakpoint.c (add_catch_command, create_ada_exception_breakpoint): Declare.
2011-06-222011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-26/+37
* breakpoint.c (init_raw_breakpoint_without_location): Don't add the breakpoint to the breakpoint chain here. (set_raw_breakpoint_without_location): Add the breakpoint to the breakpoint chain here. (init_raw_breakpoint): Adjust comments. (set_raw_breakpoint): Add the breakpoint to the breakpoint chain here. (init_catchpoint): Don't set the catchpoint's breakpoint number here. (install_catchpoint): New function. (create_fork_vfork_event_catchpoint) (create_syscall_event_catchpoint, catch_exec_command_1): Adjust to use install_catchpoint.
2011-06-222011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2-42/+5
* breakpoint.c (create_catchpoint_without_mention) (create_catchpoint): Delete.