This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdbserver --attach


Hello.

I'm trying to remote debug a Linux executable from a Windows board.
On the Windows machine, I'm running MINGW gdb 6.3.

My problem is that I'm required to run gdbserver with sudo, which changes the environment somehow, and the application runs into a segmentation fault.
If however I run the application without sudo, and then attach gdbserver to the running process, things go okay.

The question is how to simulate gdbserver's behavior of stopping the process just after it has been run?
I've been thinking of pidof && kill -STOP, but it seems it doesn't work well if started right after the process.
Is there a better way?

Any help much appreciated!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]