(gdb) file /wd1/gdb/20140930/build-v7le/gdb/testsuite/gdb.base/store Reading symbols from /wd1/gdb/20140930/build-v7le/gdb/testsuite/gdb.base/store...done. (gdb) tbreak wack_double Temporary breakpoint 1 at 0x1076c: file ../../../binutils-gdb/gdb/testsuite/gdb.base/store.c, line 117. (gdb) run Starting program: /wd1/gdb/20140930/build-v7le/gdb/testsuite/gdb.base/store Temporary breakpoint 1, wack_double (u= ../../binutils-gdb/gdb/regcache.c:177: internal-error: register_size: Assertion `regnum >= 0 && regnum < (gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch))' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. BE Dump ======= <1><779>: Abbrev Number: 12 (DW_TAG_subprogram) <77a> DW_AT_external : 1 <77a> DW_AT_name : (indirect string, offset: 0x3c9): wack_double <77e> DW_AT_decl_file : 1 <77f> DW_AT_decl_line : 115 <780> DW_AT_prototyped : 1 <780> DW_AT_type : <0x57c> <784> DW_AT_low_pc : 0x10758 <788> DW_AT_high_pc : 0x40 <78c> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <78e> DW_AT_GNU_all_tail_call_sites: 1 <78e> DW_AT_sibling : <0x7d7> <2><792>: Abbrev Number: 10 (DW_TAG_formal_parameter) <793> DW_AT_name : u <795> DW_AT_decl_file : 1 <796> DW_AT_decl_line : 115 <797> DW_AT_type : <0x57c> <79b> DW_AT_location : 6 byte block: 6d 93 4 6c 93 4 (DW_OP_reg29 (r29); DW_OP_piece: 4; DW_OP_reg28 (r28); DW_OP_piece: 4) <2><7a2>: Abbrev Number: 10 (DW_TAG_formal_parameter) <7a3> DW_AT_name : v <7a5> DW_AT_decl_file : 1 <7a6> DW_AT_decl_line : 115 <7a7> DW_AT_type : <0x57c> <7ab> DW_AT_location : 6 byte block: 6f 93 4 6e 93 4 (DW_OP_reg31 (r31); DW_OP_piece: 4; DW_OP_reg30 (r30); DW_OP_piece: 4) <2><7b2>: Abbrev Number: 13 (DW_TAG_variable) <7b3> DW_AT_name : l <7b5> DW_AT_decl_file : 1 <7b6> DW_AT_decl_line : 117 <7b7> DW_AT_type : <0x57c> <7bb> DW_AT_location : 8 byte block: 90 21 93 4 90 20 93 4 (DW_OP_regx: 33 (r33); DW_OP_piece: 4; DW_OP_regx: 32 (r32); DW_OP_piece: 4) <2><7c4>: Abbrev Number: 13 (DW_TAG_variable) <7c5> DW_AT_name : r <7c7> DW_AT_decl_file : 1 <7c8> DW_AT_decl_line : 117 <7c9> DW_AT_type : <0x57c> <7cd> DW_AT_location : 8 byte block: 90 23 93 4 90 22 93 4 (DW_OP_regx: 35 (r35); DW_OP_piece: 4; DW_OP_regx: 34 (r34); DW_OP_piece: 4) LE Dump ======= <1><777>: Abbrev Number: 12 (DW_TAG_subprogram) <778> DW_AT_external : 1 <778> DW_AT_name : (indirect string, offset: 0x3c9): wack_double <77c> DW_AT_decl_file : 1 <77d> DW_AT_decl_line : 115 <77e> DW_AT_prototyped : 1 <77e> DW_AT_type : <0x57a> <782> DW_AT_low_pc : 0x10758 <786> DW_AT_high_pc : 0x40 <78a> DW_AT_frame_base : 1 byte block: 9c (DW_OP_call_frame_cfa) <78c> DW_AT_GNU_all_tail_call_sites: 1 <78c> DW_AT_sibling : <0x7d5> <2><790>: Abbrev Number: 10 (DW_TAG_formal_parameter) <791> DW_AT_name : u <793> DW_AT_decl_file : 1 <794> DW_AT_decl_line : 115 <795> DW_AT_type : <0x57a> <799> DW_AT_location : 6 byte block: 6c 93 4 6d 93 4 (DW_OP_reg28 (r28); DW_OP_piece: 4; DW_OP_reg29 (r29); DW_OP_piece: 4) <2><7a0>: Abbrev Number: 10 (DW_TAG_formal_parameter) <7a1> DW_AT_name : v <7a3> DW_AT_decl_file : 1 <7a4> DW_AT_decl_line : 115 <7a5> DW_AT_type : <0x57a> <7a9> DW_AT_location : 6 byte block: 6e 93 4 6f 93 4 (DW_OP_reg30 (r30); DW_OP_piece: 4; DW_OP_reg31 (r31); DW_OP_piece: 4) <2><7b0>: Abbrev Number: 13 (DW_TAG_variable) <7b1> DW_AT_name : l <7b3> DW_AT_decl_file : 1 <7b4> DW_AT_decl_line : 117 <7b5> DW_AT_type : <0x57a> <7b9> DW_AT_location : 8 byte block: 90 20 93 4 90 21 93 4 (DW_OP_regx: 32 (r32); DW_OP_piece: 4; DW_OP_regx: 33 (r33); DW_OP_piece: 4) <2><7c2>: Abbrev Number: 13 (DW_TAG_variable) <7c3> DW_AT_name : r <7c5> DW_AT_decl_file : 1 <7c6> DW_AT_decl_line : 117 <7c7> DW_AT_type : <0x57a> <7cb> DW_AT_location : 8 byte block: 90 22 93 4 90 23 93 4 (DW_OP_regx: 34 (r34); DW_OP_piece: 4; DW_OP_regx: 35 (r35); DW_OP_piece: 4) Backtrace when it failed to get reg number ========================================== (gdb) n 4207 if (reg >= 256 && reg <= 287) (gdb) n 4216 return -1; (gdb) bt #0 arm_dwarf_reg_to_regnum (gdbarch=0x24043a0, reg=29) at ../../binutils-gdb/gdb/arm-tdep.c:4216 #1 0x0020d430 in read_pieced_value (v=0x6c08) at ../../binutils-gdb/gdb/dwarf2loc.c:1686 #2 0x00144d7c in value_fetch_lazy (val=0x2635e08) at ../../binutils-gdb/gdb/value.c:3895 #3 0x001453b0 in value_entirely_covered_by_range_vector (value=0x2635e08, ranges=0x2635e5c) at ../../binutils-gdb/gdb/value.c:392 #4 0x00156834 in value_check_printable (val=val@entry=0x2635e08, stream=stream@entry=0x24280c8, options=0xbee8e3ec) at ../../binutils-gdb/gdb/valprint.c:810 #5 0x00156bbc in common_val_print (val=0x2635e08, stream=0x24280c8, stream@entry=0x4f505f72, recurse=recurse@entry=2, options=0xbee8e3ec, options@entry=0xbee8e3e4, language=language@entry=0x3b979c ) at ../../binutils-gdb/gdb/valprint.c:849 #6 0x00189cbc in print_frame_arg (arg=0x2044575f) at ../../binutils-gdb/gdb/stack.c:286 #7 0x0018aa04 in print_frame_args (func=, frame=0x0, frame@entry=0x22f74a8, num=36664488, num@entry=-1, stream=0xffffffff) at ../../binutils-gdb/gdb/stack.c:674 #8 0x0018b3f0 in print_frame (frame=frame@entry=0x22f74a8, print_level=print_level@entry=4331400, print_what=print_what@entry=SRC_AND_LOC, print_args=print_args@entry=1, sal=...) at ../../binutils-gdb/gdb/stack.c:1205 #9 0x0018b8bc in print_frame_info (frame=0x22f74a8, frame@entry=0x1, print_level=print_level@entry=4331400, print_what=SRC_AND_LOC, print_what@entry=36664488, print_args=print_args@entry=1, set_current_sal=set_current_sal@entry=1) at ../../binutils-gdb/gdb/stack.c:857 #10 0x0018baac in print_stack_frame (frame=0x1, print_level=4331400, print_level@entry=0, print_what=36664488, print_what@entry=SRC_AND_LOC, set_current_sal=0, set_current_sal@entry=1) at ../../binutils-gdb/gdb/stack.c:166 #11 0x0017ffe8 in print_stop_event (ws=ws@entry=0xbee8e6b8) at ../../binutils-gdb/gdb/infrun.c:6280 #12 0x001804c8 in normal_stop () at ../../binutils-gdb/gdb/infrun.c:6426 #13 0x00186304 in fetch_inferior_event (client_data=client_data@entry=0x0) at ../../binutils-gdb/gdb/infrun.c:3149 #14 0x0019bc08 in inferior_event_handler (event_type=INF_REG_EVENT, client_data=0x0) at ../../binutils-gdb/gdb/inf-loop.c:58 #15 0x00199dfc in process_event () at ../../binutils-gdb/gdb/event-loop.c:340 #16 0x0019a204 in gdb_do_one_event () at ../../binutils-gdb/gdb/event-loop.c:392 #17 0x0019a400 in start_event_loop () at ../../binutils-gdb/gdb/event-loop.c:429 #18 0x00193ed4 in captured_command_loop (data=) at ../../binutils-gdb/gdb/main.c:323 #19 0x00190ea4 in catch_errors (func=0x22b01d8, func@entry=0x193ebc , func_args=0x417fe8 , func_args@entry=0x0, errstring=0x0, errstring@entry=0x387fc8 "", mask=37532008, mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:237 #20 0x00195168 in captured_main (data=) at ../../binutils-gdb/gdb/main.c:1151 #21 0x00190ea4 in catch_errors (func=0xb6f02800, func@entry=0x194404 , func_args=0x0, func_args@entry=0xbee8e914, errstring=0xbee8e91c "", errstring@entry=0x387fc8 "", mask=4299140, mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:237 #22 0x00195658 in gdb_main (args=args@entry=0xbee8e914) at ../../binutils-gdb/gdb/main.c:1159 #23 0x0005f220 in main (argc=, argv=) at ../../binutils-gdb/gdb/gdb.c:32 Latter it hits assert in register_size #0 0xb6a9d354 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0xb6aa0eb4 in __GI_abort () at abort.c:89 #2 0x0025b480 in dump_core () at ../../binutils-gdb/gdb/utils.c:578 #3 0x0025d448 in internal_vproblem (problem=0xb6bac0ac , problem@entry=0x419a78 , file=file@entry=0x37358c "../../binutils-gdb/gdb/regcache.c", line=line@entry=177, fmt=fmt@entry=0x0, ap=...) at ../../binutils-gdb/gdb/utils.c:786 #4 0x0025d518 in internal_verror (file=file@entry=0x37358c "../../binutils-gdb/gdb/regcache.c", line=line@entry=177, fmt=fmt@entry=0x0, ap=..., ap@entry=...) at ../../binutils-gdb/gdb/utils.c:812 #5 0x0028f150 in internal_error (file=file@entry=0x37358c "../../binutils-gdb/gdb/regcache.c", line=line@entry=177, fmt=0x331904 "%s: Assertion `%s' failed.") at ../../binutils-gdb/gdb/common/errors.c:55 #6 0x00137558 in register_size (gdbarch=gdbarch@entry=0x24043a0, regnum=-1, regnum@entry=37804872) at ../../binutils-gdb/gdb/regcache.c:175 #7 0x0020d590 in read_pieced_value (v=0x6c08) at ../../binutils-gdb/gdb/dwarf2loc.c:1690 #8 0x00144d7c in value_fetch_lazy (val=0x2635e08) at ../../binutils-gdb/gdb/value.c:3895 #9 0x001453b0 in value_entirely_covered_by_range_vector (value=0x2635e08, ranges=0x2635e5c) at ../../binutils-gdb/gdb/value.c:392 #10 0x00156834 in value_check_printable (val=val@entry=0x2635e08, stream=stream@entry=0x24280c8, options=0xbee8e3ec) at ../../binutils-gdb/gdb/valprint.c:810 #11 0x00156bbc in common_val_print (val=0x2635e08, stream=0x24280c8, stream@entry=0x4f505f72, recurse=recurse@entry=2, options=0xbee8e3ec, options@entry=0xbee8e3e4, language=language@entry=0x3b979c ) at ../../binutils-gdb/gdb/valprint.c:849 #12 0x00189cbc in print_frame_arg (arg=0x2044575f) at ../../binutils-gdb/gdb/stack.c:286 #13 0x0018aa04 in print_frame_args (func=, frame=0x0, frame@entry=0x22f74a8, num=36664488, num@entry=-1, stream=0xffffffff) at ../../binutils-gdb/gdb/stack.c:674 #14 0x0018b3f0 in print_frame (frame=frame@entry=0x22f74a8, print_level=print_level@entry=4331400, print_what=print_what@entry=SRC_AND_LOC, print_args=print_args@entry=1, sal=...) at ../../binutils-gdb/gdb/stack.c:1205 #15 0x0018b8bc in print_frame_info (frame=0x22f74a8, frame@entry=0x1, print_level=print_level@entry=4331400, print_what=SRC_AND_LOC, print_what@entry=36664488, print_args=print_args@entry=1, set_current_sal=set_current_sal@entry=1) at ../../binutils-gdb/gdb/stack.c:857 #16 0x0018baac in print_stack_frame (frame=0x1, print_level=4331400, print_level@entry=0, print_what=36664488, print_what@entry=SRC_AND_LOC, set_current_sal=0, set_current_sal@entry=1) at ../../binutils-gdb/gdb/stack.c:166 #17 0x0017ffe8 in print_stop_event (ws=ws@entry=0xbee8e6b8) at ../../binutils-gdb/gdb/infrun.c:6280 #18 0x001804c8 in normal_stop () at ../../binutils-gdb/gdb/infrun.c:6426 #19 0x00186304 in fetch_inferior_event (client_data=client_data@entry=0x0) at ../../binutils-gdb/gdb/infrun.c:3149 #20 0x0019bc08 in inferior_event_handler (event_type=INF_REG_EVENT, client_data=0x0) at ../../binutils-gdb/gdb/inf-loop.c:58 #21 0x00199dfc in process_event () at ../../binutils-gdb/gdb/event-loop.c:340 #22 0x0019a204 in gdb_do_one_event () at ../../binutils-gdb/gdb/event-loop.c:392 #23 0x0019a400 in start_event_loop () at ../../binutils-gdb/gdb/event-loop.c:429 #24 0x00193ed4 in captured_command_loop (data=) at ../../binutils-gdb/gdb/main.c:323 #25 0x00190ea4 in catch_errors (func=0x22b01d8, func@entry=0x193ebc , func_args=0x417fe8 , func_args@entry=0x0, errstring=0x0, errstring@entry=0x387fc8 "", mask=37532008, mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:237 #26 0x00195168 in captured_main (data=) at ../../binutils-gdb/gdb/main.c:1151 #27 0x00190ea4 in catch_errors (func=0xb6f02800, func@entry=0x194404 , func_args=0x0, func_args@entry=0xbee8e914, errstring=0xbee8e91c "", errstring@entry=0x387fc8 "", mask=4299140, mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:237 LE code receives gdb_regnum = -1 as well but LE code does not hit this because it does not have the following snippet in read_pieced_value if (gdbarch_byte_order (arch) == BFD_ENDIAN_BIG && this_size < register_size (arch, gdb_regnum)) { /* Big-endian, and we want less than full size. */ reg_offset = register_size (arch, gdb_regnum) - this_size; /* We want the lower-order THIS_SIZE_BITS of the bytes we extract from the register. */ source_offset_bits += 8 * this_size - this_size_bits; } and it proceeds with error: (gdb) n 1699 if (gdb_regnum != -1) (gdb) n 1718 error (_("Unable to access DWARF register number %s"), (gdb) bt #0 read_pieced_value (v=0xb6c967c0 ) at ../../binutils-gdb/gdb/dwarf2loc.c:1718 #1 0x00144a50 in value_fetch_lazy (val=0x2625020) at ../../binutils-gdb/gdb/value.c:3895 #2 0x00145084 in value_entirely_covered_by_range_vector (value=0x2625020, ranges=0x2625074) at ../../binutils-gdb/gdb/value.c:392 #3 0x00156580 in value_check_printable (val=val@entry=0x2625020, stream=stream@entry=0x2439da8, options=0xbebb85cc) at ../../binutils-gdb/gdb/valprint.c:810 #4 0x00156908 in common_val_print (val=0x2625020, stream=0x2439da8, stream@entry=0x725f504f, recurse=recurse@entry=2, options=0xbebb85cc, options@entry=0xbebb85c4, language=language@entry=0x3b8f60 ) at ../../binutils-gdb/gdb/valprint.c:849 #5 0x001899c8 in print_frame_arg (arg=0x5f574420) at ../../binutils-gdb/gdb/stack.c:286 #6 0x0018a710 in print_frame_args (func=, frame=0x0, frame@entry=0x2260438, num=36045880, num@entry=-1, stream=0xffffffff) at ../../binutils-gdb/gdb/stack.c:674 #7 0x0018b0fc in print_frame (frame=frame@entry=0x2260438, print_level=print_level@entry=4331144, print_what=print_what@entry=SRC_AND_LOC, print_args=print_args@entry=1, sal=...) at ../../binutils-gdb/gdb/stack.c:1205 #8 0x0018b5c8 in print_frame_info (frame=0x2260438, frame@entry=0x1, print_level=print_level@entry=4331144, print_what=SRC_AND_LOC, print_what@entry=36045880, print_args=print_args@entry=1, set_current_sal=set_current_sal@entry=1) at ../../binutils-gdb/gdb/stack.c:857 #9 0x0018b7b8 in print_stack_frame (frame=0x1, print_level=4331144, print_level@entry=0, print_what=36045880, print_what@entry=SRC_AND_LOC, set_current_sal=0, set_current_sal@entry=1) at ../../binutils-gdb/gdb/stack.c:166 #10 0x0017fd00 in print_stop_event (ws=ws@entry=0xbebb8898) at ../../binutils-gdb/gdb/infrun.c:6280 #11 0x001801e0 in normal_stop () at ../../binutils-gdb/gdb/infrun.c:6426 #12 0x00186010 in fetch_inferior_event (client_data=client_data@entry=0x0) at ../../binutils-gdb/gdb/infrun.c:3149 #13 0x0019b8fc in inferior_event_handler (event_type=INF_REG_EVENT, client_data=0x0) at ../../binutils-gdb/gdb/inf-loop.c:58 #14 0x00199af0 in process_event () at ../../binutils-gdb/gdb/event-loop.c:340 #15 0x00199ef8 in gdb_do_one_event () at ../../binutils-gdb/gdb/event-loop.c:392 #16 0x0019a0f4 in start_event_loop () at ../../binutils-gdb/gdb/event-loop.c:429 #17 0x00193bcc in captured_command_loop (data=) at ../../binutils-gdb/gdb/main.c:323 #18 0x00190bac in catch_errors (func=0x22191d8, func@entry=0x193bb4 , func_args=0x417ee8 , func_args@entry=0x0, errstring=0x0, errstring@entry=0x3877e0 "", mask=37746520, mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:237 #19 0x00194e60 in captured_main (data=) at ../../binutils-gdb/gdb/main.c:1151 #20 0x00190bac in catch_errors (func=0xb6fec2a0, func@entry=0x1940fc , func_args=0x0, func_args@entry=0xbebb8af4, errstring=0xbebb8afc "\005", errstring@entry=0x3877e0 "", mask=4298884, mask@entry=RETURN_MASK_ALL) at ../../binutils-gdb/gdb/exceptions.c:237 #21 0x00195350 in gdb_main (args=args@entry=0xbebb8af4) at ../../binutils-gdb/gdb/main.c:1159 #22 0x0005f218 in main (argc=, argv=) at ../../binutils-gdb/gdb/gdb.c:32