inconsistent gdbserver behaviour on Virtex-4

Grant Likely grant.likely at secretlab.ca
Thu Jan 19 08:08:53 EST 2006


Sorry, wrong log file; correct one now attached.

Grant Likely wrote:
> I need some help;
> 
> I'm seeing odd inconsistent behaviour when debugging userspace on a 
> Virtex-4 (don't yet know if it's a gdbserver or kernel issue).
> 
> Here's the scenario:
> 
> - tested on kernel versions: 2.6.15, 2.6.16-rc1  both w/ ml403 patches
> - tested with gdb versions 6.1, 6.3 & 6.4
> - root file system contains: busybox-1.01, glibc-2.3.5, gdbserver
> - gcc version: 3.4.4 compiled with crosstool-0.38
> - BDI *not* attached, and CONFIG_BDI_SWITCH is *not set*
> 
> simple hello.c compiled for the target.  Program loops 20 times over 
> some printf's and simple math.
> 
> On target, I start the program with:
> $ gdbserver 192.168.0.37:2345 ./hello
> Process ./hello created; pid = 268
> Listening on port 2345
> 
> On the host, I connect gdb and set a breakpoint at main(), and at two 
> places in the loop.
> 
> Whenever I continue (c), I see one of the following behaviours (randomly 
> it seems):
> 
> 1. gdb stops exactly where it started from.  ie. no code gets executed,
> 2. continue behaves properly, and execution stops at the next 
> breakpoint, or
> 3. the program runs to completion, and no other breakpoints get hit. 
> program exits normally
> 
> When I do a single instruction step (si), I see either:
> 1. the pc does not move, or
> 2. the program runs freely until the next breakpoint.
> 
> I've attached a gdb log with 'set debug remote 1' turned on.  It looks 
> to me that the kernel single step support is still busted on my board. 
> It also seems to be that gdb single steps off of the previous breakpoint 
> before reestablishing all the breakpoints and letting the process run 
> again.  Therefore, if single step is busted, then it makes sense that 
> continue is busted to.
> 
> Any help would be appreciated.
> 
> Thanks,
> g.
> 
> 

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
(403) 663-0761
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb.log
Type: text/x-log
Size: 18673 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060118/9b32e971/attachment.bin 


More information about the Linuxppc-embedded mailing list