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 01/16] use the libiberty crc code


On 06/21/2013 06:24 PM, Tom Tromey wrote:
> gdb has a copy of some CRC code that also appears in libiberty.
> This patch just removes the local copy.

No exactly the same, as libiberty's pre-computes the table, but,
yeah.

> You may notice that "crc32" returns unsigned long but "xcrc32" returns
> unsigned int.  However, this does not matter, because crc32 actually
> does all its operations in unsigned int type, and only the return
> result is widened.  So, the difference does not matter.
> 
> 	* remote.c (crc32_table, crc32): Remove.
> 	(remote_verify_memory): Use xcrc32.

That's fine.

(gdbserver also has it's own copy in server.c (and for that one
the return type does matter), but we don't use
libiberty-the-kitchen-sink there...  Oh well.)

Thanks,
-- 
Pedro Alves


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