Date: Thu, 15 Jan 1998 23:40:18 +1100 From: Bruce Evans <bde@zeta.org.au> To: current@FreeBSD.ORG, luoqi@watermarkgroup.com Subject: Re: gdb addressing off by 0x20 Message-ID: <199801151240.XAA25568@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
[This may have been lost when hub.freebsd.org was down.] >> >Has anyone else noticed this? When I debug a program with gdb, I have to >> >specify x+0x20 if I want to get data at address x. For example, >> ^^^^ text >> >> Oops. Try this fix. >Thanks, it works. But there seems to be some problem on dependency generation. >The first time, I did a simple make, only one file was recompiled and the >problem didn't go away. Only after I have done a make clean, then followed by >make, it worked correctly. Here only one file was recompiled and the problem did go away :-). Dependencies on libraries (libbfd.a in this case) aren't generated right if the library is described by `-Lfoo -lbar' and doesn't already exist. `ld -f' can't find the library, and it does nothing because emitting a wrong library name breaks the dependencies even more. DPADD gives the dependencies in cases where it is set properly (including for gdb), but isn't used since automatic generation of library dependencies is supposed to work. This problem is made worse by bsd.dep.mk's smartness about not rebuilding .depend. foo/bar.a instead of -Lfoo -lbar works right. -lbar is only better for libraries that might be shared. The makefiles have to know all about where nonstandard libraries are to issue -Lfoo's. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801151240.XAA25568>
