This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/19288] need a way to see if an address is covered by some existing object
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 14 Apr 2016 18:22:45 +0000
- Subject: [Bug python/19288] need a way to see if an address is covered by some existing object
- Auto-submitted: auto-generated
- References: <bug-19288-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19288
--- Comment #15 from Pedro Alves <palves at redhat dot com> ---
> One is, suppose there is an objfile without debuginfo. In this case,
> it seems that the frame will be presented to my Python unwinder.
Yes.
> However, I already know my unwinder can't deal with this. So I would still
> appreciate some way of finding out whether a given PC is in some objfile.
> Simply moving the Python unwinder lower won't work because the prologue
> unwinder might "make sense" of a JIT frame, even though it really can't.
But wouldn't it be more robust to check whether it's an address you know you
can unwind (by consulting whatever tables the JIT uses internally), instead of
checking whether the program stopped at an address you can't unwind?
E.g., the PC may jump out to some other mmaped code (or some wild address) that
falls out of any objfile, that is unrelated to your JIT's code (maybe another
unrelated JIT is loaded in the process). So I'm thinking that that would be an
optimization, rather than a requirement. Is that a correct view? Just trying
to understand things, not pushing back on the idea.
> The other scenario is speculative: if someone wrote a caching JIT that
> wrote out object code and dlopened it in a later invocation. But I think
> the above ordering suffices for that.
Yeah, I'd assume that if you wanted those objects to be unwound with the python
unwinder, it'd because you're not going to include dwarf info in them.
--
You are receiving this mail because:
You are on the CC list for the bug.