[Crash-utility] [PATCH] Fix compile warnings
Bernhard Walle
bwalle at suse.de
Wed Jan 17 19:04:39 UTC 2007
Hello,
* Dave Anderson <anderson at redhat.com> [2007-01-17 15:48]:
>
> gdb-6.1.patch:
>
> else if (*augmentation == 'P')
> {
> /* Skip. */
> - buf += size_of_encoded_value (*buf++);
> + buf += size_of_encoded_value (*buf);
> augmentation++;
> }
>
> This patch makes me a litte nervous. I see that gdb 6.5 does this:
>
> else if (*augmentation == 'P')
> {
> /* Skip. Avoid indirection since we throw away the result. */
> gdb_byte encoding = (*buf++) & ~DW_EH_PE_indirect;
> read_encoded_value (unit, encoding, buf, &bytes_read);
> buf += bytes_read;
> augmentation++;
> }
>
> Are they equivalent?
Of course not. :) After thinking a bit I think the correct fix would
be:
buf += size_of_encoded_value(*buf);
buf++;
Do you aggree?
Attached I have some more fixes for the GDB patch (so this is no patch
for crash but should be added to gdb-6.1.patch). I saw that there's
some internal memset() with different paramter order in GDB [1], but
that's not taken in the gdb/ subdirectory because if you compile the
whole GDB with -D_FORTIFY_SOURCE=2, you get a linker (and not
compiler) warning. And the linker should know about it.
Regards,
Bernhard
[1] libiberty/memset.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash-gdb-fix-gcc-warnings.diff
Type: text/x-patch
Size: 1813 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20070117/be78c231/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20070117/be78c231/attachment.sig>
More information about the Crash-utility
mailing list