From: Ben Warren <bwarren@qstreams.com>
To: "Martin, Tim" <tim.martin@viasat.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Debugging with no serial port
Date: Thu, 10 Aug 2006 15:27:58 -0400 [thread overview]
Message-ID: <1155238078.920.15.camel@saruman.qstreams.net> (raw)
In-Reply-To: <821B2170E9E7F04FA38DF7EC21DE487105FD10D3@VCAEXCH01.hq.corp.viasat.com>
[-- Attachment #1: Type: text/plain, Size: 2322 bytes --]
Tim,
How about something a bit simpler like running gdb within a 'script'
context, which will log your session to a file. Get gdb to print the
variables to the screen (using 'print' or whatever), wrap your data with
easily searchable characters (eg. ***data1 data2 data3***), then filter
your data from the script file with sed/awk or perl scripts?
A bit brute force, but bound to work.
regards,
Ben
On Thu, 2006-08-10 at 10:14 -0700, Martin, Tim wrote:
> This may be more of a question for GDB folks...but I'll post it here
> because it relates to embedded systems as well.
>
> I'm trying to validate some signal processing software on an embedded
> Virtex4 PowerPC 405. Basically, the validation consists of calling
> functions and looking at their outputs. Over time, there are several
> thousand numbers to look at, so manually looking at each number at a
> break point would be very time consuming (to put it mildly).
>
> The normal way I would go about doing this is to print out the data
> (e.g. to a serial port) and post-process the data somewhere else. But
> on this particular target, I don't have a serial port. So I thought
> about using GDB's breakpoint command list feature. When the software
> has data it wants to print out, it calls a function "log_stuff". I
> then set a breakpoint and command list in the "log_stuff" function,
> which writes out the variables I'm interested in checking out to a
> file named outputfile.bin. E.g. the following command file does this:
>
> break log_stuff
> commands
> silent
> if (variable_logging_enabled)
> append value outputfile.bin stuff1_variable
> append value outputfile.bin stuff2_variable
> end
> cont
> end
>
> The problem I have with this approach is that GDB doesn't finish
> writing out everything before it continues executing the program, so a
> backlog develops. So my first question would be, is there some GDB
> "flush" like command I could run before the cont statement?
>
> Second question would be - is there an easier way to accomplish what
> I'm trying to do, which is basically emulate a serial port with GDB.
>
> Tim
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
[-- Attachment #2: Type: text/html, Size: 4628 bytes --]
next prev parent reply other threads:[~2006-08-10 19:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-10 17:14 Debugging with no serial port Martin, Tim
2006-08-10 17:31 ` Frank
2006-08-10 19:27 ` Ben Warren [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-10 19:00 Martin, Tim
2006-08-10 19:13 ` Brian Waite
2006-08-10 20:12 Martin, Tim
2006-08-10 20:53 ` Ben Warren
2006-08-11 16:30 Martin, Tim
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=1155238078.920.15.camel@saruman.qstreams.net \
--to=bwarren@qstreams.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=tim.martin@viasat.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;
as well as URLs for NNTP newsgroup(s).