I think you run these commands inside Docker container. GDB calls the physical CPU directly, this maybe the root cause.
I tested with --privileged when create Docker container, it works well. On Wed, Jul 15, 2015 at 11:37 PM, James Peach <[email protected]> wrote: > > > On Jul 15, 2015, at 6:31 AM, Guangya Liu <[email protected]> wrote: > > > > Hi Mesos dev: > > > > I'm now trying to use gdb-mesos-master.sh to debug mesos master but found > > that I cannot hit my break point, can someone help to see if there are > > something wrong with my steps? > > > > The following are my steps: > > > > *1) Start gdb-mesos-master.sh* > > root@devstack007:/home/gyliu/src/mesos/m1/mesos/build# > > ./bin/gdb-mesos-master.sh --ip=9.111.242.143 --work_dir=/var/lib/mesos > > --log_dir=/root/mesos-log > > GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 > > Copyright (C) 2014 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-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 > > /home/gyliu/src/mesos/m1/mesos/build/src/.libs/lt-mesos-master...done. > > *2) Set break point* > > (gdb) b master.cpp:2498 > > No source file named master.cpp. > > Make breakpoint pending on future shared library load? (y or [n]) n > > I'd bet that you don't have enough debug information for GDB to figure > things out. Make sure to add "-ggdb3" to CFLAGS and CXXFLAGS when you build > Mesos. If you are making an RPM build, I've found that letting rpmbuild > generate a debuginfo package works really well with gdb. > > > (gdb) dir /home/gyliu/src/mesos/m1/mesos/src/master/ > > Source directories searched: > > /home/gyliu/src/mesos/m1/mesos/src/master:$cdir:$cwd > > (gdb) b Master::accept > > Function "Master::accept" not defined. > > Make breakpoint pending on future shared library load? (y or [n]) y > > Breakpoint 1 (Master::accept) pending. > > (gdb) i b > > Num Type Disp Enb Address What > > 1 breakpoint keep y <PENDING> Master::accept > > (gdb) b master.cpp:2498 > > No source file named master.cpp. > > Make breakpoint pending on future shared library load? (y or [n]) y > > Breakpoint 2 (master.cpp:2498) pending. > > *3) Start mesos master* > > (gdb) r > > Starting program: > > /home/gyliu/src/mesos/m1/mesos/build/src/.libs/lt-mesos-master > > --ip=9.111.242.143 --work_dir=/var/lib/mesos --log_dir=/root/mesos-log > > Traceback (most recent call last): > > File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++. > > so.6.0.19-gdb.py", line 63, in <module> > > from libstdcxx.v6.printers import register_libstdcxx_printers > > > > > > > > > > *4) Start up mesos slave in another console* > > > > *5) Start up python test framework, the code for mesos master did not > stop > > at my break point* > > Thanks, > > > > Guangya > >
