This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

gcc -pie makes gdb unable to set breakpoints on Debian/ppc


gcc -pie makes gdb unable to set breakpoints on Debian/ppc


I know..old stuff..and I didn't debug at all or try current. Don't know if gcc or gdb or kernel or whatnot is at fault.

This is stable Debian 5.0.

jay@plin:~$ uname -a
Linux plin 2.6.26-2-powerpc #1 Tue Mar 9 23:07:18 UTC 2010 ppc GNU/Linux


jay@plin:~$ gcc -v
Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-softfloat --enable-secureplt --enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32 --with-long-double-128 --enable-checking=release --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 


jay@plin:~$ gdb -v
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.? Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu".


jay@plin:~$ cat 2.c
int main()
{
}


jay@plin:~$ gcc -g -pie 2.c


jay@plin:~$ gdb ./a.out


GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.? Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu"...


(gdb) break main
Breakpoint 1 at 0x658: file 2.c, line 3.


(gdb) run
Starting program: /home/jay/a.out 
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x658: Input/output error.



(gdb) q
The program is running.? Exit anyway? (y or n) y

jay@plin:~$ gcc -g 2.c


jay@plin:~$ gdb ./a.out

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.? Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu"...


(gdb) break main
Breakpoint 1 at 0x10000448: file 2.c, line 3.


(gdb) run
Starting program: /home/jay/a.out 

Breakpoint 1, main () at 2.c:3
3??? }
(gdb) q
The program is running.? Exit anyway? (y or n) y



?- Jay
 		 	   		  


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