How to debug the exec process in gdb?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bibek4u
    New Member
    • Sep 2007
    • 1

    How to debug the exec process in gdb?

    Hi, Im using gdb for debugging my application..
    I was able to debug child process(when fork comes) .. and in child process we have an exec call...
    So the problem is, when the control come to exec , the exec process is executing at a time...
    I could not debug the exec. process...
    So, is there any way to debug the exec process
  • pntkiran
    New Member
    • Jun 2007
    • 16

    #2
    Hi Bibek4u,
    I am not sure but You can try the strace command.

    $starce ./outputfile
    likewise your source file is tmp.cpp and output file is tmp on current directory.
    $strace ./tmp

    The output of strace command will help you.
    Cheers

    Originally posted by Bibek4u
    Hi, Im using gdb for debugging my application..
    I was able to debug child process(when fork comes) .. and in child process we have an exec call...
    So the problem is, when the control come to exec , the exec process is executing at a time...
    I could not debug the exec. process...
    So, is there any way to debug the exec process

    Comment

    Working...