Re: debugging - help
From: kbc (kbc32_at_yahoo.com)
Date: 11/26/03
- Next message: Debashish Chakravarty: "Re: reading a file in reverse order (bootom-top)"
- Previous message: Heck: "Re: Re: [OT] Indian C programmers and "u""
- In reply to: Michael Str.: "Re: debugging - help"
- Next in thread: Hans-Bernhard Broeker: "Re: debugging - help"
- Reply: Hans-Bernhard Broeker: "Re: debugging - help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Nov 2003 19:59:54 -0800
thanks for all replies.
i am executing on Armulator using AXD debugger.
What i have is an array of function pointers which get periodically
filled up. I parse this array each time, calling the functions
indexed by the pointer. I would like to print the name of the function
before calling it.
I dont want to put breakpoints.
__FUNCTION__ will help only in printing from within the function.
shankar
au_79_197@yahoo.com (Michael Str.) wrote in message news:<1bb3bcf0.0311250042.623f1b5f@posting.google.com>...
> kbc32@yahoo.com (kbc) wrote in message news:<a382521e.0311240246.483a4a8e@posting.google.com>...
> > Hi,
> >
> > I am programming in C.
> >
> > ( You know that __FILE__ is a 'macro' which may be used to print
> > debug messages. )
> > 3 questions :
> >
> > a) I have 10000 functions in my project. I am interested in 100
> > of them.
> > Whenever any of them are entered, I want a message printed saying the
> > same. ( such as "function foo_bar entered." when entering
> > foo_bar )
> >
> > What is the least effort way of doing this ? I hate to edit the
> > individual functions. They are too many.
> >
>
> If i understand, you know what are these '100' functions. First of
> all, if you
> work with big project and have to debug it - use good Editor ( such as
> CodeWrite or MultiEdit ). So, you can use regular expressions and
> macro for inserting these printings.
>
> > b) Given a function address, can any compiler tricks be used to
> > print the associated function name ( without manually putting the
> > name in the
> > source code ) ? ( I know that map file will give it, but i am looking
> > for
> > an automatic way of doing this at runtime itself. )
> >
>
> Generally, as people already said, at runtime you don't know
> functions' names.
> Besides, here, you don't say that you want to do it when entering
> function,
> right ? So, without appropriate instrumentation tools, you cannot do
> it.
>
> > c) Any good website or book for info related to debugging code
> > execution ??
> >
>
> Did you search it on Internet ?
>
> > thanks
> > shankar
- Next message: Debashish Chakravarty: "Re: reading a file in reverse order (bootom-top)"
- Previous message: Heck: "Re: Re: [OT] Indian C programmers and "u""
- In reply to: Michael Str.: "Re: debugging - help"
- Next in thread: Hans-Bernhard Broeker: "Re: debugging - help"
- Reply: Hans-Bernhard Broeker: "Re: debugging - help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|