This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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]

Breakpoints


Hi,
  I have compiled a program using the gcc compiler with the options -g and
-ax (-ax is the  option to enable block profiling). I am debugging the
program using gdb-5.2 . I set a breakpoint at main. When the program hits
the breakpoint, I obtained the backtrace of the program.It was as follows:
(gdb) bt
#0  main () at ex7.c:7
#1  0x400a5316 in __libc_start_main (main=0x8048a34 <main>, argc=1,
ubp_av=0xbffff594, init=0x80487ac <_init>, fini=0x804a1d0 <_fini>,
rtld_fini=0x4000d2fc <_dl_fini>, stack_end=0xbffff58c)
at ../sysdeps/generic/libc-start.c:129

Then I continued the program using the command "continue". Then the
breakpoint at main was hit again.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x08048a50 in main () at ex7.c:7
Then when I tried to obtain the backtrace, I got the following output:
(gdb) bt
#0  0x08048a50 in main () at ex7.c:7
#1  0xbffff568 in ?? ()

Can someone help me figure out why this is happening.

Thanks,
Satya


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