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]

Re: gdb/622: clear current breakpoint in command-list problem


The following reply was made to PR gdb/622; it has been noted by GNATS.

From: Don Howard <dhoward@redhat.com>
To: <brobecker@gnat.com>
Cc: <gdb-gnats@sources.redhat.com>, <nobody@sources.redhat.com>,
   <gdb-prs@sources.redhat.com>
Subject: Re: gdb/622: clear current breakpoint in command-list problem
Date: Thu, 1 Aug 2002 11:49:40 -0700 (PDT)

 I've made a couple attempts at fixing this.  
 See http://sources.redhat.com/ml/gdb-patches/2002-05/msg00479.html
 
 
 On 31 Jul 2002 brobecker@gnat.com wrote:
 
 > 
 > >Number:         622
 > >Category:       gdb
 > >Synopsis:       clear current breakpoint in command-list problem
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Wed Jul 31 12:18:01 PDT 2002
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Joel Brobecker
 > >Release:        unknown-1.0
 > >Organization:
 > >Environment:
 > Platform independent. Reproduced on x86-linux, and sparc-solaris.
 > GDB 2002-07-27-cvs.
 > >Description:
 > Using the program in the gdb.base/commands.exp testcase, the following
 > session shows that clearing the current breakpoint inside its commands
 > list causes a memory-corruption problem:
 > 
 >       (gdb) b factorial
 >       Breakpoint 1 at 0x8048582: file ./gdb.base/run.c, line 77.
 >       (gdb) commands
 >       Type commands for when breakpoint 1 is hit, one per line.
 >       End with a line saying just "end".
 >       >silent
 >       >printf "factorial command-list executed\n"
 >       >clear factorial
 >       >cont
 >       >end
 >       (gdb) run 1
 >       Starting program: [...]/gdb.base/commands 1
 >       factorial command-list executed
 >       warning: Invalid control type in command structure.      <<<--- (1)
 >       (gdb)
 > 
 > (1) shows that the command-list becomes corrupted, and as a consequence,
 > the execution is not resumed.  Instead, the expected output from the run
 > command is:
 > 
 >       Starting program: [...]/gdb.base/run 1
 >       factorial command-list executed
 >       1
 > 
 >       Program exited normally.
 >       (gdb)
 > >How-To-Repeat:
 > 
 > >Fix:
 > The fix consists in making a duplicate of the commands-list
 > and execute this copy. I will send a patch to gdb-patches
 > shortly.
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 
 
 -- 
 dhoward@redhat.com
 gdb engineering
 
 


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