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: Patch: fix gdb_gcore.sh failure in ash/dash


>> That's creative.  I assume it tests out OK with bash?
Yes, it is OK with bash.

> Anybody know how portable /dev/stdin is?  I've got no idea, but I'm a
> bit worried that it won't be portable enough.

It is important to consider the portable. But I am wondering if /dev/null
is having the same portable issue. If /dev/null is okay, then /dev/stdin should
be okay too? But I am not very sure about that. Need an expert for an advice.


> It may be simpler to remove the clever bits and use a temporary file.

/dev/stdin here cannot be replaced with a temporary file.
    gdb -batch -x tmpfile >/dev/null<<EOF
    ...
    EOF

gdb reads the input stream from the end-of-file, not from the start position.

If /dev/stdin is replaced with tmpfile, the script should be divided into
two parts:
    cat >tmpfile <<EOF
     ...
    EOF
    gdb -batch -x tmpfile >/dev/null

Looks a little bit complicated.

> I don't suppose you know which fixes the ash problem - the -batch or
the -x?

It only works with the combination of both -batch and -x.


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