From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17746 invoked by alias); 25 Apr 2010 20:45:34 -0000 Received: (qmail 17736 invoked by uid 22791); 25 Apr 2010 20:45:33 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Apr 2010 20:45:28 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o3PKiwXo014860; Sun, 25 Apr 2010 22:44:58 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o3PKiv5G016820; Sun, 25 Apr 2010 22:44:57 +0200 (CEST) Date: Sun, 25 Apr 2010 20:45:00 -0000 Message-Id: <201004252044.o3PKiv5G016820@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <1272210447-13895-14-git-send-email-brobecker@adacore.com> (message from Joel Brobecker on Sun, 25 Apr 2010 11:47:26 -0400) Subject: Re: [vxworks 13/14] Add tdep files for x86 and powerpc. References: <1272210447-13895-1-git-send-email-brobecker@adacore.com> <1272210447-13895-14-git-send-email-brobecker@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00854.txt.bz2 > From: Joel Brobecker > Date: Sun, 25 Apr 2010 11:47:26 -0400 > > 2010-04-24 Joel Brobecker > > * defs.h (enum gdb_osabi): Add GDB_OSABI_VXWORKS. > * osabi.c (gdb_osabi_names): Add entry for GDB_OSABI_VXWORKS. > * i386-vxworks-tdep.c, rs6000-vxworks-tdep.c: New files. > > --- /dev/null > +++ b/gdb/i386-vxworks-tdep.c > @@ -0,0 +1,53 @@ > +/* Copyright (C) 2007, 2010 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#include "defs.h" > +#include "inferior.h" > +#include "osabi.h" > +#include "i386-tdep.h" > + > +static void > +i386_vxworks_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) > +{ > + /* The AT_ENTRY_POINT method is not practical on VxWorks systems, > + because there is no concept of "the" executable. Furthermore, > + memory space is shared by all processes (and thus someone > + spawning a new task using the same entry point might interfere > + with our function call). So we rely on the ON_STACK method > + instead. */ > + set_gdbarch_call_dummy_location (gdbarch, ON_STACK); > +} Ugh, that means the stack is executable then isn't it? > +static enum gdb_osabi > +i386_vxworks_osabi_sniffer (bfd * abfd) > +{ > + char *target_name = bfd_get_target (abfd); > + > + if (strstr (target_name, "vxworks") != NULL) > + return GDB_OSABI_VXWORKS; > + > + return GDB_OSABI_UNKNOWN; > +} > +void > +_initialize_vxworks_tdep (void) > +{ Can you insert a blank line between those functions? With that change, i386 bits are ok with me.