This is the mail archive of the
mailing list for the GDB project.
Re: Log every call and exit in embedded system
- From: Daniel Jacobowitz <drow at false dot org>
- To: John Zoidberg <the dot real dot doctor dot zoidberg at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Sat, 24 Mar 2007 18:20:43 -0400
- Subject: Re: Log every call and exit in embedded system
- References: <firstname.lastname@example.org>
On Sat, Mar 24, 2007 at 08:05:11PM +0000, John Zoidberg wrote:
> 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
> 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.