From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Aravinda <aravindakidambi@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Problem with manual watchpoints
Date: Thu, 24 Dec 2009 21:52:00 -0000 [thread overview]
Message-ID: <20091224215217.GA32721@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <26eb53620912241341w30a924afxf90f66166b8c552b@mail.gmail.com>
On Thu, 24 Dec 2009 22:41:37 +0100, Aravinda wrote:
> Yes, thats why I have a watchpoint added at &a[20]. So on accessing
> the first element out of the allocated array, I want the program to
> receive a SIGTRAP.
Ah, OK.
> Infact it gets this signal when the getc(stdin) is included, is it
> something to do with the program should be in single step mode to get
> SIGTRAPs
No.
> or is the loop way too simple that it executes in no time before the SIGTRAP
> is even raised ?
There may be some compiler optimization in effect such as if you have not used
"volatile" keyword for the "a" array. You should rather check the code using
"objdump -dS" or GDB "disass/m" how it got compiled.
Still (with default -O0) I do not know the answer.
Regards,
Jan
next prev parent reply other threads:[~2009-12-24 21:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 20:47 Aravinda
2009-12-24 21:08 ` Jan Kratochvil
2009-12-24 21:42 ` Aravinda
2009-12-24 21:52 ` Jan Kratochvil [this message]
2009-12-28 21:22 ` Aravinda
2009-12-28 21:49 ` Jan Kratochvil
2009-12-29 3:00 ` Aravinda
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=20091224215217.GA32721@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=aravindakidambi@gmail.com \
--cc=gdb@sourceware.org \
/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