This is the mail archive of the gdb@sources.redhat.com 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: Is QNX weird or is it just me?


> > I'm thinking that we might be stuck with actually needing to separate
> > ld-qnx.so from libc.so to get it working right but perhaps there are
some
> > clever ideas about.
>
> Separating the dynamic linker out of libc.so seems like the most
> straightforward route to go.  Another idea though: if your dynamic
> linker could set some flag when it's working and reset it when it's
> not, perhaps you could have gdb read the memory associated with the
> flag?  Of course, that'd mean doing a target memory read every time
> qnx_in_dynsym_resolve_code() is called...

Well, I tested the override of qnx_in_dynsym_resolve_code() to just return 0
and it doesn't seem to have any ill effects that I can see.  We don't do
lazy linking and aren't planning to any time in the future.  The
dlopen/dlsym thing didn't seem to have any trouble either so I'm just taking
the easy solution for now and leaving a note to myself to re-examine it if
we ever implement late binding.

The flag idea is not bad but you're right about the inefficiency.
Considering that the IN_DYNSYM_CODE is called for every step, it could slow
things down a fair bit if I had to make an extra call.  I bet if I
encapsulated the flag in one of our packets that needs to go across the wire
every step anyway,  and just check it as it comes in; that would work
though.  Thanks.

cheers,

Kris



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