[Cbe-oss-dev] Hardware watchpoints cause kernel hang

Paul_Rasmussen at playstation.sony.com Paul_Rasmussen at playstation.sony.com
Fri Feb 16 05:39:05 EST 2007


Benjamin Herrenschmidt wrote:

>On Tue, 2007-02-13 at 13:12 -0800, Paul_Rasmussen at playstation.sony.com
>wrote:
>  
>
>>I have discovered that setting a hardware watchpoint in PPE code with 
>>ptrace(PTRACE_SET_DEBUGREG, tid, 0, 6) for example and then continuing 
>>the program causes our current version of the cell-linux OS to hang (its 
>>a complete hang, not a panic and is repeatable every time).  Is this 
>>something that someone could take a look at?  If there's any more 
>>information you would like about this, please let me know.
>>    
>>
>
>We'll have a look. In the meantime, if you had a test-case program, that
>would be nice.
>
>Thanks,
>Ben.
>
>
>
>  
>
The version of gdb we have demonstrates the problem.  But I'm not sure
if all versions of gdb for cell-linux actually try to use hardware
watchpoints.  And I'm just using a simple "Hello World" style program
for the test.  Anyway doing the following creates the problem on our
system...

% gdb hello
GNU gdb 6.5
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 "powerpc64-unknown-linux-gnu"...Using host
libthread_db library "/lib64/libthread_db.so.1".

(gdb) b main
Breakpoint 1 at 0x10000474: file hello.c, line 5.
(gdb) r
Starting program: /olympus/pras/test/linux/hello

Breakpoint 1, main () at hello.c:5
5               printf("Hello world!\n");
(gdb) p/x $sp
$1 = 0xffffc430
(gdb) watch *0xffffc430  (Set watchpoint on a specific address)
Hardware watchpoint 2: *4294951984
(gdb) cont  (this hangs)

I tried attaching a copy of our gdb and hello but it was rejected by the 
moderator as too long. But you could maybe try this with your gdb and a 
simple program?  If that doesn't repeat it, I can try to create a 
smaller test...

Thanks,

- paul r.





More information about the cbe-oss-dev mailing list