public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Watch point for unaligned stores
@ 2005-04-23 20:25 Shaun Jackman
  2005-04-24 22:36 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Shaun Jackman @ 2005-04-23 20:25 UTC (permalink / raw)
  To: gdb

I had a bug where the word at 0x8 was being clobbered by some bug in
my program. I set at a watchpoint (watch *(int*)8) but it was never
triggered even though the memory was modified. I found in the end that
the errant instruction was writing a word at address 0x9, which on the
ARM architecture modifies the word at 0x8 due to alignment. Could I
set a watchpoint that would have caught this bug, other than say
setting a watchpoint at all four addresses of the word?

Thanks,
Shaun

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Watch point for unaligned stores
  2005-04-23 20:25 Watch point for unaligned stores Shaun Jackman
@ 2005-04-24 22:36 ` Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-04-24 22:36 UTC (permalink / raw)
  To: Shaun Jackman; +Cc: gdb

On Sat, Apr 23, 2005 at 01:25:24PM -0700, Shaun Jackman wrote:
> I had a bug where the word at 0x8 was being clobbered by some bug in
> my program. I set at a watchpoint (watch *(int*)8) but it was never
> triggered even though the memory was modified. I found in the end that
> the errant instruction was writing a word at address 0x9, which on the
> ARM architecture modifies the word at 0x8 due to alignment. Could I
> set a watchpoint that would have caught this bug, other than say
> setting a watchpoint at all four addresses of the word?

This sounds like a bug in your remote debugging stub.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-24 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-23 20:25 Watch point for unaligned stores Shaun Jackman
2005-04-24 22:36 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).