[PATCH 6/5] Only warn about malformed win32pstatus notes

Tom Tromey tom@tromey.com
Wed Aug 12 14:51:33 GMT 2020


>>>>> "Jon" == Jon Turney <jon.turney@dronecode.org.uk> writes:

Jon> 	* elf.c (elfcore_grok_win32pstatus): Warn on malformed
Jon> 	win32pstatus notes, and return TRUE so we continue rather than
Jon> 	stopping as if it was an error.

On my machine (x86-64 Fedora 32), this patch causes:

../../binutils-gdb/bfd/elf.c: In function ‘elfcore_grok_win32pstatus’:
../../binutils-gdb/bfd/elf.c:10168:12: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
10168 |   if (type > (sizeof(size_check)/sizeof(size_check[0])))
      |            ^


Changing 'type' from int to 'unsigned' makes it compile for me and seems
to be correct.

Tom


More information about the Binutils mailing list