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 python/19288] need a way to see if an address is covered by some existing object


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.

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