This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Log every call and exit in embedded system


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]