Hi,
>I know that I saw a message about this some time ago, but I can not
>find that message now. BTW is there a site that is keeping a monthly
>archive of these messages?
No idea, but that would be nice.
>but the real question is how do you dump the .B files that are needed
ir_b2a will dump the .B file. I don't believe we ship the binary
and that you'd have to build it (in the ir_tools build sub-directory).
>by the be component? I need to execute the be by itself to debug
>something, and it needs the .B file. BTW, does anyone have any useful
>tips on debugging the phases of the compiler using gdb?
Yes.
- Run the compiler with "-keep -show" on the test case.
- Capture the command line from 'be'.
- Run gdb on 'be' (will probably need to point LD_LIBRARY_PATH at where
cg.so, be.so, etc are).
- issue the gdb 'run' command with the captured command line.
Now, presumably you'd like to set breakpoints. 'be' dynamically loads
the components necessary based on the command line you gave it.
For example, if you do -O2 it will load wopt.so and cg.so.
If you do -O3 it will load lno.so in addition.
Because these dso's are dynamically linked, gdb won't know the symbols.
There's a kludge in 'be' to help. Right after 'be' loads the dso's
mention above, it calls the empty function be_debug(). So if you
set a breakpoint on be_debug, and give the gdb 'run' command, once
you hit the breakpoint you'll have access to the symbols in the
dynamically loaded dso's.
>Thanks,
>
>Charles
Ken
|