From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5822fc8be1e71128f7bcd09d5c4196d9.axp-list@archive.invalid> X-Archive-Original-Message-ID: <199706031504.IAA04732@speedy.speakeasy.org> Date: Tue, 3 Jun 1997 11:19:27 -0400 (EDT) From: Jeff Odom Subject: Re: GDB patch In-Reply-To: <199706031414.HAA30021@panda.mosberger> > I'm don't know why it fails, but the reason I made that patch is so you > can do stuff like: > > gdb> p printf("Hello World\n") > > (passing the "Hello World\n" string constant causes gdb to implicitly > call malloc()). It certainly used to work with ECOFF. With ELF, I > probably always had debug info available while working on these > things, si I never noticed. In other words, it's quite possible that > the problem got introduced during the ELF->ECOFF switch. Looks like something got changed in the switch. Without the patch, and with just a simple program like main(){printf("blah");} gdb> p printf("Hello World\n") produced evaluation of this expression requires the program to have a function "malloc" Adding a simple malloc the program, and doing the same, produces Cannot access memory at address 0x20100c30. A static binary produces: The program being debugged stopped while in a function called from GDB. When the function (malloc) is done executing, GDB will silently stop (instead of continuing to evaluate the expression containing the function call). Which I'm guessing is because of a lack of debugging symbols?? Jeff Odom System Administrator The Johns Hopkins Kreiger Mind/Brain Institute -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com