From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29084 invoked by alias); 6 Aug 2003 15:35:24 -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 29077 invoked from network); 6 Aug 2003 15:35:22 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 6 Aug 2003 15:35:22 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 982E02B7F; Wed, 6 Aug 2003 11:35:13 -0400 (EDT) Message-ID: <3F312031.1080906@redhat.com> Date: Wed, 06 Aug 2003 15:35:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bob Rossi Cc: gdb@sources.redhat.com Subject: Re: -data-disassemble segmetation fault References: <20030730023918.GA6057@white> <3F27DA0D.9020904@redhat.com> <20030805124002.GA17726@white> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00076.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? If you intend posting a patch (with addition to the existing disasm tests), no skip all that. Andrew > 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 >> > >