This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C++  stream

Hi,

I'm trying to link C++ code using RVDS 6.0.

On runtime during C++ initialization (__cpp_initialize_aeabi), it calls the following function:

  t._ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE _ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE

0x800d56d8: aa0103e2 .... MOV x2,x1

0x800d56dc: d2800001 .... MOV x1,#0

0x800d56e0: 17ffc7d2 .... B _ZNSoC2EPSt15basic_streambufIcSt11char_traitsIcEE ; 0x800c7628

Because x1 is set to 0. The function _ZNSoC2EPSt15basic_streambufIcSt11char_traitsIcEE will crash.

The content of the register:_ZNSoC2EPSt15basic_streambufIcSt11char_traitsIcEE

x2: std::__rw_cout_buffer 0x8011d290 Data 160 ios.o(.bss)

x0: std::__rw_indestructible_cout 0x8011d330 Data 144 ios.o(.bss)

x1 = 0

I think the reason initialization calls this function because one of the members of the class is of "string" type.

Do I need to set any option or define anything before I use "string" or streambuf?

Thanks,

-Andreas

Parents
  • Hi Andreas,

              would you be able to provide a sample code to reproduce this issue ? Which target are you compiling for ?

    Which release of ARM Compiler 6 are you using ? You can get this information by typing in the DS-5 command line:

    armclang --vsn
    

    Thanks,

    Stefano

Reply
  • Hi Andreas,

              would you be able to provide a sample code to reproduce this issue ? Which target are you compiling for ?

    Which release of ARM Compiler 6 are you using ? You can get this information by typing in the DS-5 command line:

    armclang --vsn
    

    Thanks,

    Stefano

Children
No data