Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "karthikeyan.s" <informkarthik@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Matthew Gretton-Dann <Matthew.Gretton-Dann@arm.com>, gdb@sourceware.org
Subject: Re: [HELP]Can GDB for ARM set hard breakpoint when native debugging?
Date: Thu, 10 Jun 2010 14:40:00 -0000	[thread overview]
Message-ID: <AANLkTin1s9fmVT_0Z0p5VZwV4EomzysWypODdxwHVsYW@mail.gmail.com> (raw)
In-Reply-To: <-3629479195726626766@unknownmsgid>

Hi Will,
Did you have issue any issues(kernel crash) with the watch_thread_num
test gdb test (testsuite) with your gdb changes (And offcourse with
you kernel backend!)? ( watch_thread_num is in
gdb/testsuite/gdb.base). The issue is not just with watchpoints but
also breakpoints. I am using a 2.6.33 kernel for which you had posted
the patch version2.

I tried something similar to watch_thread_num using breakpoints and I
get a hang.
#./gdb watch_thread_vum
# b main
# run
At this point the porogram is waiting in main
# hb 60
# c
Line 60 is --> shared_var++
# c (hit continue for some time)
# quit
When I quit, the kernel hangs (ping does not work).

This issue does not happen if I set the breakpoint (hb 60) after all
the threads have spawned.

I noted that gdb requests breakpoint removal and then insertion
whenever a thread is spawned. I insert breakpoints on all the current
threads (ALL_LWPS). And remove only on those threads that I inserted
the breakpoint on.

I am yet to dig in though.

Thanks,
Karthik

On Thu, Jun 3, 2010 at 5:23 PM, Will Deacon <will.deacon@arm.com> wrote:
> Hi Karthik,
>
>> Just in case you are going to re-use most of the code for 2.6.35.
>> In hw_breakpoint.c, the handlers do not release the locks on wtpt/bkpt
>> not matched.
>> Should rather be:
>>  if (val != (unpredictable & ~0x3)) {
>>     rcu_read_unlock();
>>     continue;
>> }
>>
>> Otherwise I get a "schedule while atomic" bug.
>
> Well spotted! My current tree is a little different, but I've
> updated it as necessary.
>
> Thanks,
>
> Will
>
>
>



-- 
---
S. Karthikeyan | +919980814745
---


  parent reply	other threads:[~2010-06-10 14:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 15:06 karthikeyan.s
2010-06-01 15:18 ` Matthew Gretton-Dann
2010-06-03 11:39   ` karthikeyan.s
2010-06-03 11:54     ` Will Deacon
     [not found]     ` <-3629479195726626766@unknownmsgid>
2010-06-10 14:40       ` karthikeyan.s [this message]
2010-06-10 15:03         ` Will Deacon
     [not found]         ` <-2775908164685299161@unknownmsgid>
2010-06-13 13:00           ` karthikeyan.s
  -- strict thread matches above, loose matches on Subject: below --
2010-05-28  6:00 xingxing pan
2010-05-28  6:22 ` xingxing pan
2010-05-28  9:28 ` Matthew Gretton-Dann
     [not found]   ` <113ACA888B71994BB56E5CF3704953486BAA6A18D8@BGMAIL02.nvidia.com>
2010-06-01  9:06     ` Will Deacon
2010-05-28 11:20 ` Simon Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTin1s9fmVT_0Z0p5VZwV4EomzysWypODdxwHVsYW@mail.gmail.com \
    --to=informkarthik@gmail.com \
    --cc=Matthew.Gretton-Dann@arm.com \
    --cc=gdb@sourceware.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox