Sunday, July 6th 2008, 5:01pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

maxel

Beginner

Posts: 6

Location: Lage Lippe

1

Sunday, December 30th 2007, 5:29pm

debugging Databases in Eclipse

trying to debug an application(running without eclipse) with eclipse-cdt and gdb
gets the error
"execution is suspend because of error.
gdb: unknown target exception 0xc0000135 at 0x7c974ed1
You can't do that without a process to debug."

Downsizing the code shows that the error is raised by calling "QSqlDatabase db;"

Trying to debug the "qt/example/sql/masterdetail" shows the same result.

What process is gdb looking for?
My database is psql, the example one is sqlite
  • Go to the top of the page

flowerJT

Trainee

Posts: 64

Location: Berlin, Germany

2

Sunday, December 30th 2007, 8:15pm

Try to debug your application "manually" with gdb from command line like

Source code

1
2
3
gdb appname

(gdb) run


to see if this is an eclipse isue.

Best regards.
  • Go to the top of the page

maxel

Beginner

Posts: 6

Location: Lage Lippe

3

Monday, December 31st 2007, 3:56pm

maually run gdb works fine for /Qt/4.3.3/example/sql/masterdetail and my psql-application.
  • Go to the top of the page

flowerJT

Trainee

Posts: 64

Location: Berlin, Germany

4

Monday, December 31st 2007, 5:42pm

I thought as much. So it seems to be a problem with the eclipse debugging settings. Open the "Debug Dialog" and try to change settings to MinGW settings and - if necessary - specify the path to your gdb executable.

It should look like the screener in the attachment...


Best regards
flowerJT has attached the following file:
  • screener.png (122.29 kB - 603 times downloaded - Last download: Jun 30th 2008, 9:19pm)
  • Go to the top of the page

maxel

Beginner

Posts: 6

Location: Lage Lippe

5

Tuesday, January 1st 2008, 10:31am

thanks for repling,

i have already tried same changes in the Debugger-Setting-Dialog. The result stays the same.

The needed process seems to have something to do with the call of QSqlDatabase variables. Without these calls the debugging works in Eclipse.

Unmodified Qt/examples without Database use works fine too.

the target exception and address is always 0xc0000135 at 0x7c974ed1.

Is there a way to find out what in detail is the calling code/function, or the Dll's name for the address?

there are 3 Line from the debugger.
The first one is suspended one(you can't do this without a process to debug)
The second is gdb.exe
the last one is the application itsthelf.
  • Go to the top of the page

maxel

Beginner

Posts: 6

Location: Lage Lippe

6

Sunday, February 3rd 2008, 10:31am

the error occured with starting eclipse or wascana via the trolltech's eclipse-integration-link. yousing wascana direct the gdb call is OK.
  • Go to the top of the page

7

Monday, April 14th 2008, 3:17pm

This is the same problem I'm having. The error is because your application cannot find the libraries it needs. I've tried setting the PATH everywhere that I can to no avail.

I also have started gdb manually and tried running the program. You are supposed to be able to use:

path [directory]

OR

set environment PATH=[PATH]

To modify the path for the app within gdb. You can check out what the PATH is holding by using the command "show paths". Even when I do this to set the path to point to the directory holding the Qt libraries, it fails saying that it can't find them.

I'm completely stumped. I've tried specifying the path in various ways:

c:\Qt\bin (the \'s get wiped out)
c:\\Qt\\bin (doesn't work)
c:/Qt/bin (doesn't work)

I don't really know what to do from here, haha. Anyone else run into this? I cleared PATH before starting gdb so it would be easier to track down where the libraries were. So gdb should have an empty PATH. Then once in there, I ran my app and found out what library it was looking for, and specified the path (as above). It doesn't seem to work!

Thanks for any help!

PS: After a bit more testing, the problem seems to be with setting the PATH within gdb. The problem with this is that this is the method that Eclipse attempts to use to set the PATH for your application when it launches gdb. So if this is a problem, it needs to be resolved.

This post has been edited 1 times, last edit by "tyraen" (Apr 14th 2008, 3:20pm)

  • Go to the top of the page

8

Monday, April 14th 2008, 3:34pm

Well, unless I have something wrong it seems like Eclipse starts gdb without any PATH variable (I can launch the program in Run mode, but not Debug, so Run seems to have a PATH that points to the libraries).

The reason that it was setting a PATH variable with "set environment PATH=[PATH]" was because I had told it in the Environment tab of the Debug Dialog that I wanted it to set up the PATH for the libraries.

So after I removed this from the Environment tab, I tried the "show paths" command in the Debug console, and it just printed out an empty list. I'm not sure what's going on here! I have the PATH set in Windows to point to the right places, and Eclipse will "Run" the program fine, but for some reason it erases the PATH when it is Debugging?
  • Go to the top of the page

9

Monday, April 14th 2008, 4:45pm

Well, it is sort of working now. I stopped launching Eclipse with the shortcut that the Qt integration installed. All the PATHs are just set up in my Windows env.

Now I've been having another problem, ntdll!ldrAccessResource() keeps stopping my program. I just realized that I can keep hitting "Continue" to get past it, and I actually hit a breakpoint! So that was nice. I looked at the gdb console and so that "set stop-on-solib-events 1" was there. After I checked the Debug preferences, I saw that the checkbox wasn't checked. After I chcked it, the command still showed up, so I went back and unchecked it. Now in the gdb console I get:

"set stop-on-solib-events 0"

...and a line later:

"set stop-on-solib-events 1"

Seems like a bug maybe? Unless there's another global option I'm unaware of. Is there any way to ignore solib events from a specific library (like ntdll)?

Thanks, hopefully this info helps some other frustrated person. :)
  • Go to the top of the page

sash_ko

Beginner

Posts: 1

Location: Ukraine

Occupation: Software Developer

10

Thursday, May 15th 2008, 2:00pm

Quoted

Now I've been having another problem, ntdll!ldrAccessResource() keeps stopping my program.


I had the same problem. But after I unchecked "Load shared library symbols automatically" in Debug preferences, this problem disappeared.
  • Go to the top of the page

Rate this thread