This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
debugging problem through GDB
- To: <ecos-discuss at sources dot redhat dot com>
- Subject: [ECOS] debugging problem through GDB
- From: "Tony Ko" <nhko at gctsemi dot com>
- Date: Thu, 6 Sep 2001 22:48:51 +0900
Hi.
I try to debug my custom board(mpc860 board) through GDB.
I used eCos-1.3.1 package and made eCos image including GDB stubs.
but some wierd result happens when program stop by breakpoint.
Passing argument values are not correct. Those looks like kind of
garbage value.
for example, source code is below,
cyg_thread_create(10, // Priority - just a number
net_test, // entry
0, // entry parameter
"Network test", // Name
&stack[0], // Stack
STACK_SIZE, // Size
&thread_handle, // Handle
&thread_data // Thread data structure
);
but argument value after program stopp by breakpoint is below,
cyg_thread_create (sched_info=10, entry=0x20368 <net_test>,
entry_data=105916, name=0x47aa4 "", stack_base=0x1,
stack_size=286326799, handle=0x1111000e, thread=0x47acc) at
/opt/ecos/ecos-1.3.1/packages/kernel/v1_3_1/src/common/kapi.cxx:151
Current language: auto; currently c++
for instance, entry_data is 0 at source code, but the value on console
is 105916.
but when I use print command, the correct value is printed on console.
for instance, (gdb)print &stack[0]
$1 = 0x47b80 ""
but one of argument ,stack_base is printed 0x1 when program stop by
breakpoint.
I use gdb with 115200 baudrate. but I don't think baudrate dosn't
matter on this problem.
So would you tell me the way fixes this problem.
thanks in advance.
Tony.