This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/17384] android arm gdb "Cannot access memory at address" when I "stepi" over "blx"


https://sourceware.org/bugzilla/show_bug.cgi?id=17384

--- Comment #9 from Pedro Alves <palves at redhat dot com> ---
> Also, I noted that if I put a breakpoint on 
> "blink::RenderFullScreen::createPlaceholder" and then just do "bt" when the 
> breakpoint hits, then it prints the same error after the bt is printed (so 
> this has nothing to do with next/stepi specifically) (...)

Yeah, this is an issue in the unwinder, which next/step use internally to
detect when the program stepped into a function.  "bt" is the most direct way
to trigger the unwinder.

If you have no (dwarf) debug/unwind info available, then GDB's fallback
heuristic unwinders kick in, which, being heuristic can fail to unwind in
presence of clever compiler optimizations that end up generating
frames/prologues that gdb might not grok, etc.  Sometimes we may be able to
improve the heuristics, often times, we won't, and debug info is the only
salvation.

First, IMO, safe_read_memory_integer shouldn't ever print the error.  It's just
too confusing when the unwinder kicks in for any reason other than "bt", and
just throws us chasing red herrings.  I've raised this here now:

  https://sourceware.org/ml/gdb-patches/2014-09/msg00574.html

With that out of the way, this then boils down to just another case of either
getting debug/unwind info for that code, or staring at the disassembly of the
function and seeing whether GDB's fallback heuristic unwinder could be improved
somehow.  (I'm no particular ARM expert, so I'll leave that to someone else).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]