* Re: GDB patch
[not found] <Pine.LNX.3.95.970603093721.14220A-100000@naphta.mb.jhu.edu>
@ 1997-06-03 14:14 ` David Mosberger-Tang
1997-06-03 15:19 ` Jeff Odom
0 siblings, 1 reply; 2+ messages in thread
From: David Mosberger-Tang @ 1997-06-03 14:14 UTC (permalink / raw)
>>>>> On Tue, 3 Jun 1997 09:42:47 -0400 (EDT), Jeff Odom <zeus@jhu.edu> said:
Jeff> I've posted a message to the axp mailing list, but I also
Jeff> wanted to make sure you knew about this. Single-stepping over
Jeff> malloc() calls seems to crash gdb under alpha. The problem
Jeff> seems to come from one of your patches,
Jeff> + * mdebugread.c (parse_symbol): When we find a malloc() symbol with
Jeff> + return type VOID, assume no debugging info is available for that
Jeff> + object file and patch the return value into VOID *. Otherwise,
Jeff> + operations requiring an implicit call to malloc() will fail.
Jeff> where t->pointer_type for a "void" t is NULL. Removing the
Jeff> patch seems to work, but I'm still not convinced that I've
Jeff> done the right thing. Obviously you patched the code for a
Jeff> good reason, and either the problem has been fixed ealier up
Jeff> the line, or it's been broken further elsewhere.
Jeff> Any comments/suggestions?
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.
--david
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: GDB patch
1997-06-03 14:14 ` GDB patch David Mosberger-Tang
@ 1997-06-03 15:19 ` Jeff Odom
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Odom @ 1997-06-03 15:19 UTC (permalink / raw)
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-06-03 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.3.95.970603093721.14220A-100000@naphta.mb.jhu.edu>
1997-06-03 14:14 ` GDB patch David Mosberger-Tang
1997-06-03 15:19 ` Jeff Odom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox