From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9693 invoked by alias); 22 Sep 2014 13:12:27 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 9649 invoked by uid 48); 22 Sep 2014 13:12:24 -0000 From: "qiyao at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/17384] android arm gdb "Cannot access memory at address" when I "stepi" over "blx" Date: Mon, 22 Sep 2014 13:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: qiyao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00721.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17384 Yao Qi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qiyao at gcc dot gnu.org --- Comment #22 from Yao Qi --- (In reply to Pedro Alves from comment #20) > > (gdb) disassemble /r 0x4e0dcc20,+10 > > Dump of assembler code from 0x4e0dcc20 to 0x4e0dcc2a: > > 0x4e0dcc20: 04 c0 9f e5 ldr r12, [pc, #4] ; 0x4e0dcc2c > > 0x4e0dcc24: 0c c0 8f e0 add r12, pc, r12 > > 0x4e0dcc28: 1c ff 2f e1 bx r12 > > End of assembler dump. > > I wonder whether that's some sort of trampoline the compiler/linker is > generating > and gdb is not grokking. > Yes, it is a trampoline and GDB isn't aware of that. See bfd/elf32-arm.c: static const insn_sequence elf32_arm_stub_long_branch_any_thumb_pic[] = { ARM_INSN (0xe59fc004), /* ldr ip, [pc, #4] */ ARM_INSN (0xe08fc00c), /* add ip, pc, ip */ ARM_INSN (0xe12fff1c), /* bx ip */ DATA_WORD (0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */ }; We need to teach GDB to understand it in both arm_stub_unwind_sniffer and arm_skip_stub. I'll take a look. -- You are receiving this mail because: You are on the CC list for the bug.