From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Warno To: gdb list Subject: Re: 1) SIGTRAP issue :/ 2) libbfd Date: Mon, 25 Jun 2001 10:17:00 -0000 Message-id: <3B377241.2DF369EF@valaran.com> References: <3B376519.60D5AE3F@valaran.com> X-SW-Source: 2001-06/msg00194.html Keith Warno wrote: > > 1) I recently upgraded glibc on one linux box to 2.2.2. I built it from > source tarballs and now, for whatever reason, I cannot debug any > programs with gdb. I wind up with something like the following: > > (gdb) run > Starting program: /home/kw/a.out > > Program received signal SIGTRAP, Trace/breakpoint trap. > Cannot remove breakpoints because program is no longer writable. > It might be running in another process. > Further execution is probably impossible. > 0x40001fa0 in ?? () > (gdb) *Sigh*. I fight with this for a day, nearly give up, then post to the list. 30 mins after I post, the solution dawns on me. I have a somewhat weird login setup as my login shell (bash, of course) is a child of ssh-agent. In other words, after login, my shell if the equivalent of ``ssh-agent /bin/bash --login''. This is for convenience in the world of SSH more than anything else but now that I think of it, probably not the wisest of ideas. For reasons unknown to me, when my login bash shell is a child of ssh-agent gdb barfs as shown above. When not a child of ssh-agent gdb works fine. The question for the members of this list is simply: why? I unfortunately don't know enough about signal handling in the context of the shell to take a stab at this one. :/ Regards, kw -- | Keith Warno cell: +1 609-209-5800 | http://www.valaran.com/ work: +1 609-716-7200 x243 | Valaran Corporation Penguin Guy SMS : kw-mobile@valaran.com +--------------------------------------------------------------//