This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb/1467: Redhat Linux/gcc/gdb/c


>Number:         1467
>Category:       gdb
>Synopsis:       Redhat Linux/gcc/gdb/c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 26 19:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Frank Wang
>Release:        GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh)
>Organization:
>Environment:
LINUX : Red Hat Enterprise Linux AS release 3 (Taroon)
GCC : 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
>Description:
Memory fault(core dumped) when setting watchpoints
>How-To-Repeat:
/*  test codes: t.c */

#include <stdio.h>
int main()
{
        int i, j, k;
        i=1;
        j=11;
        k=6;
        for( i =1; i < 15; i++)
        {
                k=k+3;
                if (i == 14) j=12;
                printf("%d  %d\n", i,k );
        }
        return 0;
}

/*
 * test process
 * gcc -g t.c
 *
 * gdb a.out -q
 * Using host libthread_db library "/lib/tls/libthread_db.so.1".
 * (gdb) b main
 * Breakpoint 1 at 0x10000470: file t1.c, line 5.
 * (gdb) r
 * Starting program: /home/xlftest/fwang/work/a.out
 *
 * Breakpoint 1, main () at t1.c:5
 * 5               i=1;
 * (gdb) watch j
 * Watchpoint 2: j
 * (gdb) c
 * Continuing.
 * Watchpoint 2: j
 *
 * Old value = -5960
 * New value = 11
 * main () at t1.c:7
 * 7               k=6;
 * (gdb) c
 * Continuing.
 * Memory fault (core dumped)
 */
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]