This is the mail archive of the gdb@sourceware.org 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]

breakpoint can be set but doesn't work


Hi guys,

I'm just working on a embedded MPC8541 linux box using ELDK 3.1.1, but
it looks like there are some problems with gdb come with the ELDK:
breakpoints can be set properly, but actually it doesn't work. So I
downloaded  the latest gdb 6.6 source and maked  a binary by myself
with the configure:host=ppc-linux, target=ppc-linux, build=ppc-linux.

cd gdb-6.6
./configure
make
make install

But later I sadly found that breakpoint doesn't work for gdb 6.6 too.
A sample session as follows:


bash-2.05b# ls hello.c bash-2.05b# cat hello.c #include <stdio.h>

int main(void)
{
       printf("hello world\n");
       printf("hello world\n");
       printf("hello world\n");
       return 0;
}
bash-2.05b# gcc -g hello.c
bash-2.05b# gdb a.out
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 "ppc-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) b main
Breakpoint 1 at 0x1000049c: file hello.c, line 5.
(gdb) info b
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x1000049c in main at hello.c:5
(gdb) r
Starting program: /root/a.out
hello world
hello world
hello world

Program exited normally.
(gdb) q
bash-2.05b# gcc --version
gcc (GCC) 3.3.3 (DENX ELDK 3.1.1 3.3.3-13)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bash-2.05b# gdb --version
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 "ppc-linux".
bash-2.05b# uname -a
Linux ppclinux 2.4.25 #8 Mon Mar 26 15:34:44 CST 2007 ppc ppc ppc GNU/Linux
bash-2.05b#

The problem has confused me for several days and I just can not figure
it out by myself. Any help will be appreciated.

--
Invent and fit; have fits and reinvent!
We toast the Lisp programmer who pens his thoughts within nests of parentheses.


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