[PATCH] Fix PR gdb/20948: --write option to GDB causes segmentation fault

Tom Tromey tom@tromey.com
Mon Sep 17 16:14:00 GMT 2018


>>>>> "Jozef" == Jozef Lawrynowicz <jozef.l@mittosystems.com> writes:

Jozef> The PR is assigned to GDB, but the fix is to BFD, hence the
Jozef> submission to binutils mailing list instead of GDB.

Jozef> 	* gdb/testsuite/gdb.base/write_mem.exp: New test.
Jozef> 	* gdb/testsuite/gdb.base/write_mem.c: Likewise.

The ChangeLog entries have to be split into the appropriate directories.

Jozef> diff --git a/gdb/testsuite/gdb.base/write_mem.c b/gdb/testsuite/gdb.base/write_mem.c
Jozef> new file mode 100644
Jozef> index 0000000..941f172
Jozef> --- /dev/null
Jozef> +++ b/gdb/testsuite/gdb.base/write_mem.c
Jozef> @@ -0,0 +1,7 @@
Jozef> +/* Test for PR gdb/20948.  */

Both new gdb files need the GPL header.
You can copy one from some other test file.

Jozef> +if {[build_executable $testfile.exp $testfile \
Jozef> +  $srcfile [list debug nowarnings] ] == -1} {

The indentation of this line looks off to me.
I would suggest checking other examples to see how it should look.

This is ok with these things fixed.  Thank you for the patch.

Tom



More information about the Binutils mailing list