User:Bugman/global registrations debugging
Jump to navigation
Jump to search
GDB output: Debugging of the anonymous global_registrations subsystem manager data structure.
Hardware watchpoint on watch '(anonymous namespace)::global_registrations' .
$ gdb ./simgear/structure/test_subsystems
GNU gdb (GDB) 7.12-16.1.mga6 (Mageia release 6)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./simgear/structure/test_subsystems...done.
(gdb) watch '(anonymous namespace)::global_registrations'
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
(gdb) run
Starting program: /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value = std::vector of length 0, capacity 0
New value = Cannot access memory at address 0x754000
(gdb)
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:442
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="mysub", f=..., group=SGSubsystemMgr::GENERAL, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x0000000000480089 in SGSubsystemMgr::Registrant<MySub1>::Registrant (this=0x721861 <registrant>, group=SGSubsystemMgr::GENERAL, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f1a7 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:158
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$1 = -68439
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value = Cannot access memory at address 0x754000
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:443
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="mysub", f=..., group=SGSubsystemMgr::GENERAL, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x0000000000480089 in SGSubsystemMgr::Registrant<MySub1>::Registrant (this=0x721861 <registrant>, group=SGSubsystemMgr::GENERAL, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f1a7 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:158
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$2 = 1
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 1, capacity -68439 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value =
std::vector of length 1, capacity 1 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:444
444 }
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:444
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="mysub", f=..., group=SGSubsystemMgr::GENERAL, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x0000000000480089 in SGSubsystemMgr::Registrant<MySub1>::Registrant (this=0x721861 <registrant>, group=SGSubsystemMgr::GENERAL, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f1a7 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:158
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$3 = 1
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 1, capacity 1 = {{name = "", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x0}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value = Cannot access memory at address 0x754000
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:442
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="anothersub", f=..., group=SGSubsystemMgr::FDM, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x000000000048026d in SGSubsystemMgr::Registrant<AnotherSub>::Registrant (this=0x721862 <registrant2>, group=SGSubsystemMgr::FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f1f2 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:159
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$4 = -12
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value = Cannot access memory at address 0x754000
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:443
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="anothersub", f=..., group=SGSubsystemMgr::FDM, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x000000000048026d in SGSubsystemMgr::Registrant<AnotherSub>::Registrant (this=0x721862 <registrant2>, group=SGSubsystemMgr::FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f1f2 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:159
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$5 = 2
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 2, capacity -12 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value =
std::vector of length 2, capacity 2 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:444
444 }
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:444
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="anothersub", f=..., group=SGSubsystemMgr::FDM, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x000000000048026d in SGSubsystemMgr::Registrant<AnotherSub>::Registrant (this=0x721862 <registrant2>, group=SGSubsystemMgr::FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f1f2 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:159
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$6 = 2
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 2, capacity 2 = {{name = "", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x0}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x0, _M_const_object = 0x0, _M_function_pointer = 0x0, _M_member_pointer = NULL}, _M_pod_data = '\000' <repeats 15 times>}, _M_manager = 0x0}, _M_invoker = 0x0}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value = Cannot access memory at address 0x754000
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:442
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="instruments", f=..., group=SGSubsystemMgr::FDM, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x000000000048045f in SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant (this=0x721863 <registrant4>, group=SGSubsystemMgr::FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f235 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:161
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$7 = 0
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value = Cannot access memory at address 0x754000
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:443
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="instruments", f=..., group=SGSubsystemMgr::FDM, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x000000000048045f in SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant (this=0x721863 <registrant4>, group=SGSubsystemMgr::FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f235 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:161
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$8 = 3
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 3, capacity 0 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "instruments", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4828b9 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x48287d <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value =
std::vector of length 3, capacity 4 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "instruments", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4828b9 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x48287d <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:444
444 }
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_M_emplace_back_aux<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:444
#1 0x00000000004a0acd in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:101
#2 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#3 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="instruments", f=..., group=SGSubsystemMgr::FDM, instanced=false, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#4 0x000000000048045f in SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant (this=0x721863 <registrant4>, group=SGSubsystemMgr::FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:576
#5 0x000000000047f235 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:161
#6 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#7 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#8 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#9 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$9 = 3
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 3, capacity 4 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "instruments", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4828b9 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x48287d <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value =
std::vector of length 4, capacity 4 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "instruments", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4828b9 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x48287d <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "fake-radio", instanced = true, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<ch---Type <return> to continue, or q <return> to quit---
ar const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4829f1 <std::_Function_base::_Base_manager<SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4829b5 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::POST_FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:102
102 }
(gdb) bt
#0 std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::emplace_back<(anonymous namespace)::RegisteredSubsystemData> (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/vector.tcc:102
#1 0x000000000049f9a6 in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::push_back(<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) (this=0x721940 <(anonymous namespace)::global_registrations>,
__x=<unknown type in /flightgear/src/flightgear-simgear/build_debug/simgear/structure/test_subsystems, CU 0x40b81, DIE 0x5f6f9>) at /usr/include/c++/5.5.0/bits/stl_vector.h:932
#2 0x000000000049dea5 in SGSubsystemMgr::registerSubsystem(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<SGSharedPtr<SGSubsystem> ()>, SGSubsystemMgr::GroupType, bool, double, std::initializer_list<SGSubsystemMgr::Dependency>) (name="fake-radio", f=..., group=SGSubsystemMgr::POST_FDM, instanced=true, updateInterval=0, deps=...) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:903
#3 0x000000000048064b in SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant (this=0x721864 <registrant3>, group=SGSubsystemMgr::POST_FDM, updateInterval=0, deps=...)
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.hxx:594
#4 0x000000000047f278 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:163
#5 0x000000000047f35e in _GLOBAL__sub_I_subsystem_test.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:456
#6 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#7 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#8 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$10 = 4
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value =
std::vector of length 4, capacity 4 = {{name = "mysub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 5}, _M_pod_data = "r8I\000\000\000\000\000\005\000\000\000\000\000\000"}, _M_manager = 0x48262c <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4825f0 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<MySub1>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::GENERAL, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "anothersub", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x482781 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x482745 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<AnotherSub>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "instruments", instanced = false, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4828b9 <std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x48287d <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::Registrant<InstrumentGroup>::Registrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}, {name = "fake-radio", instanced = true, functor = {<std::_Maybe_unary_or_binary_function<SGSharedPtr<SGSubsystem> >> = {<No data fields>}, <std::_Function_base> = {static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_const_object = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_function_pointer = 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x493872 <std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag)+222>, this adjustment 140737488343840}, _M_pod_data = "r8I\000\000\000\000\000 \323\377\377\377\177\000"}, _M_manager = 0x4829f1 <std::_Function_base::_Base_manager<SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}> const&, std::_Manager_operation)>}, _M_invoker = 0x4829b5 <std::_Function_handler<SGSharedPtr<SGSubsystem> (), SGSubsystemMgr::InstancedRegistrant<FakeRadioSub>::InstancedRegistrant(SGSubsystemMgr::GroupType, double, std::initializer_list<SGSubsystemMgr::Dependency>)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>}, defaultGroup = SGSubsystemMgr::POST_FDM, defaultUpdateInterval = 0, depends = std::vector of length 0, capacity 0}}
New value = Cannot access memory at address 0x0
(gdb) bt
#0 0x00000000004a1815 in std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_impl::_Vector_impl (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/stl_vector.h:87
#1 0x00000000004a0888 in std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_base (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:125
#2 0x000000000049f7ca in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::vector (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:257
#3 0x00000000004a27bb in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:880
#4 0x00000000004a282f in _GLOBAL__sub_I_subsystem_mgr.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:1030
#5 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#6 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#7 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$11 = 68459
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value = Cannot access memory at address 0x0
(gdb) bt
#0 0x00000000004a1821 in std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_impl::_Vector_impl (
this=0x721940 <(anonymous namespace)::global_registrations>) at /usr/include/c++/5.5.0/bits/stl_vector.h:87
#1 0x00000000004a0888 in std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_base (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:125
#2 0x000000000049f7ca in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::vector (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:257
#3 0x00000000004a27bb in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:880
#4 0x00000000004a282f in _GLOBAL__sub_I_subsystem_mgr.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:1030
#5 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#6 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#7 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$12 = 0
(gdb) c
Continuing.
Hardware watchpoint 1: '(anonymous namespace)::global_registrations'
Old value = std::vector of length 0, capacity 68459
New value = std::vector of length 0, capacity 0
std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_impl::_Vector_impl (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:88
88 { }
(gdb) bt
#0 std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_impl::_Vector_impl (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:88
#1 0x00000000004a0888 in std::_Vector_base<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::_Vector_base (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:125
#2 0x000000000049f7ca in std::vector<(anonymous namespace)::RegisteredSubsystemData, std::allocator<(anonymous namespace)::RegisteredSubsystemData> >::vector (this=0x721940 <(anonymous namespace)::global_registrations>)
at /usr/include/c++/5.5.0/bits/stl_vector.h:257
#3 0x00000000004a27bb in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:880
#4 0x00000000004a282f in _GLOBAL__sub_I_subsystem_mgr.cxx(void) () at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_mgr.cxx:1030
#5 0x00000000004ecd2d in __libc_csu_init (argc=argc@entry=1, argv=argv@entry=0x7fffffffd598, envp=0x7fffffffd5a8) at elf-init.c:88
#6 0x00007ffff436f58f in __libc_start_main (main=0x47f0b2 <main(int, char**)>, argc=1, argv=0x7fffffffd598, init=0x4ecce0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd588) at libc-start.c:245
#7 0x0000000000475ec9 in _start () at ../sysdeps/x86_64/start.S:118
(gdb) print global_registrations.size()
$13 = 0
(gdb) c
Continuing.
failed: anotherSub
at /flightgear/src/flightgear-simgear/simgear/structure/subsystem_test.cxx:170
[Inferior 1 (process 29067) exited with code 01]