Unsolved Attaching to process only shows disassembly
-
The situation:
Linux cgi build under qt. When it starts there is a delay, allowing me to attach to the process, which is started from a web form. (process user is me still).When I attach to the process only the disassembly shows. No source.
If I use dgb and attach to the pid I can list the source.
But am unable to step (Cannot find bounds of current function)If I start debugging the process with qtcreator, it shows source and steps normally.
Any ideas what is going on?
Sample code:
#include <stdio.h>
#include <unistd.h>define UNUSED(x) (void)x;
int main(int argc, char *argv[])
{
UNUSED(argc);
UNUSED(argv);
if (access("pause",0)==0)
{
int g=100;
while(g>0) // for debugging
{
sleep(1);
if(access("pause",0)!=0)
g = 0;
g--;
}
}
printf("past the pause");
return 0;
}Called from a standard webform.
<HTML>
<HEAD>
<TITLE>web cgi debug test</TITLE>
</HEAD>
<BODY>
<FORM action="http://www.testsite.com/cgi-bin/webtest" method="POST">
<INPUT type="submit" value=" web cgi debug test start Now ">
</FORM>
</BODY>
</HTML> -
Hi,
You need to setup gdb for your application which Qt Creator does for you.
-
To be clear, I want to debug under qtcreator, so I was expecting things to be set up. But I only see disassembly, so I think they are not set up.
-
@iplayfast
Did you compile under debug or release? You won't see anything in release compile. All debug symbols are removed. -
@fcarney I compile under debug for debugging it. If I just start debugging it works fine, but if I attach to a running program is shows disassembly.
-
Bug report submitted https://bugreports.qt.io/browse/QTCREATORBUG-22703