[vlc-devel] [PATCH 2/2] Print(Color)Msg: display 32bits ID

Rafaël Carré funman at videolan.org
Mon Nov 18 19:45:02 CET 2013


Le 18/11/2013 19:05, Rémi Denis-Courmont a écrit :
> Le lundi 18 novembre 2013, 18:58:03 Rafaël Carré a écrit :
>> Use simple CRC to have a unique 32bits ID even with x86_64 pointers
> 
> And when running a debugger, we get the object pointers how?

I never typed a pointer from the console into gdb, I use breakpoints to
get the object pointers.

>> ---
>>  src/misc/messages.c | 31 +++++++++++++++++++++++++++----
>>  1 file changed, 27 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/misc/messages.c b/src/misc/messages.c
>> index 4272f1d..4f3b30b 100644
>> --- a/src/misc/messages.c
>> +++ b/src/misc/messages.c
>> @@ -204,8 +204,29 @@ static const char msg_type[4][9] = { "", " error", "
>> warning", " debug" }; #define GRAY    "\033[0m"
>>  static const char msg_color[4][8] = { WHITE, RED, YELLOW, GRAY };
>>
>> -/* Display size of a pointer */
>> -static const int ptr_width = 2 * /* hex digits */ sizeof(uintptr_t);
>> +/*
>> + * crc_octets() was lamely copied from rfc 2440
>> + * Copyright (C) The Internet Society (1998).  All Rights Reserved.
> 
> AFAIK, copyright on code from old RFCs is (L)GPL-icompatible.


   Copyright (C) The Internet Society (1998).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.



More information about the vlc-devel mailing list