On 07/24/2014 03:23 AM, skunlin wrote:
> Recently, when doing kgdb on my cpu which arch is mips_64, I encounter some 
> problems.
>
>
> arch : mips_64-octeon
> kernel-version: linux 2.6.32 
>
>
> when setting watchpoints on the kernel , it logs that 
>
>
> (gdb) watch jiffies
> Sending packet: $mffffffff80da0800,8#f6...Ack
> Packet received: 00000001000026ae
> Sending packet: $mffffffff80da0800,8#f6...Ack
> Packet received: 00000001000026ae
> Hardware watchpoint 1: jiffies
>
>
> (gdb) c
> Continuing.
> Sending packet: $mffffffff802cd42c,4#27...Ack
> Packet received: 0000000d
> Sending packet: $mffffffff80da0800,8#f6...Ack
> Packet received: 00000001000026ae
> Sending packet: $Z2,ffffffff80da0800,8#41...Ack
> Packet received: ==============================================>empty package
> Packet Z2 (write-watchpoint) is NOT supported
> Warning:
> Could not insert hardware watchpoint 1.
> Could not insert hardware breakpoints:
> You may have requested too many hardware breakpoints/watchpoints.
>
>
> then, I open the switch 
> (gdb) set remote write-watchpoint-packet on
> (gdb) c
> Continuing.
> Sending packet: $mffffffff802cd42c,4#27...Ack
> Packet received: 0000000d
> Sending packet: $mffffffff80da0800,8#f6...Ack
> Packet received: 00000001000026ae
> Sending packet: $Z2,ffffffff80da0800,8#41...Ack
> Packet received: 
> Enabled packet Z2 (write-watchpoint) not recognized by 
> stub====================>stub no support watchpoint ?
>
>
> Searching the 
> http://git.kernel.org/cgit/linux/kernel/git/jwessel/kgdb.git/log/?qt=grep&q=mips
>  , I was
> noticed that mips har support the hardware watchpoint on kgdb.

What specifically at the URL above led you to believe this?


>
> But when reading the kernel source code , only kgdb.c in .../x86/kernel which 
> define such functions like
> kgdb_set_hw_break / kgdb_remove_hw_break and so on. 
>
>
> That's confuse me so much.

There is no implementation of hardware breakpoints for the MIPS architecture 
for kprobes, kgdb,  or ptrace (used for user space gdb).  Any time I have ever 
dealt with hardware breakpoints it has been using a JTAG device with the MIPS 
architecture.

If you would like to contribute an implementation, it is always welcome of 
course.  Most MIPS CPUs have no way to deliver internal exceptions or program 
the hardware breakpoints however.

Cheers,
Jason.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to