Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* gdb/linux/alpha/malloc not happy
@ 1997-07-22  0:07 Uncle George
  0 siblings, 0 replies; 2+ messages in thread
From: Uncle George @ 1997-07-22  0:07 UTC (permalink / raw)


Message-ID: <33D3F766.4BBD@voicenet.com>
Date: Mon, 21 Jul 1997 19:57:26 -0400
From: Uncle George <gatgul@voicenet.com>
Reply-To: gatgul@voicenet.com
Organization: sloppy, at best
X-Mailer: Mozilla 3.01Gold (WinNT; I)
MIME-Version: 1.0
To: davidm@azstarnet.com
CC: linux-axp@redhat.com
Subject: gdb/linux/alpha/malloc not happy
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
This particular piece of code from mdebugread.c seems to break the
"where" functionality on my linux/alpha/elf ( linux 2.0.27 ). Generally
it goes core when the 
 t = t->pointer_type; is used - pointer_type seems to contain 0x0
Took the piece out, and can print stack traces with "malloc" in it.

Any Comment????? gdb is 4-16 ( from redhat 4.2/alpha/srms )

----------------mdebugread.c @ ~ line 840 -------------
      else
	{
	  t = parse_type (cur_fd, ax, sh->index + 1, 0, bigend, name);
#if gb
	  if (STREQ(name, "malloc") && t->code == TYPE_CODE_VOID)
	    {
	      /* 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;
	    }
#endif
	}
      b = top_stack->cur_block;

-- 
Uncle George ( aka G. Baeslack )
http://www.voicenet.com/~gatgul

--
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/linux/alpha/malloc not happy
@ 1997-07-22  0:14 wsb
  0 siblings, 0 replies; 2+ messages in thread
From: wsb @ 1997-07-22  0:14 UTC (permalink / raw)


George,

Looks like you found the problem I've been having in gdb. Whenever
I tried to step thru a malloc(), it would always bail out on me.
From your post, it looks like the variable 't' is a pointer to something
and that assignment in the if() looks like bad news. I'll try your
fix tonight and see if it fixes my problem.

Thanks....
Wes

--
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-07-22  0:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-07-22  0:07 gdb/linux/alpha/malloc not happy Uncle George
  -- strict thread matches above, loose matches on Subject: below --
1997-07-22  0:14 wsb

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