From 778c379f889c1ba23684594e7a0386930f85c1f0 Mon Sep 17 00:00:00 2001 From: Oleg Krasilnikov Date: Thu, 31 Aug 2006 10:25:42 +0000 Subject: [PATCH] From: Davasam, Sunil K Sent: Monday, August 28, 2006 9:57 PM To: Treggiari, Leo; Sennikovsky, Mikhail Cc: Monteleone, Robert; Davasam, Sunil K Subject: Issue with CDT dwarf reader.. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, I found an issue with CDT dwarf reader. The method ‘read_unsigned_leb128()’ contains a bug. Due to this bug, if the control reaches to this method, it goes in infinite loop and Eclipse hangs. This bug is exposed during the Intel Compiler integration testing into Eclipse/CDT. If the user tries to expand the debug binary (built by Intel Compiler) in ‘C/C++ Projects view’, Eclipse hangs. Even though I found this problem during the Intel Compiler integration testing, I think that the problem will appear when ever the control reaches this method. According to DWARF standard, algorithm to decode an unsigned LEB128 number: result = 0; shift = 0; size = number of bits in signed integer; while(true) { byte = next byte in input; result |= (low order 7 bits of byte << shift); shift += 7; /* sign bit of byte is second high order bit (0x40) */ if (high order bit of byte == 0) break; } if ((shift