Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with executing dsf-gdb JUnit tests
Problem with executing dsf-gdb JUnit tests [message #518509] Thu, 04 March 2010 10:24 Go to next message
sneha is currently offline sneha
Messages: 25
Registered: July 2009
Junior Member
Hi all,

I am trying to execute JUnit tests for dsf-gdb from Eclipse. However I
am getting following type of error for most of the tests:

!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2010-03-04 15:46:17.832
!MESSAGE Failed to execute MI command:
-break-insert -t main
Error message from debugger back end:
No symbol table is loaded. Use the "file" command.
!STACK 0
java.lang.Exception: No symbol table is loaded. Use the "file" command.
at
org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxT hread.processMIOutput(AbstractMIControl.java:806)
at
org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxT hread.run(AbstractMIControl.java:645)

I am performing following steps:
1. Checked out cdt-all, dsf, dsf-gdb plugins from CVS HEAD.
2. Pre-requisite of the tests is that the gdb binary should have given
names:
• gdb.6.6
• gdb.6.7
• gdb.6.8
• gdb.7.0
3. As per post from following link, test cases for gdb 6.8 are all passing.
http://old.nabble.com/DSF-GDB-JUnit-tests-td27533144.html
4. On my machine, the gdb binary is named "gdb" only. It is of 6.8 version.
5. Thus I added a link gdb.6.8 pointing to this gdb.
6. I have also included the path to this symbolic link in the PATH variable.
Some more information:
7. I am using eclipse Helios.
8. Number of tests to be executed is displayed as 136.

If anybody can provide me some pointers / guidance it would be of great
help.

Thanks and Regards,
Sneha
Re: Problem with executing dsf-gdb JUnit tests [message #518514 is a reply to message #518509] Thu, 04 March 2010 10:52 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
You can get a more profound answer in the CDT mailing list.
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Problem with executing dsf-gdb JUnit tests [message #518626 is a reply to message #518509] Thu, 04 March 2010 16:25 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc Khouzam
Messages: 275
Registered: July 2009
Senior Member
My guess is that the test binaries have not been built. Do you have anything listed under
org.eclipse.cdt.tests.dsf.gdb/data/launch/bin

The tests are built automatically using 'make'
Re: Problem with executing dsf-gdb JUnit tests [message #518863 is a reply to message #518626] Fri, 05 March 2010 10:29 Go to previous message
sneha is currently offline sneha
Messages: 25
Registered: July 2009
Junior Member
Hi,

Thanks for your inputs.
I checked the plugin. All the test binaries except MultiThread.exe is
present in the org.eclipse.cdt.tests.dsf.gdb/data/launch/bin folder.

Following is a snap shot of stack trace on Eclipse console once tracing
is enabled while executing Junit Plugin Tests in debug mode:
************************************************************ *******************************************************
============================================================ ========
Launching test application: data/launch/bin/MultiThread.exe
============================================================ ========
365,716 [MI] 1-inferior-tty-set /dev/pts/8
365,717 [MI] 1^done
365,723 [MI] (gdb)
365,929 [MI] 2source .gdbinit
365,931 [MI] &"source .gdbinit\n"
365,934 [MI] &".gdbinit: No such file or directory.\n"
365,934 [MI] 2^error,msg=".gdbinit: No such file or directory."
365,936 [MI] (gdb)
365,940 [MI] 3-gdb-set auto-solib-add on
365,941 [MI] 3^done
365,942 [MI] (gdb)
365,953 [MI] 4-environment-directory
365,954 [MI] 4^done,source-path="$cdir:$cwd"
365,954 [MI] (gdb)
365,963 [MI] 5-break-insert -t main
365,964 [MI] &"No symbol table is loaded. Use the \"file\" command.\n"
365,964 [MI] 5^error,msg="No symbol table is loaded. Use the \"file\"
command."
365,966 [MI] (gdb)
!SESSION 2010-03-05 15:32:37.402
-----------------------------------------------
eclipse.buildId=I20100129-1300
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -g -version 3 -port 43220 -testLoaderClass
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader
-loaderpluginname org.eclipse.jdt.junit4.runtime -classNames
org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.Suite_6_8 -application
org.eclipse.pde.junit.runtime.uitestapplication -product
org.eclipse.sdk.ide -g -testpluginname org.eclipse.cdt.tests.dsf.gdb
Command-line arguments: -os linux -ws gtk -arch x86_64 -consoleLog -g
-version 3 -port 43220 -testLoaderClass
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader
-loaderpluginname org.eclipse.jdt.junit4.runtime -classNames
org.eclipse.cdt.tests.dsf.gdb.tests.tests_6_8.Suite_6_8 -application
org.eclipse.pde.junit.runtime.uitestapplication -product
org.eclipse.sdk.ide -data
/users/snehaa/SystemAnalyzerWorkspaces/Task154/../junit-work space -dev
file:/users/snehaa/SystemAnalyzerWorkspaces/Task154/.metadat a/.plugins/org.eclipse.pde.core/pde-junit/dev.properties
-debug
/users/snehaa/SystemAnalyzerWorkspaces/Task154/.metadata/.pl ugins/org.eclipse.pde.core/pde-junit/.options
-os linux -ws gtk -arch x86_64 -consoleLog -g -testpluginname
org.eclipse.cdt.tests.dsf.gdb

!ENTRY org.eclipse.cdt.dsf 4 10005 2010-03-05 15:32:45.971
!MESSAGE Request for monitor: 'RequestMonitor
(org.eclipse.cdt.dsf.concurrent.RequestMonitorWithProgress@7925871f):
Status ERROR: org.eclipse.cdt.dsf.gdb code=10004 Failed to execute MI
command:
-break-insert -t main
Error message from debugger back end:
No symbol table is loaded. Use the "file" command. java.lang.Exception:
No symbol table is loaded. Use the "file" command.' resulted in an error.
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2010-03-05 15:32:45.971
!MESSAGE Failed to execute MI command:
-break-insert -t main
Error message from debugger back end:
No symbol table is loaded. Use the "file" command.
!STACK 0
java.lang.Exception: No symbol table is loaded. Use the "file" command.
at
org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxT hread.processMIOutput(AbstractMIControl.java:806)
at
org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxT hread.run(AbstractMIControl.java:645)

************************************************************ *******************************************************

This error is repeated for most of the tests.
Following setup is done for gdb:
The .gdbinit file is kept in my home directory.
PATH variable is updated with the path of gdb binary.
All other steps have been executed as mentioned in the following link
before executing JUnit tests.
http://wiki.eclipse.org/CDT/cdt-debug-dsf-gdb#Launching_the_ tests

With the above set up following are the results after executing the
JUnit tests for Test suite gdb.6.8:
Runs: 136/136 (7 Ignored)
Errors: 41
Failures:1

The JUnit view displays failure for 4 classes out of 7 from package
org.eclipse.cdt.tests.dsf.gdb.test.tests_6_8.Suite_6_8.


Following binaries are present in
org.eclipse.cdt.tests.dsf.gdb/data/launch/bin folder:
BreakpointTestApp.exe
ExpressionTestApp.exe
GDBMIGenericTestApp.exe
MemoryTestApp.exe
SpecialTestApp.exe
TracePointTestApp.exe

Thus as mentioned above, only the MultiThread.exe is not present in the
bin folder.

Any pointers will be of great help.

Thanks and Regards,
Sneha


Marc Khouzam wrote:
> My guess is that the test binaries have not been built. Do you have
> anything listed under
> org.eclipse.cdt.tests.dsf.gdb/data/launch/bin
>
> The tests are built automatically using 'make'
Previous Topic:Programatically create a project?
Next Topic:Problems with path discovery
Goto Forum:
  


Current Time: Mon Sep 15 02:06:14 GMT 2014

Powered by FUDForum. Page generated in 0.01741 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software