Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gdb core dumps when "where" and sym malloc on stack
@ 1998-03-09 12:42 Uncle George
  0 siblings, 0 replies; only message in thread
From: Uncle George @ 1998-03-09 12:42 UTC (permalink / raw)
  To: bug-gdb; +Cc: axp-list@redhat.com

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-03-09 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-03-09 12:42 gdb core dumps when "where" and sym malloc on stack Uncle George

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