aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-01Darwin/detach: Do not resume inferior after ptrace detachJoel Brobecker2-1/+10
When trying to detach from an inferior that we start from the debugger, GDB prints the following warning: (gdb) detach Detaching from program: /[...]/foo, process 74593 warning: Mach error at "/[...]/darwin-nat.c:445" in function "darwin_resume_inferior": (os/kern) failure (0x5) The warning comes from the following code in darwin_detach: darwin_resume_inferior (inf); This is because the process has already been resumed by the PT_DETACH ptrace operation that has just been performed. On the other hand, when trying to detach from an inferior that was started outside of debugger control (thus after having attached the debugger to that inferior), things go smoothly. That's because we don't use ptrace to control the process in that case, and so the resume is perfectly justified. This patch makes sure that we resume the inferior during the detach only when we're NOT using ptrace. gdb/ChangeLog: * darwin-nat.c (darwin_detach): Call darwin_resume_inferior only when inf->private->no_ptrace.
2011-07-01bettter display for temporary Ada exception catchpointsJoel Brobecker4-8/+58
Temporary catchpoints on Ada exceptions are now displayed as "Temporary catchpoint" as opposed to just "Catchpoint". This is cosmetic only, but in line with what's done for other catchpoints as well as breakpoints. gdb/ChangeLog: * ada-lang.c (print_it_exception): Print temporary catchpoints as "Temporary catchpoint". (print_mention_exception): Likewise. gdb/testsuite/ChangeLog: * gdb.ada/catch_ex.exp: Add temporary catchpoint tests.
2011-07-01gdb/testsuite/Jan Kratochvil3-0/+46
Test GCC PR debug/49546. * gdb.cp/temargs.exp (set sixth breakpoint for temargs) (test type of F in k3_m, test value of F in k3_m): New. * gdb.cp/temargs.cc (struct S3, struct K3): New. (main): New variable k3. Call k3.k3_m.
2011-07-01 * jv-lang.c (java_language_defn): Use java_printchar,Tom Tromey2-30/+65
java_printstr. (java_get_encoding): New function. (java_emit_char): Use generic_emit_char. (java_printchar): New function. (java_printstr): Likewise.
2011-07-01crash when printing type of tagged typeJoel Brobecker2-2/+16
If the debugging info is incorrect or incomplete, printing the type description of a variable that's a variant tagged type can trigger a crash. The crash comes from us trying print a NULL string which was supposed to be the parent type name. We observed this behavior on bareboard targets where a-tags is not always linked in, as is the case for native platforms, for instance. Coupled with -feliminate-unused-debug-types, this leads to GDB being unable to find type ada__tags__type_specific_data, without which printing the type description above cannot be done acurately. There is an easy workaround for this limitation, which is to compile at least 1 unit with -fno-eliminate-unused-debug-types, but GDB should also be made resilient to this situation. gdb/ChangeLog: * ada-typeprint.c (print_record_type): If unable to decode the name of the parent type, use the encoded name.
2011-07-01Fix printing address of packed arrayJoel Brobecker5-15/+18
When trying to print the address of a non-packed array, GDB correctly prints the type name and address: (gdb) print &var $2 = (access pa.var) 0xbffff1d8 However, it is behaving differently when dealing with a packed array: (gdb) p &var (access array (4 .. 8) of boolean <packed: 1-bit elements>) (4 => false, false, false, true, false) The type description isn't all that bad, but GDB shouldn't be printing the array value! This patch fixes the `print` and `ptype` command on packed and non-packed array. It also fixes a gdb.ada test to match with the new ouput. gdb/ChangeLog (Jean-Charles Delay): * ada-typeprint.c (ada_print_type): Fix both PAD type and pointer to constrained packed array type output. * ada-valprint.c (ada_val_print_1): Fix pointer to constrained packed array output. gdb/testsuite/ChangeLog (Jean-Charles Delay): * gdb.ada/packed_array.exp: Fix expected outout.
2011-07-01Fix ada array bounds displayJoel Brobecker4-41/+45
Array bounds were not correctly displayed when the SHOW parameter of print_type functions is set to -1. This shows up in the following type of situation, where we have a declaration as follow: Anon_Array_Int_Obj : array (1..10) of Integer := (others => 8); In GDB/MI mode, trying to print the type info for our array object yields: (gdb) -var-create ai 0 Anon_Array_Int_Obj (gdb) -var-info-type ai ^done,type="array (...) of integer" The actual bounds are missing. Contrast this with what happens when in GDB/CLI mode: (gdb) ptype Anon_Array_Int_Obj type = array (1 .. 10) of integer This patch fixes array type printing accordingly. And as it turns out, it also improves the output for one of the tests already present, so it shows that it's not just the GDB/MI mode that's affected. gdb/ChangeLog (Jean-Charles Delay): * ada-typeprint.c (print_array_type): removed if condition on show being negative for bounds printing. gdb/testsuite/ChangeLog (Jean-Charles Delay): * gdb.ada/packed_array.exp: fixed expected output.
2011-07-01treat identical enum types as the same typeJoel Brobecker7-0/+242
This is to avoid an unnecessary multiple-choice menu for an expression involving an enumeral declared in two types, when the second type is an identical copy of the first type. This happens in the following situation: type Color is (Black, Red, Green, Blue, White); type RGB_Color is new Color range Red .. Blue; In that case, an implict type is created, and is used as the base type for type RGB_Color. This base type is a copy of type Color. We've added some extensive comments explaining the situation and our approach further. gdb/ChangeLog: * ada-lang.c (ada_identical_enum_types_p): New function. (symbols_are_identical_enums): New function. (remove_extra_symbols): Do nothing if NSYMS < 2. Use symbols_are_identical_enums. gdb/testsuite/ChangeLog: * gdb.ada/same_enum: New testcase.
2011-07-01missing type description for typedef to pointer valueJoel Brobecker7-1/+114
If we evaluate an expression that results in a value that is a typedef to pointer, then the debugger fails to print the type description before printing the actual value: (gdb) print e.plan(1) $1 = 0x0 The expected output is: (gdb) print e.plan(1) $1 = (access integer) 0x0 gdb/ChangeLog: * ada-valprint.c (ada_value_print): Handle typedefs. gdb/testsuite/ChangeLog: * gdb.ada/ptr_typedef: New testcase.
2011-07-01Add missing word in comment (ada-lang.c)Joel Brobecker2-2/+6
gdb/ChangeLog: * ada-lang.c (ada_evaluate_subexp): Add missing word in comment.
2011-07-01variables whose type is a typedef to an array pointerJoel Brobecker4-7/+20
If we declare a type as being an access to array type, and then declare a variable of that type, for instance: type Some_Array is array [...]; type Array_Access is access all Some_Array; Table : Array_Access := [...]; The variable "Table" may be defined in the debugging information as being a typedef to the array pointer type. In the past, it was defined directly as the array pointer type, but this has been changed to make sure that the typedef type gets used. If the typedef type wasn't used, it would allow the compiler to stop emitting that typedef type when compiling with -feliminate-unused-debug-types. The removal of this typedef would be a problem, because GDB relies on the typedef to create symbols for pointer types, and without it, we would no longer be able to do "ptype array_access". This patch helps prevent incorrect output or even crashes when that extra typedef layer is used. The testing is already mostly covered by arrayptr.exp, but I still added a 'ptype' test, just for good measure. gdb/ChangeLog: (Eric Botcazou) * ada-lang.c (thin_descriptor_type): Deal with typedefs. (decode_constrained_packed_array): Likewise. (ada_evaluate_subexp) <TERNOP_SLICE>: Likewise. gdb/testsuite/ChangeLog (Joel Brobecker): * gdb.ada/arrayptr.exp: Add ptype test.
2011-07-01Fix date in testsuite/ChangeLog entry.Joel Brobecker1-1/+1
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-01[libiberty/filename_cmp] Darwin has case-insensitive filesystemsJoel Brobecker4-6/+41
include/ChangeLog: * filenames.h (HAVE_CASE_INSENSITIVE_FILE_SYSTEM): Define on Darwin, as well as on the systems that use a DOS-like filesystem. libiberty/ChangeLog: * filename_cmp.c (filename_cmp, filename_ncmp): Add handling of HAVE_CASE_INSENSITIVE_FILE_SYSTEM.
2011-07-01merge from gccJan Kratochvil3-3/+84
libiberty/ PR debug/49408 * cp-demangle.c (d_print_comp): Suppress argument list for function references by the '&' unary operator. Keep also already processed variant without the argument list. Suppress argument list types for function call used in an expression. * testsuite/demangle-expected: Fix excessive argument list types in `test for typed function in decltype'. New testcase for no argument list types printed. 3 new testcases for function references by the '&' unary operator..
2011-07-012011-07-01 Eric B. Weddington <eric.weddington@atmel.com>Eric B. Weddington2-2/+6
* avr.h (AVR_ISA_AVR6): Remove AVR_ISA_SPMX as it was actually a duplicate of AVR_ISA_SPM.
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-01 PR binutils/12329Nick Clifton5-2/+16
* avr-dis.c (avr_operand): Fix disassembly of ELPM, LPM and SPM insns using post-increment addressing. * avr.h (AVR_ISA_AVR6): Fix typo, adding AVR_ISA_SPMX.
2011-07-01 PR binutils/12325Nick Clifton2-2/+20
* doc/binutils.texi (ar cmdline): Document --target, --version and --help command line options.
2011-07-01 PR sim/12737Nick Clifton5-4/+8
* sim/arm/iwmmxt/wcmpgt.cgs: Remove expectation of failure. * sim/arm/iwmmxt/wmac.cgs: Remove expectation of failure. * sim/arm/iwmmxt/wsra.cgs: Remove expectation of failure. * sim/arm/xscale/blx.cgs: Remove expectation of failure.
2011-07-01 PR sim/12737Nick Clifton2-8/+19
* iwmmxt.c (WCMPGT): Sign extend 32-bit values before performing a signed compare. (WMAC): Extend computed result before adding to result register. (WRSA): Sign extend 32-bit values before shifting.
2011-07-01 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look atAlan Modra3-76/+56
dyn relocs when called to copy flags for a weak sym. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. (ppc64_elf_merge_private_bfd_data): Delete. (bfd_elf64_bfd_merge_private_bfd_data): Define as _bfd_generic_verify_endian_match.
2011-07-01Update rorxS.H.J. Lu2-1/+5
2011-06-30 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (vex_len_table): Update rorxS.
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-07-01daily updateAlan Modra1-1/+1
2011-06-30 * binutils-all/objcopy.exp (strip_test, strip_executable):Bernd Schmidt2-1/+70
On ELF targets, test that OS/ABI is preserved. (copy_setup): Do test on tic6x-*-uclinux.
2011-06-30 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it ifBernd Schmidt2-1/+6
link_info is NULL.
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-30Fix rorx in BMI2.H.J. Lu11-82/+98
gas/testsuite/ 2011-06-30 H.J. Lu <hongjiu.lu@intel.com> AVX Programming Reference (June, 2011) * gas/i386/bmi2.s: Correct rorx tests. * gas/i386/x86-64-bmi2.s: Likewise. * gas/i386/bmi2-intel.d: Updated. * gas/i386/bmi2.d: Likewise. * gas/i386/x86-64-bmi2-intel.d: Likewise. * gas/i386/x86-64-bmi2.d: Likewise. opcodes/ 2011-06-30 H.J. Lu <hongjiu.lu@intel.com> AVX Programming Reference (June, 2011) * i386-dis.c (vex_len_table): Correct rorxS. * i386-opc.tbl: Correct rorx. * i386-tbl.h: Regenerated.
2011-06-30 PR binutils/12558Nick Clifton2-5/+17
* ar.c (main): When asked to move members in an archive that is being created, ignore the move request.
2011-06-30 * gas/arm/addthumb2err.s: New test file.Nick Clifton6-0/+74
* gas/arm/addthumb2err.d: Test control file. * gas/arm/addthumb2err.l: Expected error messages. * config/tc-arm.c (do_t_add_sub): Only allow LSL shifts of less than 4 in Thumb mode.
2011-06-30 PR gas/12931Nick Clifton4-1/+11
* gas/arm/blx-bad.d: Add exrta nop at end of disassembly. * gas/arm/inst-po-be.d: Add exrta nop at end of disassembly. * gas/arm/inst-po.d: Add exrta nop at end of disassembly.
2011-06-30 PR 12848Nick Clifton4-0/+34
* gas/arm/thumb-b-bad.s: New test. * gas/arm/thumb-b-bad.d: Test control file. * gas/arm/thumb-b-bad.l: Expected error output.
2011-06-30 PR gas/12848Nick Clifton2-28/+23
* config/tc-arm.c (BAD_RANGE): New error message define. (md_apply_fix): Use it. Fix range check for thumb branch instructions.
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 PR gold/12629Ian Lance Taylor3-38/+113
* object.cc (Sized_relobj_file::layout_section): Change shdr parameter to be const. (Sized_relobj_file::layout_eh_frame_section): New function, broken out of do_layout. (Sized_relobj_file::do_layout): Defer .eh_frame sections if appropriate. Call layout_eh_frame_section. (Sized_relobj_file::do_layout_deferred_sections): Handle .eh_frame sections. * object.h (class Sized_relobj_file): Update declarations.
2011-06-30*** empty log message ***gdbadmin1-1/+1
2011-06-30daily updateAlan Modra1-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 * script.cc (Token::integer_value): Accept trailing M/m/K/kIan Lance Taylor2-11/+40
modifier. (Lex::gather_token): Accept trailing M/m/K/k for integers.
2011-06-29 * script.cc (Token::integer_value): Accept trailing M/m/K/kIan Lance Taylor1-0/+6
modifier. (Lex::gather_token): Accept trailing M/m/K/k for integers.
2011-06-29 PR gold/12675Ian Lance Taylor3-2/+12
* object.cc (Sized_relobj_file::check_eh_frame_flags): Check for SHT_X86_64_UNWIND. * layout.cc (Layout::layout_eh_frame): Likewise.