Re: ping: [testsuite patch] for: [PATCH] [PR corefiles/17808] i386: Fix internal error when prstatus in core file is too big

Pedro Alves
2015-02-05T09:47:55Z

On 02/05/2015 08:37 AM, Jan Kratochvil wrote:
> Hi,
>

Thanks for the test case.

> now when the fix is checked-in even the testcase could be.
>
> OK for check-in?

It's not obvious to me why is the file uuencoded. What's the
reason for that? I can think of a reason, but I don't want to
guess.

> +# Wrongly built GDB complains by:
> +# "..." is not a core dump: File format not recognized
> +# As the provided test core has 64bit PRSTATUS i386 built GDB cannot parse it.
> +# This is just a problem of the test care, real-world elf64-i386 file will have
> +# 32bit PRSTATUS. One cannot prepare elf64-i386 core file from elf32-i386 by
> +# objcopy as it corrupts the core file beyond all recognition.
> +# "\r\nCore was generated by `\[^\r\n\]*'\\.\r\nProgram terminated with signal 11, Segmentation fault\\.\r\n.*"

Hmm, this line is commented out, but there's no explanation of why
that is. Is that a left over that was intended to be used in the
gdb_test below? As is, it seems like the gdb_test below will PASS
even on buggy GDB?

> +gdb_test "core-file ${corefile}" ".*" "core-file"
> +
> +gdb_test "x/i $address" "\r\n\[ \t\]*$address:\[ \t\]*hlt\[ \t\]*" ".text is readable"

Thanks,
Pedro Alves