Find the answer to your Linux question:
Results 1 to 2 of 2
I'm trying to debug an application and anytime I use breakpoints to step into the code I get this problem: Code: Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Location
    Brockville, Ontario, Canada
    Posts
    74

    Funny gdb: libpthread.so.0, SIGTRAP, Trace/breakpoint trap


    I'm trying to debug an application and anytime I use breakpoints to step into the code I get this problem:
    Code:
    Program received signal SIGTRAP, Trace/breakpoint trap.
    [Switching to Thread 1270610864 (LWP 30338)]
    0x40c9e931 in __nptl_death_event () from /lib/tls/libpthread.so.0
    I use Mandrake 10.1 mostly as is. The differences I do development with are:
    • 1. I have installed a 2nd version of gcc and all it's tools (3.2.3) because I need to when compiling with Matlab.
      2. I have installed a 2nd version of QT that I develop with to be compatible with the older compiler (lbstdc++ to be specific)


    The things I did recently that potentially caused the problem are:
    • 1. I had to recompile the 2nd QT to include support for mySQL calls because I need to interface with mySQL databases
      2. Following from above, I've now started using mySQL and I can't quite remember if I was having the problem before. I THINK I was. Either way I removed the mySQL calls and the problem still happens when I step through the code

    Everything works great when I don't debug. It's as soon as I start debugging I get these errors and there's no consistency to it at all.

    Could it be that I need to use an older version of gdb that matches better with gcc 3.2.3 (the gdb website made me think older versions would be a bad idea)? Or perhaps somehow link against older libpthread versions (what package woudl this be part of)?

    Thanks in advance,

    Stu

  2. #2
    Just Joined!
    Join Date
    Apr 2005
    Location
    Brockville, Ontario, Canada
    Posts
    74

    Hallelujah DEBIAN!!

    Well, it turns out the Mathworks (makers of Matlab) acknowledge that there is a problem when calling their compiled shared libraries from Red Hat based distributions. I just finished getting my Debian distro all setup and for kicks decided to try the Matlab Compiler without bothering to install gcc-3.2.3 (supposedly this is necessary, and my Debian shipped with gcc v 3.3.5). Well, the Matlab compile worked, and when I stepped through the code NO MORE ERRORS!!!

    SWEET.... assuming I'm not jumping the gun I might actually be able to progress forward instead of spinning my wheels.

    I doubt this matters to most people, but just in case someone goes searching around here with the same problem.... here's your answer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •