Sponsored Content
Top Forums UNIX for Advanced & Expert Users “Ostream” object is not printing message on HP-UNIX for debug mode Post 55464 by heena on Monday 13th of September 2004 05:08:03 AM
Old 09-13-2004
“Ostream” object is not printing message on HP-UNIX for debug mode

The following C++ code segment is not working in debug mode build on HP-UNIX machine. It is not printing "Hello World" message on the screen. While it is working fine in release mode build.

==============================================

class KLogStreamBuf : public streambuf {
public:
...........
...........
void LogOn( ostream& l, const int ts = 1 ) {
FStreamBufsList.append( new KLogStreamBufs(l.rdbuf(), ts)); }
...........
...........
}


int main(int argc, char *argv[])
{
...........
...........

KLogStreamBuf DELogBuf1;

ostream DELog1( &DELogBuf1);

DELogBuf1.LogOn( cout);

DELog1<<"Hello World";

...........
...........
}

==============================================


For debug mode build I am using following compilation options

"/opt/aCC/bin/aCC -c -g +DA2.0N -w -AA -mt -N "


I would appreciate any help regarding it.

Regards,
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

run in debug mode

Hi, I have a question on my korn shell script. When I run without debugging turned on, I can't get the correct result. If I turn on the debug mode, like sh -x myprogram, it will give me the correct result. Can someone tell me what is going on here? Thanks, :rolleyes: (6 Replies)
Discussion started by: whatisthis
6 Replies

2. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

3. Shell Programming and Scripting

Debug mode

When I run a lengthy script in debug mode i need to capture all the steps which are executed. e.g ksh -x script.ksh + test -f /proc/mounts + /bin/ls -l /proc/21326/exe + is=ksh + test ksh = ksh + test -s /etc/ksh.kshrc + . /etc/ksh.kshrc + trap 1 2 3 + who am i + awk {print $1} +... (2 Replies)
Discussion started by: zooby
2 Replies

4. AIX

Running Installp in debug mode

Is there a way I can execute an installp command in debug mode, so that I can see whats happening when a fileset is being installed or updated? (What files are being replace etc etc). I have an installp command failing for unknown reason. (7 Replies)
Discussion started by: balaji_prk
7 Replies

5. Red Hat

ehternet in debug mode

I have a little dell running redhat server. it's getting ethernet traffic to console and /var/log/messages (up 60Mb) i can't seem to find where to turn it off! any help would be greatly appreciated. here's syslog: here's a snip from the log: Sep 28 21:34:08 zgarch_serv kernel: IN=eth0... (2 Replies)
Discussion started by: toferloafer
2 Replies

6. Programming

Compile a proc/c++ file in debug mode.

Hi, I'm using the following commands to execute a proc file, but I'm unable to debug the program. What modifications do I need to make in the command options to debug the program created. I have a proc1.pc file, using the following three steps to generate the proc1 exe. After the proc1 exe... (2 Replies)
Discussion started by: ehari
2 Replies

7. Programming

Is there any possibility of running the PHP script in a debug mode ?

Is there any possibility of running the PHP script in a debug mode ? If so, do i have to download any package? Any free downloads available? Can anyone please guide me through? Am a newbie in PHP scripting. Thanks in Advance! (1 Reply)
Discussion started by: vidhyaS
1 Replies

8. Shell Programming and Scripting

Logging perl and shell debug mode.

I have a shell program which calls a perl program. I am running the shell program with command; $ ksh -x <prog_name> Inside the shell program, I am calling perl with warnings. I want to capture the entire output as it comes on screen. The command I tried is: $ ksh -x... (1 Reply)
Discussion started by: som.nitk
1 Replies
FBB::IOStreambuf(3bobcat)					   Error handler					 FBB::IOStreambuf(3bobcat)

NAME
FBB::IOStreambuf - streambuf allowing input and output operations SYNOPSIS
#include <bobcat/iostreambuf> Linking option: -lbobcat DESCRIPTION
This class implements a specialization of the std::streambuf class, allowing input operations from and output operations to different files. It is intended to be used in combination with FBB::IOStream, thus allowing all stream-based input and output operations using the same object without the need to use seek-operations. Using an FBB::IOStream object it is, e.g., possible to construct two-way communica- tions using pipes, much like the facilities offered by sockets. If the streams that will be associated with the IOStreambuf object support seeking, then the IOStreambuf will do so to. Seeking might also be availble for a single stream (either the std::istream or the std::ostream). When the IOStreambuf object goes out of scope, its associated std::ostream object is flushed. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
std::streambuf CONSTRUCTORS
o IOStreambuf(): The default constructor results in a IOStreambuf object that cannot be immediately used. Its member open() must be called first. o IOStreambuf(std::istream &in, std::ostream &out): This constructor associates the IOStreambuf object with a std::istream and a std::ostream. All output operations will be passed on to the std::ostream, all input operations to the std::istream. The streams passed to IOStreambuf() should outlive the IOStreambuf object. De copy constructor is available as well. MEMBER FUNCTIONS
All members of std::streambuf are available, as FBB::IOStreambuf inherits from these classes. o void open(std::istream &in, std::ostream &out): This member (re)associates the IOStreambuf object with a std::istream and a std::ostream. All output operations will be passed on to the std::ostream, all input operations to the std::istream. The streams passed to IOStreambuf() should outlive the IOStreambuf object. If this member is called for an IOStreambuf object already associated with an std::ostream object, the already associated std::ostream object is flushed before setting up the new association. VIRTUAL PROTECTED MEMBER FUNCTIONS
The following std::streambuf member functions should only be called when the FBB::Streambuf object is associated with std::istream and std::ostream objects (i.e., they should not be called between the construction of a default FBB:IOStreambuf object and a subsequent call of IOStreambuf::open()): The members listed in this section implement the tasks of comparably named virtual function in the class's private interface. This sepa- rates the redefinable interface from the user-interface. The class IOStreamBuf can, in accordance with Liskov's Substitution Principle, be used as a std:streambuf; but it also offers facilities for classes deriving from IOStreamBuf. These facilities are listed here. o pos_type pSeekoff(off_type offset, std::ios::seekdir way, std::ios::openmode mode = std::ios::in | std::ios::out): With seekable streams, repositions the associated std::istream or std::ostream is repositioned to offset offset, relative to way. o pos_type pSeekpos(off_type offset, std::ios::openmode mode = std::ios::in | std::ios::out): With seekable streams, repositions the associated std::istream or std::ostream is repositioned to offset offset, relative to the beginning of the stream. o int pSync(): This member flushes the associated std::ostream object. o std::streamsize pXsputn(char const *buffer, std::streamsize n): This member inserts n characters from buffer into the associated std::ostream stream. EXAMPLE
See the example provided with process(3bobcat). FILES
bobcat/iostreambuf - defines the class interface SEE ALSO
bobcat(7), iostream(3bobcat), process(3bobcat) BUGS
None reported. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::IOStreambuf(3bobcat)
All times are GMT -4. The time now is 02:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy