From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10625 invoked by alias); 29 Jun 2004 04:57:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10589 invoked from network); 29 Jun 2004 04:57:21 -0000 Received: from unknown (HELO smtp6.mindspring.com) (207.69.200.110) by sourceware.org with SMTP; 29 Jun 2004 04:57:21 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by smtp6.mindspring.com with esmtp (Exim 3.33 #1) id 1BfAgE-0004xX-00; Tue, 29 Jun 2004 00:57:14 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id EB38D4B104; Tue, 29 Jun 2004 00:57:14 -0400 (EDT) To: bob@brasko.net, schwab@suse.de Subject: Re: -file-list-exec-source-files Cc: eliz@gnu.org, ezannoni@redhat.com, gdb-patches@sources.redhat.com Message-Id: <20040629045714.EB38D4B104@berman.michael-chastain.com> Date: Tue, 29 Jun 2004 04:57:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-06/txt/msg00661.txt.bz2 bob> The patch below checks symtab_to_fullname's return value against NULL. bob> Even though this is the "trivial" fix, I believe it is the correct bob> patch. When I added these calls recently, I blindly changed the old call bob> to symtab_to_fullname, and the old call did not return NULL. First, I had a formatting problem with the patch. By the time I got it, the patch had no tabs, and it looked like the tabs were expanded to 4 spaces each (instead of 8 spaces). No big deal, I just applied the changes by hand. I ran this patch in my test bed and it fixed the problem for me. It also has no regressions in any other tests. As usual, my test bed is: native i686-pc-linux-gnu, red hat 8.0, gcc 2.95.3 and gcc 3.3.3, dwarf-2 and stabs+. I discovered a subtle interaction between my testbed, selftest.exp, and this bug. Unlike most people, I don't run the test suite in the build directory. My script runs the test suite in a fresh 'test' directory for each run. The 'test' directory has a fresh copy of the build/gdb/testsuite directory (which is actually just a framework), but it does not have build/gdb itself. And indeed I remove everything in the build/ tree except for the testsuite/ subtree to save space. When I make that removal, I get the crash. No removal, no crash. I think that's why symtab_to_fullname returns NULL for me. I don't have any more objfiles for gdb itself. And it happens only in selftest.exp, because selftest.exp is special. I'm not qualified to say whether this is the *right* fix but it fixes the problem for me. Michael C === 2004-06-28 Bob Rossi * symtab.c (lookup_symtab): check return value of symtab_to_fullname