Hi Henning,
        thank you for you help. But it didnt work. See bellow.

[EMAIL PROTECTED]: ~$ more program.c 
#include<stdio.h>
void main()
{
        int i=1;
        printf("%d", i);
}
[EMAIL PROTECTED]: ~$ gcc -o program -g program.c
[EMAIL PROTECTED]: ~$ gdb ./program
GNU gdb 4.17.19981224.m68k.objc.threads.hwwp.fpu.gnat
Copyright 1998 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 "i686-pc-linux-gnu"...
(gdb) l
1       #include<stdio.h>
2       void main()
3       {
4               int i=1;
5               printf("%d", i);
6       }
(gdb) b 4
Breakpoint 1 at 0xbffffab4: file program.c, line 4.
(gdb) r
Starting program: /home/IA/baptista/./program 
Breakpoint 1 at 0x81f6c80: file program.c, line 4.
Cannot insert breakpoint 1:
Cannot access memory at address 0x81f6c80.

        Regards,                Paulo Henrique

Quoting Henning Makholm ([EMAIL PROTECTED]):
> Paulo Henrique Baptista de Oliveira <[EMAIL PROTECTED]> writes:
> 
> > [EMAIL PROTECTED]: /home/IA/baptista$ gcc -g -o teste teste.c
> > [EMAIL PROTECTED]: /home/IA/baptista$ gdb teste
> [...]
> > (gdb) l
> > warning: Source file is more recent than executable.
> 
> This suggests that there is a 'teste' executable somewhere in
> your path that gdb finds before it looks for the one you just
> built.
> 
> Try starting gdb with './teste' as the argument and see if it
> works better that way.
> 
> -- 
> Henning Makholm
> http://www.diku.dk/students/makholm
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
> 

Reply via email to