From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27730 invoked by alias); 5 Aug 2003 12:40:10 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27721 invoked from network); 5 Aug 2003 12:40:07 -0000 Received: from unknown (HELO lakemtao02.cox.net) (68.1.17.243) by sources.redhat.com with SMTP; 5 Aug 2003 12:40:07 -0000 Received: from white ([68.9.191.65]) by lakemtao02.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030805124007.RYRQ24359.lakemtao02.cox.net@white>; Tue, 5 Aug 2003 08:40:07 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 19k16g-0004cI-00; Tue, 05 Aug 2003 08:40:02 -0400 Date: Tue, 05 Aug 2003 12:40:00 -0000 From: Bob Rossi To: Andrew Cagney Cc: gdb@sources.redhat.com Subject: Re: -data-disassemble segmetation fault Message-ID: <20030805124002.GA17726@white> Mail-Followup-To: Andrew Cagney , gdb@sources.redhat.com References: <20030730023918.GA6057@white> <3F27DA0D.9020904@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F27DA0D.9020904@redhat.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2003-08/txt/msg00060.txt.bz2 Hi, I haven't added the PR yet because I plan on trying to fix the bug when I get some time. Should I add the PR first, and then fix the bug if I get time? Also, I didn't know if you realized that the file I sent in called 'basics.c' is not the same file as the one in the gdb testsuite directory. This is probably why I found the crash, it does look as if basics.c in the testsuite is tested well. Thanks, Bob Rossi On Wed, Jul 30, 2003 at 10:45:33AM -0400, Andrew Cagney wrote: > >Hi, > > > >I tried using the -data-disassemble command on the attached file. > >I ran this command, > >-data-disassemble -f basic.c -l 25 -n -1 -- 1 > >and gdb segfaulted. > > > >I am concerned that the MI code is being presented as an alternative > >interface to GDB, but it is mainly untested when it comes to building > >a practical application on top of it. Either that, or I just found the > >needle in the haystack crash, since it was the first or second command I > >ran. > > Given that a quick glance at GDBs testsuite reveals that it is trying > all the following combinations: > > 111-data-disassemble -s $pc -e "$pc + 12" -- 0 > 222-data-disassemble -f basics.c -l 32 -- 0 > 002-data-disassemble -f basics.c -l 21 -- 1 > 003-data-disassemble -s $pc -e "$pc+4" -- 1 > 123-data-disassemble -f foo -l abc -n 0 -- 0 > 321-data-disassemble -s foo -e bar -- 0 > 456-data-disassemble -s $pc -f basics.c -- 0 > 789-data-disassemble -f basics.c -l 32 -- 9 > 222-data-disassemble -f basics.c -l 32 -n 20 -- 0 > 222-data-disassemble -f basics.c -l 32 -n 0 -- 0 > 222-data-disassemble -f basics.c -l 32 -n 50 -- 0 > 222-data-disassemble -f basics.c -l 32 -n 20 -- 1 > 222-data-disassemble -f basics.c -l 32 -n 0 -- 1 > 222-data-disassemble -f basics.c -l 32 -n 50 -- 1 > 111-data-disassemble -s $pc -e "$pc + 12" -- 0 > 222-data-disassemble -f basics.c -l 32 -- 0 > 002-data-disassemble -f basics.c -l 21 -- 1 > 003-data-disassemble -s $pc -e "$pc+4" -- 1 > 123-data-disassemble -f foo -l abc -n 0 -- 0 > 321-data-disassemble -s foo -e bar -- 0 > 456-data-disassemble -s $pc -f basics.c -- 0 > 789-data-disassemble -f basics.c -l 32 -- 9 > 222-data-disassemble -f basics.c -l 32 -n 20 -- 0 > 222-data-disassemble -f basics.c -l 32 -n 0 -- 0 > 222-data-disassemble -f basics.c -l 32 -n 50 -- 0 > 222-data-disassemble -f basics.c -l 32 -n 20 -- 1 > 222-data-disassemble -f basics.c -l 32 -n 0 -- 1 > 222-data-disassemble -f basics.c -l 32 -n 50 -- 1 > > I'd assume that you've tickled an edge case. > > >Please let me know if I am doing anything wrong. > > > >I have attached the file that reproduced the crash ( basic.c ), and I also > >attached a backtrace. I was running a gdb out of cvs, freshly updated > >tonight ( 07/29/2003 ). > > Can you turn this into a bug report (transcript of what lead to the > sigseg) and an addition gdb to the testsuite. That way it can be > added to the repository. Of course, if you've also got a patch. > > Andrew >