Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: John Zoidberg <the.real.doctor.zoidberg@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Log every call and exit in embedded system
Date: Sat, 24 Mar 2007 22:20:00 -0000	[thread overview]
Message-ID: <20070324222043.GA20939@caradoc.them.org> (raw)
In-Reply-To: <adbca6b50703241305v7ed29ad6k98ebd64c369271d8@mail.gmail.com>

On Sat, Mar 24, 2007 at 08:05:11PM +0000, John Zoidberg wrote:
> Hi,

> I am studying a FOSS embedded OS and would like to understand its
> callgraph (especially assembly calls during OS initialization).
> Since this is an embedded OS it means I have no access to profiling or
> coverage features from GCC.

Actually, it doesn't mean that at all.  It means you have to go to a
little more work to recover the profile data, though.

GDB won't be able to help you much with this; a simulator or hardware
debug interface may be able to do much better.

> (3) can GBD handle thousands of breakpoints?

Not really.  It will get very slow.

> Is this the only way? Can anyone give me any suggestions or hints?

If you're not too interested in recursive calls, and you're not
talking about too large an instruction trace, you could record the
output of stepi and then analyze it looking for jumps and calls.
It may be simpler if the data collection time is small enough for your
needs.

> OFFTOPIC: how can I define string variables for GDB command files?

You can't.  This is one of the reasons I've been talking about Python
integration; it's not a small problem to solve, because of the way we
define our variables.


-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-03-24 22:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-24 20:05 John Zoidberg
2007-03-24 22:20 ` Daniel Jacobowitz [this message]
2007-03-26 10:04 ` Andrew STUBBS
2007-03-26 10:23   ` mathieu lacage
2007-03-27 11:07     ` John Zoidberg
2007-03-27 11:56       ` Mathieu Lacage
2007-03-26 21:33 ` Michael Snyder
2007-03-27  9:56   ` John Zoidberg

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=20070324222043.GA20939@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=the.real.doctor.zoidberg@gmail.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