Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Zhang, Eric" <Eric.Zhang@icn.siemens.com>
To: "'jtc@redback.com'" <jtc@redback.com>, Stan Shebs <shebs@cygnus.com>
Cc: gdb@cygnus.com
Subject: gdb virtual memory exhausted
Date: Thu, 01 Apr 1999 00:00:00 -0000	[thread overview]
Message-ID: <8EF3FE311AA1D111B07E00A0C92C816FDAE294@boca101a.boca.rolm.com> (raw)

Hi,

You are much more fluent in gdb.  May I ask you a 
question about gdb?

I am running gdb on a SCO system and got:

gdb virtual memory exhausted.  Failed to allocated 4072 bytes memory.

I used swap -a to add 500,000 blocks of space.  But the problem
existed.  Any suggestions?

Eric

-----Original Message-----
From: jtc@redback.com [ mailto:jtc@redback.com ]
Sent: Wednesday, March 17, 1999 6:52 PM
To: Stan Shebs
Cc: gdb@cygnus.com
Subject: Re: problem with chained if statements?


jtc> I'm trying to write some user-defined commands to traverse
jtc> and/or pretty-print some of the internal data structures used in
jtc> our SW.  In the absense of a `switch' statement, I am using a
jtc> chain of if .. else if ... else if ... else ... end statements.
jtc> Unfortunately it doesn't seem to work.

Stan> Try:
Stan> 	   if ($status == $TASK_READY)
Stan> 		   printf "READY    "
Stan> 	   else
Stan> 		if ($status == $TASK_DELAY)
Stan> 		   printf "DELAY    "
Stan> 	   else
Stan> 		if ($status == ($TASK_DELAY | $TASK_SUSPEND))
Stan> 		   printf "DELAY+S  "
Stan> I think the else and the if each need to be on their own lines.

It turns out to be something like:

	if ($status == $TASK_READY)
		printf "READY    "
 	else
		if ($status == $TASK_DELAY)
			printf "DELAY    "
		else
	 		if ($status == ($TASK_DELAY | $TASK_SUSPEND))
				printf "DELAY+S  "
			else
				....
			end
		end
	end

Pretty ugly (IMO).  It will suffice as a workaround, but I'll have to
look into how difficult adding "true" else-if support will be.  Would
an `elif' keyword be objectionable?  What are the current thoughts
wrt. adding a more capable extension language for gdb scripting?

	--jtc

-- 
J.T. Conklin
RedBack Networks


             reply	other threads:[~1999-04-01  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-01  0:00 Zhang, Eric [this message]
1999-04-01  0:00 ` Guenther Grau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8EF3FE311AA1D111B07E00A0C92C816FDAE294@boca101a.boca.rolm.com \
    --to=eric.zhang@icn.siemens.com \
    --cc=gdb@cygnus.com \
    --cc=jtc@redback.com \
    --cc=shebs@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox