Jump to content
OMRON Forums

gdb hangs when debugging background program capp1 on ARMv7


patdb
 Share

Recommended Posts

Description:

 

The debugger hangs and communication is lost when trying to debug a background program (such as capp1) that links to libppmac.so on ARMv7. This problem does not occur if the PMAC library is not linked (i.e. plain c or c++ code).

 

Further details:

 

The bug is not caused by the PowerPMAC IDE nor the ARM cross-compiler as it can be reproduced solely using gdb via console on the device. Moreover, the problem is not caused by a certain call to a method as it also happens if the body of capp1’s main method is completely replaced by a simple printf().

It even occurs when the breakpoint is set in line 1 which may indicate that the problem arises during the initialization phase. The breakpoint itself is reached but the system is not responding any more (communication is lost and no longer possible unless rebooted). Upon initialization of gdb a warning is displayed: “warning: Unable to find libthread_db matching inferior’s thread library, thread debugging will not be available.”

 

According to a quick Google search it appears that certain versions of gdb have problems with multithreaded libraries. Could this be the problem?

 

System: Firmware 2.2.0.37, PowerPMAC IDE 3.0.0.2

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I'd bet this is because your Capp links against the Xenomai scheduler (by default because libppmac links against the Xenomai scheduler). When the breakpoint is hit, the scheduler hangs and you get a hard watchdog.

 

Before starting gdb go into gpascii and issue "Sys.DebugMode=$AAAAAAAA". This will let the RTI thread continue to toggle the watchdog so the Xenomai scheduler doesn't hang when you hit a breakpoint.

Link to comment
Share on other sites

I issued "Sys.DebugMode=$AAAAAAAA" via gpascii and read Sys.DebugMode to confirm that the value was set correctly before starting the debugger.

Regrettably, it did not solve the problem; the symptoms are still the same.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...