This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: Accessing function code from CFG


On 3/7/07, Diego Novillo <dnovillo@redhat.com> wrote:
Paulo J. Matos wrote on 03/07/07 10:36:

> Is this normal? It seems there are no basic blocks set for the
> functions. Probably my pass is being run before the bbs are created?

Looks like it.  Set a breakpoint in build_tree_cfg and your function.
If gdb stops in your function first, you found the problem.


Now, this is wierd, probably I'm just doing it wrong, gdb is not finding any build_tree_cfg or my pass pass_gsvt, but it find, for example xmalloc. $ gdb gcc-bin/bin/gcc GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) break build_tree_cfg Function "build_tree_cfg" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) break pass_gsvt Function "pass_gsvt" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) break xmalloc Breakpoint 1 at 0x415f30: file ../../gsvt/libiberty/xmalloc.c, line 145.

Same results if I use objdump -t gcc | grep <whatever>
finds xmalloc but no build_tree_cfg or pass_gsvt.

What am I missing?

--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


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