This is the mail archive of the gdb@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]

Re: How to tell gdb about dlls using remote protocol


> >       else if (cache->pc == 0 && frame_pc_unwind (next_frame) != 0)
> > 
> > What do you think of that?
> 
> Can we actually check for a failure to find the start address?  Using
> pc == 0 is unfortunate - we keep encountering people who link code at
> zero.

The problem is in the way we designed frame_func_unwind: It returns
zero if we couldn't find the function start, which cannot be
differentiated from the case where the function actually starts at
address zero (which I didn't think I would ever encounter).

I think in the long term, we might want to adjust frame_func_unwind
to return a be something like:

   int frame_func_unwind (struct frame_info *fi, CORE_ADDR *addr)

The return value would be non-zero only if the function could be
found.

In the short-term, Mark's proposal seems a good way to make progress
for little cost.

> Oh, I guess there's no way; we already use the pc != 0 check in the
> same function.

Yep, same issue.

-- 
Joel


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