Still have problem with missing files (warnings)
Mahmood Naderan
nt_mahmood@yahoo.com
Wed Feb 13 18:09:00 GMT 2013
Dear all,
Recently I began a discussion about some missing files reported by GDB. It has been stated that these messages are warning but still I think there is a problem with GDB. As a result, I prefer to start a new thread with all available information. Sorry for disturbing you.
1 )) The normal execution of my program looks like
$ ./run
Initializing Flexus::ComponentManager...done
Entered init_local
Flexus (C) 2006-2010 The SimFlex Project
Flexus Simics simulator - Built as CMP v1.0
1 <startup.cpp:85> {0}- Initializing Flexus.
Initializing Flexus::ComponentManager...done
....
-----------------------------------------------------------------------------------
2 )) When I want to run through gdb, the application gives a PID and wants me to attach the GDB to the PID. Like this:
$ ./run -gdb
Initializing Flexus::ComponentManager...done
Entered init_local
Flexus (C) 2006-2010 The SimFlex Project
Flexus Simics simulator - Built as CMP v1.0
Waiting for SIGCONT...
Attach gdb with the following command and 'c' from the gdb prompt:
gdb - 29349
-----------------------------------------------------------------------------------
3 )) Now I run "gdb - 29349" on another terminal and it will load all required modules. Like this:
Reading symbols from /home/mahmood/results/temp/000_000/libflexus_CMP_v9_iface_gcc.so...done.
Loaded symbols for /home/mahmood/results/temp/000_000/libflexus_CMP_v9_iface_gcc.so
0x00007ff4c3d51b7b in raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
42 ../nptl/sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.
(gdb)
-----------------------------------------------------------------------------------
4 )) At this point I will enter "continue" in the GDB prompt. However shortly after that, GDB reports a crash with the following backtrace
(gdb) continue
Continuing.
Program received signal SIGSTOP, Stopped (signal).
[Switching to Thread 0x7ff4c27f1700 (LWP 29366)]
0x00007ff4c3440303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>)
at ../sysdeps/unix/sysv/linux/poll.c:87
87 ../sysdeps/unix/sysv/linux/poll.c: No such file or directory.
(gdb) bt
#0 0x00007ff4c3440303 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>)
at ../sysdeps/unix/sysv/linux/poll.c:87
#1 0x00007ff4c3fc1c4c in ?? () from /home/mahmood/simic/amd64-linux/bin/libsimic-common.so
#2 0x00007ff4c3d49e9a in start_thread (arg=0x7ff4c27f1700) at pthread_create.c:308
#3 0x00007ff4c344bcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4 0x0000000000000000 in ?? ()
(gdb)
-----------------------------------------------------------------------------------
5 )) While GDB reports a crash, my program on the other terminal, still waits for SIGCONT (the same output as step 2).
-----------------------------------------------------------------------------------
6 )) There are two assumptions:
6-1 )) The crash is caused by my program and not GDB. This is not true, because the normal execution of my program (without GDB) shows two more lines which are
1 <startup.cpp:85> {0}- Initializing Flexus.
Initializing Flexus::ComponentManager...done
If my program has problem and causes a crash, then I shouldn't see these two lines.
6-2 )) Since the first assumption is wrong, we *should* conclude that there is a problem with GDB. I don't know any further assumption. So please let me know if there are more things that should be taken into account.
-----------------------------------------------------------------------------------
7 )) What I want to conclude is that GDB didn't send the SIGCONT to my program. The function that communicate with GDB is
extern "C" void init_local(void) {
std::cerr << "Entered init_local\n";
print_copyright();
if (getenv("WAITFORSIGCONT")) {
std::cerr << "Waiting for SIGCONT..." << std::endl;
std::cerr << "Attach gdb with the following command and 'c' from the gdb prompt:" << std::endl;
std::cerr << " gdb - " << getpid() << std::endl;
raise(SIGSTOP);
}
DBG_(Dev, ( << "Initializing Flexus." ));
Flexus::Simic::PrepareFlexus();
DBG_(Iface, ( << "Flexus Initialized." ));
}
-----------------------------------------------------------------------------------
8 )) sorry for the long message and appreciate any reply.
Regards,
Mahmood
More information about the Gdb
mailing list