This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [vxworks 13/14] Add tdep files for x86 and powerpc.


> From: Joel Brobecker <brobecker@adacore.com>
> Date: Sun, 25 Apr 2010 11:47:26 -0400
> 
> 2010-04-24  Joel Brobecker  <brobecker@adacore.com>
> 
>         * 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 <http://www.gnu.org/licenses/>.  */
> +
> +#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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]