Date: Tue, 12 Oct 1999 22:33:57 -0400 From: "Brian J. McGovern" <mcgovern@spoon.beta.com> To: Regina Rosales Hain <rrosales@bbn.com> Cc: questions@freebsd.org Subject: Re: gdb to work on a.out on 3.3 systems Message-ID: <199910130233.WAA20010@spoon.beta.com> In-Reply-To: Your message of "Tue, 12 Oct 1999 15:08:04 EDT." <199910121908.PAA01304@virh.bbn.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > I saw that you had compiled gdb on a 2.2.6 system with -static > and you claimed that worked for you in terms of debugging a.out files. > > I tried that with gdb.4.16 and it doesn't work for me. > > Any help would be appreciated. > > > Thanks, > Regina Hey, Regina. Hows BBN? I did a (very) short stint in the NOC in Cambridge a few years back... Anyhow, about your question... 2.2.6 and 2.2.7 were (what I consider) the transitory releases between a.out and ELF formats. As such, they were originally intended to support both fairly transparently. 2.2.6 had an enviornment variable, OBJFORMAT, that could be set to either aout or elf (actually, I believe you can still do this in 3.x), and this in turn would be used by helper applications to determine the correct underlying binary to run. For instance /usr/bin/gdb would only be a binary that if OBJFORMAT was set elf, it'd run /usr/local/libexec/gdb with all of your parameters. If it was set aout, it'd run /usr/local/libexec/aout/gdb. Note that the above description is merely an example, and I don't still have a 2.2.6 system to validate the paths I'm giving, but, that was the general idea at the time. The 'gotcha' in 2.2.6 was that the 'standard' installation didn't install the a.out binaries in the right place, so you had to build what you wanted with -aout. Well, there was also a problem with the dynamic loader at the time that made it easier to link -static that do screw around with library paths and the like when you wanted to switch from debugging an elf app to an a.out flavor. I just took a quick look around my 3.3 system, and it looks like /usr/lib/aout isn't even populated any more. My guess would be that you'd have to install the 3.0 (or possibly even the 2.x) compatability distributions to get them. With that, you may also get all of the a.out tools. If not, once you have the libraries, you could probably punt, and rebuild gdb with -aout and -static, as I did for 2.2.6. I wish I could offer a more concise "how to", but as my job is writing tools on FreeBSD for doing testing, I tend to stay pretty current with new features, which means I went elf at 3.0, and haven't really had to look back since. If I can provide any additional pointers, please let me know. I'm also going to also send this reply along to the -questions list, so people can comment on how wrong I am, and possibly have a quick answer for you. :) -Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910130233.WAA20010>