This is the mail archive of the gdb-patches@sources.redhat.com 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]

gdbarch.sh -- sh vs bash


gdbarch.sh used to have the line:

    #!/usr/local/bin/bash -u

but it was recently changed to:

    #!/bin/sh -u

Unfortunately, sh doesn't currently work for this script.

Using /bin/sh (on Solaris 7 anyway), does not produce any errors but
generates a gdbarch.h which is significantly different than that
produced by bash -- in particular, if you make no changes to the
script and regenerate the gdbarch.? files, the sh generated copy of
gdbarch.h (possibly gdbarch.c as well -- I didn't check) has code
like:

    /* Number of bits in a float for the target machine. */

    extern float_bit gdbarch_8 * sizeof (float) (struct gdbarch *gdbarch);
    extern void set_gdbarch_8 * sizeof (float) (struct gdbarch *gdbarch, float_bit 8 * sizeof (float));
    #if GDB_MULTI_ARCH
    #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (int)
    #define int (gdbarch_8 * sizeof (float) (current_gdbarch))
    #endif
    #endif

which results in most of gdb not compiling...

So, either bash needs to be used to regenerate the files or the
differences between bash and sh need to be investigated...

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