From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25002 invoked by alias); 16 Jun 2004 05:02:16 -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 24995 invoked from network); 16 Jun 2004 05:02:15 -0000 Received: from unknown (HELO mclean.mail.mindspring.net) (207.69.200.57) by sourceware.org with SMTP; 16 Jun 2004 05:02:15 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by mclean.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BaSYw-0001Qd-00; Wed, 16 Jun 2004 01:02:14 -0400 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 94BCC4B104; Wed, 16 Jun 2004 01:02:13 -0400 (EDT) To: cagney@gnu.org, gdb-patches@sources.redhat.com Subject: Re: [rfa/testsuite] Extend signull to work with discriptors Message-Id: <20040616050213.94BCC4B104@berman.michael-chastain.com> Date: Wed, 16 Jun 2004 05:02:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-06/txt/msg00365.txt.bz2 Needs more work: - copyright year 2004 in signull.c - did you test it on ia64 and/or ppc? can't quite tell from your wording - this code has ISO problems. % cat ptr.c typedef long data_t; typedef long code_t (void); volatile data_t zero[10]; volatile code_t *desc = (void *) zero; % gcc-340 -Wall -S -pedantic -std=iso9899:1990 ptr.c ptr.c:4: warning: ISO C forbids qualified function types ptr.c:4: warning: ISO C forbids initialization between function pointer and `void *' What about: code_t * volatile desc = 0; But that's semantically different from what you wrote. Hmmm. I don't think it's possible in ISO C to initialize a pointer-to-code with the address of a data object. Any ideas? Michael C === 2004-06-15 Andrew Cagney * gdb.base/signull.c (bowler): Replace data_pointer with data_read and data_write cases. Add code_descriptor case. (zero, desc): New array and pointer. (data, code): Change to simple pointers. * gdb.base/signull.exp: Fix probe pattern matching a function descriptor SIGSEGV. Replace data_pointer with data_read and data_write tests.