Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: EBo <ebo@sandien.com>
Cc: gdb@sourceware.org
Subject: Re: using gdb to do embedded unit/regression testing
Date: Mon, 03 Nov 2008 19:21:00 -0000	[thread overview]
Message-ID: <20081103192037.GA13409@caradoc.them.org> (raw)
In-Reply-To: <twig.1225739451.50844@swcp.com>

On Mon, Nov 03, 2008 at 12:10:51PM -0700, EBo wrote:
> The current issue at hand is that `print "STRING"` only works if the program
> is running AND gdb can interface with malloc.  On the embedded project which I
> am currently testing this idea out, malloc is not available and the print
> command returns an error.  What I was trying to do is simply write some
> diagnostic comments to help orient myself when reading the output from gdb
> which was piped to a file.  If there is some other way to write diagnostic
> strings to stdout other than `print "STRING"` which does not require some call
> to malloc?  If so please let me know.  I have not seen anything like this in
> the documentation yet.

Try the "echo" and "printf" commands instead.  These give you much
more control over output.

Also, "print" may not call malloc if you use a current snapshot of the
GDB development sources.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-11-03 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 19:11 EBo
2008-11-03 19:21 ` Daniel Jacobowitz [this message]
2008-11-03 20:02   ` EBo
2008-11-03 19:26 ` Michael Snyder
2008-11-03 19:50   ` EBo
2008-11-03 20:06     ` EBo
2008-11-06 17:14       ` Doug Evans
2008-11-06 17:23         ` EBo

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=20081103192037.GA13409@caradoc.them.org \
    --to=drow@false.org \
    --cc=ebo@sandien.com \
    --cc=gdb@sourceware.org \
    /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