trace/breakpoint trap - Unix

This is a discussion on trace/breakpoint trap - Unix ; hi, I've attached one of my program to gdb, while the program is being run, I got the following error message in gdb "Program terminated with signal 5, Trace/breakpoint trap" and the program terminated generating a core. why this has ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: trace/breakpoint trap

  1. trace/breakpoint trap

    hi,
    I've attached one of my program to gdb, while the program is being
    run, I got the following error message in gdb
    "Program terminated with signal 5, Trace/breakpoint trap" and the
    program terminated generating a core.
    why this has happened;

    thanks
    sinbad

  2. Re: trace/breakpoint trap

    sinbad writes:

    > I've attached one of my program to gdb, while the program is being
    > run, I got the following error message in gdb
    > "Program terminated with signal 5, Trace/breakpoint trap" and the
    > program terminated generating a core.


    You may wish to read this:
    http://catb.org/esr/faqs/smart-questions.html

    [I see that I already asked you to read this once, so I'll probably
    ignore any further "stupid" questions from you.]

    > why this has happened;


    There is a bug somewhere.

    Most likely there is a bug in gdb, where it sets a breakpoint,
    the process forks, and the breakpoint is not removed from the
    (untraced) child process.

    But you didn't tell us what OS you are on, whether your program
    forks, nor which version of GDB you are using, so further help is
    pretty much impossible to provide.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  3. Re: trace/breakpoint trap

    On Aug 8, 9:34*am, Paul Pluzhnikov wrote:
    > sinbad writes:
    > > I've attached one of my program to gdb, while the program is being
    > > run, I got the following error message in gdb
    > > "Program terminated with signal 5, Trace/breakpoint trap" and the
    > > program terminated generating a core.

    >
    > You may wish to read this:
    > *http://catb.org/esr/faqs/smart-questions.html
    >
    > [I see that I already asked you to read this once, so I'll probably
    > ignore any further "stupid" questions from you.]
    >
    > > why this has happened;

    >
    > There is a bug somewhere.
    >
    > Most likely there is a bug in gdb, where it sets a breakpoint,
    > the process forks, and the breakpoint is not removed from the
    > (untraced) child process.
    >
    > But you didn't tell us what OS you are on, whether your program
    > forks, nor which version of GDB you are using, so further help is
    > pretty much impossible to provide.
    >
    > Cheers,
    > --
    > In order to understand recursion you must first understand recursion.
    > Remove /-nsp/ for email.


    [Apologies for insufficient info.]

    i am using gdb 6.5 compiled for powerpc.
    i am doing remote debugging of a device running linux kernel version
    2.6 with a powerpc processor.
    my process does spawn a new thread during startup for reading messages
    from another process.

  4. Re: trace/breakpoint trap

    sinbad writes:

    > i am using gdb 6.5 compiled for powerpc.


    You could try gdb-6.8, or even gdb from latest CVS trunk -- there
    were some PPC-specific fixes recently.

    > i am doing remote debugging of a device running linux kernel version
    > 2.6 with a powerpc processor.


    You can't be debugging a (hardware) "device" with GDB.
    You could be debugging a user-level program that interacts with it,
    or a kernel driver for it.

    > my process does spawn a new thread during startup for reading messages
    > from another process.


    Try disabling all breakpoints, try different versions of gdb,
    or try posting even more detailed message to gdb@sourceware.org.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

+ Reply to Thread