c++ debugging remarkably good right now

Benjamin Kosnik bkoz@redhat.com
Sun Feb 3 17:44:00 GMT 2002


Thanks a bunch to all/whoever sorted out these issues. I don't know
who did it, so this is a rather blind and scatter-shot cc, but since
you've all had to hear me moan about this forever, I thought I'd pass
along some praise as well.

Thanks again.

On x86/linux, with current src and gcc modules:

(gdb) p locale::classic()
$7 = (const locale &) @0x812b760: {
  static none = 0, 
  static ctype = 1, 
  static numeric = 2, 
  static collate = 4, 
  static time = 8, 
  static monetary = 16, 
  static messages = 32, 
  static all = 63, 
  _M_impl = 0x812b740, 
  static _S_classic = 0x812b740, 
  static _S_global = 0x812b740, 
  static _S_num_categories = 6, 
  static _S_num_facets = 28
}


Amazing! Even more complex types are rendered well:

(gdb) p fb
$2 = (enc_filebuf<wchar_t>) {
  <basic_filebuf<wchar_t,enc_char_traits<wchar_t> >> = {
    <basic_streambuf<wchar_t,enc_char_traits<wchar_t> >> = {
      _vptr.basic_streambuf<wchar_t,enc_char_traits<wchar_t> > = 0x810d208, 
      _M_buf = 0x0, 
      _M_buf_size = 0, 
      _M_buf_size_opt = 8192, 
      _M_buf_unified = false, 
      _M_in_beg = 0x0, 
      _M_in_cur = 0x0, 
      _M_in_end = 0x0, 
      _M_out_beg = 0x0, 
      _M_out_cur = 0x0, 
      _M_out_end = 0x0, 
      _M_mode = 0, 
      _M_buf_locale = {
        static none = 0, 
        static ctype = 1, 
        static numeric = 2, 
        static collate = 4, 
        static time = 8, 
        static monetary = 16, 
        static messages = 32, 
        static all = 63, 
        _M_impl = 0x812d698, 
        static _S_classic = 0x812b740, 
        static _S_global = 0x812b740, 
        static _S_num_categories = 6, 
        static _S_num_facets = 28
      }, 
      _M_buf_locale_init = true, 
      _M_pback_size = 1, 
      _M_pback = 0x0, 
      _M_pback_cur_save = 0x0, 
      _M_pback_end_save = 0x0, 
      _M_pback_init = false
    }, 
    members of basic_filebuf<wchar_t,enc_char_traits<wchar_t> >: 
    _M_file = 0x0, 
    _M_state_cur = {
      static _S_max_size = 32, 
      _M_int_enc = "UCS4", '\0' <repeats 27 times>, 
      _M_ext_enc = "UTF-8", '\0' <repeats 26 times>, 
      _M_in_desc = 0x812e380, 
      _M_out_desc = 0x81363d8, 
      _M_ext_bom = 0, 
      _M_int_bom = 0
    }, 
    _M_state_beg = {
      static _S_max_size = 32, 
      _M_int_enc = '\0' <repeats 31 times>, 
      _M_ext_enc = '\0' <repeats 31 times>, 
      _M_in_desc = 0x0, 
      _M_out_desc = 0x0, 
      _M_ext_bom = 0, 
      _M_int_bom = 0
    }, 
    _M_lock = 135449064, 
    _M_buf_allocated = false, 
    _M_last_overflowed = false
  }, <No data fields>}













More information about the Libstdc++ mailing list