473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Command line interpreter

I was wondering if anyone could lend a hand with the following issue...

I am testing application code (C++) that is currently built for the VxWorks
platform. When loading in the object code (ld < test.o), all global
definitions are automatically visible to the VxWorks command line interpreter,
meaning I can call my test functions in whatever order I like. So far so good.

Now I would like to port this code to Solaris. The problem is that when I
build an executable, there is normally no command line interpreter available
that sees the global code space of the executable. I would normally have to
re-compile every time I want my test code to call functions in a different order.

So the question is: Is there a public domain command line interpreter (C/C++)
available for linking into a Solaris executable, preferably that uses Bash
syntax? Or has anyone tried to link in bash itself?

Many thanks in advance for the feedback.
Jul 22 '05 #1
7 4546
Ryan wrote:
I was wondering if anyone could lend a hand with the following issue...

I am testing application code (C++) that is currently built for the VxWorks platform. When loading in the object code (ld < test.o), all global
definitions are automatically visible to the VxWorks command line interpreter, meaning I can call my test functions in whatever order I like. So far so good.
Now I would like to port this code to Solaris. The problem is that when I
build an executable, there is normally no command line interpreter available that sees the global code space of the executable. I would normally have to re-compile every time I want my test code to call functions in a different order.
So the question is: Is there a public domain command line interpreter (C/C++) available for linking into a Solaris executable, preferably that uses Bash
syntax? Or has anyone tried to link in bash itself?
A recent thread here contained links like this:

Ioannis Vranos wrote:
And a very nice simple one that I just discovered on the web:

http://home.mweb.co.za/sd/sdonovan/underc.html

I really like it:

UnderC C++ Interpreter vs 1.2.9w
Steve Donovan, 2001-2003
This program is GPL'd; see LICENCE for details

program is GPL'd; see LICENCE for details
template<class T>
inline void f(T x)
{
cout<<x<<endl;
}
;>
;;
;; f(1);
1
;>


Use http://groups.google.com to seek that thread and see a few other links.

However, why are you _manually_ testing? When I use CppUnit (or, as usual
for C++, a hand-made equivalent, such as NanoCppUnit), I do what you do on a
command line; make little experiments and verify each one's results.
However, because I use a .cpp file to store all the experiments, I can run
them over and over again. I'm just curious about your intent.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #2
Ryan wrote:

I was wondering if anyone could lend a hand with the following issue...

I am testing application code (C++) that is currently built for the
VxWorks platform. When loading in the object code (ld < test.o), all
global definitions are automatically visible to the VxWorks command line
interpreter, meaning I can call my test functions in whatever order I
like. So far so good.

Now I would like to port this code to Solaris. The problem is that when
I build an executable, there is normally no command line interpreter
available that sees the global code space of the executable. I would
normally have to re-compile every time I want my test code to call
functions in a different order.

So the question is: Is there a public domain command line interpreter
(C/C++) available for linking into a Solaris executable, preferably that
uses Bash syntax? Or has anyone tried to link in bash itself?

Many thanks in advance for the feedback.


Here are three ones:
http://home.mweb.co.za/sd/sdonovan/underc.html NEW

http://www.softintegration.com

http://root.cern.ch/root/Cint.html

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #3
> Here are three ones:


http://home.mweb.co.za/sd/sdonovan/underc.html

http://www.softintegration.com

http://root.cern.ch/root/Cint.html

However I do not know if these can do what you want.

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 22 '05 #4
Ioannis Vranos wrote:
Ryan wrote:

I was wondering if anyone could lend a hand with the following issue...

I am testing application code (C++) that is currently built for the
VxWorks platform. When loading in the object code (ld < test.o), all
global definitions are automatically visible to the VxWorks command
line interpreter, meaning I can call my test functions in whatever
order I like. So far so good.

Now I would like to port this code to Solaris. The problem is that
when I build an executable, there is normally no command line
interpreter available that sees the global code space of the
executable. I would normally have to re-compile every time I want my
test code to call functions in a different order.

So the question is: Is there a public domain command line interpreter
(C/C++) available for linking into a Solaris executable, preferably
that uses Bash syntax? Or has anyone tried to link in bash itself?

Many thanks in advance for the feedback.

How about simply running it under a debugger and call your functions
from the debugger prompt ?
Jul 22 '05 #5
Hi all,

Thanks for the quick feedback. You guys are the best.

Nils: Running the code under a debugger would essentially be a way around the
problem. However.. I was hoping to have the look-and-feel of a unix shell
environment simply be calling the executable (without the debugger). The
difference is that the "shell" would parse the solaris executable's symbol
table instead of directories in $PATH.

This is exactly what VxWorks provides when object files are loaded in.

Phlip: Using a test unit (such as CppUnit) is a good idea for regression
testing, but the project is unfortunately too complex to cover all paths with
scripts. Although my example used test.o, in reality there are hundreds of
files being parsed.

Ioannis: I will have a closer look at those links. Maybe they offer what I am
looking for.

Best regards,
Ryan

How about simply running it under a debugger and call your functions
from the debugger prompt ?

Jul 22 '05 #6
Ryan wrote:
You guys are the best.
A minority opinion!
Phlip: Using a test unit (such as CppUnit) is a good idea for regression
testing, but the project is unfortunately too complex to cover all paths with scripts. Although my example used test.o, in reality there are hundreds of files being parsed.


There are those who claim that if you write tests before writing the tested
code, and if you only add code when you can force a test to fail and require
it, your tests will snuggle up against your code and cover all its paths
with a minimal set of tests.

There are also those who claim, given a project without the benefit of such
tests, you can rapidly rewrite it, test-first, and get all those benefits.

There are _also_ those who claim, given hundreds of tests cases, you should
put them all in a lite database (XML, Excel, etc.) and write a test fixture
to traverse all of them.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #7
Ryan schrieb:
Hi all,

Thanks for the quick feedback. You guys are the best.

Nils: Running the code under a debugger would essentially be a way
around the problem. However.. I was hoping to have the look-and-feel of
a unix shell environment simply be calling the executable (without the
debugger). The difference is that the "shell" would parse the solaris
executable's symbol table instead of directories in $PATH.


under solaris you could use sun's dbx (debugger of sun studio/compiler
collection), which actually has a ksh command line interface and tons
of other useful features...
Jul 22 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: enjoylife_95135 | last post by:
Hi, I'm running RH9 on my laptop. It comes with the Python 2.2.2 RPM. Its cool because when I run the interpreter, I can use command line history. I need to upgrade, so I downloaded and...
8
by: Joe | last post by:
I'm using Python 2.4 on Windows XP SP2. I'm trying to receive a command line argument that is a newline (\n) Here is the command line to use sample.py "\n" Here is a sample.py script
2
by: Christopher Wood | last post by:
Greetings all, A quick query: as all sorts of stuff can be defined in a .pythonrc.py file or similar and called at python startup using the PYTHONSTARTUP environment variable, it's very useful...
3
by: Tuang | last post by:
I'd like to create my own mini "IDE" for working with several programming languages that provide interactive "toplevel" command line interpreters, such as Python, Ruby, Lisp, Scheme, OCaml, etc....
8
by: 4.spam | last post by:
Hello. WinXP, db2 v8.2.7 When I use UPDATE COMMAND OPTION USING <any_switchON(or OFF) it seems that this command has absolutely no effect on these switches since command LIST COMMAND...
4
by: J. Frank Parnell | last post by:
Hi there, I have a list of links which point to e.g. thescript.php?album=somePictures1 thescript.php?album=somePictures2 This list is about 3000 links. Each album may have 500 or more...
0
by: Jacob Davis | last post by:
On Apr 3, 2008, at 10:54 AM, Trent Mick wrote: Thanks, that seems to have worked. I added "/usr/local/bin" to the PATH in the preferences Environment panel in Komodo. Then in preferences I...
2
by: Peng Yu | last post by:
Hi, Perl has a command line help perldoc. I'm wondering if python has a similar help command. Thanks, Peng
3
by: V S Rawat | last post by:
Browser has its own settings, java, javascripts, addons, extensions, keyboard shortcuts, along with the problem in html coding in the php file, which all I think might interfere with seeing only...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.