[cfe-dev] main functions of clang

eyasu getahun eya.get at gmail.com
Mon Dec 12 06:36:39 PST 2011


Hi Hans,

I can't use debugger. Because am using Linux  command line to run clang.
There is no debugging option at Linux. Thanks for the idea.

On Mon, Dec 12, 2011 at 10:23 PM, Hans Wennborg <hans at chromium.org> wrote:

> On Mon, Dec 12, 2011 at 2:03 PM, eyasu getahun <eya.get at gmail.com> wrote:
> >
> > Hey James,
> >
> > Thanks for the command line option. But where is the function called? I
> mean
> > in which main method of clang it is called? We know that every function
> must
> > be called at least at one main method/function to be executed. Let me
> make
> > it clear like this way:
> >
> > int main ()//main method
> > {
> > S->Printpretty(context);
> > }
> >
> > So, which main method is calling our printpretty() function? Hope now its
> > clear for you.
>
> Hi Eyasu,
>
> The best way to find out where a function is called from is to run
> Clang in a debugger, set a breakpoint in the function you are asking
> about (StmtPrinter::PrintStmt), and look at the stack trace.
>
>  - Hans
>



-- 
*With Best Regards,

===========================================
Eyasu Getahun*

1 Fusionopolis way, #08-10 Connexis North Tower
Singapore 138632, Singapore
Mobile: +393279239907
*===========================================
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111212/588a610e/attachment.html>


More information about the cfe-dev mailing list