From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15808 invoked by alias); 27 Jan 2004 08:16:07 -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 15800 invoked from network); 27 Jan 2004 08:16:07 -0000 Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173) by sources.redhat.com with SMTP; 27 Jan 2004 08:16:07 -0000 Received: from [207.232.27.5] (helo=WST0054) by monty-python.gnu.org with asmtp (Exim 4.24) id 1AlO3y-0001wf-Tw; Tue, 27 Jan 2004 02:55:11 -0500 Date: Tue, 27 Jan 2004 08:16:00 -0000 Message-Id: From: Eli Zaretskii To: Mark Kettenis CC: gdb@sources.redhat.com In-reply-to: <200401261242.i0QCgUoB026534@elgar.kettenis.dyndns.org> (message from Mark Kettenis on Mon, 26 Jan 2004 13:42:30 +0100 (CET)) Subject: Re: [RFC] Non-executable stack on SPARC Reply-to: Eli Zaretskii References: <200401252350.i0PNoB1O021806@elgar.kettenis.dyndns.org> <200401261242.i0QCgUoB026534@elgar.kettenis.dyndns.org> X-SW-Source: 2004-01/txt/msg00314.txt.bz2 > Date: Mon, 26 Jan 2004 13:42:30 +0100 (CET) > From: Mark Kettenis > > With my patch, > or with the suggestions I made below, GDB will usually still see > SIGSEG under normal circumstances. GDB will only convert such a > signal into SIGTRAP if there's a breakpoint inserted at the point > where the inferior stopped. Where is this last condition tested to be true? The if clause where you wanted to add SIGSEGV doesn't test that, I think. > As to punting the SIGSEGV to SIGTRAP conversion to the architecture: > we could do this in target_wait() or target_wait_hook(), but that > would offload it to the target we're running on and not to the > architecture. So perhaps we need an architecture way to do such conversions. My line of thought is that it's IMHO fundamentally wrong to push target- or architecture-specific details into the application level of GDB, which is what infrun.c is. infrun.c should deal with high-level logic of handling a stopped inferior, it should not IMHO know about intricacies of specific targets.