I use GDB to debug a C program, but I find GDB execute some codes twice.
For example,
....
stream_t *s = stream_CommonNew( VLC_OBJECT(p_access) );
stream_sys_t *p_sys;
if( !s )
return NULL;
s->p_input = p_access->p_input;
s->psz_path = strdup( p_access->psz_path );
....
GDB Debugging,
292 stream_t *s = stream_CommonNew( VLC_OBJECT(p_access) );
Missing separate debuginfos, use: debuginfo-install dbus-libs-1.2.16-9.fc12.i686 libcap-ng-0.6.2-3.fc12.i686
(gdb) next
295 if( !s )
(gdb)
292 stream_t *s = stream_CommonNew( VLC_OBJECT(p_access) );
(gdb)
295 if( !s )
(gdb)
298 s->p_input = p_access->p_input;
(gdb)
299 s->psz_path = strdup( p_access->psz_path );
(gdb)
298 s->p_input = p_access->p_input;
(gdb)
299 s->psz_path = strdup( p_access->psz_path );
I am confused. Could you explain why?
Thanks