public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator
@ 2010-02-05  2:37 green at moxielogic dot com
  2010-02-05  6:41 ` [Bug gdb/11253] " teawater at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: green at moxielogic dot com @ 2010-02-05  2:37 UTC (permalink / raw)
  To: gdb-prs

I'm getting a SEGV now whenever I step after setting record on for my target
(the built-in moxie simulator).

It's happening in the first line of watchpoints_triggered(), where the code reads:
 int stopped_by_watchpoint = target_stopped_by_watchpoint ();

target_stopped_by_watchpoint is defined as
(*current_target.to_stopped_by_watchpoint).

The problem is that current_target.to_stopped_by_watchpoint is NULL.

This has something to do with how the record and simulator targets interact.

Normal breakpoints (w/o record) are working fine.

AG

-- 
           Summary: SEGV during reverse debugging w/ record target over
                    simulator
           Product: gdb
           Version: 7.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: green at moxielogic dot com
                CC: gdb-prs at sourceware dot org,msnyder at vmware dot
                    com,teawater at gmail dot com
GCC target triplet: moxie-elf


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
@ 2010-02-05  6:41 ` teawater at gmail dot com
  2010-02-05 13:03 ` green at moxielogic dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: teawater at gmail dot com @ 2010-02-05  6:41 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From teawater at gmail dot com  2010-02-05 06:41 -------
Thanks Anthony.

Hello everybody,

Now I have 2 ways to handle this issue:
1. Add a check to record.c when it call to_stopped_by_watchpoint
2. Add a default value for to_stopped_by_watchpoint to init_dummy_target.

Which way for us it better?

Thanks,
Hui

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware dot|teawater at gmail dot com
                   |org                         |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
  2010-02-05  6:41 ` [Bug gdb/11253] " teawater at gmail dot com
@ 2010-02-05 13:03 ` green at moxielogic dot com
  2010-02-08  5:45 ` teawater at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: green at moxielogic dot com @ 2010-02-05 13:03 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From green at moxielogic dot com  2010-02-05 13:03 -------
(In reply to comment #1)
> Thanks Anthony.
> 
> Hello everybody,
> 
> Now I have 2 ways to handle this issue:
> 1. Add a check to record.c when it call to_stopped_by_watchpoint
> 2. Add a default value for to_stopped_by_watchpoint to init_dummy_target.
> 
> Which way for us it better?

My guess is [2].

Thanks!

AG


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
  2010-02-05  6:41 ` [Bug gdb/11253] " teawater at gmail dot com
  2010-02-05 13:03 ` green at moxielogic dot com
@ 2010-02-08  5:45 ` teawater at gmail dot com
  2010-02-20  5:56 ` teawater at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: teawater at gmail dot com @ 2010-02-08  5:45 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From teawater at gmail dot com  2010-02-08 05:45 -------
Subject: Re:  SEGV during reverse debugging w/ record target 
	over simulator

Hi Anthony,

I make a patch for it.

Please help me test it.

Thanks,
Hui

2010-02-08  Hui Zhu  <teawater@gmail.com>

	* target.c (init_dummy_target): Add to_stopped_by_watchpoint.
---
 target.c |    1 +
 1 file changed, 1 insertion(+)

--- a/target.c
+++ b/target.c
@@ -2836,6 +2836,7 @@ init_dummy_target (void)
   dummy_target.to_has_stack = (int (*) (struct target_ops *)) return_zero;
   dummy_target.to_has_registers = (int (*) (struct target_ops *)) return_zero;
   dummy_target.to_has_execution = (int (*) (struct target_ops *)) return_zero;
+  dummy_target.to_stopped_by_watchpoint = return_zero;
   dummy_target.to_magic = OPS_MAGIC;
 }


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
                   ` (2 preceding siblings ...)
  2010-02-08  5:45 ` teawater at gmail dot com
@ 2010-02-20  5:56 ` teawater at gmail dot com
  2010-02-22 13:04 ` pedro at codesourcery dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: teawater at gmail dot com @ 2010-02-20  5:56 UTC (permalink / raw)
  To: gdb-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]


------- Additional Comments From teawater at gmail dot com  2010-02-20 05:56 -------
Subject: Re:  SEGV during reverse debugging w/ record target 
	over simulator

Ping.

On Mon, Feb 8, 2010 at 13:44, Hui Zhu <teawater@gmail.com> wrote:
> Hi Anthony,
>
> I make a patch for it.
>
> Please help me test it.
>
> Thanks,
> Hui
>
> 2010-02-08  Hui Zhu  <teawater@gmail.com>
>
>        * target.c (init_dummy_target): Add to_stopped_by_watchpoint.
> ---
>  target.c |    1 +
>  1 file changed, 1 insertion(+)
>
> --- a/target.c
> +++ b/target.c
> @@ -2836,6 +2836,7 @@ init_dummy_target (void)
>   dummy_target.to_has_stack = (int (*) (struct target_ops *)) return_zero;
>   dummy_target.to_has_registers = (int (*) (struct target_ops *)) return_zero;
>   dummy_target.to_has_execution = (int (*) (struct target_ops *)) return_zero;
> +  dummy_target.to_stopped_by_watchpoint = return_zero;
>   dummy_target.to_magic = OPS_MAGIC;
>  }
>


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
                   ` (3 preceding siblings ...)
  2010-02-20  5:56 ` teawater at gmail dot com
@ 2010-02-22 13:04 ` pedro at codesourcery dot com
  2010-02-22 16:47 ` teawater at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pedro at codesourcery dot com @ 2010-02-22 13:04 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2010-02-22 13:04 -------
Subject: Re:  SEGV during reverse debugging w/ record target 
 =?iso-8859-1?q?=09over?= simulator

On Saturday 20 February 2010 05:55:57, Hui Zhu wrote:
> Ping.
> 
> On Mon, Feb 8, 2010 at 13:44, Hui Zhu <teawater@gmail.com> wrote:
> > Hi Anthony,
> >
> > I make a patch for it.
> >
> > Please help me test it.
> >
> > Thanks,
> > Hui
> >
> > 2010-02-08  Hui Zhu  <teawater@gmail.com>
> >
> >        * target.c (init_dummy_target): Add to_stopped_by_watchpoint.
> > ---
> >  target.c |    1 +
> >  1 file changed, 1 insertion(+)
> >
> > --- a/target.c
> > +++ b/target.c
> > @@ -2836,6 +2836,7 @@ init_dummy_target (void)
> >   dummy_target.to_has_stack = (int (*) (struct target_ops *)) return_zero;
> >   dummy_target.to_has_registers = (int (*) (struct target_ops *)) return_zero;
> >   dummy_target.to_has_execution = (int (*) (struct target_ops *)) return_zero;
> > +  dummy_target.to_stopped_by_watchpoint = return_zero;
> >   dummy_target.to_magic = OPS_MAGIC;
> >  }
> >
> 

Does this actually fix the problem?  How?



-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
                   ` (4 preceding siblings ...)
  2010-02-22 13:04 ` pedro at codesourcery dot com
@ 2010-02-22 16:47 ` teawater at gmail dot com
  2010-02-25 21:44 ` green at moxielogic dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: teawater at gmail dot com @ 2010-02-22 16:47 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From teawater at gmail dot com  2010-02-22 16:47 -------
Patch wait Green's test.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
                   ` (5 preceding siblings ...)
  2010-02-22 16:47 ` teawater at gmail dot com
@ 2010-02-25 21:44 ` green at moxielogic dot com
  2010-02-26  3:26 ` teawater at gmail dot com
  2010-03-11  9:25 ` teawater at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: green at moxielogic dot com @ 2010-02-25 21:44 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From green at moxielogic dot com  2010-02-25 21:44 -------
(In reply to comment #3)
> Subject: Re:  SEGV during reverse debugging w/ record target 
> 	over simulator
> 
> Hi Anthony,
> 
> I make a patch for it.
> 
> Please help me test it.
> 

This patch appears to fix the problem.

Thanks!

AG


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
                   ` (6 preceding siblings ...)
  2010-02-25 21:44 ` green at moxielogic dot com
@ 2010-02-26  3:26 ` teawater at gmail dot com
  2010-03-11  9:25 ` teawater at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: teawater at gmail dot com @ 2010-02-26  3:26 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From teawater at gmail dot com  2010-02-26 03:26 -------
Wait review.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug gdb/11253] SEGV during reverse debugging w/ record target over simulator
  2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
                   ` (7 preceding siblings ...)
  2010-02-26  3:26 ` teawater at gmail dot com
@ 2010-03-11  9:25 ` teawater at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: teawater at gmail dot com @ 2010-03-11  9:25 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From teawater at gmail dot com  2010-03-11 09:24 -------
Fixed in cvs-head.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=11253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2010-03-11  9:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-05  2:37 [Bug gdb/11253] New: SEGV during reverse debugging w/ record target over simulator green at moxielogic dot com
2010-02-05  6:41 ` [Bug gdb/11253] " teawater at gmail dot com
2010-02-05 13:03 ` green at moxielogic dot com
2010-02-08  5:45 ` teawater at gmail dot com
2010-02-20  5:56 ` teawater at gmail dot com
2010-02-22 13:04 ` pedro at codesourcery dot com
2010-02-22 16:47 ` teawater at gmail dot com
2010-02-25 21:44 ` green at moxielogic dot com
2010-02-26  3:26 ` teawater at gmail dot com
2010-03-11  9:25 ` teawater at gmail dot com

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).