aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-24DWARF-5 Fix DW_FORM_implicit_constJan Kratochvil2-1/+18
-gdwarf-4: ptype logical type = const char [2] (gdb) PASS: gdb.base/constvars.exp: ptype logical -gdwarf-5: ptype logical type = const char [] (gdb) FAIL: gdb.base/constvars.exp: ptype logical <2><2fc>: Abbrev Number: 1 (DW_TAG_variable) <2fd> DW_AT_name : (indirect string, offset: 0x2eb): logical <301> DW_AT_decl_file : 1 1 DW_TAG_variable [no children] DW_AT_name DW_FORM_strp DW_AT_decl_file DW_FORM_implicit_const: 1 During symbol reading, invalid attribute class or form for 'DW_FORM_implicit_const' in '(null)'. gdb/ChangeLog 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com> PR symtab/22003 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow) (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes) (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2017-08-24DWARF-5: Fix -fdebug-types-sectionJan Kratochvil2-17/+48
GDB was now accessing as signatured_type memory allocated only by size of dwarf2_per_cu_data. gdb/ChangeLog 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf2read.c (build_type_psymtabs_reader): New prototype. (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES. (read_comp_units_from_section): New parameter abbrev_section, use read_and_check_comp_unit_head, allocate signatured_type if needed. (create_all_comp_units): Update read_comp_units_from_section caller.
2017-08-24Automatic date update in version.inGDB Administrator1-1/+1
2017-08-23Automatic date update in version.inGDB Administrator1-1/+1
2017-08-21Automatic date update in version.inGDB Administrator1-1/+1
2017-08-20Automatic date update in version.inGDB Administrator1-1/+1
2017-08-19Automatic date update in version.inGDB Administrator1-1/+1
2017-08-18Automatic date update in version.inGDB Administrator1-1/+1
2017-08-17Automatic date update in version.inGDB Administrator1-1/+1
2017-08-16Automatic date update in version.inGDB Administrator1-1/+1
2017-08-14Automatic date update in version.inGDB Administrator1-1/+1
2017-08-13Automatic date update in version.inGDB Administrator1-1/+1
2017-08-12Automatic date update in version.inGDB Administrator1-1/+1
2017-08-11PR breakpoints/21886: mem-break: Fix breakpoint insertion locationMaciej W. Rozycki2-1/+8
Fix a commit cd6c3b4ffc4e ("New gdbarch methods breakpoint_kind_from_pc and sw_breakpoint_from_kind") regression and restore the use of `->placed_address' rather than `->reqstd_address' as the location for a memory breakpoint to be inserted at. Previously `gdbarch_breakpoint_from_pc' was used that made that adjustment in `default_memory_insert_breakpoint' from the preinitialized value, however with the said commit that call is gone, so the passed `->placed_address' has to be used for the initialization. The regression manifests itself as the inability to debug any MIPS/Linux compressed ISA dynamic executable as GDB corrupts the dynamic loader with one of its implicit breakpoints, causing the program to crash, as seen for example with the `mips-linux-gnu' target, o32 ABI, MIPS16 code, and the gdb.base/advance.exp test case: (gdb) continue Continuing. Program received signal SIGBUS, Bus error. _dl_debug_initialize (ldbase=0, ns=0) at dl-debug.c:51 51 r = &_r_debug; (gdb) FAIL: gdb.base/advance.exp: Can't run to main gdb/ PR breakpoints/21886 * mem-break.c (default_memory_insert_breakpoint): Use `->placed_address' rather than `->reqstd_address' for the breakpoint location. (cherry picked from commit ba7b109b296feac8cf8cab74db5f824dfa631610)
2017-08-11Automatic date update in version.inGDB Administrator1-1/+1
2017-08-10Automatic date update in version.inGDB Administrator1-1/+1
2017-08-09Add missing ChangeLog entryYao Qi2-0/+16
The changelog entry for cd33a03d183a268b83ccbcae07f3788308e8d9f4 is missing. This patch adds it.
2017-08-09Automatic date update in version.inGDB Administrator1-1/+1
2017-08-08Automatic date update in version.inGDB Administrator1-1/+1
2017-08-07Automatic date update in version.inGDB Administrator1-1/+1
2017-08-06Automatic date update in version.inGDB Administrator1-1/+1
2017-08-05Automatic date update in version.inGDB Administrator1-1/+1
2017-08-04Automatic date update in version.inGDB Administrator1-1/+1
2017-08-03Automatic date update in version.inGDB Administrator1-1/+1
2017-08-02Automatic date update in version.inGDB Administrator1-1/+1
2017-08-01Automatic date update in version.inGDB Administrator1-1/+1
2017-07-31Automatic date update in version.inGDB Administrator1-1/+1
2017-07-30Automatic date update in version.inGDB Administrator1-1/+1
2017-07-29Automatic date update in version.inGDB Administrator1-1/+1
2017-07-28Automatic date update in version.inGDB Administrator1-1/+1
2017-07-27Automatic date update in version.inGDB Administrator1-1/+1
2017-07-26Automatic date update in version.inGDB Administrator1-1/+1
2017-07-25Catch exceptions thrown from gdbarch_skip_prologueYao Qi5-108/+154
PR 21555 is caused by the exception during the prologue analysis when re-set a breakpoint. (gdb) bt #0 memory_error_message (err=TARGET_XFER_E_IO, gdbarch=0x153db50, memaddr=93824992233232) at ../../binutils-gdb/gdb/corefile.c:192 #1 0x00000000005718ed in memory_error (err=TARGET_XFER_E_IO, memaddr=memaddr@entry=93824992233232) at ../../binutils-gdb/gdb/corefile.c:220 #2 0x00000000005719d6 in read_memory_object (object=object@entry=TARGET_OBJECT_CODE_MEMORY, memaddr=93824992233232, memaddr@entry=1, myaddr=myaddr@entry=0x7fffffffd0a0 "P\333S\001", len=len@entry=1) at ../../binutils-gdb/gdb/corefile.c:259 #3 0x0000000000571c6e in read_code (len=1, myaddr=0x7fffffffd0a0 "P\333S\001", memaddr=<optimized out>) at ../../binutils-gdb/gdb/corefile.c:287 #4 read_code_unsigned_integer (memaddr=memaddr@entry=93824992233232, len=len@entry=1, byte_order=byte_order@entry=BFD_ENDIAN_LITTLE) at ../../binutils-gdb/gdb/corefile.c:362 #5 0x000000000041d4a0 in amd64_analyze_prologue (gdbarch=gdbarch@entry=0x153db50, pc=pc@entry=93824992233232, current_pc=current_pc@entry=18446744073709551615, cache=cache@entry=0x7fffffffd1e0) at ../../binutils-gdb/gdb/amd64-tdep.c:2310 #6 0x000000000041e404 in amd64_skip_prologue (gdbarch=0x153db50, start_pc=93824992233232) at ../../binutils-gdb/gdb/amd64-tdep.c:2459 #7 0x000000000067bfb0 in skip_prologue_sal (sal=sal@entry=0x7fffffffd4e0) at ../../binutils-gdb/gdb/symtab.c:3628 #8 0x000000000067c4d8 in find_function_start_sal (sym=sym@entry=0x1549960, funfirstline=1) at ../../binutils-gdb/gdb/symtab.c:3501 #9 0x000000000060999d in symbol_to_sal (result=result@entry=0x7fffffffd5f0, funfirstline=<optimized out>, sym=sym@entry=0x1549960) at ../../binutils-gdb/gdb/linespec.c:3860 .... #16 0x000000000054b733 in location_to_sals (b=b@entry=0x15792d0, location=0x157c230, search_pspace=search_pspace@entry=0x1148120, found=found@entry=0x7fffffffdc64) at ../../binutils-gdb/gdb/breakpoint.c:14211 #17 0x000000000054c1f5 in breakpoint_re_set_default (b=0x15792d0) at ../../binutils-gdb/gdb/breakpoint.c:14301 #18 0x00000000005412a9 in breakpoint_re_set_one (bint=bint@entry=0x15792d0) at ../../binutils-gdb/gdb/breakpoint.c:14412 This problem can be fixed by - either each prologue analyzer doesn't throw exception, - or catch the exception thrown from gdbarch_skip_prologue, I choose the latter because the former needs to fix *every* prologue analyzer to not throw exception. This error can be reproduced by changing reread.exp. The test reread.exp has already test that breakpoint can be reset correctly after the executable is re-read. This patch extends this test by compiling test c file with and without -fPIE. (gdb) run ^M The program being debugged has been started already.^M Start it from the beginning? (y or n) y^M x86_64/gdb/testsuite/outputs/gdb.base/reread/reread' has changed; re-reading symbols. Error in re-setting breakpoint 1: Cannot access memory at address 0x555555554790^M Error in re-setting breakpoint 2: Cannot access memory at address 0x555555554790^M Starting program: /scratch/yao/gdb/build-git/x86_64/gdb/testsuite/outputs/gdb.base/reread/reread ^M This is foo^M [Inferior 1 (process 27720) exited normally]^M (gdb) FAIL: gdb.base/reread.exp: opts= "-fPIE" "ldflags=-pie" : run to foo() second time (the program exited) This patch doesn't re-indent the code, to keep the patch simple. gdb: 2017-07-25 Yao Qi <yao.qi@linaro.org> PR gdb/21555 * arch-utils.c (gdbarch_skip_prologue_noexcept): New function. * arch-utils.h (gdbarch_skip_prologue_noexcept): Declare. * infrun.c: Include arch-utils.h (handle_step_into_function): Call gdbarch_skip_prologue_noexcept. (handle_step_into_function_backward): Likewise. * symtab.c (skip_prologue_sal): Likewise. gdb/testsuite: 2017-07-25 Yao Qi <yao.qi@linaro.org> PR gdb/21555 * gdb.base/reread.exp: Wrap the whole test with two kinds of compilation flags, with -fPIE and without -fPIE.
2017-07-25[ARM] Access FPSCR on vfpv2Yao Qi2-2/+11
GDB can fetch or store FPSCR on vfpv3, which has 32 VFP registers, but fail to do so on vfpv2, which has 16 VFP registers. GDB code is incorrect for vfpv2, else if (tdep->vfp_register_count > 0 && regno >= ARM_D0_REGNUM && regno <= ARM_D0_REGNUM + tdep->vfp_register_count) while FPSCR register number is defined as ARM_D0_REGNUM + 32. ARM_D0_REGNUM, /* VFP double-precision registers. */ ARM_D31_REGNUM = ARM_D0_REGNUM + 31, ARM_FPSCR_REGNUM, The code above uses "<=" rather than "<", in order to put FPSCR in the range, but it is only correct when tdep->vfp_register_count is 32. On vpfv2, it is 16, and FPSCR is out of the range, so fetch_vfp_regs or store_vfp_regs are not called. gdb: 2017-07-25 Yao Qi <yao.qi@linaro.org> PR tdep/21717 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update condition for FPSCR. (arm_linux_store_inferior_registers): Likewise.
2017-07-25Automatic date update in version.inGDB Administrator1-1/+1
2017-07-24Automatic date update in version.inGDB Administrator1-1/+1
2017-07-23Automatic date update in version.inGDB Administrator1-1/+1
2017-07-22Automatic date update in version.inGDB Administrator1-1/+1
2017-07-21Automatic date update in version.inGDB Administrator1-1/+1
2017-07-20Automatic date update in version.inGDB Administrator1-1/+1
2017-07-19Automatic date update in version.inGDB Administrator1-1/+1
2017-07-18Automatic date update in version.inGDB Administrator1-1/+1
2017-07-17Automatic date update in version.inGDB Administrator1-1/+1
2017-07-16Automatic date update in version.inGDB Administrator1-1/+1
2017-07-15Automatic date update in version.inGDB Administrator1-1/+1
2017-07-14Automatic date update in version.inGDB Administrator1-1/+1
2017-07-13Automatic date update in version.inGDB Administrator1-1/+1
2017-07-12Automatic date update in version.inGDB Administrator1-1/+1
2017-07-11Automatic date update in version.inGDB Administrator1-1/+1
2017-07-10Automatic date update in version.inGDB Administrator1-1/+1