Windows hosted GDB hang at breaking point

Bug #1197615 reported by Joey Ye
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Fix Released
High
Terry Guo

Bug Description

Host: Only happens on Windows
Version: 4.7
When debugging following program and break point test with Windows hosted GDB and certain version of gdbserver from 3rd party, it just hangs.

unsigned char test(unsigned char c)
{
    return (c + 2);
}

int main(void)
{
   unsigned char temp;
   temp = test(1);
   temp = test(0x50);
   temp = test(0x90);
    while(1)
    {
    }
}

Revision history for this message
Joey Ye (jinyun-ye) wrote :

From Terry:

This issue is against gcc 4.7 and gdb 7.4. At this time the dwarf info generated by gcc doesn't meet the requirement of gdb. So when gdb stops at function test, it calculated a wrong value for function argument c based on incomplete dwarf info. Then gdb calls iconv to translate argument c's immediate value into some kind of character for a better reading. Unfortunately we are using libiconv 1.11 which has bug code in function wchar_to_loop_convert, when c's value meets some conditions like too big, this function will fall into an endless while loop. From gdb user's perspective, it looks like gdb is halted at function break point.

The latest libiconv 1.14 fixed its bug. After building tool chain with 1.14, this issue disappears.

The iconv function for Linux-based tool chain comes from glibc which has its own implementation. So far no such issue for Linux-based tool chain.

Changed in gcc-arm-embedded:
importance: Undecided → High
assignee: nobody → Terry Guo (terry.guo)
milestone: none → 4.7-2014-q3-update
status: New → Fix Committed
milestone: 4.7-2014-q3-update → 4.7-2013-q3-update
Joey Ye (jinyun-ye)
Changed in gcc-arm-embedded:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.