Friday, 15 May 2015

c++ - inheriting iostream and streambuf gives a wierd starting address msg -



c++ - inheriting iostream and streambuf gives a wierd starting address msg -

i have class logger implementes streambuf , iostream , overrides xsputn , overflow.. has been working while now...

class logger : public std::iostream, public std::streambuf { virtual std::streamsize xsputn(const char* s, std::streamsize n); virtual int overflow(char c); }

all of sudden(and suspect compilation flags..), getting start address string @ origin of each time append it, saw in gdb:

breakpoint 2, logger::xsputn (this=0x7fffffffb2d0, s=0x7fffffffae30 "0x4d927a\356\330\060\367\377\177", n=8) breakpoint 2, logger::xsputn (this=0x7fffffffb2d0, s=0x4d95cf "sending body: ", n=14)

the adress of actual body sent looks similiar append in beginning... has thought is? or how set ignore / set no t come? suspecting compilation flags such fpic

thanks

c++ linux stl iostream

No comments:

Post a Comment