[LLVMdev] viewCFGOnly() function
David Stuttard
david.stuttard at ziilabs.com
Wed Jul 22 01:04:55 PDT 2009
You can call the function from your program OR the debugger. The
comments simply inform you that it is quite handy to be able to call the
function from a debugger (such as gdb).
To call the function in you code simply add a line such as:
F->viewCFGOnly();
Where F is an appropriate variable eg. a MachineFunction pointer
If you are using gdb then you can do the following:
call F->viewCFGOnly()
from a point where F is live.
David
nxer wrote:
> Hello All,
>
> I am trying to get basic CFG display to work. I have read the programmer's
> manual and it mentions that we can simply call the viewCFGOnly() (part of
> Function.h) from our sample program. When i read the comments for that
> method in Function.h, it mentions that i need to call it from the gdb
> debugger instead. I am confused as to how to get this working. Do we need to
> call it from a simple program or a debugger. An example would be very
> helpful.
>
> I have LLVM compiled in debug mode and have "dot" and "gv" in my path.
>
> I would appreciate any help or at least a point the right direction in terms
> of documentation. Thank you.
--
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
3DLabs Ltd company number 02883883 registered in England and Wales at 79
Knightsbridge, London SW1X 7RB
More information about the llvm-dev
mailing list