How to Debug GCC Internals!?
Jeffrey Walton
noloader@gmail.com
Fri Oct 22 07:42:00 GMT 2010
Hi Hadi,
I think you have to set a gdb option to make it happen. I beleive gdb,
by default, does not follow a child on a fork/exec. Try tuning 'set
follow-fork-mode {parent|child|ask}'.
See for example, http://www.manpagez.com/info/gdb/gdb_28.php. If that
is not it, then I'm out of suggestions :/
Jeff
On Fri, Oct 22, 2010 at 3:21 AM, Hadi Hajimiri <hadi@cise.ufl.edu> wrote:
> Hi,
> I'm a newbie on GCC debugging and I need to modify some of the source codes
> (the part for manipulating control flow graph - cfg) for my project. I was
> wondering if there's a way to set break points on GCC internals using GDB.
> For instance, I'm able to add some lines in the method init_flow() in file
> "cfg.c" to just create a new file to see when I'm reaching to this method at
> run-time; and it creates the file when executing gcc. But I'm not able to
> set a breakpoint at any point of this file when running gcc with GDB!! I
> guess this code is dynamically linked and when setting any breakpoint gdb
> suggests (after "No source file named cfg.c") "Make breakpoint pending on
> future shared library load? (y or [n])".
>
> Thanks in advance
> -- Hadi
>
More information about the Gcc-help
mailing list