This is the mail archive of the
mailing list for the GDB project.
Re: breaking on open(2) on linux
Daniel Jacobowitz <email@example.com> writes on Sun, 13 Apr 2008 00:18:33 -0400
> > Marty Leisner writes:
> > > I've used gdb for 20 years...I've found the ability to
> > > break on a system call and then backtrace very useful when
> > > reverse engineering code
> > >
> > > Now, I can't do it (not sure when I last could -- I recall its been
> > > a problem before, but I worked around it).
> > >
> > > strace shows open(2) calls...
> Glibc is not good about passing all calls to e.g. open through the
> "open" function. Many will be inlined. GDB does not support stopping
> on system calls, though I hope it will some day (someone tried to
> contribute this, but the assignment paperwork never went through and I
> can no longer reach him).
I always felt it would be useful to embed some of the capability of strace into
gdb...an "strace mode" where gdb gives strace like output until a breakpoint is
Stopping on system calls IMHO is a very useful feature....
I think I'm going to look into this...
I'm not sure why the static and the shared are acting very different (guess
its time to build glibc ;-().