2009-09-14 10:23:48     gdbserver, breakpoints not working.

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-09-14 10:23:48     gdbserver, breakpoints not working.

Niclas Karlsson (SWEDEN)

Message: 79879   

 

Hi,

 

I'm trying to get gdbserver working on a bf537 ez-kit-lite board.

 

Uboot downloads an linux image (SVN) and runs it in the RAM. I download a simple application and set two breakpoints, one at main and the other at a function. The applications is compiled with no optimization and with -g flag.

 

I start debugging on target:

 

>gdbserver l:3456 ./app

 

On the host I start gdb (with the executable file as input) and connects to target. I then set the breakpoints, e.g. b main. I can list all breakpoints. When the c command is issued, the application starts but never stops at any breakpoints.

 

Do you know ehat I'm doing wrong?

QuoteReplyEditDelete

 

 

2009-09-14 10:30:28     Re: gdbserver, breakpoints not working.

Robin Getz (UNITED STATES)

Message: 79880   

 

Niclas:

 

Are you using svn 2009 branch, or trunk?

 

-Robin

QuoteReplyEditDelete

 

 

2009-09-15 03:36:28     Re: gdbserver, breakpoints not working.

Niclas Karlsson (SWEDEN)

Message: 79924   

 

Didn't know exactly which image I used, so I downloaded and tested this:

 

  blackfin.uclinux.org/gf/download/frsrelease/345/3190/uImage-SVN-r8827-bf537-stamp

 

Same result. GDB not stopping at the breakpoints.

 

 

 

I also tried write 0 to an address using GDB:

 

(gdb) x 0x866ffe

0x866ffe <gpioRead+10>: 0xe410b9da

(gdb) set *(unsigned long int *)0x866ffe = 0

(gdb) x 0x866ffe

0x866ffe <gpioRead+10>: 0xe410b9da

(gdb)

 

I got the address, 0x866ffe, from one of the breakpoints I set. As you can see, the value at the address didn't change.

QuoteReplyEditDelete

 

 

2009-09-15 11:34:52     Re: gdbserver, breakpoints not working.

Robin Getz (UNITED STATES)

Message: 79934   

 

Niclas:

 

I assume that you are using the same version of the kernel/dist/toolchain? You can't only change one peice - it works for me.

 

  docs.blackfin.uclinux.org/doku.php?id=faq#folded_12

 

Why do I need to use the same version of toolchain/kernel/uClibc/U-boot/uClinux-dist?

 

-Robin

Attachments

    Outcomes