Ed, thank you for your reply. It will take me a while to get back to you... as this is a hobby thing and I will get back to it when I get a chance.
Having said that though, I don't have enough experience in FreeBSD to be able to answer all your questions; and I never had to use gdb to debug a linked library before. Let me answer and ask in turns: 1. I downloaded FreeBSD 10.3 and libelf came with the system without me installing anything. I presume then it's in the FreeBSD source tree since I didn't install that one from the ports tree, correct? 2. Where is the upstream version? And how can I compile it to replace the ones that my makefile grabs? (I think I can figure this one out, but a hint will help). 3. How do use gdb to step into such a library? Would just typing "s" take you into the code if everything else is in place? --Sam On Sun, May 15, 2016 at 4:47 PM, Ed Maste <ema...@freebsd.org> wrote: > On 15 May 2016 at 16:43, Sam Habiel <sam.hab...@gmail.com> wrote: >> First time on list, >> >> Failure here: >> https://github.com/shabiel/fis-gtm/blob/freebsd/sr_x86_64/obj_filesp.c#L322 >> >> I added a line after it: >> FPRINTF(stderr, elf_errmsg(elf_errno())); >> >> And this line says: Invalid data buffer descriptor. >> >> Ports tree libelf doesn't have this problem. >> >> root@:~/repos/fis-gtm # uname -a >> FreeBSD 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 >> 02:10:02 UTC 2016 >> r...@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > To confirm, this is the libelf in the FreeBSD source tree, not the > upstream elftoolchain version? If so, can you test the upstream > version? I don't anticipate any differences, but it will be a better > base for experimentation and debugging. > > I see three > LIBELF_SET_ERROR(DATA, 0); > in libelf/elf_update.c. If you can run the application under a > debugger I would set a breakpoint on them and see which case returned > the error, which should give a suggestion on next steps. > > -Ed -- Sam Habiel, Pharm.D. VISTA Expertise Network ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Elftoolchain-developers mailing list Elftoolchain-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers