Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Uncle George <gatgul@voicenet.com>
To: bug-gdb@prep.ai.mit.edu
Cc: "axp-list@redhat.com" <axp-list@redhat.com>
Subject: gdb core dumps when "where" and sym malloc on stack
Date: Mon, 09 Mar 1998 07:42:34 -0500	[thread overview]
Message-ID: <3503E3B7.4E683772@voicenet.com> (raw)

the following code in mdebugread.c fixes a gdb/alpha/linux bug which
causes gdb to go core.
the t->pointer_type contains a NULL, and shouldn't be used if it finds
"malloc" on a linux/alpha stack trace.

   if (STREQ(name, "malloc")
   && t->code == TYPE_CODE_VOID
   && t->pointer_type )
     {
       /* I don't know why, but, at least under Linux/Alpha,
   when linking against a malloc without debugging
   symbols, its read as a function returning void---this
   is bad because it means we cannot call functions with
   string arguments interactively; i.e., "call
   printf("howdy\n")" would fail with the error message
   "program has no memory available".  To avoid this, we
   patch up the type and make it void*
   instead. (davidm@azstarnet.com)
   */
       t = t->pointer_type;
     }
 }



gat


                 reply	other threads:[~1998-03-09 12:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox