1

I have a class logger that implementes streambuf and iostream and overrides xsputn and overflow.. This has been working for a 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 a sudden(and I suspect some compilation flags..), I am getting some start address as a string at the beginning of each time I append to it, this is what I 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 the actual body sent looks very similiar to the append I get in the beginning... anyone has any idea what it is? or how to set to ignore it / set that it does no t come? I am suspecting some compilation flags such as fPIC

Thanks

Alon
  • 1,776
  • 13
  • 31

0 Answers0